nRF5 SDK for Thread and Zigbee v1.0.0
Macros | Typedefs | Enumerations | Functions
Legacy ZBOSS callbacks interface

Macros

#define SET_ZBOSS_CB(cb)   (zb_void_t (*)()) cb
 

Typedefs

typedef enum
zb_zboss_core_callbacks_e 
zb_zboss_core_callbacks_t
 

Enumerations

enum  zb_zboss_core_callbacks_e {
  ZB_DEVICE_ASSOCIATED_CB, ZB_DEVICE_ANNCE_CB, ZB_LEAVE_INDICATION_CB, ZB_LEAVE_CB,
  ZB_ASSERT_INDICATION_CB, ZB_ZCL_DEVICE_CB
}
 

Functions

zb_void_t zb_register_zboss_callback (zb_zboss_core_callbacks_t cbid, zb_void_t(*cb_ptr)())
 

Detailed Description

Typedef Documentation

Enum ZBOSS Core callback types.

Enumeration Type Documentation

Enum ZBOSS Core callback types.

Enumerator
ZB_DEVICE_ASSOCIATED_CB 

Informs application that some device has been associated. Use it on routers and coordinators. See zb_addr_assignment_cb_t for callback type.

ZB_DEVICE_ANNCE_CB 

Informs application that some device has joined to network. Use this callback on routers and coordinators. See zb_device_annce_cb_t for callback type.

ZB_LEAVE_INDICATION_CB 

Informs application that some device has left network. Use it on Routers and coordinators. See zb_callback_t for callback type.

ZB_LEAVE_CB 
         Called when device leaves itself from network.

See zb_callback_t for callback type.

ZB_ASSERT_INDICATION_CB 

Called when assert was occured. See zb_callback_t for callback type.

ZB_ZCL_DEVICE_CB 

Informs application that ZCL command was received. See zb_callback_t for callback type.

Function Documentation

zb_void_t zb_register_zboss_callback ( zb_zboss_core_callbacks_t  cbid,
zb_void_t(*)()  cb_ptr 
)

Register ZBOSS Core callbacks.

Each callback is triggered by it's specific event denoted in cbid parameter. Reference to zb_zboss_core_callbacks_e.

Parameters
cbid- callback id used to specify callback type
cb_ptr- pointer to callback function

Example:

...
zb_register_zboss_callback(ZB_DEVICE_ANNCE_CB, SET_ZBOSS_CB(dev_annce_cb));
...
zb_void_t dev_annce_cb(zb_zdo_device_annce_t *da)
{
// user code
}

Documentation feedback | Developer Zone | Subscribe | Updated