Developing with ZBOSS SDK 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("led_bulb");
/* Initiate the stack start with starting the commissioning */
if (zboss_start() != 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();
}
zboss_main_loop
void zboss_main_loop(void)
ZB_INIT
#define ZB_INIT(trace_comment)
Definition: zboss_api.h:326
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:73
zboss_main_loop_iteration
void zboss_main_loop_iteration(void)
zboss_start_no_autostart
zb_ret_t zboss_start_no_autostart(void)