Debugging Utilities#

EmberZNet debugging utilities.

See ember-debug.h for source code.

Functions#

void
emberDebugAssert(const char *filename, int linenumber)

Prints the filename and line number to the debug serial port.

void
emberDebugMemoryDump(uint8_t *start, uint8_t *end)

Prints the contents of RAM to the debug serial port.

void
emberDebugBinaryPrintf(const char *formatString,...)

Prints binary data to the debug channel.

void
emDebugSendVuartMessage(uint8_t *buff, uint8_t len)

Sends VUART data out the debug channel.

void
emberDebugError(EmberStatus code)

Prints an EmberStatus return code to the serial port.

bool

Turns off all debug output.

void

Restores the state of the debug output.

void
emberDebugPrintf(const char *formatString,...)

Prints text debug messages.

Macros#

#define
#define
#define
#define

This function is obsolete and no longer required to initialize the debug system.

Function Documentation#

emberDebugAssert#

void emberDebugAssert (const char * filename, int linenumber)

Prints the filename and line number to the debug serial port.

Parameters
N/Afilename

The name of the file where the assert occurred.

N/Alinenumber

The line number in the file where the assert occurred.


Definition at line 49 of file /Users/vihuszar/Git/EmbeddedSoftware/super/protocol/zigbee/stack/include/ember-debug.h

emberDebugMemoryDump#

void emberDebugMemoryDump (uint8_t * start, uint8_t * end)

Prints the contents of RAM to the debug serial port.

Parameters
N/Astart

The start address of the block of RAM to dump.

N/Aend

The end address of the block of RAM to dump (address of the last byte).


Definition at line 58 of file /Users/vihuszar/Git/EmbeddedSoftware/super/protocol/zigbee/stack/include/ember-debug.h

emberDebugBinaryPrintf#

void emberDebugBinaryPrintf (const char * formatString, ... )

Prints binary data to the debug channel.

Parameters
N/AformatString

A string of conversion specification characters describing the arguments to be printed.

N/A

The arguments to be printed.

This function does not use the normal printf format conventions. To print text debug messages, use emberDebugPrintf(). The format string must contain only these conversion specification characters:

  • B - uint8_t value.

  • W - uint16_t value, printed least significant byte first.

  • D - uint32_t value, printed least significant byte first.

  • F - pointer to null terminated string in Flash (const char *).

  • xxxp - pointer to RAM, length is xxx (max 255).

  • lp - pointer to RAM, length is uint8_t argument.

  • xxxf - pointer to Flash (const char *), length is xxx (max 255).

  • lf - pointer to Flash (const char *), length is uint8_t argument.

  • b - EmberMessageBuffer.

Examples:

emberDebugBinaryPrintf("BWD", status, panId, channelMask);
emberDebugBinaryPrintf("F8p", "string example", eui64);
emberDebugBinaryPrintf("lp64fb", length, bytes, dataTable, buffer);

Definition at line 86 of file /Users/vihuszar/Git/EmbeddedSoftware/super/protocol/zigbee/stack/include/ember-debug.h

emDebugSendVuartMessage#

void emDebugSendVuartMessage (uint8_t * buff, uint8_t len)

Sends VUART data out the debug channel.

Parameters
N/Abuff

A pointer to the data to send.

N/Alen

The length of the data to send.


Definition at line 94 of file /Users/vihuszar/Git/EmbeddedSoftware/super/protocol/zigbee/stack/include/ember-debug.h

emberDebugError#

void emberDebugError (EmberStatus code)

Prints an EmberStatus return code to the serial port.

Parameters
N/Acode

The EmberStatus code to print.


Definition at line 101 of file /Users/vihuszar/Git/EmbeddedSoftware/super/protocol/zigbee/stack/include/ember-debug.h

emberDebugReportOff#

bool emberDebugReportOff (void )

Turns off all debug output.

Parameters
N/A

Returns

  • The current state (true for on, false for off).


Definition at line 107 of file /Users/vihuszar/Git/EmbeddedSoftware/super/protocol/zigbee/stack/include/ember-debug.h

emberDebugReportRestore#

void emberDebugReportRestore (bool state)

Restores the state of the debug output.

Parameters
N/Astate

The state returned from emberDebugReportOff(). This is done so that debug output is not blindly turned on.


Definition at line 114 of file /Users/vihuszar/Git/EmbeddedSoftware/super/protocol/zigbee/stack/include/ember-debug.h

emberDebugPrintf#

void emberDebugPrintf (const char * formatString, ... )

Prints text debug messages.

Parameters
N/AformatString

Takes the following:

N/A

%%

Percent sign

%c

Single-byte char

%s

RAM string

%p

Flash string (does not follow the printf standard)

%u

Two-byte unsigned decimal

%d

Two-byte signed decimal

%x, %%2x, %%4x

1-, 2-, 4-byte hex value (always 0 padded; does not follow the printf standard)


Definition at line 133 of file /Users/vihuszar/Git/EmbeddedSoftware/super/protocol/zigbee/stack/include/ember-debug.h

Macro Definition Documentation#

NO_DEBUG#

#define NO_DEBUG
Value:
0

Definition at line 30 of file /Users/vihuszar/Git/EmbeddedSoftware/super/protocol/zigbee/stack/include/ember-debug.h

BASIC_DEBUG#

#define BASIC_DEBUG
Value:
1

Definition at line 31 of file /Users/vihuszar/Git/EmbeddedSoftware/super/protocol/zigbee/stack/include/ember-debug.h

FULL_DEBUG#

#define FULL_DEBUG
Value:
2

Definition at line 32 of file /Users/vihuszar/Git/EmbeddedSoftware/super/protocol/zigbee/stack/include/ember-debug.h

emberDebugInit#

#define emberDebugInit
Value:
(port)

This function is obsolete and no longer required to initialize the debug system.


Definition at line 40 of file /Users/vihuszar/Git/EmbeddedSoftware/super/protocol/zigbee/stack/include/ember-debug.h