nl::Weave::Profiles::DataManagement_Current::TraitDataSource

This is an abstract class.

Summary

Inheritance

Inherits from: nl::Weave::Profiles::DataManagement_Current::TraitSchemaEngine::IGetDataDelegate

Constructors and Destructors

TraitDataSource(const TraitSchemaEngine *aEngine)
~TraitDataSource()

Public attributes

mRootIsDirty
bool

Protected attributes

mManagedVersion
bool
mSchemaEngine
mVersion
uint64_t

Public functions

ClearRootDirty(void)
void
GetSchemaEngine(void) const
GetVersion(void) const
uint64_t
IsRootDirty(void) const
bool
Lock(void)
OnCustomCommand(Command *aCommand, const nl::Weave::WeaveMessageInfo *aMsgInfo, nl::Weave::PacketBuffer *aPayload, const uint64_t & aCommandType, const bool aIsExpiryTimeValid, const int64_t & aExpiryTimeMicroSecond, const bool aIsMustBeVersionValid, const uint64_t & aMustBeVersion, nl::Weave::TLV::TLVReader & aArgumentReader)
virtual void
Handler for custom command.
OnCustomCommand(Command *aCommand, const nl::Weave::WeaveMessageInfo *aMsgInfo, nl::Weave::PacketBuffer *aPayload, nl::Weave::TLV::TLVReader & aArgumentReader)
virtual void
Handler for custom command.
OnEvent(uint16_t aType, void *aInEventParam)
virtual WEAVE_ERROR
ReadData(PropertyPathHandle aHandle, uint64_t aTagToWrite, TLV::TLVWriter & aWriter)
SetDirty(PropertyPathHandle aPropertyHandle)
void
SetRootDirty(void)
void
Unlock(void)

Protected functions

GetData(PropertyPathHandle aHandle, uint64_t aTagToWrite, nl::Weave::TLV::TLVWriter & aWriter, bool & aIsNull, bool & aIsPresent) __OVERRIDE
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) __OVERRIDE=0
virtual WEAVE_ERROR
Given a path handle to a leaf node and a TLV writer, get the data from the callee.
IncrementVersion(void)
void

Public attributes

mRootIsDirty

bool mRootIsDirty

Protected attributes

mManagedVersion

bool mManagedVersion

mSchemaEngine

const TraitSchemaEngine * mSchemaEngine

mVersion

uint64_t mVersion

Public functions

ClearRootDirty

void ClearRootDirty(
  void
)

GetSchemaEngine

const TraitSchemaEngine * GetSchemaEngine(
  void
) const 

GetVersion

uint64_t GetVersion(
  void
) const 

IsRootDirty

bool IsRootDirty(
  void
) const 

Lock

WEAVE_ERROR Lock(
  void
)

OnCustomCommand

virtual void OnCustomCommand(
  Command *aCommand,
  const nl::Weave::WeaveMessageInfo *aMsgInfo,
  nl::Weave::PacketBuffer *aPayload,
  const uint64_t & aCommandType,
  const bool aIsExpiryTimeValid,
  const int64_t & aExpiryTimeMicroSecond,
  const bool aIsMustBeVersionValid,
  const uint64_t & aMustBeVersion,
  nl::Weave::TLV::TLVReader & aArgumentReader
)

Handler for custom command.

This is a virtual method. If not overridden, the default behavior is to return a status report with status code Common::kStatus_UnsupportedMessage

OnCustomCommand

virtual void OnCustomCommand(
  Command *aCommand,
  const nl::Weave::WeaveMessageInfo *aMsgInfo,
  nl::Weave::PacketBuffer *aPayload,
  nl::Weave::TLV::TLVReader & aArgumentReader
)

Handler for custom command.

This is a virtual method. If not overridden, the default behavior is to return a status report with status code Common::kStatus_UnsupportedMessage

OnEvent

virtual WEAVE_ERROR OnEvent(
  uint16_t aType,
  void *aInEventParam
)

ReadData

WEAVE_ERROR ReadData(
  PropertyPathHandle aHandle,
  uint64_t aTagToWrite,
  TLV::TLVWriter & aWriter
)

SetDirty

void SetDirty(
  PropertyPathHandle aPropertyHandle
)

SetRootDirty

void SetRootDirty(
  void
)

TraitDataSource

 TraitDataSource(
  const TraitSchemaEngine *aEngine
)

Unlock

WEAVE_ERROR Unlock(
  void
)

~TraitDataSource

virtual  ~TraitDataSource()

Protected functions

GetData

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

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
) __OVERRIDE=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.

IncrementVersion

void IncrementVersion(
  void
)