|
#define | ZB_ZCL_GENERAL_GET_COMPLETE_DISC_RES(data_buf, complete) |
| Parses Discovery attribute response and returns next Read attribute status record or NULL if there is no more data. More...
|
|
#define | ZB_ZCL_GENERAL_GET_NEXT_DISC_ATTR_RES(data_buf, disc_attr_info) |
| Discovery attribute response and returns next Discovery attribute status record or NULL if there is no more data. More...
|
|
#define | ZB_ZCL_GENERAL_DISC_READ_ATTR_REQ(buffer, def_resp, start_attr_id, max_len, addr, dst_addr_mode, dst_ep, ep, profile_id, cluster_id, cb) |
| Discover attribute command. More...
|
|
#define | ZB_ZCL_GENERAL_DISC_ATTR_REQ_A(buffer, cmd_ptr, direction, def_resp, start_attr_id, max_len, addr, dst_addr_mode, dst_ep, ep, profile_id, cluster_id, cb) |
| Discover Attribute Request. More...
|
|
Discover attributes command described in ZCL spec, subclauses 2.4.13 and 2.4.14.
Read attributes request command can be formed and sent as in following snippet:
DUT_ADDR, DUT_ADDR_MODE, DUT_ENDPOINT,
Discover attributes response can be parsed as:
until allocated buffer space exceeds.
Discover attributes request parsing and response filling and sending is implemented in ZCL library internal functions.
◆ ZB_ZCL_DISC_COMPLETE
#define ZB_ZCL_DISC_COMPLETE 0x01U |
no more attributes to be discovered
◆ ZB_ZCL_DISC_NON_COMPLETE
#define ZB_ZCL_DISC_NON_COMPLETE 0x00U |
more attributes to be discovered
◆ ZB_ZCL_GENERAL_DISC_ATTR_REQ_A
#define ZB_ZCL_GENERAL_DISC_ATTR_REQ_A |
( |
|
buffer, |
|
|
|
cmd_ptr, |
|
|
|
direction, |
|
|
|
def_resp, |
|
|
|
start_attr_id, |
|
|
|
max_len, |
|
|
|
addr, |
|
|
|
dst_addr_mode, |
|
|
|
dst_ep, |
|
|
|
ep, |
|
|
|
profile_id, |
|
|
|
cluster_id, |
|
|
|
cb |
|
) |
| |
Value:{ \
ZB_ZCL_CONSTRUCT_GENERAL_COMMAND_REQ_FRAME_CONTROL_A(cmd_ptr, direction, \
ZB_ZCL_PACKET_PUT_DATA16_VAL(cmd_ptr, (start_attr_id)); \
ZB_ZCL_PACKET_PUT_DATA8(cmd_ptr, (max_len)); \
ZB_ZCL_FINISH_PACKET(buffer, cmd_ptr) \
ZB_ZCL_SEND_COMMAND_SHORT(buffer, addr, dst_addr_mode, dst_ep, ep, profile_id, cluster_id, cb); \
}
Discover Attribute Request.
- Parameters
-
buffer | - reference to buffer to put packet into |
cmd_ptr | - pointer to command (not used) |
direction | - direction of command (see zcl_frame_direction) |
def_resp | - enable/disable default response |
start_attr_id | - start attribute ID |
max_len | - max count |
addr | - address to send packet to |
dst_addr_mode | - addressing mode |
dst_ep | - destination endpoint |
ep | - sending endpoint |
profile_id | - profile identifier |
cluster_id | - cluster identifier |
cb | - callback for getting command send status |
◆ ZB_ZCL_GENERAL_DISC_READ_ATTR_REQ
#define ZB_ZCL_GENERAL_DISC_READ_ATTR_REQ |
( |
|
buffer, |
|
|
|
def_resp, |
|
|
|
start_attr_id, |
|
|
|
max_len, |
|
|
|
addr, |
|
|
|
dst_addr_mode, |
|
|
|
dst_ep, |
|
|
|
ep, |
|
|
|
profile_id, |
|
|
|
cluster_id, |
|
|
|
cb |
|
) |
| |
Value:{ \
ZB_ZCL_CONSTRUCT_GENERAL_COMMAND_REQ_FRAME_CONTROL(cmd_ptr, def_resp); \
ZB_ZCL_PACKET_PUT_DATA16_VAL(cmd_ptr, (start_attr_id)); \
ZB_ZCL_PACKET_PUT_DATA8(cmd_ptr, (max_len)); \
ZB_ZCL_FINISH_PACKET(buffer, cmd_ptr) \
ZB_ZCL_SEND_COMMAND_SHORT(buffer, addr, dst_addr_mode, dst_ep, ep, profile_id, cluster_id, cb); \
}
Discover attribute command.
- Parameters
-
buffer | - reference to buffer to put packet into |
def_resp | - enable/disable default response |
start_attr_id | - start attribute ID |
max_len | - max count |
addr | - address to send packet to |
dst_addr_mode | - addressing mode |
dst_ep | - destination endpoint |
ep | - sending endpoint |
profile_id | - profile identifier |
cluster_id | - cluster identifier |
cb | - callback for getting command send status |
◆ ZB_ZCL_GENERAL_GET_COMPLETE_DISC_RES
#define ZB_ZCL_GENERAL_GET_COMPLETE_DISC_RES |
( |
|
data_buf, |
|
|
|
complete |
|
) |
| |
Value:{ \
{ \
} \
else \
{ \
(complete) = 0; \
} \
}
Parses Discovery attribute response and returns next Read attribute status record or NULL if there is no more data.
If response contains invalid data, 0 is returned.
- Parameters
-
data_buf | - ID zb_bufid_t of a buffer containing discover attribute response data |
complete | - variable to store Complete field |
- Note
- data_buf buffer should contain Discover attribute response payload, without ZCL header.
◆ ZB_ZCL_GENERAL_GET_NEXT_DISC_ATTR_RES
#define ZB_ZCL_GENERAL_GET_NEXT_DISC_ATTR_RES |
( |
|
data_buf, |
|
|
|
disc_attr_info |
|
) |
| |
Value:{ \
(disc_attr_info) =
zb_buf_len(data_buf) >= ZB_ZCL_DISC_ATTR_RESP_SIZE ? \
\
if (disc_attr_info) \
{ \
ZB_ZCL_HTOLE16_INPLACE(&(disc_attr_info)->attr_id); \
\
} \
}
Discovery attribute response and returns next Discovery attribute status record or NULL if there is no more data.
If response contains invalid data, NULL is returned.
- Parameters
-
data_buf | - ID zb_bufid_t of a buffer containing part of Discover attribute response data |
disc_attr_info | - out pointer to zb_zcl_disc_attr_info_t, containing Discover attribute status record |
- Note
- data_buf buffer should contain Discover attribute response payload, without ZCL header. Each parsed Discover attribute status record is extracted from initial data_buf buffer
◆ zb_zcl_disc_attr_info_t
ZCL Description for Discover Attribute Response frame.
- See also
- ZCL spec, zb_zcl_read_attr 2.4.14 Discover Attribute Response
◆ zb_zcl_disc_attr_req_t
ZCL Discover Attribute Command frame.
- See also
- ZCL spec, zb_zcl_disc_attr 2.4.13 Discover Attributes Command
◆ zb_zcl_disc_attr_res_t
ZCL Discover Attribute Response frame.
- See also
- ZCL spec, zb_zcl_read_attr 2.4.15 Discover Attribute Response
- Note
- Command frame contains variable number of parameters
◆ zb_zcl_disc_complete_t
Type for possible values of ZCL Discover Attribute Response.
- Deprecated:
- holds one of zcl_disc_complete. Kept only for backward compatibility as zcl_disc_complete were declared previously as enum. Can be removed in future releases.