mFrame
載入中...
搜尋中...
無符合項目
Svchost.h
1
7#ifndef MFRAME_90F75476_6982_4BDD_B9ED_0A250FE9C324
8#define MFRAME_90F75476_6982_4BDD_B9ED_0A250FE9C324
9
10/* ***************************************************************************************
11 * Include
12 */
13
14//----------------------------------------------------------------------------------------
15
16//----------------------------------------------------------------------------------------
17#include "./../func/Runnable.h"
18#include "./../io/InputStream.h"
19#include "./../io/PrintStream.h"
20#include "./../lang/Object.h"
21#include "./../sys/Svcexec.h"
22#include "./../sys/SystemProvider.h"
23#include "./../util/Application.h"
24
25/* ***************************************************************************************
26 * Namespace
27 */
28namespace ufm::sys {
29 class Svchost;
30} // namespace ufm::sys
31
32/* ***************************************************************************************
33 * Class/struct/Struct/Enum
34 */
50 /* *************************************************************************************
51 * Variable
52 */
53 public:
54 ufm::sys::SystemProvider& vProvider;
55 ufm::sys::Svcexec vSvcexec;
56 ufm::util::Application vApplicationManager;
57
58 private:
59 int vDelay;
60 bool vStart;
61 bool vAction;
62
63 /* *************************************************************************************
64 * Abstract Method
65 */
66
67 /* *************************************************************************************
68 * Construct Method
69 */
70 private:
79
80 public:
86 virtual ~Svchost(void) override;
87
88 /* *************************************************************************************
89 * Operator Method
90 */
91
92 /* *************************************************************************************
93 * Override Method - ufm::func::Runnable
94 */
95 public:
96 virtual void run(void) override;
97
98 /* *************************************************************************************
99 * Public Method
100 */
101 public:
110 inline Svchost& setServiceDelay(int value) {
111 this->vDelay = value;
112 return *this;
113 }
114
120 inline int getServiceDelay(void) {
121 return this->vDelay;
122 }
123
129 void stop(void);
130
140 inline bool execute(ufm::func::Runnable& task) {
141 return this->vSvcexec.execute(task);
142 }
143
150 bool flush(void);
151
157 inline uint64 microseconds(void) const {
158 return this->vProvider.clock().microseconds();
159 }
160
166 inline uint32 seconds(void) const {
167 return this->vProvider.clock().seconds();
168 }
169
170 /* *************************************************************************************
171 * Protected Method
172 */
173
174 /* *************************************************************************************
175 * Private Method
176 */
177
178 /* *************************************************************************************
179 * Static Variable
180 */
181 private:
182 static Svchost* vInstance;
183
184 /* *************************************************************************************
185 * Static Method
186 */
187 public:
193 static inline Svchost& getInstance(void) {
194 return *Svchost::vInstance;
195 }
196
201 static void instantiation(SystemProvider& provider);
202};
203
204/* ***************************************************************************************
205 * End of file
206 */
207
208#endif /* MFRAME_90F75476_6982_4BDD_B9ED_0A250FE9C324 */
物件基底類別
Definition Object.h:63
Definition Svcexec.h:31
bool execute(ufm::func::Runnable &task)
在服務主機中執行使用者事件
Definition Svcexec.h:84
系統服務主機
Definition Svchost.h:49
bool flush(void)
Flushes this stream by writing any buffered output to the underlying stream.
Svchost & setServiceDelay(int value)
設定服務執行時間週期,預設10ms執行一次
Definition Svchost.h:110
virtual void run(void) override
執行方法
bool execute(ufm::func::Runnable &task)
在服務主機中執行使用者事件
Definition Svchost.h:140
void stop(void)
停止服務主機執行
virtual ~Svchost(void) override
釋放Svchost對象資源的解構子
int getServiceDelay(void)
獲取當前設定的服務延遲時間
Definition Svchost.h:120
static void instantiation(SystemProvider &provider)
類單例實例化。
static Svchost & getInstance(void)
取得CoreChip的實例
Definition Svchost.h:193
uint32 seconds(void) const
取得當前時間(微秒,64位)
Definition Svchost.h:166
uint64 microseconds(void) const
取得當前時間(微秒,64位)
Definition Svchost.h:157
應用程式管理器 管理所有應用程式實例的生命週期,包括創建、初始化、執行、停止、銷毀。 以 PArraySet 儲存並管理。
Definition Application.h:42
系統功能相關的命名空間
Definition Object.h:31
[Interface] 可執行函數式介面
Definition Runnable.h:40
virtual uint64 microseconds(void) const override
取得啟動至今的微秒數
virtual uint32 seconds(void) const override
取得啟動至今的秒數
系統資源提供者抽象介面
Definition SystemProvider.h:44
virtual ufm::lang::Clock & clock(void) override
取得系統時鐘 (Clock)