|
Developing with ZBOSS SDK for Zigbee
|
◆ ZB_ZDO_RECORD_GET_DEVICE_TYPE
#define ZB_ZDO_RECORD_GET_DEVICE_TYPE |
( |
|
var | ) |
( var & 3U ) |
◆ ZB_ZDO_RECORD_GET_RELATIONSHIP
#define ZB_ZDO_RECORD_GET_RELATIONSHIP |
( |
|
var | ) |
( (var & 0x70) >> 4 ) |
◆ ZB_ZDO_RECORD_GET_RX_ON_WHEN_IDLE
#define ZB_ZDO_RECORD_GET_RX_ON_WHEN_IDLE |
( |
|
var | ) |
( (var & 0xCU) >> 2U ) |
◆ 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
◆ 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_permit_joining_req_t
Parameters for Mgmt_Permit_Joining_req.
- See also
- ZB spec, subclause 2.4.3.3.7.
◆ zb_zdo_pim_get_long_poll_interval_resp_t
Arguments of asynchronous Get Long Poll Interval response.
◆ zb_zdo_mgmt_lqi_req()
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:
{
}
{
TRACE_MSG(TRACE_APS1, "get_lqi_cb status %hd, neighbor_table_entries %hd, start_index %hd, neighbor_table_list_count %d",
{
TRACE_MSG(TRACE_APS1, "#%hd: long addr " TRACE_FORMAT_64 " pan id " TRACE_FORMAT_64,
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",
record++;
}
}
See zdpo_lqi sample
◆ zb_zdo_mgmt_nwk_update_req()
Performs Mgmt_NWK_Update_req request.
- Parameters
-
- Returns
- - ZDP transaction sequence number or 0xFF if operation cannot be performed now (nor enough memory, resources, etc.)
Example:
{
}
{
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",
{
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));
}
}
See TP_PRO_BV-37 sample
◆ zb_zdo_mgmt_permit_joining_req()
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
- ZDP transaction sequence number
-
0xFF if operation cannot be performed now (nor enough memory, resources, etc.)
req_param->dest_addr = 0xfffc;
req_param->permit_duration = 0;
req_param->tc_significance = 1;
See onoff_server sample
◆ zdo_mgmt_leave_req()
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 can't be performed right now (if there is no free slot for registering the callback)
Example:
{
TRACE_MSG(TRACE_ERROR, "zb_leave_req", (FMT__0));
}
{
TRACE_MSG(TRACE_ERROR,
"LEAVE CALLBACK status %hd", (FMT__H, resp->
status));
}
See nwk_leave sample
unsigned int zb_uint_t
Unsigned int (at least 2 bytes).
Definition: zb_types.h:336
#define ZB_ZDO_RECORD_GET_RX_ON_WHEN_IDLE(var)
Definition: zboss_api_zdo.h:2009
zb_uint16_t transmission_failures
Definition: zboss_api_zdo.h:1802
zb_uint32_t scan_channels
Definition: zboss_api_zdo.h:1741
zb_uint8_t status
Definition: zboss_api_zdo.h:1799
zb_uint8_t lqi
Definition: zboss_api_zdo.h:2045
Response for Mgmt_Lqi_rsp.
Definition: zboss_api_zdo.h:1957
Response for Mgmt_Leave_rsp.
Definition: zboss_api_zdo.h:2375
zb_ieee_addr_t device_address
Definition: zboss_api_zdo.h:2349
zb_uint16_t dst_addr
Definition: zboss_api_zdo.h:2350
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:139
Parameters for Mgmt_NWK_Update_req.
Definition: zboss_api_zdo.h:1750
zb_uint8_t status
Definition: zboss_api_zdo.h:2378
zb_uint16_t dst_addr
Definition: zboss_api_zdo.h:1760
zb_bitfield_t remove_children
Definition: zboss_api_zdo.h:2353
zb_int32_t zb_ret_t
Return type for ZB functions returning execution status.
Definition: zb_errors.h:33
NeighborTableList Record Format for Mgmt_Lqi_resp.
Definition: zboss_api_zdo.h:2032
zb_zdo_mgmt_nwk_update_req_hdr_t hdr
Definition: zboss_api_zdo.h:1752
zb_uint8_t start_index
Definition: zboss_api_zdo.h:1937
zb_uint8_t scanned_channels_list_count
Definition: zboss_api_zdo.h:1804
zb_ext_pan_id_t ext_pan_id
Definition: zboss_api_zdo.h:2034
#define ZB_ZDO_RECORD_GET_RELATIONSHIP(var)
Definition: zboss_api_zdo.h:2029
Parameters for Mgmt_Lqi_req.
Definition: zboss_api_zdo.h:1935
zb_uint8_t zdo_mgmt_leave_req(zb_uint8_t param, zb_callback_t cb)
Sends Mgmt_Leave_req.
#define ZB_BUF_GET_PARAM(buf, type)
Definition: zboss_api_buf.h:486
zb_uint8_t status
Definition: zboss_api_zdo.h:1960
Header parameters for mgmt_nwk_update_notify.
Definition: zboss_api_zdo.h:1796
zb_uint16_t network_addr
Definition: zboss_api_zdo.h:2038
zb_bitfield_t rejoin
Definition: zboss_api_zdo.h:2354
#define ZB_ZDO_RECORD_GET_DEVICE_TYPE(var)
Definition: zboss_api_zdo.h:1989
zb_uint8_t depth
Definition: zboss_api_zdo.h:2044
zb_ieee_addr_t ext_addr
Definition: zboss_api_zdo.h:2036
zb_uint32_t scanned_channels
Definition: zboss_api_zdo.h:1800
#define ZB_ZDP_STATUS_SUCCESS
Definition: zboss_api_zdo.h:41
zb_uint8_t permit_join
Definition: zboss_api_zdo.h:2042
#define zb_buf_begin(buf)
Definition: zboss_api_buf.h:345
zb_64bit_addr_t zb_ieee_addr_t
Long (64-bit) device address.
Definition: zb_types.h:529
Parameters for zb_zdo_mgmt_permit_joining_req.
Definition: zboss_api_zdo.h:2517
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_uint8_t neighbor_table_list_count
Definition: zboss_api_zdo.h:1965
#define RET_OK
Error codes for non-void stack functions. In general, function can return OK, BLOCKED or some error....
Definition: zb_errors.h:77
zb_uint8_t scan_duration
Definition: zboss_api_zdo.h:1742
zb_uint16_t total_transmissions
Definition: zboss_api_zdo.h:1801
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_uint8_t zb_zdo_mgmt_nwk_update_req(zb_uint8_t param, zb_callback_t cb)
Performs Mgmt_NWK_Update_req request.
zb_uint8_t type_flags
Definition: zboss_api_zdo.h:2040
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:143
Request for Mgmt_Leave_req.
Definition: zboss_api_zdo.h:2347
#define zb_buf_free(buf)
Free packet buffer and put it into free list.
Definition: zboss_api_buf.h:335
#define ZB_FALSE
Definition: zb_types.h:360
#define zb_buf_len(buf)
Definition: zboss_api_buf.h:392
zb_uint8_t neighbor_table_entries
Definition: zboss_api_zdo.h:1961
zb_uint8_t zb_bufid_t
Definition: zboss_api_buf.h:170
zb_uint8_t scan_count
Definition: zboss_api_zdo.h:1753
zb_uint8_t start_index
Definition: zboss_api_zdo.h:1963
zb_uint16_t dst_addr
Definition: zboss_api_zdo.h:1939