nRF5 SDK for Thread and Zigbee v1.0.0
Modules | Data Structures | Macros | Typedefs | Enumerations | Functions
ZDO base constants and definitions

Modules

 Zgp_sink
 

Data Structures

struct  zb_zdo_signal_leave_params_s
 Leave parameters. More...
 
struct  zb_zdo_signal_leave_indication_params_s
 Leave Indication parameters. More...
 
struct  zb_nwk_signal_device_associated_params_s
 Association parameters. More...
 
struct  zb_zdo_signal_device_annce_params_s
 Association parameters. More...
 
struct  zb_bdb_signal_touchlink_nwk_started_params_s
 
struct  zb_bdb_signal_touchlink_nwk_joined_router_s
 
struct  zb_zdo_signal_can_sleep_params_s
 Sleep signal parameters. More...
 
struct  zb_zdo_app_signal_hdr_s
 
struct  zb_zdo_callback_info_s
 
struct  zb_zdo_default_resp_s
 

Macros

#define ZB_ZDO_SIGNAL_GET_PARAMS(sg_p, type)   ((type *)((sg_p) + sizeof(zb_zdo_app_signal_t)))
 
#define ZB_ZDO_INVALID_TSN   0xFF
 
#define zb_get_app_event(param, sg_p)   zb_get_app_signal(param, sg_p)
 
#define ZB_GET_APP_SIGNAL_STATUS(param)   (ZB_BUF_FROM_REF(param)->u.hdr.status)
 
#define ZB_GET_APP_EVENT_STATUS(param)   ZB_GET_APP_SIGNAL_STATUS(param)
 

Typedefs

typedef enum zb_zdp_status_e zb_zdp_status_t
 
typedef enum
zb_zdo_app_signal_type_e 
zb_zdo_app_signal_type_t
 
typedef zb_zdo_app_signal_type_t zb_zdo_app_signal_t
 
typedef struct
zb_zdo_signal_leave_params_s 
zb_zdo_signal_leave_params_t
 Leave parameters. More...
 
typedef struct
zb_zdo_signal_leave_indication_params_s 
zb_zdo_signal_leave_indication_params_t
 Leave Indication parameters. More...
 
typedef struct
zb_nwk_signal_device_associated_params_s 
zb_nwk_signal_device_associated_params_t
 Association parameters. More...
 
typedef struct
zb_zdo_signal_device_annce_params_s 
zb_zdo_signal_device_annce_params_t
 Association parameters. More...
 
typedef struct
zb_bdb_signal_touchlink_nwk_started_params_s 
zb_bdb_signal_touchlink_nwk_started_params_t
 
typedef struct
zb_bdb_signal_touchlink_nwk_joined_router_s 
zb_bdb_signal_touchlink_nwk_joined_router_t
 
typedef struct
zb_zdo_signal_can_sleep_params_s 
zb_zdo_signal_can_sleep_params_t
 Sleep signal parameters. More...
 
typedef struct
zb_zdo_app_signal_hdr_s 
zb_zdo_app_signal_hdr_t
 
typedef zb_zdo_app_signal_hdr_t zb_zdo_app_event_t
 
typedef struct
zb_zdo_callback_info_s 
zb_zdo_callback_info_t
 
typedef struct
zb_zdo_default_resp_s 
zb_zdo_default_resp_t
 

Enumerations

enum  zb_zdp_status_e {
  ZB_ZDP_STATUS_SUCCESS = 0x00, ZB_ZDP_STATUS_INV_REQUESTTYPE = 0x80, ZB_ZDP_STATUS_DEVICE_NOT_FOUND = 0x81, ZB_ZDP_STATUS_INVALID_EP = 0x82,
  ZB_ZDP_STATUS_NOT_ACTIVE = 0x83, ZB_ZDP_STATUS_NOT_SUPPORTED = 0x84, ZB_ZDP_STATUS_TIMEOUT = 0x85, ZB_ZDP_STATUS_NO_MATCH = 0x86,
  ZB_ZDP_STATUS_NO_ENTRY = 0x88, ZB_ZDP_STATUS_NO_DESCRIPTOR = 0x89, ZB_ZDP_STATUS_INSUFFICIENT_SPACE = 0x8a, ZB_ZDP_STATUS_NOT_PERMITTED = 0x8b,
  ZB_ZDP_STATUS_TABLE_FULL = 0x8c, ZB_ZDP_STATUS_NOT_AUTHORIZED = 0x8d, ZB_ZDP_STATUS_TIMEOUT_BY_STACK = 0xff
}
 
enum  zb_zdo_app_signal_type_e {
  ZB_ZDO_SIGNAL_DEFAULT_START, ZB_ZDO_SIGNAL_SKIP_STARTUP, ZB_ZDO_SIGNAL_DEVICE_ANNCE, ZB_ZDO_SIGNAL_LEAVE,
  ZB_ZDO_SIGNAL_ERROR, ZB_BDB_SIGNAL_DEVICE_FIRST_START, ZB_BDB_SIGNAL_DEVICE_REBOOT, ZB_BDB_SIGNAL_TOUCHLINK_NWK_STARTED,
  ZB_BDB_SIGNAL_TOUCHLINK_NWK_JOINED_ROUTER, ZB_BDB_SIGNAL_TOUCHLINK, ZB_BDB_SIGNAL_STEERING, ZB_BDB_SIGNAL_FORMATION,
  ZB_BDB_SIGNAL_FIND_BIND, ZB_BDB_SIGNAL_TOUCHLINK_TARGET, ZB_BDB_SIGNAL_TOUCHLINK_NWK, ZB_NWK_SIGNAL_DEVICE_ASSOCIATED,
  ZB_ZDO_SIGNAL_LEAVE_INDICATION, ZB_ZGP_SIGNAL_COMMISSIONING, ZB_COMMON_SIGNAL_CAN_SLEEP, ZB_ZDO_SIGNAL_PRODUCTION_CONFIG_READY,
  ZB_ZDO_APP_SIGNAL_COUNT
}
 

Functions

zb_zdo_app_signal_type_t zb_get_app_signal (zb_uint8_t param, zb_zdo_app_signal_hdr_t **sg_p)
 
zb_void_t zb_zdo_get_diag_data (zb_uint16_t short_address, zb_uint8_t *lqi, zb_int8_t *rssi)
 

Detailed Description

Macro Definition Documentation

#define ZB_GET_APP_SIGNAL_STATUS (   param)    (ZB_BUF_FROM_REF(param)->u.hdr.status)

Get status from application signal

Parameters
param- buffer reference
Returns
status, see zb_ret_t
#define ZB_ZDO_SIGNAL_GET_PARAMS (   sg_p,
  type 
)    ((type *)((sg_p) + sizeof(zb_zdo_app_signal_t)))

Obtains pointer to parameters passed with application signal.

Parameters
sg_p- pointer to application signal
type- parameter type
Returns
pointer to signal parameters

Example

simple_gw_dev_annce_cb(dev_annce_params->device_short_addr);

Typedef Documentation

Association parameters.

Stack passes this parameter to application when some device associates to us.

Application signal header

Signals passed to zboss_signal_handler()

Sleep signal parameters.

Stack passes this parameter to application when device ready to sleep.

Association parameters.

Stack passes this parameter to application when some device joins/rejoins to network.

Leave Indication parameters.

Stack passes this parameter to application upon receipt leave.indication primitive.

Leave parameters.

Stack passes this parameter to application when device itself lefts network.

ZDP status values (2.4.5 ZDP Enumeration Description)

Enumeration Type Documentation

Signals passed to zboss_signal_handler()

Enumerator
ZB_ZDO_SIGNAL_DEFAULT_START 

Default signal, for pre-R21 ZBOSS API compatibility.

The signal has Code+statusonly.

ZB_ZDO_SIGNAL_SKIP_STARTUP 

Notifies the application that ZBOSS framework (scheduler, buffer pool, etc.) started, but no join/rejoin/formation/BDB initialization is done yet.

That signal is generated if application called zb_zdo_start_no_autostart() instead of zboss_start() before zboss_main_loop(). Useful, for instance, when some HW (like, sensor connected via UART etc) must be initialized before ZigBee commissioning, but having ZBOSS scheduler running.

The signal has Code+statusonly.

{
zb_zdo_app_signal_t sig = zb_get_app_signal(param, &sg_p);
TRACE_MSG(TRACE_APP1, "zboss_signal_handler: status %hd signal %hd",
(FMT__H_H, ZB_GET_APP_SIGNAL_STATUS(param), sig));
if (ZB_GET_APP_SIGNAL_STATUS(param) == 0)
{
switch(sig)
{
TRACE_MSG(TRACE_APP1, "ZB_ZDO_SIGNAL_SKIP_STARTUP: start commissioning", (FMT__0));
/* Have zb_bdb_is_factory_new() check inside */
ZB_SCHEDULE_CALLBACK(sp_start_join, SP_FIRST_JOIN_ATTEMPT);
break;
ZB_ZDO_SIGNAL_DEVICE_ANNCE 

Inform App about receiving device_annce.

               The even has additional data of
               zb_zdo_signal_device_annce_params_t type.

               @snippet simple_gw.c signal_device_annce
ZB_ZDO_SIGNAL_LEAVE 

The device itself has left the network.

 The evemnt has an additional data of type
 zb_zdo_signal_leave_params_t.

 @snippet application/light_sample/light_control/light_control.c signal_leave
ZB_ZDO_SIGNAL_ERROR 

some mess in the buffer

ZB_BDB_SIGNAL_DEVICE_FIRST_START 

Device started and commissioned first time after NVRAM erase.

The signal has Code + Status only.

ZB_BDB_SIGNAL_DEVICE_REBOOT 

BDB initialization completed after device reboot, use NVRAM contents during initialization. Device joined/rejoined and started.

The signal has Code + Status only.

ZB_BDB_SIGNAL_TOUCHLINK_NWK_STARTED 

Inform the Touchlink initiator that the new Zigbee network created.

ZB_BDB_SIGNAL_TOUCHLINK_NWK_JOINED_ROUTER 

Inform the Touchlink initiator that the new router joined the network.

ZB_BDB_SIGNAL_TOUCHLINK 

Touchlink commissioning done.

ZB_BDB_SIGNAL_STEERING 

BDB steering completed.

ZB_BDB_SIGNAL_FORMATION 

BDB formation completed.

ZB_BDB_SIGNAL_FIND_BIND 

BDB finding and binding completed.

ZB_BDB_SIGNAL_TOUCHLINK_TARGET 

Touchlink Target started.

ZB_BDB_SIGNAL_TOUCHLINK_NWK 

Touchlink Target Network started.

ZB_NWK_SIGNAL_DEVICE_ASSOCIATED 

New device associated to ZigBee Coordinator or router. Note: that signal exists due to historical reasons. Its usage is not recommented. Base your logic on ZB_ZDO_SIGNAL_DEVICE_ANNCE instead.

ZB_ZDO_SIGNAL_LEAVE_INDICATION 

NWK leave indication from the child received

Has additional data of type zb_zdo_signal_leave_indication_params_t.

ZB_ZGP_SIGNAL_COMMISSIONING 

ZGP commissioning complete signal

Called when GPCB is leaving commissioning mode.

See Also
zb_zgp_signal_commissioning_params_t.
ZB_COMMON_SIGNAL_CAN_SLEEP 

Notifies application that MCU can go to sleep.

           Passed up with parameter @ref zb_zdo_signal_can_sleep_params_t

           @snippet onoff_server/on_off_switch_zed.c signal_sleep
ZB_ZDO_SIGNAL_PRODUCTION_CONFIG_READY 

Notifies application that application specific part of production configuration can be applied

Passed up with application specific data from production configuration.

ZDP status values (2.4.5 ZDP Enumeration Description)

Enumerator
ZB_ZDP_STATUS_SUCCESS 

The requested operation or transmission was completed successfully

ZB_ZDP_STATUS_INV_REQUESTTYPE 

The supplied request type was invalid.

ZB_ZDP_STATUS_DEVICE_NOT_FOUND 

The requested device did not exist on a device following a child descriptor request to a parent.

ZB_ZDP_STATUS_INVALID_EP 

The supplied endpoint was equal to 0x00 or between 0xf1 and 0xff.

ZB_ZDP_STATUS_NOT_ACTIVE 

The requested endpoint is not described by a simple descriptor.

ZB_ZDP_STATUS_NOT_SUPPORTED 

The requested optional feature is not supported on the target device.

ZB_ZDP_STATUS_TIMEOUT 

A timeout has occurred with the requested operation.

ZB_ZDP_STATUS_NO_MATCH 

The end device bind request was unsuccessful due to a failure to match any suitable clusters.

ZB_ZDP_STATUS_NO_ENTRY 

The unbind request was unsuccessful due to the coordinator or source device not having an entry in its binding table to unbind.

ZB_ZDP_STATUS_NO_DESCRIPTOR 

A child descriptor was not available following a discovery request to a parent.

ZB_ZDP_STATUS_INSUFFICIENT_SPACE 

The device does not have storage space to support the requested operation.

ZB_ZDP_STATUS_NOT_PERMITTED 

The device is not in the proper state to support the requested operation.

ZB_ZDP_STATUS_TABLE_FULL 

The device does not have table space to support the operation.

ZB_ZDP_STATUS_NOT_AUTHORIZED 

The permissions configuration table on the target indicates that the request is not authorized from this device.

ZB_ZDP_STATUS_TIMEOUT_BY_STACK 

Custom internal statuses.

Function Documentation

zb_zdo_app_signal_type_t zb_get_app_signal ( zb_uint8_t  param,
zb_zdo_app_signal_hdr_t **  sg_p 
)

Unpack application signal buffer in zboss_signal_handler()

Parameters
param- parameter of zboss_signal_handler()
sg_p- pointer to the extended signal info, if application wants it. Can be NULL.
Returns
application signal
zb_void_t zb_zdo_get_diag_data ( zb_uint16_t  short_address,
zb_uint8_t lqi,
zb_int8_t rssi 
)

Obtains last known LQI and RSSI values from device with specified short address

Parameters
short_address- address of device
lqi[in] - pointer to zb_uint8_t variable to store lqi value
rssi[in] - pointer to zb_uint8_t variable to store rssi value

Example:

zb_uint8_t lqi, rssi;
zb_zdo_get_diag_data(0x0000, &lqi, &rssi);

Documentation feedback | Developer Zone | Subscribe | Updated