|
Developing with ZBOSS for Zigbee
|
|
#define | ZB_ZDO_INVALID_TSN 0xFFU |
|
◆ zb_zdo_get_diag_data()
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_zdo_get_diag_data_async()
Obtains last known LQI and RSSI values from the device with the specified short address.
- Parameters
-
buf | - a buffer with request params, see zb_zdo_get_diag_data_req_params_t |
cb | - a user's function to call when the response is ready. See zb_zdo_get_diag_data_resp_params_t for response params description. |
- Returns
- status, RET_OK - request successfully sent, RET_INVALID_PARAMETER_1 if buf is ZB_BUF_INVALID, RET_INVALID_PARAMETER_2 if cb is NULL, RET_BUSY if this request can't be served at the moment
Example:
{
TRACE_MSG(TRACE_APP1,
"handle_diag_data_resp, status: %d, addr: 0x%x, lqi: %d, rssi: %d",
(FMT__D_D_D_D, resp_params->status, resp_params->short_address,
resp_params->lqi, resp_params->rssi));
}
static void send_diag_data_req(
zb_uint16_t short_address)
{
if (buf != ZB_BUF_INVALID)
{
ZB_BZERO(req, sizeof(*req));
req->short_address = short_address;
}
else
{
TRACE_MSG(TRACE_ERROR,
"Failed to get a buffer", (FMT__0));
}
}
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:149
#define TRACE_MSG(lm, fmts, args)
Put trace output.
Definition: zb_trace.h:348
#define ZB_BUF_GET_PARAM(buf, type)
Definition: zboss_api_buf.h:455
Definition: zboss_api_zdo.h:1147
zb_ret_t zb_zdo_get_diag_data_async(zb_bufid_t buf, zb_callback_t cb)
Obtains last known LQI and RSSI values from the device with the specified short address.
void 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.
#define zb_buf_get_out()
Definition: zboss_api_buf.h:238
Definition: zboss_api_zdo.h:1142
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:153
#define zb_buf_free(buf)
Free packet buffer and put it into free list.
Definition: zboss_api_buf.h:333
zb_uint8_t zb_bufid_t
Definition: zboss_api_buf.h:172