0.01.00
logging.hpp File Reference

This file includes functions for debugging. More...

#include "openthread-core-config.h"
#include <ctype.h>
#include <stdio.h>
#include "utils/wrap_string.h"
#include <openthread/instance.h>
#include <openthread/types.h>
#include <openthread/platform/logging.h>

Go to the source code of this file.

Macros

#define otLogFuncEntry()
 
#define otLogFuncEntryMsg(aFormat, ...)
 
#define otLogFuncExit()
 
#define otLogFuncExitMsg(aFormat, ...)
 
#define otLogFuncExitErr(error)
 
#define otLogCrit(aInstance, aRegion, aFormat, ...)
 Logging at log level critical. More...
 
#define otLogWarn(aInstance, aRegion, aFormat, ...)
 Logging at log level warning. More...
 
#define otLogInfo(aInstance, aRegion, aFormat, ...)
 Logging at log level info. More...
 
#define otLogDebg(aInstance, aRegion, aFormat, ...)
 Logging at log level debug. More...
 
#define otLogCritApi(aInstance, aFormat, ...)
 This method generates a log with level critical for the API region. More...
 
#define otLogWarnApi(aInstance, aFormat, ...)
 This method generates a log with level warning for the API region. More...
 
#define otLogInfoApi(aInstance, aFormat, ...)
 This method generates a log with level info for the API region. More...
 
#define otLogDebgApi(aInstance, aFormat, ...)
 This method generates a log with level debug for the API region. More...
 
#define otLogCritMeshCoP(aInstance, aFormat, ...)
 This method generates a log with level critical for the MLE region. More...
 
#define otLogWarnMeshCoP(aInstance, aFormat, ...)
 This method generates a log with level warning for the MLE region. More...
 
#define otLogInfoMeshCoP(aInstance, aFormat, ...)
 This method generates a log with level info for the MLE region. More...
 
#define otLogDebgMeshCoP(aInstance, aFormat, ...)
 This method generates a log with level debug for the MLE region. More...
 
#define otLogCritMbedTls(aInstance, aFormat, ...)   otLogCritMeshCoP(aInstance, aFormat, ## __VA_ARGS__)
 
#define otLogWarnMbedTls(aInstance, aFormat, ...)   otLogWarnMeshCoP(aInstance, aFormat, ## __VA_ARGS__)
 
#define otLogInfoMbedTls(aInstance, aFormat, ...)   otLogInfoMeshCoP(aInstance, aFormat, ## __VA_ARGS__)
 
#define otLogDebgMbedTls(aInstance, aFormat, ...)   otLogDebgMeshCoP(aInstance, aFormat, ## __VA_ARGS__)
 
#define otLogCritMle(aInstance, aFormat, ...)
 This method generates a log with level critical for the MLE region. More...
 
#define otLogWarnMle(aInstance, aFormat, ...)
 This method generates a log with level warning for the MLE region. More...
 
#define otLogWarnMleErr(aInstance, aError, aFormat, ...)
 
#define otLogInfoMle(aInstance, aFormat, ...)
 This method generates a log with level info for the MLE region. More...
 
#define otLogDebgMle(aInstance, aFormat, ...)
 This method generates a log with level debug for the MLE region. More...
 
#define otLogCritArp(aInstance, aFormat, ...)
 This method generates a log with level critical for the EID-to-RLOC mapping region. More...
 
#define otLogWarnArp(aInstance, aFormat, ...)
 This method generates a log with level warning for the EID-to-RLOC mapping region. More...
 
#define otLogInfoArp(aInstance, aFormat, ...)
 This method generates a log with level info for the EID-to-RLOC mapping region. More...
 
#define otLogDebgArp(aInstance, aFormat, ...)
 This method generates a log with level debug for the EID-to-RLOC mapping region. More...
 
#define otLogCritNetData(aInstance, aFormat, ...)
 This method generates a log with level critical for the Network Data region. More...
 
#define otLogWarnNetData(aInstance, aFormat, ...)
 This method generates a log with level warning for the Network Data region. More...
 
#define otLogInfoNetData(aInstance, aFormat, ...)
 This method generates a log with level info for the Network Data region. More...
 
#define otLogDebgNetData(aInstance, aFormat, ...)
 This method generates a log with level debug for the Network Data region. More...
 
#define otLogCritIcmp(aInstance, aFormat, ...)
 This method generates a log with level critical for the ICMPv6 region. More...
 
#define otLogWarnIcmp(aInstance, aFormat, ...)
 This method generates a log with level warning for the ICMPv6 region. More...
 
#define otLogInfoIcmp(aInstance, aFormat, ...)
 This method generates a log with level info for the ICMPv6 region. More...
 
#define otLogDebgIcmp(aInstance, aFormat, ...)
 This method generates a log with level debug for the ICMPv6 region. More...
 
#define otLogCritIp6(aInstance, aFormat, ...)
 This method generates a log with level critical for the IPv6 region. More...
 
#define otLogWarnIp6(aInstance, aFormat, ...)
 This method generates a log with level warning for the IPv6 region. More...
 
#define otLogInfoIp6(aInstance, aFormat, ...)
 This method generates a log with level info for the IPv6 region. More...
 
#define otLogDebgIp6(aInstance, aFormat, ...)
 This method generates a log with level debug for the IPv6 region. More...
 
#define otLogCritMac(aInstance, aFormat, ...)
 This method generates a log with level critical for the MAC region. More...
 
#define otLogWarnMac(aInstance, aFormat, ...)
 This method generates a log with level warning for the MAC region. More...
 
#define otLogInfoMac(aInstance, aFormat, ...)
 This method generates a log with level info for the MAC region. More...
 
#define otLogDebgMac(aInstance, aFormat, ...)
 This method generates a log with level debug for the MAC region. More...
 
#define otLogDebgMacErr(aInstance, aError, aFormat, ...)
 
#define otLogCritMem(aInstance, aFormat, ...)
 This method generates a log with level critical for the memory region. More...
 
#define otLogWarnMem(aInstance, aFormat, ...)
 This method generates a log with level warning for the memory region. More...
 
#define otLogInfoMem(aInstance, aFormat, ...)
 This method generates a log with level info for the memory region. More...
 
#define otLogDebgMem(aInstance, aFormat, ...)
 This method generates a log with level debug for the memory region. More...
 
#define otLogCritNetDiag(aInstance, aFormat, ...)
 This method generates a log with level critical for the NETDIAG region. More...
 
#define otLogWarnNetDiag(aInstance, aFormat, ...)
 This method generates a log with level warning for the NETDIAG region. More...
 
#define otLogInfoNetDiag(aInstance, aFormat, ...)
 This method generates a log with level info for the NETDIAG region. More...
 
#define otLogDebgNetDiag(aInstance, aFormat, ...)
 This method generates a log with level debug for the NETDIAG region. More...
 
#define otLogCertMeshCoP(aInstance, aFormat, ...)
 
#define otLogCritCli(aInstance, aFormat, ...)
 This method generates a log with level critical for the CLI region. More...
 
#define otLogWarnCli(aInstance, aFormat, ...)
 This method generates a log with level warning for the CLI region. More...
 
#define otLogInfoCli(aInstance, aFormat, ...)
 This method generates a log with level info for the CLI region. More...
 
#define otLogInfoCliErr(aInstance, aError, aFormat, ...)
 
#define otLogDebgCli(aInstance, aFormat, ...)
 This method generates a log with level debug for the CLI region. More...
 
#define otLogCritCoap(aInstance, aFormat, ...)
 This method generates a log with level critical for the CoAP region. More...
 
#define otLogWarnCoap(aInstance, aFormat, ...)
 This method generates a log with level warning for the CoAP region. More...
 
#define otLogInfoCoap(aInstance, aFormat, ...)
 This method generates a log with level info for the CoAP region. More...
 
#define otLogInfoCoapErr(aInstance, aError, aFormat, ...)
 
#define otLogDebgCoap(aInstance, aFormat, ...)
 This method generates a log with level debug for the CoAP region. More...
 
#define otLogCritPlat(aInstance, aFormat, ...)
 This method generates a log with level critical for the Platform region. More...
 
#define otLogWarnPlat(aInstance, aFormat, ...)
 This method generates a log with level warning for the Platform region. More...
 
#define otLogInfoPlat(aInstance, aFormat, ...)
 This method generates a log with level info for the Platform region. More...
 
#define otLogDebgPlat(aInstance, aFormat, ...)
 This method generates a log with level debug for the Platform region. More...
 
#define otDumpCrit(aInstance, aRegion, aId, aBuf, aLength)
 This method generates a memory dump with log level critical. More...
 
#define otDumpWarn(aInstance, aRegion, aId, aBuf, aLength)
 This method generates a memory dump with log level warning. More...
 
#define otDumpInfo(aInstance, aRegion, aId, aBuf, aLength)
 This method generates a memory dump with log level info. More...
 
#define otDumpDebg(aInstance, aRegion, aId, aBuf, aLength)
 This method generates a memory dump with log level debug. More...
 
#define otDumpCritNetData(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level debug and region Network Data. More...
 
#define otDumpWarnNetData(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level warning and region Network Data. More...
 
#define otDumpInfoNetData(aInstance, aId, aBuf, aLength)
 
#define otDumpDebgNetData(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level debug and region Network Data. More...
 
#define otDumpCritMle(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level debug and region MLE. More...
 
#define otDumpWarnMle(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level warning and region MLE. More...
 
#define otDumpInfoMle(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level info and region MLE. More...
 
#define otDumpDebgMle(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level debug and region MLE. More...
 
#define otDumpCritArp(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level debug and region EID-to-RLOC mapping. More...
 
#define otDumpWarnArp(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level warning and region EID-to-RLOC mapping. More...
 
#define otDumpInfoArp(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level info and region EID-to-RLOC mapping. More...
 
#define otDumpDebgArp(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level debug and region EID-to-RLOC mapping. More...
 
#define otDumpCritIcmp(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level debug and region ICMPv6. More...
 
#define otDumpWarnIcmp(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level warning and region ICMPv6. More...
 
#define otDumpInfoIcmp(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level info and region ICMPv6. More...
 
#define otDumpDebgIcmp(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level debug and region ICMPv6. More...
 
#define otDumpCritIp6(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level debug and region IPv6. More...
 
#define otDumpWarnIp6(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level warning and region IPv6. More...
 
#define otDumpInfoIp6(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level info and region IPv6. More...
 
#define otDumpDebgIp6(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level debug and region IPv6. More...
 
#define otDumpCritMac(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level debug and region MAC. More...
 
#define otDumpWarnMac(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level warning and region MAC. More...
 
#define otDumpInfoMac(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level info and region MAC. More...
 
#define otDumpDebgMac(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level debug and region MAC. More...
 
#define otDumpCritMem(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level debug and region memory. More...
 
#define otDumpWarnMem(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level warning and region memory. More...
 
#define otDumpInfoMem(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level info and region memory. More...
 
#define otDumpDebgMem(aInstance, aId, aBuf, aLength)
 This method generates a memory dump with log level debug and region memory. More...
 
#define otDumpCertMeshCoP(aInstance, aId, aBuf, aLength)
 
#define _otLogFormatter(aInstance, aLogLevel, aRegion, aFormat, ...)
 Local/private macro to format the log message. More...
 
#define _otDynamicLog(aInstance, aLogLevel, aRegion, aFormat, ...)   _otPlatLog(aLogLevel, aRegion, aFormat, ## __VA_ARGS__)
 
#define _otPlatLog(aLogLevel, aRegion, aFormat, ...)   OPENTHREAD_CONFIG_PLAT_LOG_FUNCTION(aLogLevel, aRegion, aFormat, ## __VA_ARGS__)
 OPENTHREAD_CONFIG_PLAT_LOG_FUNCTION is a configuration parameter (see openthread-core-default-config.h) which specifies the function/macro to be used for logging in OpenThread. More...
 

Functions

void otDump (otInstance *aIntsance, otLogLevel aLevel, otLogRegion aRegion, const char *aId, const void *aBuf, const size_t aLength)
 This method dumps bytes to the log in a human-readable fashion. More...
 

Detailed Description

This file includes functions for debugging.

Macro Definition Documentation

§ _otLogFormatter

#define _otLogFormatter (   aInstance,
  aLogLevel,
  aRegion,
  aFormat,
  ... 
)
Value:
_otDynamicLog( \
aInstance, \
aLogLevel, \
aRegion, \
## __VA_ARGS__ \
)
#define OPENTHREAD_CONFIG_LOG_SUFFIX
Define suffix to append at the end of logs.
Definition: openthread-core-default-config.h:703

Local/private macro to format the log message.

§ _otPlatLog

#define _otPlatLog (   aLogLevel,
  aRegion,
  aFormat,
  ... 
)    OPENTHREAD_CONFIG_PLAT_LOG_FUNCTION(aLogLevel, aRegion, aFormat, ## __VA_ARGS__)

OPENTHREAD_CONFIG_PLAT_LOG_FUNCTION is a configuration parameter (see openthread-core-default-config.h) which specifies the function/macro to be used for logging in OpenThread.

By default it is set to otPlatLog().

§ otDumpCrit

#define otDumpCrit (   aInstance,
  aRegion,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level critical.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aRegionThe log region.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpCritArp

#define otDumpCritArp (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level debug and region EID-to-RLOC mapping.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpCritIcmp

#define otDumpCritIcmp (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level debug and region ICMPv6.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpCritIp6

#define otDumpCritIp6 (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level debug and region IPv6.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpCritMac

#define otDumpCritMac (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level debug and region MAC.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpCritMem

#define otDumpCritMem (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level debug and region memory.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpCritMle

#define otDumpCritMle (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level debug and region MLE.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpCritNetData

#define otDumpCritNetData (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level debug and region Network Data.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpDebg

#define otDumpDebg (   aInstance,
  aRegion,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level debug.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aRegionThe log region.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpDebgArp

#define otDumpDebgArp (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level debug and region EID-to-RLOC mapping.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpDebgIcmp

#define otDumpDebgIcmp (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level debug and region ICMPv6.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpDebgIp6

#define otDumpDebgIp6 (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level debug and region IPv6.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpDebgMac

#define otDumpDebgMac (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level debug and region MAC.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpDebgMem

#define otDumpDebgMem (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level debug and region memory.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpDebgMle

#define otDumpDebgMle (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level debug and region MLE.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpDebgNetData

#define otDumpDebgNetData (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level debug and region Network Data.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpInfo

#define otDumpInfo (   aInstance,
  aRegion,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level info.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aRegionThe log region.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpInfoArp

#define otDumpInfoArp (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level info and region EID-to-RLOC mapping.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpInfoIcmp

#define otDumpInfoIcmp (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level info and region ICMPv6.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpInfoIp6

#define otDumpInfoIp6 (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level info and region IPv6.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpInfoMac

#define otDumpInfoMac (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level info and region MAC.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpInfoMem

#define otDumpInfoMem (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level info and region memory.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpInfoMle

#define otDumpInfoMle (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level info and region MLE.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpInfoNetData

#define otDumpInfoNetData (   aInstance,
  aId,
  aBuf,
  aLength 
)
Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpWarn

#define otDumpWarn (   aInstance,
  aRegion,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level warning.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aRegionThe log region.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpWarnArp

#define otDumpWarnArp (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level warning and region EID-to-RLOC mapping.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpWarnIcmp

#define otDumpWarnIcmp (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level warning and region ICMPv6.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpWarnIp6

#define otDumpWarnIp6 (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level warning and region IPv6.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpWarnMac

#define otDumpWarnMac (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level warning and region MAC.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpWarnMem

#define otDumpWarnMem (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level warning and region memory.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpWarnMle

#define otDumpWarnMle (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level warning and region MLE.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otDumpWarnNetData

#define otDumpWarnNetData (   aInstance,
  aId,
  aBuf,
  aLength 
)

This method generates a memory dump with log level warning and region Network Data.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.

§ otLogCrit

#define otLogCrit (   aInstance,
  aRegion,
  aFormat,
  ... 
)

Logging at log level critical.

Parameters
[in]aInstanceA pointer to the OpenThread instance.
[in]aRegionThe log region.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogCritApi

#define otLogCritApi (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level critical for the API region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogCritArp

#define otLogCritArp (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level critical for the EID-to-RLOC mapping region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogCritCli

#define otLogCritCli (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level critical for the CLI region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogCritCoap

#define otLogCritCoap (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level critical for the CoAP region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogCritIcmp

#define otLogCritIcmp (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level critical for the ICMPv6 region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogCritIp6

#define otLogCritIp6 (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level critical for the IPv6 region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogCritMac

#define otLogCritMac (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level critical for the MAC region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogCritMem

#define otLogCritMem (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level critical for the memory region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogCritMeshCoP

#define otLogCritMeshCoP (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level critical for the MLE region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogCritMle

#define otLogCritMle (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level critical for the MLE region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogCritNetData

#define otLogCritNetData (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level critical for the Network Data region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogCritNetDiag

#define otLogCritNetDiag (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level critical for the NETDIAG region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogCritPlat

#define otLogCritPlat (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level critical for the Platform region.

Parameters
[in]aInstanceA pointer to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogDebg

#define otLogDebg (   aInstance,
  aRegion,
  aFormat,
  ... 
)

Logging at log level debug.

Parameters
[in]aInstanceA pointer to the OpenThread instance.
[in]aRegionThe log region.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogDebgApi

#define otLogDebgApi (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level debug for the API region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogDebgArp

#define otLogDebgArp (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level debug for the EID-to-RLOC mapping region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogDebgCli

#define otLogDebgCli (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level debug for the CLI region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogDebgCoap

#define otLogDebgCoap (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level debug for the CoAP region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogDebgIcmp

#define otLogDebgIcmp (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level debug for the ICMPv6 region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogDebgIp6

#define otLogDebgIp6 (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level debug for the IPv6 region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogDebgMac

#define otLogDebgMac (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level debug for the MAC region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogDebgMem

#define otLogDebgMem (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level debug for the memory region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogDebgMeshCoP

#define otLogDebgMeshCoP (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level debug for the MLE region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogDebgMle

#define otLogDebgMle (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level debug for the MLE region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogDebgNetData

#define otLogDebgNetData (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level debug for the Network Data region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogDebgNetDiag

#define otLogDebgNetDiag (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level debug for the NETDIAG region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogDebgPlat

#define otLogDebgPlat (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level debug for the Platform region.

Parameters
[in]aInstanceA pointer to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogInfo

#define otLogInfo (   aInstance,
  aRegion,
  aFormat,
  ... 
)

Logging at log level info.

Parameters
[in]aInstanceA pointer to the OpenThread instance.
[in]aRegionThe log region.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogInfoApi

#define otLogInfoApi (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level info for the API region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogInfoArp

#define otLogInfoArp (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level info for the EID-to-RLOC mapping region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogInfoCli

#define otLogInfoCli (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level info for the CLI region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogInfoCoap

#define otLogInfoCoap (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level info for the CoAP region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogInfoIcmp

#define otLogInfoIcmp (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level info for the ICMPv6 region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogInfoIp6

#define otLogInfoIp6 (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level info for the IPv6 region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogInfoMac

#define otLogInfoMac (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level info for the MAC region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogInfoMem

#define otLogInfoMem (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level info for the memory region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogInfoMeshCoP

#define otLogInfoMeshCoP (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level info for the MLE region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogInfoMle

#define otLogInfoMle (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level info for the MLE region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogInfoNetData

#define otLogInfoNetData (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level info for the Network Data region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogInfoNetDiag

#define otLogInfoNetDiag (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level info for the NETDIAG region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogInfoPlat

#define otLogInfoPlat (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level info for the Platform region.

Parameters
[in]aInstanceA pointer to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogWarn

#define otLogWarn (   aInstance,
  aRegion,
  aFormat,
  ... 
)

Logging at log level warning.

Parameters
[in]aInstanceA pointer to the OpenThread instance.
[in]aRegionThe log region.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogWarnApi

#define otLogWarnApi (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level warning for the API region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogWarnArp

#define otLogWarnArp (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level warning for the EID-to-RLOC mapping region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogWarnCli

#define otLogWarnCli (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level warning for the CLI region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogWarnCoap

#define otLogWarnCoap (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level warning for the CoAP region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogWarnIcmp

#define otLogWarnIcmp (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level warning for the ICMPv6 region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogWarnIp6

#define otLogWarnIp6 (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level warning for the IPv6 region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogWarnMac

#define otLogWarnMac (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level warning for the MAC region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogWarnMem

#define otLogWarnMem (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level warning for the memory region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogWarnMeshCoP

#define otLogWarnMeshCoP (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level warning for the MLE region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogWarnMle

#define otLogWarnMle (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level warning for the MLE region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogWarnNetData

#define otLogWarnNetData (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level warning for the Network Data region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogWarnNetDiag

#define otLogWarnNetDiag (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level warning for the NETDIAG region.

Parameters
[in]aInstanceA reference to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

§ otLogWarnPlat

#define otLogWarnPlat (   aInstance,
  aFormat,
  ... 
)

This method generates a log with level warning for the Platform region.

Parameters
[in]aInstanceA pointer to the OpenThread instance.
[in]aFormatA pointer to the format string.
[in]...Arguments for the format specification.

Function Documentation

§ otDump()

void otDump ( otInstance aIntsance,
otLogLevel  aLevel,
otLogRegion  aRegion,
const char *  aId,
const void *  aBuf,
const size_t  aLength 
)

This method dumps bytes to the log in a human-readable fashion.

Parameters
[in]aInstanceA pointer to the instance.
[in]aLevelThe log level.
[in]aRegionThe log region.
[in]aIdA pointer to a NULL-terminated string that is printed before the bytes.
[in]aBufA pointer to the buffer.
[in]aLengthNumber of bytes to print.