nl::Weave::Profiles::DataManagement_Current::TraitSchemaEngine::IGetDataDelegate

This is an abstract class.

Summary

Inheritance

Direct Known Subclasses: nl::Weave::Profiles::DataManagement_Current::TraitDataSource

Public functions

GetData(PropertyPathHandle aHandle, uint64_t aTagToWrite, nl::Weave::TLV::TLVWriter & aWriter, bool & aIsNull, bool & aIsPresent)=0
virtual WEAVE_ERROR
Given a path handle to a node, a TLV writer, and booleans indicating whether the value is null or not present, get the data from the trait source that will build a notify.
GetLeafData(PropertyPathHandle aLeafHandle, uint64_t aTagToWrite, nl::Weave::TLV::TLVWriter & aWriter)=0
virtual WEAVE_ERROR
Given a path handle to a leaf node and a TLV writer, get the data from the callee.

Public functions

GetData

virtual WEAVE_ERROR GetData(
  PropertyPathHandle aHandle,
  uint64_t aTagToWrite,
  nl::Weave::TLV::TLVWriter & aWriter,
  bool & aIsNull,
  bool & aIsPresent
)=0

Given a path handle to a node, a TLV writer, and booleans indicating whether the value is null or not present, get the data from the trait source that will build a notify.

If the path handle is not a leaf node, TDM will handle writing values to the writer (like opening containers, nullifying the struct, etc). If a non-leaf node is null or not present, TDM will not call GetData for its children.

This function will only be called for handles that are nullable, optional, ephemeral, or leafs. The expectation is that any traits with handles that have those options enabled will implement appropriate logic to populate aIsNull and aIsPresent.

Details
Parameters
[in] aHandle
The PropertyPathHandle in question.
[in] aTagToWrite
The tag to write for the aHandle.
[in,out] aWriter
The writer to write TLV elements to.
[out] aIsNull
Is aHandle nullified? If yes, TDM will write a null element. If aHandle is not a leaf, TDM will skip over its children.
[out] aIsPresent
Is aHandle present? If no and if aHandle is not a leaf, TDM will skip over the path and its children.
Return Values
WEAVE_NO_ERROR
On success.
other
Was unable to retrieve data and write it into the writer.

GetLeafData

virtual WEAVE_ERROR GetLeafData(
  PropertyPathHandle aLeafHandle,
  uint64_t aTagToWrite,
  nl::Weave::TLV::TLVWriter & aWriter
)=0

Given a path handle to a leaf node and a TLV writer, get the data from the callee.

Details
Return Values
WEAVE_NO_ERROR
On success.
other
Was unable to retrieve data and write it into the writer.