nl:: Weave:: Profiles:: DataManagement_Current:: TraitUpdatableDataSink
Summary
Inheritance
Inherits from:nl::Weave::Profiles::DataManagement_Current::TraitDataSink
nl::Weave::Profiles::DataManagement_Current::TraitSchemaEngine::IGetDataDelegate
Constructors and Destructors |
|
---|---|
TraitUpdatableDataSink(const TraitSchemaEngine *aEngine)
|
Public functions |
|
---|---|
ClearUpdated(SubscriptionClient *apSubClient, PropertyPathHandle aPropertyHandle)
|
|
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.
|
GetSubscriptionClient() __OVERRIDE
|
virtual SubscriptionClient *
|
GetUpdateEncoder() __OVERRIDE
|
virtual UpdateEncoder *
|
IsUpdatableDataSink(void) __OVERRIDE
|
virtual bool
|
Lock(SubscriptionClient *apSubClient)
|
void
|
ReadData(TraitDataHandle aTraitDataHandle, PropertyPathHandle aHandle, uint64_t aTagToWrite, TLV::TLVWriter & aWriter, PropertyPathHandle & aPropertyPathHandleOfDictItemToStartFrom)
|
|
SetSubscriptionClient(SubscriptionClient *apSubClient) __OVERRIDE
|
virtual WEAVE_ERROR
|
SetUpdateEncoder(UpdateEncoder *apEncoder) __OVERRIDE
|
virtual WEAVE_ERROR
|
SetUpdated(SubscriptionClient *apSubClient, PropertyPathHandle aPropertyHandle, bool aIsConditional)
|
Declares that the given PropertyPathHandle has local modifications.
|
Unlock(SubscriptionClient *apSubClient)
|
void
|
Public functions
ClearUpdated
WEAVE_ERROR ClearUpdated( SubscriptionClient *apSubClient, PropertyPathHandle aPropertyHandle )
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 |
|
||||||||||
Return Values |
|
GetSubscriptionClient
virtual SubscriptionClient * GetSubscriptionClient() __OVERRIDE
GetUpdateEncoder
virtual UpdateEncoder * GetUpdateEncoder() __OVERRIDE
IsUpdatableDataSink
virtual bool IsUpdatableDataSink( void ) __OVERRIDE
Lock
void Lock( SubscriptionClient *apSubClient )
ReadData
WEAVE_ERROR ReadData( TraitDataHandle aTraitDataHandle, PropertyPathHandle aHandle, uint64_t aTagToWrite, TLV::TLVWriter & aWriter, PropertyPathHandle & aPropertyPathHandleOfDictItemToStartFrom )
SetSubscriptionClient
virtual WEAVE_ERROR SetSubscriptionClient( SubscriptionClient *apSubClient ) __OVERRIDE
SetUpdateEncoder
virtual WEAVE_ERROR SetUpdateEncoder( UpdateEncoder *apEncoder ) __OVERRIDE
SetUpdated
WEAVE_ERROR SetUpdated( SubscriptionClient *apSubClient, PropertyPathHandle aPropertyHandle, bool aIsConditional )
Declares that the given PropertyPathHandle has local modifications.
The NotificationEngine will not override the handle and its descendants until the update request has been processed. The application will receive kEvent_OnUpdateComplete callbacks for this handle or for one of its ancestors with the result of the update operation. The modification can be conditional or not. Conditional data updates will be lost if the local copy of the trait instance is not in sync anymore with publisher's because it was mutated by the publisher itself or by another client. Conditional and unconditional mutations are not supported at the same time in the same trait instance.
Details | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||||
Return Values |
|
TraitUpdatableDataSink
TraitUpdatableDataSink( const TraitSchemaEngine *aEngine )
Unlock
void Unlock( SubscriptionClient *apSubClient )