Debugging Utilities#
EmberZNet debugging utilities.
See sl_zigbee_debug.h for source code.
Functions#
Print the filename and line number to the debug serial port.
Print the contents of RAM to the debug serial port.
Print binary data to the debug channel.
Send VUART data out the debug channel.
Print an ::sl_status_t return code to the serial port.
Turn off all debug output.
Restore the state of the debug output.
Prints text debug messages.
Macros#
This function is obsolete and no longer required to initialize the debug system.
Function Documentation#
sl_zigbee_debug_assert#
void sl_zigbee_debug_assert (const char * filename, int linenumber)
Print the filename and line number to the debug serial port.
N/A | filename | The name of the file where the assert occurred. |
N/A | linenumber | The line number in the file where the assert occurred. |
52
of file stack/include/sl_zigbee_debug.h
sl_zigbee_debug_memory_dump#
void sl_zigbee_debug_memory_dump (uint8_t * start, uint8_t * end)
Print the contents of RAM to the debug serial port.
N/A | start | The start address of the block of RAM to dump. |
N/A | end | The end address of the block of RAM to dump (address of the last byte). |
61
of file stack/include/sl_zigbee_debug.h
sl_zigbee_debug_binary_printf#
void sl_zigbee_debug_binary_printf (const char * formatString, ... )
Print binary data to the debug channel.
N/A | formatString | 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 sl_zigbee_debug_printf(). 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 - sli_buffer_manager_buffer_t.
Examples:
sl_zigbee_debug_binary_printf("BWD", status, panId, channelMask);
sl_zigbee_debug_binary_printf("F8p", "string example", eui64);
sl_zigbee_debug_binary_printf("lp64fb", length, bytes, dataTable, buffer);
89
of file stack/include/sl_zigbee_debug.h
sli_util_debug_send_vuart_message#
void sli_util_debug_send_vuart_message (uint8_t * buff, uint8_t len)
Send VUART data out the debug channel.
N/A | buff | A pointer to the data to send. |
N/A | len | The length of the data to send. |
97
of file stack/include/sl_zigbee_debug.h
sl_zigbee_debug_error#
void sl_zigbee_debug_error (sl_status_t code)
Print an ::sl_status_t return code to the serial port.
N/A | code | The ::sl_status_t code to print. |
104
of file stack/include/sl_zigbee_debug.h
sl_zigbee_debug_report_off#
bool sl_zigbee_debug_report_off (void )
Turn off all debug output.
N/A |
Returns
The current state (true for on, false for off).
110
of file stack/include/sl_zigbee_debug.h
sl_zigbee_debug_report_restore#
void sl_zigbee_debug_report_restore (bool state)
Restore the state of the debug output.
N/A | state | The state returned from sl_zigbee_debug_report_off(). This is done so that debug output is not blindly turned on. |
117
of file stack/include/sl_zigbee_debug.h
sl_zigbee_debug_printf#
void sl_zigbee_debug_printf (const char * formatString, ... )
Prints text debug messages.
N/A | formatString | Takes the following: |
N/A |
%% | Percent sign |
---|---|
%c | Single-byte char |
%s | RAM string |
%s | Flash string (does not follow the printf standard) |
%u | Two-byte unsigned decimal |
%d | Two-byte signed decimal |
%%02X, %%04X, %%08X | 1-, 2-, 4-byte hex value (always 0 padded; does not follow the printf standard) |
136
of file stack/include/sl_zigbee_debug.h
Macro Definition Documentation#
sl_zigbee_debug_init#
#define sl_zigbee_debug_initValue:
(port)
This function is obsolete and no longer required to initialize the debug system.
40
of file stack/include/sl_zigbee_debug.h
DEBUG_ROUTINES_PRESENT#
#define DEBUG_ROUTINES_PRESENT
44
of file stack/include/sl_zigbee_debug.h