|
Developing with ZBOSS for Zigbee
|
◆ ZB_ZDO_EXTENDED_DEVICE_RESP
#define ZB_ZDO_EXTENDED_DEVICE_RESP 1U |
◆ ZB_ZDO_SINGLE_DEVICE_RESP
#define ZB_ZDO_SINGLE_DEVICE_RESP 0U |
◆ zb_zdo_ieee_addr_req_t
Parameters of IEEE_addr_req primitive.
To be put into buffer as data (means - after space alloc).
◆ zb_zdo_ieee_addr_resp_t
brief ZDO IEEE address response frame
◆ zb_zdo_ieee_addr_req()
IEEE_addr_req primitive.
- Parameters
-
param | - index of buffer with primitive parameters zb_zdo_ieee_addr_req_s. Parameters must be put into the buffer as data (allocated). |
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.)
Example:
{
\
if (dev_idx != SIMPLE_GW_INVALID_DEV_INDEX)
{
req_param->
nwk_addr = g_device_ctx.devices[dev_idx].short_addr;
}
else
{
TRACE_MSG(TRACE_APP2,
"No devices in discovery state were found!", (FMT__0));
}
}
{
TRACE_MSG(TRACE_APP2,
">> device_ieee_addr_req_cb param %hd", (FMT__H, param));
{
dev_idx = simple_gw_get_dev_index_by_short_addr(nwk_addr);
if (dev_idx != SIMPLE_GW_INVALID_DEV_INDEX)
{
ZB_MEMCPY(g_device_ctx.devices[dev_idx].ieee_addr, ieee_addr,
sizeof(
zb_ieee_addr_t));
g_device_ctx.devices[dev_idx].dev_state = CONFIGURE_BINDING;
param = 0;
}
else
{
TRACE_MSG(TRACE_APP2,
"This resp is not for our device", (FMT__0));
}
}
if (param)
{
}
TRACE_MSG(TRACE_APP2,
"<< device_ieee_addr_req_cb", (FMT__0));
}
◆ zb_zdo_nwk_addr_req()
Sends NWK_addr_req primitive.
- Parameters
-
- Returns
- - ZDP transaction sequence number or 0xFF if operation cannot be performed now (nor enough memory, resources, etc.)
Example:
{
TRACE_MSG(TRACE_APP2,
"bulb_nwk_addr_req: param %hd ieee "TRACE_FORMAT_64, (FMT__H_A, param, TRACE_ARG_64(ieee_addr)));
ZB_IEEE_ADDR_COPY(req->
ieee_addr, ieee_addr);
}
{
TRACE_MSG(TRACE_APP2,
">> bulb_nwk_addr_req_cb param %hd", (FMT__H, param));
{
find_light_bulb(param, nwk_addr, g_device_ctx.pending_dev_ep);
}
TRACE_MSG(TRACE_APP2,
"<< bulb_ieee_addr_req_cb", (FMT__0));
}
NWK_addr_req response frame.
Definition: zboss_api_zdo.h:1338
zb_uint8_t request_type
Definition: zboss_api_zdo.h:1326
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:153
#define ZB_SCHEDULE_APP_CALLBACK2(func, param, user_param)
Definition: zboss_api_core.h:348
#define TRACE_MSG(lm, fmts, args)
Put trace output.
Definition: zb_trace.h:359
zb_uint16_t dst_addr
Definition: zboss_api_zdo.h:1414
zb_uint16_t nwk_addr
Definition: zboss_api_zdo.h:1343
#define ZB_NWK_BROADCAST_ALL_DEVICES
Definition: zboss_api_nwk.h:41
zb_uint8_t start_index
Definition: zboss_api_zdo.h:1329
zb_uint8_t start_index
Definition: zboss_api_zdo.h:1420
zb_uint8_t request_type
Definition: zboss_api_zdo.h:1417
zb_uint8_t zb_zdo_ieee_addr_req(zb_uint8_t param, zb_callback_t cb)
IEEE_addr_req primitive.
#define ZB_LETOH16
Definition: zb_types.h:794
#define ZB_BUF_GET_PARAM(buf, type)
Definition: zboss_api_buf.h:447
#define ZB_TRUE
Definition: zb_types.h:375
Parameters for nwk_addr_req command.
Definition: zboss_api_zdo.h:1321
#define zb_buf_alloc_tail(buf, size)
Definition: zboss_api_buf.h:416
Parameters for ieee_addr_req command.
Definition: zboss_api_zdo.h:1412
#define ZB_ZDP_STATUS_SUCCESS
Definition: zboss_api_zdo.h:41
zb_ieee_addr_t ieee_addr
Definition: zboss_api_zdo.h:1324
#define zb_buf_begin(buf)
Definition: zboss_api_buf.h:343
zb_64bit_addr_t zb_ieee_addr_t
Long (64-bit) device address.
Definition: zb_types.h:554
zb_uint8_t zb_zdo_nwk_addr_req(zb_uint8_t param, zb_callback_t cb)
Sends NWK_addr_req primitive.
zb_uint8_t zb_address_ieee_ref_t
Definition: zb_address.h:80
zb_ieee_addr_t ieee_addr
Definition: zboss_api_zdo.h:1342
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:157
#define zb_buf_free(buf)
Free packet buffer and put it into free list.
Definition: zboss_api_buf.h:333
zb_ret_t zb_address_update(zb_ieee_addr_t ieee_address, zb_uint16_t short_address, zb_bool_t lock, zb_address_ieee_ref_t *ref_p)
zb_uint8_t status
Definition: zboss_api_zdo.h:1341
zb_uint8_t zb_bufid_t
Definition: zboss_api_buf.h:172
zb_uint16_t dst_addr
Definition: zboss_api_zdo.h:1323
zb_uint16_t nwk_addr
Definition: zboss_api_zdo.h:1415