nl::Weave::TLV::Debug

This namespace includes types and interfaces for debugging and logging Weave TLV.

Summary

Typedefs

DumpWriter)(const char *aFormat,...) typedef
void(*

Functions

DecodeTagControl(const TLVTagControl aTagControl)
const char *
Decode a TLV tag control with a descriptive string.
DecodeType(const TLVType aType)
const char *
Decode a TLV type with a descriptive string.
Dump(const TLVReader & aReader, DumpWriter aWriter)
Dump the TLV data within the specified reader in human-readable form with the specified writer.
DumpHandler(DumpWriter aWriter, const char *aIndent, const TLVReader & aReader, size_t aDepth)
void
Dump the TLV element referenced by aReader in human-readable form using aWriter.
DumpHandler(const TLVReader & aReader, size_t aDepth, void *aContext)
Log the TLV data within the specified reader in human-readable form.
DumpIterator(DumpWriter aWriter, const TLVReader & aReader)
Log the TLV data within the specified reader in human-readable form to the specified writer.

Structs

nl::Weave::TLV::Debug::DumpContext

Typedefs

DumpWriter

void(* DumpWriter)(const char *aFormat,...)

Functions

DecodeTagControl

const char * DecodeTagControl(
  const TLVTagControl aTagControl
)

Decode a TLV tag control with a descriptive string.

Details
Parameters
[in] aTagControl
The TLV tag control to decode and for which to return a descriptive string.
Returns
A pointer to a NULL-terminated string describing the specified tag control on success; otherwise, NULL.

DecodeType

const char * DecodeType(
  const TLVType aType
)

Decode a TLV type with a descriptive string.

Details
Parameters
[in] aType
The TLV type to decode and for which to return a descriptive string.
Returns
A pointer to a NULL-terminated string describing the specified type on success; otherwise, NULL.

Dump

WEAVE_ERROR Dump(
  const TLVReader & aReader,
  DumpWriter aWriter
)

Dump the TLV data within the specified reader in human-readable form with the specified writer.

Details
Parameters
[in] aReader
A read-only reference to the TLV reader containing the TLV data to log.
[in] aWriter
A dump writer to log the TLV data of the TLV reader.
Return Values
WEAVE_NO_ERROR
On success.

DumpHandler

void DumpHandler(
  DumpWriter aWriter,
  const char *aIndent,
  const TLVReader & aReader,
  size_t aDepth
)

Dump the TLV element referenced by aReader in human-readable form using aWriter.

Details
Parameters
[in] aWriter
The writer to log the TLV data.
[in] aIndent
The indentation for logging the current depth into the TLV data.
[in] aReader
A read-only reference to the TLV reader containing the TLV data to log.
[in] aDepth
The current depth into the TLV data.

DumpHandler

WEAVE_ERROR DumpHandler(
  const TLVReader & aReader,
  size_t aDepth,
  void *aContext
)

Log the TLV data within the specified reader in human-readable form.

Details
Parameters
[in] aReader
A read-only reference to the TLV reader containing the TLV data to log.
[in] aDepth
The current depth into the TLV data.
[in,out] aContext
A pointer to the handler-specific context.
Return Values
WEAVE_NO_ERROR
On success.
WEAVE_ERROR_INVALID_ARGUMENT
If aContext is NULL or if aContext->mWriter is NULL.

DumpIterator

WEAVE_ERROR DumpIterator(
  DumpWriter aWriter,
  const TLVReader & aReader
)

Log the TLV data within the specified reader in human-readable form to the specified writer.

Details
Parameters
[in] aWriter
The writer to log the TLV data.
[in] aReader
A read-only reference to the TLV reader containing the TLV data to log.
Return Values
WEAVE_NO_ERROR
Unconditionally.