Developing with ZBOSS for Zigbee

Functions

void zboss_main_loop (void)
 
void zboss_main_loop_iteration (void)
 

Detailed Description

Function Documentation

◆ zboss_main_loop()

void zboss_main_loop ( void  )

ZBOSS main loop. Must be called after ZB_INIT() and zboss_start(). Loops infinitely.

ZB_INIT("bulb");
if (
#ifdef DIMMABLE_LIGHT_ENABLE_ZDD
/* Initiate the stack start without starting the commissioning to trigger it later by ZVD */
#else
/* Initiate the stack start with starting the commissioning */
#endif /* DIMMABLE_LIGHT_ENABLE_ZDD */
!= RET_OK)
{
TRACE_MSG(TRACE_ERROR, "ERROR dev_start failed", (FMT__0));
}
else
{
/* Call the main loop */
}

◆ zboss_main_loop_iteration()

void zboss_main_loop_iteration ( void  )

ZBOSS main loop iteration.

This function is useful if application wants to do something special in the main loop without involving ZBOSS scheduler.

Must be called after ZB_INIT() and zboss_start() / zboss_start_no_autostart() inside the application's main cycle.

/* Example of user-defined main loop.
* If you don't need more complicated functionality inside your main loop, use zboss_main_loop() function. */
void my_main_loop()
{
while (1)
{
/* ... User code ... */
/* ... User code ... */
}
}
/* Initiate the stack start without starting the commissioning */
{
TRACE_MSG(TRACE_ERROR, "zboss_start failed", (FMT__0));
}
else
{
/* Call the application-specific main loop */
my_main_loop();
}
TRACE_MSG
#define TRACE_MSG(lm, fmts, args)
Put trace output.
Definition: zb_trace.h:369
zboss_main_loop
void zboss_main_loop(void)
ZB_INIT
#define ZB_INIT(trace_comment)
Definition: zboss_api.h:500
zboss_start
zb_ret_t zboss_start(void)
ZBOSS start function.
RET_OK
#define RET_OK
Error codes for non-void stack functions. In general, function can return OK, BLOCKED or some error....
Definition: zb_errors.h:79
zboss_main_loop_iteration
void zboss_main_loop_iteration(void)
zboss_start_no_autostart
zb_ret_t zboss_start_no_autostart(void)