nRF5 SDK for Thread and Zigbee v3.2.0
Macros | Functions
Dynamic (run-time) asserts

Macros

#define ZB_ASSERT(expr)   {if(!(expr)) zb_assert(__FILE__, __LINE__);}
 
#define ZB_INLINE_ASSERT(expr)   ZB_INLINE_ASSERT_SIMPLE((expr)),
 

Functions

void zb_abort (char *caller_file, int caller_line)
 

Detailed Description

Macro Definition Documentation

#define ZB_ASSERT (   expr)    {if(!(expr)) zb_assert(__FILE__, __LINE__);}

Check for expression in runtime and call zb_assert() if it is false.

Compiled to nothing if USE_ASSERT is not defined.

Parameters
exprexpression to check
#define ZB_INLINE_ASSERT (   expr)    ZB_INLINE_ASSERT_SIMPLE((expr)),

Assert which can be used inside an expression.

Parameters
expr- expression to check.
Returns
always 1 (true)

Function Documentation

void zb_abort ( char *  caller_file,
int  caller_line 
)

Trace current location, abort current program execution, with core dump if possible.

Parameters
caller_file- source file name
caller_line- line in the source

Documentation feedback | Developer Zone | Subscribe | Updated