class TraitUpdatableDataSource

Defined at line 984 of file 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 resource (publisher).

Application developers are expected to subclass this to make a concrete source that apply data received from client

Public Methods

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 996 of file gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/TraitData.h

bool IsUpdatableDataSource ()

Defined at line 1085 of file gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/TraitData.h

void TraitUpdatableDataSource (const TraitSchemaEngine * aEngine)
WEAVE_ERROR StoreDataElement (PropertyPathHandle aHandle, TLV::TLVReader & aReader, uint8_t aFlags, OnChangeRejection aFunc, void * aContext)

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 updatable source chooses to reject this data

for any reason.

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

Enumerations

enum EventType
Name Value Comments
kEventDataElementBegin kEventDataSourceMax + 1

Start of a data element

kEventDataElementEnd 2

End of a data element

kEventUpdateProcessingComplete 3

Signal complete of update processing

kEventDictionaryReplaceBegin 4

Start of replacement of an entire dictionary

kEventDictionaryReplaceEnd 5

End of replacement of an entire dictionary

kEventDictionaryItemModifyBegin 6

Start of modification or addition of a dictionary item

kEventDictionaryItemModifyEnd 7

End of modification or addition of a dictionary item

kEventDictionaryItemDelete 8

Deletion of a dictionary item

kEventUpdateRequestBegin 9

Signals the start of the processing of a update request packet

kEventUpdateRequestEnd 10

Signals the end of the processing of a update request packet

kEventSubscriptionTerminated 11

Signals the termination of a subscription either due to an error, or the subscription was cancelled

kEventUpdatableDataSourceMax 12

Signals the termination of a subscription either due to an error, or the subscription was cancelled

Defined at line 1005 of file gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/TraitData.h

Records

Friends

class SubscriptionEngine