nl::Weave::TLV::Utilities
Stay organized with collections
Save and categorize content based on your preferences.
This namespace includes types and utility interfaces for managing and working with Weave TLV.
Summary
Typedefs |
|
---|---|
IterateHandler)(const TLVReader &aReader, size_t aDepth, void *aContext)
|
typedef |
Functions |
|
---|---|
Count(const TLVReader & aReader, size_t & aCount)
|
|
Count(const TLVReader & aReader, size_t & aCount, const bool aRecurse)
|
|
CountHandler(const TLVReader & aReader, size_t aDepth, void *aContext)
|
Increment the counter when iterating through the TLV data.
|
Find(const TLVReader & aReader, const uint64_t & aTag, TLVReader & aResult)
|
Search for the specified tag within the provided TLV reader.
|
Find(const TLVReader & aReader, const uint64_t & aTag, TLVReader & aResult, const bool aRecurse)
|
Search for the specified tag within the provided TLV reader, optionally descending into arrays or structures.
|
Find(const TLVReader & aReader, IterateHandler aPredicate, void *aContext, TLVReader & aResult)
|
Search for the first element matching the predicate within the TLV reader descending into arrays or structures.
|
Find(const TLVReader & aReader, IterateHandler aPredicate, void *aContext, TLVReader & aResult, const bool aRecurse)
|
Search for the first element matching the predicate within the TLV reader optionally descending into arrays or structures.
|
FindHandler(const TLVReader & aReader, size_t aDepth, void *aContext)
|
Search for the specified tag within the provided TLV reader.
|
FindPredicateHandler(const TLVReader & aReader, size_t aDepth, void *aContext)
|
|
Iterate(TLVReader & aReader, size_t aDepth, IterateHandler aHandler, void *aContext, bool aRecurse)
|
|
Iterate(const TLVReader & aReader, IterateHandler aHandler, void *aContext)
|
|
Iterate(const TLVReader & aReader, IterateHandler aHandler, void *aContext, const bool aRecurse)
|
Typedefs
IterateHandler
WEAVE_ERROR(* IterateHandler)(const TLVReader &aReader, size_t aDepth, void *aContext)
Functions
Count
WEAVE_ERROR Count( const TLVReader & aReader, size_t & aCount )
Count
WEAVE_ERROR Count( const TLVReader & aReader, size_t & aCount, const bool aRecurse )
Count the number of TLV elements within the specified TLV reader, optionally descending into arrays or structures.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
CountHandler
WEAVE_ERROR CountHandler( const TLVReader & aReader, size_t aDepth, void *aContext )
Increment the counter when iterating through the TLV data.
Details | |||||
---|---|---|---|---|---|
Parameters | |||||
Return Values |
|
Find
WEAVE_ERROR Find( const TLVReader & aReader, const uint64_t & aTag, TLVReader & aResult )
Search for the specified tag within the provided TLV reader.
Details | |||||
---|---|---|---|---|---|
Parameters | |||||
Return Values |
|
Find
WEAVE_ERROR Find( const TLVReader & aReader, const uint64_t & aTag, TLVReader & aResult, const bool aRecurse )
Search for the specified tag within the provided TLV reader, optionally descending into arrays or structures.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
Find
WEAVE_ERROR Find( const TLVReader & aReader, IterateHandler aPredicate, void *aContext, TLVReader & aResult )
Search for the first element matching the predicate within the TLV reader descending into arrays or structures.
The aPredicate is applied to each visited TLV element; the aPredicate shall return WEAVE_ERROR_MAX for the matching elements, WEAVE_NO_ERROR for non-matching elements, and any other value to terminate the search.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
Find
WEAVE_ERROR Find( const TLVReader & aReader, IterateHandler aPredicate, void *aContext, TLVReader & aResult, const bool aRecurse )
Search for the first element matching the predicate within the TLV reader optionally descending into arrays or structures.
The aPredicate is applied to each visited TLV element; the aPredicate shall return WEAVE_ERROR_MAX for the matching elements, WEAVE_NO_ERROR for non-matching elements, and any other value to terminate the search.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||
Return Values |
|
FindHandler
WEAVE_ERROR FindHandler( const TLVReader & aReader, size_t aDepth, void *aContext )
Search for the specified tag within the provided TLV reader.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters | |||||||
Return Values |
|
FindPredicateHandler
WEAVE_ERROR FindPredicateHandler( const TLVReader & aReader, size_t aDepth, void *aContext )
Iterate
WEAVE_ERROR Iterate( TLVReader & aReader, size_t aDepth, IterateHandler aHandler, void *aContext, bool aRecurse )
Iterate through the TLV data referenced by aReader and invoke aHandler for each visited TLV element in the context of aContext.
The iteration is aborted if aHandler returns anything other than WEAVE_NO_ERROR
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||
Return Values |
|
Iterate
WEAVE_ERROR Iterate( const TLVReader & aReader, IterateHandler aHandler, void *aContext )
Iterate through the TLV data referenced by aReader and invoke aHandler for each visited TLV element in the context of aContext.
The iteration is aborted if aHandler returns anything other than WEAVE_NO_ERROR
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters | |||||||
Return Values |
|
Iterate
WEAVE_ERROR Iterate( const TLVReader & aReader, IterateHandler aHandler, void *aContext, const bool aRecurse )
Iterate through the TLV data referenced by aReader and invoke aHandler for each visited TLV element in the context of aContext.
The iteration is aborted if aHandler returns anything other than WEAVE_NO_ERROR
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|