nl::Weave::Profiles::Time::TimeSyncRequest

Summary

Constructors and Destructors

TimeSyncRequest(void)
default constructor shall be used with Decode, as all members will be initialized through decoding

Public types

@320 enum
minimum and maxiumum settings for the intended likelihood of response for this time sync request.
@321 enum

Public attributes

mIsTimeCoordinator
bool
true if the originator of this request is a Time Sync Coordinator
mLikelihoodForResponse
uint8_t
intended likelihood of response for this time sync request.

Public functions

Encode(PacketBuffer *const aMsg)
encode time sync request into an PacketBuffer.
Init(const uint8_t aLikelihood, const bool aIsTimeCoordinator)
void
initialize this object for encoding.

Public static functions

Decode(TimeSyncRequest *const aObject, PacketBuffer *const aMsg)
decode time sync request from an PacketBuffer.

Public types

@320

 @320

minimum and maxiumum settings for the intended likelihood of response for this time sync request.

Note that we cannot put check on kLikelihoodForResponse_Min in the Encode and Decode routines because it's 0, so it's not safe to adjust it just at here

@321

 @321

Public attributes

mIsTimeCoordinator

bool mIsTimeCoordinator

true if the originator of this request is a Time Sync Coordinator

mLikelihoodForResponse

uint8_t mLikelihoodForResponse

intended likelihood of response for this time sync request.

Public functions

Encode

WEAVE_ERROR Encode(
  PacketBuffer *const aMsg
)

encode time sync request into an PacketBuffer.

Details
Parameters
[out] aMsg
A pointer to the PacketBuffer
Returns
WEAVE_NO_ERROR on success

Init

void Init(
  const uint8_t aLikelihood,
  const bool aIsTimeCoordinator
)

initialize this object for encoding.

Details
Parameters
[in] aLikelihood
intended likelihood of response for this time sync request
[in] aIsTimeCoordinator
true if the originator of this request is a Time Sync Coordinator
Returns
WEAVE_NO_ERROR on success

TimeSyncRequest

 TimeSyncRequest(
  void
)

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

Public static functions

Decode

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

decode time sync request from an PacketBuffer.

Details
Parameters
[out] aObject
A pointer to the decoded object
[in] aMsg
A pointer to the PacketBuffer
Returns
WEAVE_NO_ERROR on success