class Parser

Defined at line 453 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/MessageDef.h

WDM Data Element parser definition

Public Methods

WEAVE_ERROR Init (const nl::Weave::TLV::TLVReader & aReader)

aReader has to be on the element of DataElement

WEAVE_ERROR CheckSchemaValidity ()

Roughly verify the schema is right, including

1) all mandatory tags are present

2) all elements have expected data type

3) any tag can only appear once

At the top level of the structure, unknown tags are ignored for foward compatibility

WEAVE_ERROR GetPath (Path::Parser *const apPath)

WEAVE_END_OF_TLV if there is no such element

WEAVE_ERROR_WRONG_TLV_TYPE if there is such element but it's not a Path

WEAVE_ERROR GetVersion (uint64_t *const apVersion)

WEAVE_END_OF_TLV if there is no such element

WEAVE_ERROR_WRONG_TLV_TYPE if there is such element but it's not any of the defined unsigned integer types

WEAVE_ERROR CheckPresence (bool *const apDataPresentFlag, bool *const apDeletePresentFlag)

on successful return, apDataPresentFlag will be TRUE if the

DataElement contains data, and GetData method may be called

without an error. apDeletePresentFlag will be set to TRUE if this

DataElement contains a DictionaryDeletedKeyList.

WEAVE_NO_ERROR if the element is properly formatted,

WEAVE_ERROR_WDM_MALFORMED_DATA_ELEMENT if the element contains

neither the data merge element nor the deleted dictionary key

list

WEAVE_ERROR GetData (nl::Weave::TLV::TLVReader *const apReader)

Data could be of any type, so we can only position the reader so the caller has

full information of tag, element type, length, and value

WEAVE_ERROR GetDeletedDictionaryKeys (nl::Weave::TLV::TLVReader *const apReader)

On success, the apReader is initialized to point to the first

element in the deleted keys list.

WEAVE_NO_ERROR on success. WEAVE_ERROR_INVALID_TLV_TAG if the

DeletedDictionaryKeyList is not present.

WEAVE_ERROR_WRONG_TLV_TYPE if the element type is not a TLV

Array

WEAVE_ERROR GetPartialChangeFlag (bool *const apPartialChangeFlag)

Default is false if there is no such element

WEAVE_ERROR_WRONG_TLV_TYPE if there is such element but it's not a boolean

WEAVE_ERROR GetReaderOnPath (nl::Weave::TLV::TLVReader *const apReader)

Protected Methods

WEAVE_ERROR ParseData (nl::Weave::TLV::TLVReader & aReader, int aDepth)

A recursively callable function to parse a data element and pretty-print it.