Logo
Developing with ZBOSS for Zigbee
ZBOSS kernel initialization and start

Macros

#define ZB_INIT(trace_comment)
 

Functions

zb_ret_t zboss_start (void)
 ZBOSS start function. More...
 
zb_ret_t zboss_start_no_autostart (void)
 
void zboss_start_continue (void)
 

Detailed Description

This feature is not used in regular deliveries and not supported by ZOI official platforms. In case of this feature is required for usage need to define additional structure zb_version_ext_platform_t and function zb_get_version_ext_platform() in platform.

During SDK build, the template file zb_sdk_version.h constants all fields of the zb_version_ext_*_s structure. The template file zb_sdk_version.h should be in the platform, copied to stack/include/ and edited there.

Macro Definition Documentation

§ ZB_INIT

#define ZB_INIT (   trace_comment)

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api.h>

Value:
{ \
ZB_CHECK_LIBRARY(); \
zb_init((zb_char_t *)trace_comment); \
zb_diag_init(); \
}
char zb_char_t
Project-local char type.
Definition: zb_types.h:143

Global stack initialization.

To be called from MAIN() at start.

Usual initialization sequence: ZB_INIT(), then assign some IB values, then zboss_start().

Parameters
trace_comment- trace file name component (valid for Unix, ignored at MCU)

Example:

ZB_INIT("zdo_zc");

Function Documentation

§ zboss_start()

zb_ret_t zboss_start ( void  )

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api.h>

ZBOSS start function.

Typical device start: init, load some parameters from NVRAM and proceed with startup.

Startup means either Formation (for ZC), rejoin or discovery/association join. After startup complete a signal is sent, so application will know when to do some useful things.

Precondition: stack must be inited by ZB_INIT() call. ZB_INIT() sets default IB parameters, so caller has a chance to change some of them. Note that NVRAM will be loaded after zboss_start() call.

Note
ZB is not looped in this routine. Instead, it schedules callback and returns. Caller must run zboss_main_loop() after this routine.
Returns
RET_OK on success.

§ zboss_start_continue()

void zboss_start_continue ( void  )

§ zboss_start_no_autostart()

zb_ret_t zboss_start_no_autostart ( void  )

#include </conan-data/ti_zigbee/9.14.00.04/library-lprf/ga/build/f6d18801b7b469a709ae7e8290b03ecdc7a7ad4c/zboss_r23/include/zboss_api.h>

Start ZBOSS with only minimal initialization, without starting commissioning.

This function initializes scheduler and buffers pool, but not MAC and upper layers. Typically zboss_start_no_autostart() is used when application wants to do something before starting joining the network.

ZB_ZDO_SIGNAL_SKIP_STARTUP can then be used to detect when ZBOSS framework has started, to proceed with join/rejoin/formation/BDB initialization

For example, you can use this function if it is needed to enable leds, timers or any other devices on periphery to work with them before starting working in a network. It's also useful if you want to run something locally during joining.

Application should later call ZBOSS commissioning initiation - for instance, bdb_start_top_level_commissioning()

To finish node initialization without triggering commissioning call bdb_start_top_level_commissioning() with commissioning mask 0 (no steering, no formation, initialization only).

Returns
RET_OK on success.