Developing with ZBOSS for Zigbee
ZDO miscellaneous management services

Data Structures

struct  zb_zdo_mgmt_nwk_update_req_hdr_s
 Header of parameters for Mgmt_NWK_Update_req. More...
 
struct  zb_zdo_mgmt_nwk_update_req_s
 Parameters for Mgmt_NWK_Update_req. More...
 
struct  zb_zdo_mgmt_nwk_enhanced_update_req_param_s
 Parameters for Mgmt_NWK_Update_req internal call. More...
 
struct  zb_zdo_mgmt_nwk_enhanced_update_req_hdr_s
 Header of parameters for Mgmt_NWK_Update_req. More...
 
struct  zb_zdo_mgmt_nwk_update_notify_hdr_s
 Header parameters for mgmt_nwk_update_notify. More...
 
struct  zb_zdo_mgmt_nwk_update_notify_param_s
 Parameters for mgmt_nwk_update_notify. More...
 
struct  zb_zdo_mgmt_nwk_unsol_enh_update_notify_s
 Notification for Mgmt_NWK_Unsolicited_Enhanced_Update_Notify. More...
 
struct  zb_zdo_mgmt_nwk_unsol_enh_update_notify_param_s
 Parameters for Mgmt_NWK_Unsolicited_Enhanced_Update_Notify. More...
 
struct  zb_zdo_mgmt_lqi_param_s
 Parameters for Mgmt_Lqi_req. More...
 
struct  zb_zdo_mgmt_lqi_req_s
 Request for Mgmt_Lqi_req. More...
 
struct  zb_zdo_mgmt_lqi_resp_s
 Response for Mgmt_Lqi_rsp. More...
 
struct  zb_zdo_neighbor_table_record_s
 NeighborTableList Record Format for Mgmt_Lqi_resp. More...
 
struct  zb_zdo_mgmt_rtg_param_s
 Parameters for Mgmt_rtg_req. More...
 
struct  zb_zdo_mgmt_rtg_req_s
 Request for Mgmt_rtg_req. More...
 
struct  zb_zdo_mgmt_rtg_resp_s
 Response for Mgmt_Rtg_rsp. More...
 
struct  zb_zdo_routing_table_record_s
 RoutingTableList Record Format for mgmt_rtg_resp. More...
 
struct  zb_zdo_mgmt_leave_param_s
 Request for Mgmt_Leave_req. More...
 
struct  zb_zdo_mgmt_leave_req_s
 
struct  zb_zdo_mgmt_leave_res_s
 Response for Mgmt_Leave_rsp. More...
 
struct  zb_zdo_mgmt_permit_joining_req_s
 Parameters for Mgmt_Permit_Joining_req. More...
 
struct  zb_zdo_mgmt_permit_joining_req_param_s
 Parameters for zb_zdo_mgmt_permit_joining_req.
More...
 
struct  zb_zdo_device_annce_s
 
struct  zb_nlme_leave_indication_s
 
struct  zb_zdo_pim_get_long_poll_interval_resp_s
 

Macros

#define ZB_ZDO_RECORD_SET_DEVICE_TYPE(var, type)   ( ( var ) &= ~3U, ( var ) |= ( type ) )
 
#define ZB_ZDO_RECORD_GET_DEVICE_TYPE(var)   ( var & 3U )
 
#define ZB_ZDO_RECORD_SET_RX_ON_WHEN_IDLE(var, type)   ( ( var ) &= ~0xCU, ( var ) |= (( type ) << 2U) )
 
#define ZB_ZDO_RECORD_GET_RX_ON_WHEN_IDLE(var)   ( (var & 0xCU) >> 2U )
 
#define ZB_ZDO_RECORD_SET_RELATIONSHIP(var, type)   ( ( var ) &= ~0x70U, ( var ) |= (( type ) << 4U) )
 
#define ZB_ZDO_RECORD_GET_RELATIONSHIP(var)   ( (var & 0x70) >> 4 )
 
#define ZB_ZDO_MGMT_RTG_RESP_RECORD_FLAGS_STATUS   0U
 
#define ZB_ZDO_MGMT_RTG_RESP_RECORD_FLAGS_MEM_CONST   3U
 
#define ZB_ZDO_MGMT_RTG_RESP_RECORD_FLAGS_MANY_TO_ONE   4U
 
#define ZB_ZDO_MGMT_RTG_RESP_RECORD_FLAGS_ROUTE_REC_REQUIRED   5U
 

Typedefs

typedef struct zb_zdo_mgmt_nwk_update_req_hdr_s zb_zdo_mgmt_nwk_update_req_hdr_t
 Header of parameters for Mgmt_NWK_Update_req.
 
typedef struct zb_zdo_mgmt_nwk_update_req_s zb_zdo_mgmt_nwk_update_req_t
 Parameters for Mgmt_NWK_Update_req.
 
typedef struct zb_zdo_mgmt_nwk_enhanced_update_req_param_s zb_zdo_mgmt_nwk_enhanced_update_req_param_t
 Parameters for Mgmt_NWK_Update_req internal call.
 
typedef struct zb_zdo_mgmt_nwk_enhanced_update_req_hdr_s zb_zdo_mgmt_nwk_enhanced_update_req_hdr_t
 Header of parameters for Mgmt_NWK_Update_req.
 
typedef struct zb_zdo_mgmt_nwk_update_notify_hdr_s zb_zdo_mgmt_nwk_update_notify_hdr_t
 Header parameters for mgmt_nwk_update_notify.
 
typedef struct zb_zdo_mgmt_nwk_update_notify_param_s zb_zdo_mgmt_nwk_update_notify_param_t
 Parameters for mgmt_nwk_update_notify.
 
typedef zb_zdo_mgmt_nwk_update_notify_param_t zb_zdo_mgmt_nwk_enhanced_update_notify_param_t
 
typedef struct zb_zdo_mgmt_nwk_unsol_enh_update_notify_s zb_zdo_mgmt_nwk_unsol_enh_update_notify_t
 Notification for Mgmt_NWK_Unsolicited_Enhanced_Update_Notify. More...
 
typedef struct zb_zdo_mgmt_nwk_unsol_enh_update_notify_param_s zb_zdo_mgmt_nwk_unsol_enh_update_notify_param_t
 Parameters for Mgmt_NWK_Unsolicited_Enhanced_Update_Notify. More...
 
typedef struct zb_zdo_mgmt_lqi_param_s zb_zdo_mgmt_lqi_param_t
 Parameters for Mgmt_Lqi_req. More...
 
typedef struct zb_zdo_mgmt_lqi_req_s zb_zdo_mgmt_lqi_req_t
 Request for Mgmt_Lqi_req. More...
 
typedef struct zb_zdo_mgmt_lqi_resp_s zb_zdo_mgmt_lqi_resp_t
 Response for Mgmt_Lqi_rsp. More...
 
typedef struct zb_zdo_neighbor_table_record_s zb_zdo_neighbor_table_record_t
 NeighborTableList Record Format for Mgmt_Lqi_resp.
 
typedef struct zb_zdo_mgmt_rtg_param_s zb_zdo_mgmt_rtg_param_t
 Parameters for Mgmt_rtg_req. More...
 
typedef struct zb_zdo_mgmt_rtg_req_s zb_zdo_mgmt_rtg_req_t
 Request for Mgmt_rtg_req. More...
 
typedef struct zb_zdo_mgmt_rtg_resp_s zb_zdo_mgmt_rtg_resp_t
 Response for Mgmt_Rtg_rsp. More...
 
typedef struct zb_zdo_routing_table_record_s zb_zdo_routing_table_record_t
 RoutingTableList Record Format for mgmt_rtg_resp.
 
typedef struct zb_zdo_mgmt_leave_param_s zb_zdo_mgmt_leave_param_t
 Request for Mgmt_Leave_req. More...
 
typedef struct zb_zdo_mgmt_leave_req_s zb_zdo_mgmt_leave_req_t
 
typedef struct zb_zdo_mgmt_leave_res_s zb_zdo_mgmt_leave_res_t
 Response for Mgmt_Leave_rsp. More...
 
typedef struct zb_zdo_mgmt_permit_joining_req_s zb_zdo_mgmt_permit_joining_req_t
 Parameters for Mgmt_Permit_Joining_req. More...
 
typedef struct zb_zdo_mgmt_permit_joining_req_param_s zb_zdo_mgmt_permit_joining_req_param_t
 Parameters for zb_zdo_mgmt_permit_joining_req.

 
typedef struct zb_zdo_device_annce_s zb_zdo_device_annce_t
 
typedef struct zb_nlme_leave_indication_s zb_nlme_leave_indication_t
 
typedef struct zb_zdo_pim_get_long_poll_interval_resp_s zb_zdo_pim_get_long_poll_interval_resp_t
 

Functions

zb_uint8_t zb_zdo_mgmt_nwk_update_req (zb_uint8_t param, zb_callback_t cb)
 Performs Mgmt_NWK_Update_req request. More...
 
zb_uint8_t zb_zdo_mgmt_nwk_enh_update_req (zb_uint8_t param, zb_callback_t cb)
 Performs Mgmt_NWK_Enhanced_Update_req request. More...
 
void zb_zdo_mgmt_nwk_unsol_enh_update_notify (zb_uint8_t param, zb_callback_t cb)
 Performs Mgmt_NWK_Enhanced_Update_req request. More...
 
zb_uint8_t zb_zdo_mgmt_lqi_req (zb_uint8_t param, zb_callback_t cb)
 Sends Mgmt_Lqi_req (see Zigbee spec 2.4.3.3.2) More...
 
zb_uint8_t zb_zdo_mgmt_rtg_req (zb_uint8_t param, zb_callback_t cb)
 
void zdo_mgmt_rtg_resp (zb_uint8_t param)
 
void zb_zdo_active_scan_request (zb_uint8_t param)
 Performs active scan. More...
 
zb_uint8_t zdo_mgmt_leave_req (zb_uint8_t param, zb_callback_t cb)
 Sends Mgmt_Leave_req. More...
 
zb_uint8_t zb_zdo_mgmt_permit_joining_req (zb_uint8_t param, zb_callback_t cb)
 sends Mgmt_Permit_Joining_req (See Zigbee spec 2.4.3.3.7) More...
 

Detailed Description

Macro Definition Documentation

◆ ZB_ZDO_RECORD_GET_DEVICE_TYPE

#define ZB_ZDO_RECORD_GET_DEVICE_TYPE (   var)    ( var & 3U )

Get device type of neighbor table record.

Parameters
var- neighbor table record type_flags

zb_zdo_neighbor_table_record_s

◆ ZB_ZDO_RECORD_GET_RELATIONSHIP

#define ZB_ZDO_RECORD_GET_RELATIONSHIP (   var)    ( (var & 0x70) >> 4 )

Get relationship of neighbor table record.

Parameters
var- neighbor table record type_flags

zb_zdo_neighbor_table_record_s

◆ ZB_ZDO_RECORD_GET_RX_ON_WHEN_IDLE

#define ZB_ZDO_RECORD_GET_RX_ON_WHEN_IDLE (   var)    ( (var & 0xCU) >> 2U )

Get RxOnWhenIdle of neighbor table record.

Parameters
var- neighbor table record type_flags

zb_zdo_neighbor_table_record_s

◆ ZB_ZDO_RECORD_SET_DEVICE_TYPE

#define ZB_ZDO_RECORD_SET_DEVICE_TYPE (   var,
  type 
)    ( ( var ) &= ~3U, ( var ) |= ( type ) )

Set device type of neighbor table record to type 'type': bits 0 - 1, mask 0x3;

Parameters
var- neighbor table record type_flags
type- Zigbee device type value

zb_zdo_neighbor_table_record_s

◆ ZB_ZDO_RECORD_SET_RELATIONSHIP

#define ZB_ZDO_RECORD_SET_RELATIONSHIP (   var,
  type 
)    ( ( var ) &= ~0x70U, ( var ) |= (( type ) << 4U) )

Set relationship attribute of neighbor table record to type 'type': bits 4 - 6, mask 0x70;

Parameters
var- neighbor table record type_flags
type- Zigbee relationship value

zb_zdo_neighbor_table_record_s

◆ ZB_ZDO_RECORD_SET_RX_ON_WHEN_IDLE

#define ZB_ZDO_RECORD_SET_RX_ON_WHEN_IDLE (   var,
  type 
)    ( ( var ) &= ~0xCU, ( var ) |= (( type ) << 2U) )

Set RxOnWhenIdle attribute of neighbor table record to type 'type': bits 2 - 3, mask 0xC;

Parameters
var- neighbor table record type_flags
type- RxOnWhenIdle value

zb_zdo_neighbor_table_record_s

Typedef Documentation

◆ zb_nlme_leave_indication_t

Arguments of the NLME-LEAVE.indication routine.

◆ zb_zdo_device_annce_t

Parameters of Device_annce primitive.

To be put into buffer as data (means - after space alloc).

◆ zb_zdo_mgmt_leave_param_t

Request for Mgmt_Leave_req.

See also
ZB spec, subclause 2.4.3.3.5.

Problem in the specification: in 2.4.3.3.5 Mgmt_Leave_req only one DeviceAddress exists. But, in such case it is impossible to satisfy 2.4.3.3.5.1: "The Mgmt_Leave_req is generated from a Local Device requesting that a Remote Device leave the network or to request that another device leave the network." Also, in the PRO TC document, 14.2TP/NWK/BV-04 ZR-ZDO-APL RX Join/Leave is following note: "gZC sends Mgmt_Leave.request with DevAddr=all zero, DstAddr=ZR"

◆ zb_zdo_mgmt_leave_req_t

Request for Mgmt_Leave_req.

See also
ZB spec, subclause 2.4.3.3.5.

◆ zb_zdo_mgmt_leave_res_t

Response for Mgmt_Leave_rsp.

See also
ZB spec, subclause 2.4.4.3.5.

◆ zb_zdo_mgmt_lqi_param_t

Parameters for Mgmt_Lqi_req.

See also
ZB spec, subclause 2.4.3.3.2.

◆ zb_zdo_mgmt_lqi_req_t

Request for Mgmt_Lqi_req.

See also
ZB spec, subclause 2.4.3.3.2.

◆ zb_zdo_mgmt_lqi_resp_t

Response for Mgmt_Lqi_rsp.

See also
ZB spec, subclause 2.4.4.3.2.

◆ zb_zdo_mgmt_nwk_unsol_enh_update_notify_param_t

Parameters for Mgmt_NWK_Unsolicited_Enhanced_Update_Notify.

See also
ZB spec, subclause 2.4.4.4.12

◆ zb_zdo_mgmt_nwk_unsol_enh_update_notify_t

Notification for Mgmt_NWK_Unsolicited_Enhanced_Update_Notify.

See also
ZB spec, subclause 2.4.4.4.12

◆ zb_zdo_mgmt_permit_joining_req_t

Parameters for Mgmt_Permit_Joining_req.

See also
ZB spec, subclause 2.4.3.3.7.

◆ zb_zdo_mgmt_rtg_param_t

Parameters for Mgmt_rtg_req.

See also
ZB spec, subclause 2.4.3.3.4.

◆ zb_zdo_mgmt_rtg_req_t

Request for Mgmt_rtg_req.

See also
ZB spec, subclause 2.4.3.3.4.

◆ zb_zdo_mgmt_rtg_resp_t

Response for Mgmt_Rtg_rsp.

See also
ZB spec, subclause 2.4.4.3.2.

◆ zb_zdo_pim_get_long_poll_interval_resp_t

Arguments of asynchronous Get Long Poll Interval response.

Function Documentation

◆ zb_zdo_active_scan_request()

void zb_zdo_active_scan_request ( zb_uint8_t  param)

Performs active scan.

The result will be provided via callback that is passed within zb_nlme_network_discovery_request_t. The only argument from this callback is the index of a buffer with zb_nlme_network_discovery_confirm_t param, followed by a sequence of zb_nlme_network_descriptor_t params (count is determined by zb_nlme_network_discovery_confirm_t - network_count)

Sample use of active scan request:

static void active_scan_complete_cb(zb_uint8_t param)
{
zb_nlme_network_discovery_confirm_t *cnf;
zb_nlme_network_descriptor_t *nwk_descr;
zb_ext_pan_id_t extended_pan_id;
zb_uint16_t short_pan_id;
cnf = (zb_nlme_network_discovery_confirm_t *)zb_buf_begin(param);
TRACE_MSG(TRACE_APP1, "Scan results: status=%d, network_count=%hd", (FMT__D_H, cnf->status, cnf->network_count));
if (cnf->status == RET_OK)
{
nwk_descr = (zb_nlme_network_descriptor_t *)(cnf + 1);
for (zb_uint32_t i = 0; i < cnf->network_count; i++)
{
zb_address_get_pan_id(nwk_descr->panid_ref, extended_pan_id);
zb_address_get_short_pan_id(nwk_descr->panid_ref, &short_pan_id);
TRACE_MSG(TRACE_APP1, "NWK #%d: short PAN ID=0x%x, extended PAN ID=" TRACE_FORMAT_64 " , permit_joining=%d, router_capacity=%d, end_device_capacity=%d, nwk_update_id=%hd",
(FMT__D_H_A_D_D_D_H,
i,
short_pan_id,
TRACE_ARG_64(extended_pan_id),
nwk_descr->permit_joining,
nwk_descr->router_capacity,
nwk_descr->end_device_capacity,
nwk_descr->nwk_update_id
));
nwk_descr++;
}
}
}
{
zb_nlme_network_discovery_request_t *req;
buf = zb_buf_get_out();
if (buf == 0)
{
TRACE_MSG(TRACE_ERROR, "Can't allocate buffer!", (FMT__0));
break;
}
req = ZB_BUF_GET_PARAM(buf, zb_nlme_network_discovery_request_t);
req->cb = active_scan_complete_cb;
req->scan_channels_list[0] = (1L << CHANNEL);
req->scan_duration = ZB_DEFAULT_SCAN_DURATION;
ZB_SCHEDULE_CALLBACK(zb_zdo_active_scan_request, buf);
}
Parameters
param- index of buffer with zb_nlme_network_discovery_request_t param

◆ zb_zdo_mgmt_lqi_req()

zb_uint8_t zb_zdo_mgmt_lqi_req ( zb_uint8_t  param,
zb_callback_t  cb 
)

Sends Mgmt_Lqi_req (see Zigbee spec 2.4.3.3.2)

Parameters
param- index of buffer with Lqi request parameters. zb_zdo_mgmt_lqi_param_s
cb- user's function to call when got response from the remote.
Returns
- ZDP transaction sequence number or 0xFF if operation cannot be performed now (nor enough memory, resources, etc.) zb_zdo_mgmt_lqi_resp_s, zb_zdo_neighbor_table_record_s

Example:

{
req_param->start_index = 0;
req_param->dst_addr = 0; //coord short addr
tsn = zb_zdo_mgmt_lqi_req(ZB_REF_FROM_BUF(buf), get_lqi_cb);
}
void get_lqi_cb(zb_uint8_t param)
{
zb_bufid_t buf = param;
zb_uint8_t *zdp_cmd = zb_buf_begin(buf);
TRACE_MSG(TRACE_APS1, "get_lqi_cb status %hd, neighbor_table_entries %hd, start_index %hd, neighbor_table_list_count %d",
(FMT__H_H_H_H, resp->status, resp->neighbor_table_entries, resp->start_index, resp->neighbor_table_list_count));
for (i = 0; i < resp->neighbor_table_list_count; i++)
{
TRACE_MSG(TRACE_APS1, "#%hd: long addr " TRACE_FORMAT_64 " pan id " TRACE_FORMAT_64,
(FMT__H_A_A, i, TRACE_ARG_64(record->ext_addr), TRACE_ARG_64(record->ext_pan_id)));
TRACE_MSG(TRACE_APS1,
"#%hd: network_addr %d, dev_type %hd, rx_on_wen_idle %hd, relationship %hd, permit_join %hd, depth %hd, lqi %hd",
(FMT_H_D_H_H_H_H_H_H, i, record->network_addr,
record->permit_join, record->depth, record->lqi));
record++;
}
}

◆ zb_zdo_mgmt_nwk_enh_update_req()

zb_uint8_t zb_zdo_mgmt_nwk_enh_update_req ( zb_uint8_t  param,
zb_callback_t  cb 
)

Performs Mgmt_NWK_Enhanced_Update_req request.

Parameters
param- index of buffer with call parameters. Parameters must be put into buffer as parameters. zb_zdo_mgmt_nwk_enhanced_update_req_param_s
cb- user's function to call when got response from the remote. zb_zdo_mgmt_nwk_update_notify_hdr_s
Returns
- ZDP transaction sequence number or 0xFF if operation cannot be performed now (nor enough memory, resources, etc.)

◆ zb_zdo_mgmt_nwk_unsol_enh_update_notify()

void zb_zdo_mgmt_nwk_unsol_enh_update_notify ( zb_uint8_t  param,
zb_callback_t  cb 
)

Performs Mgmt_NWK_Enhanced_Update_req request.

Parameters
param- index of buffer with call parameters. Parameters must be put into buffer as parameters. zb_zdo_mgmt_nwk_unsol_enh_update_notify_param_t
cb- user's function to call when the notification has been sent.

◆ zb_zdo_mgmt_nwk_update_req()

zb_uint8_t zb_zdo_mgmt_nwk_update_req ( zb_uint8_t  param,
zb_callback_t  cb 
)

Performs Mgmt_NWK_Update_req request.

Parameters
param- index of buffer with call parameters. Parameters must be put into buffer as parameters. zb_zdo_mgmt_nwk_update_req_s
cb- user's function to call when got response from the remote. zb_zdo_mgmt_nwk_update_notify_hdr_s
Returns
- ZDP transaction sequence number or 0xFF if operation cannot be performed now (nor enough memory, resources, etc.)

Example:

{
req->hdr.scan_channels = ZB_MAC_ALL_CHANNELS_MASK;
req->hdr.scan_duration = TEST_SCAN_DURATION;
req->scan_count = TEST_SCAN_COUNT;
req->dst_addr = 0;
tsn = zb_zdo_mgmt_nwk_update_req(param, mgmt_nwk_update_ok_cb);
}
void mgmt_nwk_update_ok_cb(zb_uint8_t param)
{
zb_bufid_t buf = param;
zb_uint8_t *zdp_cmd = zb_buf_begin(buf);
TRACE_MSG(TRACE_APS3,
"notify_resp status %hd, scanned_channels %x %x, total_transmissions %hd, "
"transmission_failures %hd, scanned_channels_list_count %hd, buf len %hd",
(FMT__H_D_D_H_H_H_H, notify_resp->status, (zb_uint16_t)notify_resp->scanned_channels,
*((zb_uint16_t*)&notify_resp->scanned_channels + 1),
notify_resp->total_transmissions, notify_resp->transmission_failures,
if (notify_resp->status == ZB_ZDP_STATUS_SUCCESS)
{
TRACE_MSG(TRACE_APS3, "mgmt_nwk_update_notify received, Ok", (FMT__0));
}
else
{
TRACE_MSG(TRACE_ERROR, "mgmt_nwk_update_notify received, ERROR incorrect status %x",
(FMT__D, notify_resp->status));
}
}

◆ zb_zdo_mgmt_permit_joining_req()

zb_uint8_t zb_zdo_mgmt_permit_joining_req ( zb_uint8_t  param,
zb_callback_t  cb 
)

sends Mgmt_Permit_Joining_req (See Zigbee spec 2.4.3.3.7)

Parameters
param- Index of buffer with request
cb- user's function to call when got response from the remote.
Returns
0xFF if the operation was NOT executed (not enough memory, resources, etc.), a valid ZDP transaction sequence number otherwise
Note
If called with destination address equal to device's address, calls nlme-permit_joining.req locally changing permit joining state on device. If called with destination address != local address (can be unicast or broadcast), forces nlme-permit_joining.req call on remote device (devices), but not on a local device keeping local permit joining state unchanged.
/* Example: send permit join request to close network */
req_param->dest_addr = 0xfffc;
req_param->permit_duration = 0;
req_param->tc_significance = 1;
zb_zdo_mgmt_permit_joining_req(buf, permit_joining_cb);

◆ zdo_mgmt_leave_req()

zb_uint8_t zdo_mgmt_leave_req ( zb_uint8_t  param,
zb_callback_t  cb 
)

Sends Mgmt_Leave_req.

See also
ZB spec, subclause 2.4.3.3.2.
Parameters
param- index of buffer with Lqi request parameters. zb_zdo_mgmt_leave_param_s
cb- user's function to call when got response from the remote.
Returns
- transaction sequence number of request or 0xFF if operation was NOT executed (if there is no free slot for registering the callback)
/* Example: send leave request */
ZB_IEEE_ADDR_COPY(req->device_address, leave_ieee_addr);
req->remove_children = ZB_FALSE;
req->rejoin = ZB_TRUE;
req->dst_addr = zr_nwk_addr;
zdo_mgmt_leave_req(buf, zb_leave_callback);

Example:

{
zb_bufid_t buf = param;
TRACE_MSG(TRACE_ERROR, "zb_leave_req", (FMT__0));
ZB_MEMSET(req->device_address, 0, sizeof(zb_ieee_addr_t));
req->rejoin = ZB_FALSE;
req->dst_addr = 1;
tsn = zdo_mgmt_leave_req(param, leave_callback);
}
void leave_callback(zb_uint8_t param)
{
TRACE_MSG(TRACE_ERROR, "LEAVE CALLBACK status %hd", (FMT__H, resp->status));
}
zb_uint_t
unsigned int zb_uint_t
Unsigned int (at least 2 bytes).
Definition: zb_types.h:325
ZB_ZDO_RECORD_GET_RX_ON_WHEN_IDLE
#define ZB_ZDO_RECORD_GET_RX_ON_WHEN_IDLE(var)
Definition: zboss_api_zdo.h:2438
zb_zdo_mgmt_nwk_update_notify_hdr_s::transmission_failures
zb_uint16_t transmission_failures
Definition: zboss_api_zdo.h:2210
zb_zdo_mgmt_nwk_update_req_hdr_s::scan_channels
zb_uint32_t scan_channels
Definition: zboss_api_zdo.h:2151
zb_zdo_mgmt_nwk_update_notify_hdr_s::status
zb_uint8_t status
Definition: zboss_api_zdo.h:2207
zb_zdo_mgmt_lqi_resp_s
Response for Mgmt_Lqi_rsp.
Definition: zboss_api_zdo.h:2386
zb_zdo_mgmt_leave_res_s
Response for Mgmt_Leave_rsp.
Definition: zboss_api_zdo.h:2922
zb_zdo_mgmt_leave_param_s::device_address
zb_ieee_addr_t device_address
Definition: zboss_api_zdo.h:2896
zb_zdo_mgmt_leave_param_s::dst_addr
zb_uint16_t dst_addr
Definition: zboss_api_zdo.h:2897
zb_uint8_t
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:147
TRACE_MSG
#define TRACE_MSG(lm, fmts, args)
Put trace output.
Definition: zb_trace.h:369
zb_zdo_mgmt_nwk_update_req_s
Parameters for Mgmt_NWK_Update_req.
Definition: zboss_api_zdo.h:2160
zb_zdo_mgmt_leave_res_s::status
zb_uint8_t status
Definition: zboss_api_zdo.h:2925
zb_zdo_mgmt_nwk_update_req_s::dst_addr
zb_uint16_t dst_addr
Definition: zboss_api_zdo.h:2170
zb_zdo_mgmt_leave_param_s::remove_children
zb_bitfield_t remove_children
Definition: zboss_api_zdo.h:2900
zb_zdo_active_scan_request
void zb_zdo_active_scan_request(zb_uint8_t param)
Performs active scan.
zb_ret_t
zb_int32_t zb_ret_t
Return type for ZB functions returning execution status.
Definition: zb_errors.h:33
zb_zdo_neighbor_table_record_s
NeighborTableList Record Format for Mgmt_Lqi_resp.
Definition: zboss_api_zdo.h:2461
zb_zdo_mgmt_nwk_update_req_s::hdr
zb_zdo_mgmt_nwk_update_req_hdr_t hdr
Definition: zboss_api_zdo.h:2162
zb_zdo_mgmt_lqi_param_s::start_index
zb_uint8_t start_index
Definition: zboss_api_zdo.h:2366
zb_zdo_mgmt_nwk_update_notify_hdr_s::scanned_channels_list_count
zb_uint8_t scanned_channels_list_count
Definition: zboss_api_zdo.h:2212
zb_zdo_neighbor_table_record_s::ext_pan_id
zb_ext_pan_id_t ext_pan_id
Definition: zboss_api_zdo.h:2463
zb_uint32_t
unsigned int zb_uint32_t
Project-local 4-byte unsigned int type.
Definition: zb_types.h:176
ZB_ZDO_RECORD_GET_RELATIONSHIP
#define ZB_ZDO_RECORD_GET_RELATIONSHIP(var)
Definition: zboss_api_zdo.h:2458
zb_zdo_mgmt_lqi_param_s
Parameters for Mgmt_Lqi_req.
Definition: zboss_api_zdo.h:2364
zdo_mgmt_leave_req
zb_uint8_t zdo_mgmt_leave_req(zb_uint8_t param, zb_callback_t cb)
Sends Mgmt_Leave_req.
ZB_BUF_GET_PARAM
#define ZB_BUF_GET_PARAM(buf, type)
Definition: zboss_api_buf.h:457
zb_zdo_mgmt_lqi_resp_s::status
zb_uint8_t status
Definition: zboss_api_zdo.h:2389
ZB_TRUE
#define ZB_TRUE
Definition: zb_types.h:350
zb_zdo_mgmt_nwk_update_notify_hdr_s
Header parameters for mgmt_nwk_update_notify.
Definition: zboss_api_zdo.h:2204
zb_zdo_neighbor_table_record_s::network_addr
zb_uint16_t network_addr
Definition: zboss_api_zdo.h:2467
zb_zdo_mgmt_leave_param_s::rejoin
zb_bitfield_t rejoin
Definition: zboss_api_zdo.h:2901
ZB_ZDO_RECORD_GET_DEVICE_TYPE
#define ZB_ZDO_RECORD_GET_DEVICE_TYPE(var)
Definition: zboss_api_zdo.h:2418
zb_zdo_neighbor_table_record_s::depth
zb_uint8_t depth
Definition: zboss_api_zdo.h:2473
zb_zdo_neighbor_table_record_s::ext_addr
zb_ieee_addr_t ext_addr
Definition: zboss_api_zdo.h:2465
zb_zdo_mgmt_nwk_update_notify_hdr_s::scanned_channels
zb_uint32_t scanned_channels
Definition: zboss_api_zdo.h:2208
zb_buf_get_out
#define zb_buf_get_out()
Definition: zboss_api_buf.h:245
ZB_ZDP_STATUS_SUCCESS
#define ZB_ZDP_STATUS_SUCCESS
Definition: zboss_api_zdo.h:41
zb_zdo_neighbor_table_record_s::permit_join
zb_uint8_t permit_join
Definition: zboss_api_zdo.h:2471
zb_buf_begin
#define zb_buf_begin(buf)
Definition: zboss_api_buf.h:354
zb_ieee_addr_t
zb_64bit_addr_t zb_ieee_addr_t
Long (64-bit) device address.
Definition: zb_types.h:535
zb_zdo_mgmt_permit_joining_req_param_s
Parameters for zb_zdo_mgmt_permit_joining_req.
Definition: zboss_api_zdo.h:3167
zb_zdo_mgmt_permit_joining_req
zb_uint8_t zb_zdo_mgmt_permit_joining_req(zb_uint8_t param, zb_callback_t cb)
sends Mgmt_Permit_Joining_req (See Zigbee spec 2.4.3.3.7)
zb_zdo_mgmt_lqi_resp_s::neighbor_table_list_count
zb_uint8_t neighbor_table_list_count
Definition: zboss_api_zdo.h:2394
RET_OK
#define RET_OK
Error codes for non-void stack functions. In general, function can return OK, BLOCKED or some error....
Definition: zb_errors.h:79
zb_zdo_mgmt_nwk_update_req_hdr_s::scan_duration
zb_uint8_t scan_duration
Definition: zboss_api_zdo.h:2152
zb_zdo_mgmt_nwk_update_notify_hdr_s::total_transmissions
zb_uint16_t total_transmissions
Definition: zboss_api_zdo.h:2209
zb_zdo_mgmt_lqi_req
zb_uint8_t zb_zdo_mgmt_lqi_req(zb_uint8_t param, zb_callback_t cb)
Sends Mgmt_Lqi_req (see Zigbee spec 2.4.3.3.2)
zb_zdo_mgmt_nwk_update_req
zb_uint8_t zb_zdo_mgmt_nwk_update_req(zb_uint8_t param, zb_callback_t cb)
Performs Mgmt_NWK_Update_req request.
zb_zdo_neighbor_table_record_s::type_flags
zb_uint8_t type_flags
Definition: zboss_api_zdo.h:2469
zb_uint16_t
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:151
zb_address_get_short_pan_id
void zb_address_get_short_pan_id(zb_address_pan_id_ref_t pan_id_ref, zb_uint16_t *pan_id_p)
zb_zdo_mgmt_leave_param_s
Request for Mgmt_Leave_req.
Definition: zboss_api_zdo.h:2894
zb_buf_free
#define zb_buf_free(buf)
Free packet buffer and put it into free list.
Definition: zboss_api_buf.h:344
ZB_FALSE
#define ZB_FALSE
Definition: zb_types.h:349
zb_buf_len
#define zb_buf_len(buf)
Definition: zboss_api_buf.h:372
zb_zdo_mgmt_lqi_resp_s::neighbor_table_entries
zb_uint8_t neighbor_table_entries
Definition: zboss_api_zdo.h:2390
zb_bufid_t
zb_uint8_t zb_bufid_t
Definition: zboss_api_buf.h:178
zb_zdo_mgmt_nwk_update_req_s::scan_count
zb_uint8_t scan_count
Definition: zboss_api_zdo.h:2163
zb_zdo_mgmt_lqi_resp_s::start_index
zb_uint8_t start_index
Definition: zboss_api_zdo.h:2392
zb_zdo_mgmt_lqi_param_s::dst_addr
zb_uint16_t dst_addr
Definition: zboss_api_zdo.h:2368
zb_ext_pan_id_t
zb_64bit_addr_t zb_ext_pan_id_t
Long (64-bit) extended Pan ID.
Definition: zb_types.h:539