Developing with ZBOSS for Zigbee

Modules

 Trace configuration
 

Macros

#define ZB_SET_TRACE_LEVEL(l)   g_trace_level = (l)
 
#define ZB_SET_TRACE_OFF()   g_o_trace_level = g_trace_level, g_trace_level = 0U
 
#define ZB_SET_TRACE_ON()   g_trace_level = g_o_trace_level
 
#define ZB_SET_TRACE_MASK(m)   g_trace_mask = (m)
 
#define TRACE_SUBSYSTEM_APP   0x0800U
 
#define TRACE_SUBSYSTEM_ZGP   0x4000U
 
#define TRACE_SUBSYSTEM_INFO   ((zb_uint_t)-1)
 
#define TRACE_DEINIT   zb_trace_deinit_file
 
#define TRACE_MSG(lm, fmts, args)
 Put trace output. More...
 

Functions

void zb_trace_str (const zb_char_t *str)
 A universal way to print raw string as trace message.
 

Detailed Description

Macro Definition Documentation

◆ TRACE_DEINIT

#define TRACE_DEINIT   zb_trace_deinit_file

Deinitialize trace subsystem

◆ TRACE_MSG

#define TRACE_MSG (   lm,
  fmts,
  args 
)
Value:
do { \
ZB_T1_TRACE(lm, fmts, args); \
} while (0)

Put trace output.

Parameters
lm- trace subsystem and level marker.
fmts- printf()-like format string.
args- format string substitution parameters with a size marker.
Example
TRACE_MSG(TRACE_APP1, ">> bulb_nvram_read_app_data page %hd pos %d", (FMT__H_D, page, pos));

◆ TRACE_SUBSYSTEM_APP

#define TRACE_SUBSYSTEM_APP   0x0800U

User Application

◆ TRACE_SUBSYSTEM_INFO

#define TRACE_SUBSYSTEM_INFO   ((zb_uint_t)-1)

Common subsystem

◆ TRACE_SUBSYSTEM_ZGP

#define TRACE_SUBSYSTEM_ZGP   0x4000U

ZGP subsystem

◆ ZB_SET_TRACE_LEVEL

#define ZB_SET_TRACE_LEVEL (   l)    g_trace_level = (l)

Set trace level at runtime

That macro can switch trace level on and off. Trace level must be included into build at compile time by setting ZB_TRACE_LEVEL compiler time define.

Parameters
l- new trace level.
Example
/* Configure trace */

◆ ZB_SET_TRACE_MASK

#define ZB_SET_TRACE_MASK (   m)    g_trace_mask = (m)

Set trace mask at runtime

That macro can switch trace mask on and off. Trace mask must be included into build at compile time by setting ZB_TRACE_MASK compiler time define.

Parameters
m- new trace mask.
Example
/* Configure trace */

◆ ZB_SET_TRACE_OFF

#define ZB_SET_TRACE_OFF ( )    g_o_trace_level = g_trace_level, g_trace_level = 0U

Switch off all trace at runtime

◆ ZB_SET_TRACE_ON

#define ZB_SET_TRACE_ON ( )    g_trace_level = g_o_trace_level

Switch on trace at runtime

That macro enables trace which was active before call to ZB_SET_TRACE_OFF().

TRACE_MSG
#define TRACE_MSG(lm, fmts, args)
Put trace output.
Definition: zb_trace.h:369
ZB_SET_TRACE_LEVEL
#define ZB_SET_TRACE_LEVEL(l)
Definition: zb_trace.h:61
ZB_SET_TRACE_ON
#define ZB_SET_TRACE_ON()
Definition: zb_trace.h:75
ZB_SET_TRACE_MASK
#define ZB_SET_TRACE_MASK(m)
Definition: zb_trace.h:89