Stack Trace and Debug#
The Trace and Debug component adds tracing capabilities to the stack and stack plugin components. The component provides APIs to configure or filter out the debug traces output.
Functions#
Set the trace filter.
Set the trace level.
Generate application logs using Wi-SUN stack trace mechanism with DEBUG level.
Generate application logs using Wi-SUN stack trace mechanism with ERROR level.
Generate application logs using Wi-SUN stack trace mechanism with INFO level.
Generate application logs using Wi-SUN stack trace mechanism with WARN level.
Function Documentation#
sl_wisun_set_trace_filter#
sl_status_t sl_wisun_set_trace_filter (const uint8_t filter)
Set the trace filter.
[in] | filter | Bit mask of trace group IDs. First byte of the array represents IDs 0 - 7, with bit 0 being ID 0. Second byte represents IDs 8 - 15 and so forth. If a bit is set, the corresponding trace group ID is selected for tracing. 0 means the particular trace group ID is disabled. Bit enumeration is defined in sl_wisun_trace_group_t. |
Indicate which trace group will be displayed.
Returns
One of the following:
SL_STATUS_NOT_AVAILABLE if the Stack Trace and Debug component is not installed
SL_STATUS_OK if successful, an error code otherwise
73
of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_trace_api.h
sl_wisun_set_trace_level#
sl_status_t sl_wisun_set_trace_level (uint8_t group_count, const sl_wisun_trace_group_config_t * trace_config)
Set the trace level.
[in] | group_count | Number of groups to configure. If 0, enable all levels for all groups. Maximum SL_WISUN_TRACE_GROUP_COUNT. |
[in] | trace_config | Table with group_count element filled. It indicates the trace level to be displayed for each group. |
Returns
One of the following:
SL_STATUS_NOT_AVAILABLE if the Stack Trace and Debug component is not installed
SL_STATUS_OK if successful, an error code otherwise
58
of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_trace_api.h
sl_wisun_trace_debug#
sl_status_t sl_wisun_trace_debug (const char * fmt, ... )
Generate application logs using Wi-SUN stack trace mechanism with DEBUG level.
[in] | fmt | Format string (same syntax as printf) |
[in] | Variable arguments related to fmt |
Returns
SL_STATUS_NOT_AVAILABLE if using the release library, SL_STATUS_OK otherwise
109
of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_trace_api.h
sl_wisun_trace_error#
sl_status_t sl_wisun_trace_error (const char * fmt, ... )
Generate application logs using Wi-SUN stack trace mechanism with ERROR level.
[in] | fmt | Format string (same syntax as printf) |
[in] | Variable arguments related to fmt |
Returns
SL_STATUS_NOT_AVAILABLE if using the release library, SL_STATUS_OK otherwise
82
of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_trace_api.h
sl_wisun_trace_info#
sl_status_t sl_wisun_trace_info (const char * fmt, ... )
Generate application logs using Wi-SUN stack trace mechanism with INFO level.
[in] | fmt | Format string (same syntax as printf) |
[in] | Variable arguments related to fmt |
Returns
SL_STATUS_NOT_AVAILABLE if using the release library, SL_STATUS_OK otherwise
100
of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_trace_api.h
sl_wisun_trace_warn#
sl_status_t sl_wisun_trace_warn (const char * fmt, ... )
Generate application logs using Wi-SUN stack trace mechanism with WARN level.
[in] | fmt | Format string (same syntax as printf) |
[in] | Variable arguments related to fmt |
Returns
SL_STATUS_NOT_AVAILABLE if using the release library, SL_STATUS_OK otherwise
91
of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_trace_api.h