nRF5 SDK for Thread and Zigbee v4.2.0
Functions

Functions

void zboss_main_loop (void)
 
void zboss_main_loop_iteration (void)
 

Detailed Description

Function Documentation

void zboss_main_loop ( void  )

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

ZB_INIT("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 */
}
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();
}

Documentation feedback | Developer Zone | Subscribe | Updated