Macros | |
#define | ZB_INIT(trace_comment) zb_init((zb_char_t *)trace_comment) |
#define | ZB_JOINED() zb_zdo_joined() |
#define | ZB_SET_ED_TIMEOUT(to) zb_nwk_set_ed_timeout(to) |
#define | ZB_SET_KEEPALIVE_TIMEOUT(to) zb_nwk_set_keepalive_timeout(to) |
Typedefs | |
typedef enum nwk_requested_timeout_e | nwk_requested_timeout_t |
Global stack initialization.
To be called from main() at start.
Usual initialization sequence: zb_init(), then assign some IB values, then zboss_start().
trace_comment | - trace file name component (for Unix) |
Example:
See any sample
#define ZB_JOINED | ( | ) | zb_zdo_joined() |
Checks that device joined to network.
typedef enum nwk_requested_timeout_e nwk_requested_timeout_t |
Enum all values used in End Device timeout request
Enum all values used in End Device timeout request
zb_bool_t zb_bdb_is_factory_new | ( | ) |
Check if device is factory new.
zb_void_t zb_get_long_address | ( | zb_ieee_addr_t * | addr | ) |
Get 64-bit long address
addr | - pointer to memory where result will be stored |
zb_char_t* zb_get_version | ( | ) |
Get ZBOSS version.
void zb_init | ( | zb_char_t * | trace_comment | ) |
Global stack initialization.
Don't call directly, use ZB_INIT() instead
void zb_nwk_set_ed_timeout | ( | zb_uint_t | to | ) |
Set end device timeout.
Use it on End Device to specify End Device timeout period used in ED Timeout request.
to | - index in nwk_requested_timeout_e |
void zb_nwk_set_keepalive_timeout | ( | zb_uint_t | to | ) |
Set keep alive timeout.
Use it on End Device to specify how often device should poll it's parent.
to | - timeout, in beacon intervals |
zb_void_t zb_set_channel | ( | zb_uint32_t | channel_mask | ) |
Set channel mask on device.
channel_mask | - ZigBee channel mask |
Example:
zb_void_t zb_set_long_address | ( | zb_ieee_addr_t * | addr | ) |
Set 64-bit long address
addr | - long address structure |
zb_void_t zb_set_max_children | ( | zb_uint8_t | max_children | ) |
Set the maximum number of connected devices. Used for coordinators and routers
max_children | - maximum number of connected devices. |
void zb_set_network_coordinator_role | ( | zb_uint32_t | channel_mask | ) |
Initiate device as a ZigBee coordinator
channel_mask | - ZigBee channel mask |
void zb_set_network_coordinator_role_legacy | ( | zb_uint32_t | channel_mask | ) |
Initiate device as a legacy (pre-r21) ZigBee coordinator
channel_mask | - ZigBee channel mask |
void zb_set_network_ed_role | ( | zb_uint32_t | channel_mask | ) |
Initiate device as a ZigBee End Device
channel_mask | - ZigBee channel mask |
void zb_set_network_ed_role_legacy | ( | zb_uint32_t | channel_mask | ) |
Initiate device as a legacy (pre-r21) ZigBee End Device
channel_mask | - ZigBee channel mask |
void zb_set_network_router_role | ( | zb_uint32_t | channel_mask | ) |
Initiate device as a ZigBee router
channel_mask | - ZigBee channel mask |
void zb_set_network_router_role_legacy | ( | zb_uint32_t | channel_mask | ) |
Initiate device as a legacy (pre-r21) ZigBee router
channel_mask | - ZigBee channel mask |
zb_void_t zb_set_rx_on_when_idle | ( | zb_bool_t | rx_on | ) |
Set RxOnWhenIdle attribute
rx_on | - attribute value |
Example:
zb_void_t zboss_main_loop | ( | ) |
ZBOSS main loop. Must be called after ZB_INIT() and zboss_start(). Loops infinitely.
See any sample
zb_void_t zboss_main_loop_iteration | ( | ) |
ZBOSS main loop iteration. Must be called after ZB_INIT() and zboss_start() inside the application's main cycle.
zb_void_t zboss_signal_handler | ( | zb_uint8_t | param | ) |
ZBOSS application signal handler.
Mandatory for all applications implemented on the top of ZBOSS stack.
param | - reference to the buffer which contains signal zb_zdo_app_signal_type_e |
zb_ret_t zboss_start | ( | ) |
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 zboss_signal_handler callback is called, so application will know when to do some useful things.
Precondition: stack must be inited by ZB_INIT() call. ZB_INIT() loads IB from NVRAM or set its defaults, so caller has a chance to change some parameters.
zb_ret_t zboss_start_no_autostart | ( | ) |
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 is doing some additional initialization (HW init etc) and requires ZBOSS scheduler to be working. Application should later call ZBOSS commissioning initiation - for instance, bdb_start_top_level_commissioning().