mFrame
載入中...
搜尋中...
無符合項目
ufm::sys::Svchost 類別 參考文件

系統服務主機 更多...

#include <Svchost.h>

類別ufm::sys::Svchost的繼承圖:
ufm::lang::Object ufm::func::Runnable ufm::lang::Interface

公開方法(Public Methods)

virtual ~Svchost (void) override
 釋放Svchost對象資源的解構子
 
virtual void run (void) override
 執行方法
 
SvchostsetServiceDelay (int value)
 設定服務執行時間週期,預設10ms執行一次
 
int getServiceDelay (void)
 獲取當前設定的服務延遲時間
 
void stop (void)
 停止服務主機執行
 
bool execute (ufm::func::Runnable &task)
 在服務主機中執行使用者事件
 
bool flush (void)
 Flushes this stream by writing any buffered output to the underlying stream.
 
uint64 microseconds (void) const
 取得當前時間(微秒,64位)
 
uint32 seconds (void) const
 取得當前時間(微秒,64位)
 
- 公開方法(Public Methods) 繼承自 ufm::lang::Object
void * operator new (size_t n)
 使用運算子 new 分配記憶體
 
void * operator new (size_t n, void *p)
 在指定記憶體上調用運算子 new
 
virtual ufm::lang::ObjectgetObject (void) override
 取得對應的 Object 物件
 
void delay (int milliseconds) const
 延遲指定的毫秒數進行執行緒等待
 
bool equals (Object *object) const
 判斷與另一物件是否為相同參照(指標型態比較)
 
bool equals (Object &object) const
 判斷與另一物件是否為相同參照(參照型態比較)
 
void wait (void) const
 使當前線程等待直到被通知
 
bool wait (int timeout) const
 等待通知或超時
 
bool yield (void) const
 讓執行緒讓渡控制權給同優先權的下一個執行緒
 
int lock (void) const
 核心鎖定,鎖定期間禁止線程切換
 
int unlock (void) const
 核心解鎖
 
ufm::sys::ThreadcurrentThread (void) const
 取得當前執行緒指標
 
virtual int hashcode (void) const
 返回對象的哈希碼值。支持這種方法是為了散列表,如HashMap提供的那樣。
 
- 公開方法(Public Methods) 繼承自 ufm::lang::Interface
virtual ~Interface (void)=default
 虛擬析構函式
 

靜態公開方法(Static Public Methods)

static SvchostgetInstance (void)
 取得CoreChip的實例
 
static void instantiation (SystemProvider &provider)
 類單例實例化。
 

公開屬性

ufm::sys::SystemProvidervProvider
 
ufm::sys::Svcexec vSvcexec
 
ufm::util::Application vApplicationManager
 

詳細描述

系統服務主機

實現系統服務控制器,管理系統級服務的執行環境。 提供輸入輸出流處理、任務執行和系統控制功能。

主要功能:

  • 服務任務管理與調度
  • 系統I/O流控制
  • 使用者事件處理
  • 系統資源管理
1.0.0

建構子與解構子說明文件

◆ ~Svchost()

virtual ufm::sys::Svchost::~Svchost ( void )
overridevirtual

釋放Svchost對象資源的解構子

負責清理Svchost對象使用的所有資源,包括可能的執行緒和緩衝區等

函式成員說明文件

◆ execute()

bool ufm::sys::Svchost::execute ( ufm::func::Runnable & task)
inline

在服務主機中執行使用者事件

將使用者任務加入執行佇列,等待服務主機執行

參數
task使用者指定事件
傳回值
true 使用者事件排定成功
false 使用者事件排定失敗

◆ flush()

bool ufm::sys::Svchost::flush ( void )

Flushes this stream by writing any buffered output to the underlying stream.

傳回值
true 動作執行成功
false 動作執行失敗

◆ getInstance()

static Svchost & ufm::sys::Svchost::getInstance ( void )
inlinestatic

取得CoreChip的實例

傳回值
CoreChip&

◆ getServiceDelay()

int ufm::sys::Svchost::getServiceDelay ( void )
inline

獲取當前設定的服務延遲時間

傳回值
int 返回當前服務執行的延遲時間(毫秒)

◆ microseconds()

uint64 ufm::sys::Svchost::microseconds ( void ) const
inline

取得當前時間(微秒,64位)

傳回值
uint64 當前時間,以微秒為單位

◆ run()

virtual void ufm::sys::Svchost::run ( void )
overridevirtual

執行方法

此方法為介面核心功能,定義了執行單元的實際行為。 不接受參數也不返回結果,專注於執行預定義的操作。 作為行為抽象化的基本形式,支持命令的參數化與延遲執行。 實現類需提供具體的執行邏輯,該邏輯將在調用時被觸發。

實作 ufm::func::Runnable.

◆ seconds()

uint32 ufm::sys::Svchost::seconds ( void ) const
inline

取得當前時間(微秒,64位)

傳回值
uint64 當前時間,以微秒為單位

◆ setServiceDelay()

Svchost & ufm::sys::Svchost::setServiceDelay ( int value)
inline

設定服務執行時間週期,預設10ms執行一次

允許使用者自定義服務執行的間隔時間,以毫秒為單位

參數
value新的執行延遲時間(毫秒)
傳回值
Svchost& 返回自身引用,支持鏈式調用

◆ stop()

void ufm::sys::Svchost::stop ( void )

停止服務主機執行

終止所有服務主機相關的操作和執行緒


此類別(class) 文件是由下列檔案中產生: