class TimeSyncResponse

Defined at line 265 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/time/WeaveTime.h

codec for Time Sync Response message

Public Members

bool mIsTimeCoordinator
uint8_t mNumContributorInLastLocalSync
uint16_t mTimeSinceLastSyncWithServer_min
timesync_t mTimeOfRequest
timesync_t mTimeOfResponse

Public Methods

void TimeSyncResponse ()

default constructor shall be used with Decode, as all members will be initialized through decoding

void Init (const TimeSyncRole aRole, const timesync_t aTimeOfRequest, const timesync_t aTimeOfResponse, const uint8_t aNumContributorInLastLocalSync, const uint16_t aTimeSinceLastSyncWithServer_min)

initialize this object for encoding.

Parameters

aRole [in] the role this responder is playing. can be either kTimeSyncRole_Server or kTimeSyncRole_Coordinator
aTimeOfRequest [in] the system time when the original request was received
aTimeOfResponse [in] the system time when this response is being sent out
aNumContributorInLastLocalSync [in] number of nodes contributed in the last local time sync
aTimeSinceLastSyncWithServer_min [in] number of minutes passed since last sync with a Server
WEAVE_ERROR Encode (PacketBuffer *const aMsg)

encode time sync response into an PacketBuffer.

Parameters

aMsg [out] A pointer to the PacketBuffer

Returns

WEAVE_NO_ERROR on success

WEAVE_ERROR Decode (TimeSyncResponse *const aObject, PacketBuffer *const aMsg)

decode time sync response from an PacketBuffer.

Parameters

aObject [out] A pointer to the decoded object
aMsg [in] A pointer to the PacketBuffer

Returns

WEAVE_NO_ERROR on success

Enumerations

enum 
Name Value
kNumberOfContributor_Max 31

maximum number of contributors in the last successful time sync operation on local fabric

Defined at line 290 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/time/WeaveTime.h

enum 
Name Value
kTimeSinceLastSyncWithServer_Max 4094
kTimeSinceLastSyncWithServer_Invalid 4095

time, in number of minutes, since last successful time sync with some proxy of atomic time.

kTimeSinceLastSyncWithServer_Invalid means this happened too long ago to be relevant, if ever

Defined at line 297 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/time/WeaveTime.h