nl:: Weave:: Profiles:: DataManagement_Current:: TraitDataSink
This is an abstract class.
Summary
Inheritance
Inherits from: nl::Weave::Profiles::DataManagement_Current::TraitSchemaEngine::ISetDataDelegateDirect Known Subclasses: nl::Weave::Profiles::DataManagement_Current::TraitUpdatableDataSink
Constructors and Destructors |
|
---|---|
TraitDataSink(const TraitSchemaEngine *aEngine)
|
|
~TraitDataSink()
|
Public types |
|
---|---|
ChangeFlags
|
enum |
EventType
|
enum |
OnChangeRejection)(uint16_t aRejectionStatusCode, uint64_t aVersion, void *aContext)
|
typedef |
Protected attributes |
|
---|---|
mSchemaEngine
|
const TraitSchemaEngine *
|
Public functions |
|
---|---|
ClearVersion(void)
|
void
|
GetSchemaEngine(void) const
|
const TraitSchemaEngine *
|
GetSubscriptionClient()
|
virtual SubscriptionClient *
|
GetUpdateEncoder()
|
virtual UpdateEncoder *
|
GetVersion(void) const
|
uint64_t
Retrieves the current version of the data that resides in this sink.
|
HandleUnknownLeafHandle(void)
|
Convenience function for data sinks to handle unknown leaf handles with a system level tolerance for mismatched schema as defined by TDM_DISABLE_STRICT_SCHEMA_COMPILANCE.
|
IsUpdatableDataSink(void)
|
virtual bool
|
IsVersionNewer(DataVersion & aVersion)
|
virtual bool
|
IsVersionValid(void) const
|
bool
Returns a boolean value that determines whether the version is valid.
|
OnEvent(uint16_t aType, void *aInEventParam)
|
virtual WEAVE_ERROR
|
SetSubscriptionClient(SubscriptionClient *apSubClient)
|
virtual WEAVE_ERROR
|
SetUpdateEncoder(UpdateEncoder *apEncoder)
|
virtual WEAVE_ERROR
|
StoreDataElement(PropertyPathHandle aHandle, TLV::TLVReader & aReader, uint8_t aFlags, OnChangeRejection aFunc, void *aContext, TraitDataHandle aDatahandle)
|
Given a reader that points to a data element conformant to a schema bound to this object, this method processes that data and invokes the relevant SetLeafData call below for all leaf items in the buffer.
|
Protected functions |
|
---|---|
GetLastNotifyVersion(void) const
|
uint64_t
|
RejectChange(uint16_t aRejectionStatusCode)
|
void
|
SetData(PropertyPathHandle aHandle, nl::Weave::TLV::TLVReader & aReader, bool aIsNull) __OVERRIDE
|
virtual WEAVE_ERROR
Given a path handle to a node, a TLV reader, and an indication of whether a null type was received, set the data in the callee.
|
SetLastNotifyVersion(uint64_t version)
|
void
|
SetLeafData(PropertyPathHandle aLeafHandle, nl::Weave::TLV::TLVReader & aReader) __OVERRIDE=0
|
virtual WEAVE_ERROR
Given a path handle to a leaf node and a TLV reader, set the leaf data in the callee.
|
SetVersion(uint64_t version)
|
void
|
Unions |
|
---|---|
nl:: |
Public types
ChangeFlags
ChangeFlags
EventType
EventType
OnChangeRejection
WEAVE_ERROR(* OnChangeRejection)(uint16_t aRejectionStatusCode, uint64_t aVersion, void *aContext)
Protected attributes
mSchemaEngine
const TraitSchemaEngine * mSchemaEngine
Public functions
ClearVersion
void ClearVersion( void )
GetSchemaEngine
const TraitSchemaEngine * GetSchemaEngine( void ) const
GetSubscriptionClient
virtual SubscriptionClient * GetSubscriptionClient()
GetUpdateEncoder
virtual UpdateEncoder * GetUpdateEncoder()
GetVersion
uint64_t GetVersion( void ) const
Retrieves the current version of the data that resides in this sink.
HandleUnknownLeafHandle
WEAVE_ERROR HandleUnknownLeafHandle( void )
Convenience function for data sinks to handle unknown leaf handles with a system level tolerance for mismatched schema as defined by TDM_DISABLE_STRICT_SCHEMA_COMPILANCE.
IsUpdatableDataSink
virtual bool IsUpdatableDataSink( void )
IsVersionNewer
virtual bool IsVersionNewer( DataVersion & aVersion )
IsVersionValid
bool IsVersionValid( void ) const
Returns a boolean value that determines whether the version is valid.
OnEvent
virtual WEAVE_ERROR OnEvent( uint16_t aType, void *aInEventParam )
SetSubscriptionClient
virtual WEAVE_ERROR SetSubscriptionClient( SubscriptionClient *apSubClient )
SetUpdateEncoder
virtual WEAVE_ERROR SetUpdateEncoder( UpdateEncoder *apEncoder )
StoreDataElement
WEAVE_ERROR StoreDataElement( PropertyPathHandle aHandle, TLV::TLVReader & aReader, uint8_t aFlags, OnChangeRejection aFunc, void *aContext, TraitDataHandle aDatahandle )
Given a reader that points to a data element conformant to a schema bound to this object, this method processes that data and invokes the relevant SetLeafData call below for all leaf items in the buffer.
A change rejection function can be passed in as well that will be invoked if the sink chooses to reject this data for any reason.
Details | |||||
---|---|---|---|---|---|
Return Values |
|
TraitDataSink
TraitDataSink( const TraitSchemaEngine *aEngine )
~TraitDataSink
virtual ~TraitDataSink()
Protected functions
GetLastNotifyVersion
uint64_t GetLastNotifyVersion( void ) const
RejectChange
void RejectChange( uint16_t aRejectionStatusCode )
SetData
virtual WEAVE_ERROR SetData( PropertyPathHandle aHandle, nl::Weave::TLV::TLVReader & aReader, bool aIsNull ) __OVERRIDE
Given a path handle to a node, a TLV reader, and an indication of whether a null type was received, set the data in the callee.
TDM will only call this function for handles that are nullable, optional, ephemeral, or leafs. If aHandle is a non-leaf node and is nullified, TDM will not call SetData for its children.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
SetLastNotifyVersion
void SetLastNotifyVersion( uint64_t version )
SetLeafData
virtual WEAVE_ERROR SetLeafData( PropertyPathHandle aLeafHandle, nl::Weave::TLV::TLVReader & aReader ) __OVERRIDE=0
Given a path handle to a leaf node and a TLV reader, set the leaf data in the callee.
Details | |||||
---|---|---|---|---|---|
Return Values |
|
SetVersion
void SetVersion( uint64_t version )