class NotifyRequestBuilder
Defined at line 159 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/NotificationEngine.h
This provides a helper class to compose notifies and abstract away the construction and structure of the message from
its consumers. This is a more compact version of a similar class provided in MessageDef.cpp that aims to be sensitive
to the flash and ram needs of the device.
Public Methods
WEAVE_ERROR Init (PacketBuffer * aBuf, TLV::TLVWriter * aWriter, SubscriptionHandler * aSubHandler, uint32_t aMaxPayloadSize)
Initializes the builder. Should only be called once.
WEAVE_ERROR StartNotifyRequest ()
Start the construction of the notify.
WEAVE_ERROR EndNotifyRequest ()
End the construction of the notify.
WEAVE_ERROR StartDataList ()
Starts the construction of the data list array.
WEAVE_ERROR EndDataList ()
End the construction of the data list array.
WEAVE_ERROR StartEventList ()
Starts the construction of the event list.
WEAVE_ERROR EndEventList ()
End the construction of the event list.
WEAVE_ERROR WriteDataElement (TraitDataHandle aTraitDataHandle, PropertyPathHandle aPropertyPathHandle, SchemaVersion aSchemaVersion, PropertyPathHandle * aMergeDataHandleSet, uint32_t aNumMergeDataHandles, PropertyPathHandle * aDeleteHandleSet, uint32_t aNumDeleteHandles)
Given a trait path, write out the data element associated with that path. The caller can also optionally pass in a handle
set allows for leveraging the merge operation with a narrower set of immediate child nodes of the parent property path
handle.
WEAVE_ERROR Checkpoint (TLV::TLVWriter & aPoint)
Checkpoint the request state into a TLVWriter
Parameters
TLV::TLVWriter * GetWriter ()
Defined at line 257 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/NotificationEngine.h
WEAVE_ERROR Rollback (TLV::TLVWriter & aPoint)
Rollback the request state into the checkpointed TLVWriter
Parameters
WEAVE_ERROR MoveToState (NotifyRequestBuilderState aDesiredState)
The main state transition function. The function takes the desired state (i.e., the phase of the notify request builder
that we would like to reach), and transitions the request into that state. If the desired state is the same as the
current state, the function does nothing. Otherwise, an PacketBuffer is allocated (if needed); the function first
transitions the request into the toplevel notify request (either opening the notify request TLV structure, or closing the
current TLV data container as needed), and then transitions the Notify request either by opening the appropriate TLV data
container or by closing the overarching Notify request.