class TraitDataSink
Defined at line 577 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/TraitData.h
Base abstract class that represents a particular instance of a trait on a specific external resource (client).
Application developers are expected to subclass this to make a concrete sink that ingests data received from publishers.
It takes in a pointer to a schema that it then uses to help decipher incoming TLV data from a publisher and invoke the
relevant data setter calls to pass the data up to subclasses.
Protected Members
const TraitSchemaEngine * mSchemaEngine
Public Methods
void TraitDataSink (const TraitSchemaEngine * aEngine)
void ~TraitDataSink ()
Defined at line 581 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/TraitData.h
const TraitSchemaEngine * GetSchemaEngine ()
Defined at line 582 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/TraitData.h
uint64_t GetVersion ()
Retrieves the current version of the data that resides in this sink.
Defined at line 608 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/TraitData.h
bool IsVersionValid ()
Returns a boolean value that determines whether the version is valid.
Defined at line 612 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/TraitData.h
bool IsVersionNewer (DataVersion & aVersion)
Defined at line 614 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/TraitData.h
bool AcceptsSubscriptionlessNotifications ()
Returns a boolean value that indicates if this sink accepts
subscriptionless notifications.
Defined at line 621 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/TraitData.h
WEAVE_ERROR HandleUnknownLeafHandle ()
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.
Defined at line 629 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/TraitData.h
WEAVE_ERROR OnEvent (uint16_t aType, void * aInEventParam)
Invoked either by the base class or by an external agent (like the subscription engine) to signal the occurence of an event
(of type EventType). Sub-classes are expected to over-ride this if they desire to be made known of these events.
Defined at line 723 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/TraitData.h
SubscriptionClient * GetSubscriptionClient ()
Defined at line 733 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/TraitData.h
UpdateEncoder * GetUpdateEncoder ()
Defined at line 734 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/TraitData.h
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.
void ClearVersion ()
Subclass can invoke this to clear out their version
Protected Methods
WEAVE_ERROR SetLeafData (PropertyPathHandle aLeafHandle, nl::Weave::TLV::TLVReader & aReader)
WEAVE_ERROR SetData (PropertyPathHandle aHandle, nl::Weave::TLV::TLVReader & aReader, bool aIsNull)
Defaults to calling SetLeafData if aHandle is a leaf. DataSinks
can optionally implement this if they need to support nullable,
ephemeral, or optional properties.
TODO: make this the defacto API, moving all the logic from
SetLeafData into this function.
void RejectChange (uint16_t aRejectionStatusCode)
Subclass can invoke this if they desire to reject a particular data change
void SetAcceptsSubscriptionlessNotifications (const bool aAcceptsSublessNotifies)
Returns a boolean value that indicates if this sink accepts
subscriptionless notifications.
Defined at line 760 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/TraitData.h
uint64_t GetLastNotifyVersion ()
Defined at line 769 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/TraitData.h
void SetVersion (uint64_t version)
Set current version of the data in this sink.
void SetLastNotifyVersion (uint64_t version)
Enumerations
enum ChangeFlags
| Name | Value |
|---|---|
| kFirstElementInChange | (1 << 0) |
| kLastElementInChange | (1 << 1) |
Defined at line 586 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/TraitData.h
enum EventType
| Name | Value |
|---|---|
| kEventChangeBegin | 0 |
| kEventDataElementBegin | 1 |
| kEventDataElementEnd | 2 |
| kEventChangeEnd | 3 |
| kEventDictionaryReplaceBegin | 4 |
| kEventDictionaryReplaceEnd | 5 |
| kEventDictionaryItemModifyBegin | 6 |
| kEventDictionaryItemModifyEnd | 7 |
| kEventDictionaryItemDelete | 8 |
| kEventNotifyRequestBegin | 9 |
| kEventNotifyRequestEnd | 10 |
| kEventViewResponseBegin | 11 |
| kEventViewResponseEnd | 12 |
| kEventSubscriptionTerminated | 13 |
Defined at line 638 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/TraitData.h
Records
Friends
class TestTdm