nl:: Weave:: Profiles:: Time:: TimeSyncResponse
摘要
建構函式和解構函式 |
|
---|---|
TimeSyncResponse(void)
預設建構函式必須與 Decode 搭配使用,因為所有成員都會透過解碼來初始化
|
公開類型 |
|
---|---|
@322
|
列舉 上次成功同步處理當地佈料的貢獻者人數上限 |
@323
|
列舉 時間 (以分鐘為單位),自上次成功與一定程度的 Proxy 時間 Proxy 同步以來, |
公開屬性 |
|
---|---|
mIsTimeCoordinator
|
bool
如果此回應是由協調器建構,則為 true;false 表示此回應是由伺服器所建構。
|
mNumContributorInLastLocalSync
|
uint8_t
上次成功同步處理時使用的本機協作者 (協調人員或伺服器) 人數
|
mTimeOfRequest
|
timesync_t
收到要求時系統時間 (自 1970/1/1 0:00:00 起的微秒次數)
|
mTimeOfResponse
|
timesync_t
系統時間 (自 1970/1/1 0:00:00 以來的系統時間 (從 1970/1/1 0:00:00 開始計算)
|
mTimeSinceLastSyncWithServer_min
|
uint16_t
時間 (以分鐘為單位),自上次成功與部分原子時間 Proxy 同步以來
|
公用函式 |
|
---|---|
Encode(PacketBuffer *const aMsg)
|
將時間同步回應編碼至 PacketBuffer。
|
Init(const TimeSyncRole aRole, const timesync_t aTimeOfRequest, const timesync_t aTimeOfResponse, const uint8_t aNumContributorInLastLocalSync, const uint16_t aTimeSinceLastSyncWithServer_min)
|
void
初始化這個物件以進行編碼。
|
公開的靜態函式 |
|
---|---|
Decode(TimeSyncResponse *const aObject, PacketBuffer *const aMsg)
|
將封包同步回應解碼為 PacketBuffer。
|
公開類型
@322
@322
上次成功同步處理當地佈料的貢獻者人數上限
@323
@323
時間 (以分鐘為單位),自上次成功與一定程度的 Proxy 時間 Proxy 同步以來,
kTimeBeginLastSyncWithServer_Invalid 表示這個問題太久以前,因此對於本質上沒有關聯 (如果有的話)
公開屬性
mIsTimeCoordinator
bool mIsTimeCoordinator
如果此回應是由協調器建構,則為 true;false 表示此回應是由伺服器所建構。
mNumContributorInLastLocalSync
uint8_t mNumContributorInLastLocalSync
上次成功同步處理時使用的本機協作者 (協調人員或伺服器) 人數
mTimeOfRequest
timesync_t mTimeOfRequest
收到要求時系統時間 (自 1970/1/1 0:00:00 起的微秒次數)
mTimeOfResponse
timesync_t mTimeOfResponse
系統時間 (自 1970/1/1 0:00:00 以來的系統時間 (從 1970/1/1 0:00:00 開始計算)
mTimeSinceLastSyncWithServer_min
uint16_t mTimeSinceLastSyncWithServer_min
時間 (以分鐘為單位),自上次成功與部分原子時間 Proxy 同步以來
公用函式
編碼
WEAVE_ERROR Encode( PacketBuffer *const aMsg )
將時間同步回應編碼至 PacketBuffer。
詳細說明 | |||
---|---|---|---|
參數 |
|
||
傳回 |
成功時:WEAVE_NO_ERROR
|
Init
void Init( const TimeSyncRole aRole, const timesync_t aTimeOfRequest, const timesync_t aTimeOfResponse, const uint8_t aNumContributorInLastLocalSync, const uint16_t aTimeSinceLastSyncWithServer_min )
初始化這個物件以進行編碼。
詳細說明 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
參數 |
|
TimeSyncResponse
TimeSyncResponse( void )
預設建構函式必須與 Decode 搭配使用,因為所有成員都會透過解碼來初始化
公開的靜態函式
Decode
WEAVE_ERROR Decode( TimeSyncResponse *const aObject, PacketBuffer *const aMsg )
將封包同步回應解碼為 PacketBuffer。
詳細說明 | |||||
---|---|---|---|---|---|
參數 |
|
||||
傳回 |
成功時:WEAVE_NO_ERROR
|