mFrame
載入中...
搜尋中...
無符合項目
mframe::sys::Svchost 類別 參考文件
類別mframe::sys::Svchost的繼承圖:
mframe::lang::Object mframe::func::Runnable mframe::io::CompletionHandler< int > mframe::sys::SystemControl mframe::lang::Interface mframe::lang::Interface mframe::lang::Interface

公開方法(Public Methods)

 Svchost (mframe::sys::SystemConfig &systemConfig)
 Construct a new Svchost object.
 
virtual void run (void) override
 執行方法。
 
virtual void completed (int &result, void *attachment) override
 Invoked when an operation has completed.
 
virtual void failed (void *attachment) override
 Invoked when an operation fails.
 
virtual void setCustomReadBuffer (mframe::lang::Readable *readable) override
 設定自訂讀取緩衝區,接管系統接收緩衝區。
 
virtual void setCustomWriteBuffer (mframe::lang::Appendable *appendable) override
 設定自訂寫入緩衝區,接管系統寫入緩衝區。
 
SvchostsetServiceDelay (int value)
 Set the Service Delay object.
 
int getServiceDelay (void)
 Get the Service Delay object.
 
bool start (mframe::func::Runnable &task, int stackSize)
 
void stop (void)
 停止執行svchost
 
bool execute (mframe::func::Runnable &task)
 執行使用者事件
 
bool action (void)
 
- 公開方法(Public Methods) 繼承自 mframe::lang::Object
 Object (void)
 Construct a new Object object.
 
virtual ~Object (void) override
 Destroy the Object object.
 
void * operator new (size_t n)
 
void * operator new (size_t n, void *p)
 
mframe::lang::ObjectgetObject (void) override
 取得類Object
 
void delay (int milliseconds) const
 函數 delay 等待內核滴答中指定的時間段。 對於1的值,系統等待直到下一個計時器滴答發生。 實際時間延遲最多可能比指定時間少一個計時器滴答聲,即在下一個系統滴答聲發生之前立即調用 osDelay(1),線程會立即重新安排。
 
bool equals (Object *object) const
 函數 delay 等待內核滴答中指定的時間段。 對於1的值,系統等待直到下一個計時器滴答發生。 實際時間延遲最多可能比指定時間少一個計時器滴答聲,即在下一個系統滴答聲發生之前立即調用 osDelay(1),線程會立即重新安排。
 
bool equals (Object &object) const
 函數 delay 等待內核滴答中指定的時間段。 對於1的值,系統等待直到下一個計時器滴答發生。 實際時間延遲最多可能比指定時間少一個計時器滴答聲,即在下一個系統滴答聲發生之前立即調用 osDelay(1),線程會立即重新安排。
 
void wait (void) const
 導致當前線程等待,直到另一個線程調用此對象的notify()方法或notifyAll()方法,或指定的時間 已過。
 
bool wait (int timeout) const
 導致當前線程等待,直到另一個線程調用此對象的 notify()方法或 notifyAll()方法,或其他一些線 程中斷當前線程,或一定量的實時時間。
 
bool yield (void) const
 函數yield()將控制權傳遞給處於READY狀態且具有相同優先級的下一個線程。 如果在READY狀態下沒有其他優先級相同的線程,則當前線程繼續執行,不會發生線程切換。
 
int lock (void) const
 核心鎖定,在調用unlock以前將不會進行執行緒切換
 
int unlock (void) const
 核心解鎖。
 
mframe::sys::ThreadcurrentThread (void) const
 取得當前的執行緒
 
virtual int hashcode (void) const
 返回對象的哈希碼值。支持這種方法是為了散列表,如HashMap提供的那樣。
 
- 公開方法(Public Methods) 繼承自 mframe::lang::Interface
virtual ~Interface (void)=default
 Destroy the struct object.
 

公開屬性

mframe::io::OutputStreammOutputStream
 
mframe::io::InputStreammInputStream
 
mframe::io::PrintBuffer mPrintBuffer
 
mframe::io::RingBuffer mRingBuffer
 

建構子與解構子說明文件

◆ Svchost()

mframe::sys::Svchost::Svchost ( mframe::sys::SystemConfig & systemConfig)

Construct a new Svchost object.

參數
systemConfig

函式成員說明文件

◆ action()

bool mframe::sys::Svchost::action ( void )
傳回值
true
false

◆ completed()

virtual void mframe::sys::Svchost::completed ( int & result,
void * attachment )
overridevirtual

Invoked when an operation has completed.

參數
resultThe result of the I/O operation.
attachmentThe object attached to the I/O operation when it was initiated.

實作 mframe::io::CompletionHandler< int >.

◆ execute()

bool mframe::sys::Svchost::execute ( mframe::func::Runnable & task)

執行使用者事件

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

◆ failed()

virtual void mframe::sys::Svchost::failed ( void * attachment)
overridevirtual

Invoked when an operation fails.

參數
attachmentThe object attached to the I/O operation when it was initiated.

實作 mframe::io::CompletionHandler< int >.

◆ getServiceDelay()

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

Get the Service Delay object.

傳回值
int

◆ run()

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

執行方法。

實作 mframe::func::Runnable.

◆ setCustomReadBuffer()

virtual void mframe::sys::Svchost::setCustomReadBuffer ( mframe::lang::Readable * readable)
overridevirtual

設定自訂讀取緩衝區,接管系統接收緩衝區。

參數
readBuffer

實作 mframe::sys::SystemControl.

◆ setCustomWriteBuffer()

virtual void mframe::sys::Svchost::setCustomWriteBuffer ( mframe::lang::Appendable * appendable)
overridevirtual

設定自訂寫入緩衝區,接管系統寫入緩衝區。

參數
writeBuffer

實作 mframe::sys::SystemControl.

◆ setServiceDelay()

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

Set the Service Delay object.

參數
value
傳回值
Svchost&

◆ start()

bool mframe::sys::Svchost::start ( mframe::func::Runnable & task,
int stackSize )
參數
task
stackSize
傳回值
true
false

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