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#

sl_status_t
sl_wisun_set_trace_filter(uint8_t filter[SL_WISUN_FILTER_BITFIELD_SIZE])

Set the trace filter.

sl_status_t
sl_wisun_set_trace_level(uint8_t group_count, sl_wisun_trace_group_config_t *trace_config)

Set the trace level.

Function Documentation#

sl_wisun_set_trace_filter#

sl_status_t sl_wisun_set_trace_filter (uint8_t filter)

Set the trace filter.

Parameters
[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


Definition at line 74 of file /mnt/raid/workspaces/ws.TauBzA8CM/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, sl_wisun_trace_group_config_t * trace_config)

Set the trace level.

Parameters
[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


Definition at line 59 of file /mnt/raid/workspaces/ws.TauBzA8CM/overlay/gsdk/protocol/wisun/stack/inc/sl_wisun_trace_api.h