nRF5 SDK for Thread and Zigbee v1.0.0
Data Structures | Typedefs
Read attributes request and response sending and parsing.

Data Structures

struct  zb_zcl_read_attr_req_s
 ZCL Read Attribute Command frame. More...
 
struct  zb_zcl_read_attr_res_s
 ZCL Read Attribute Response Command frame. More...
 

Typedefs

typedef struct
zb_zcl_read_attr_req_s 
zb_zcl_read_attr_req_t
 ZCL Read Attribute Command frame. More...
 
typedef struct
zb_zcl_read_attr_res_s 
zb_zcl_read_attr_res_t
 ZCL Read Attribute Response Command frame. More...
 

Detailed Description

Read attributes command described in ZCL spec, subclauses 2.4.1 and 2.4.2.

Read attributes request command can be formed and sent as in following snippet:

ZB_ZCL_GENERAL_INIT_READ_ATTR_REQ(zcl_cmd_buf, cmd_ptr, ZB_ZCL_ENABLE_DEFAULT_RESPONSE);
ZB_ZCL_GENERAL_ADD_ID_READ_ATTR_REQ(cmd_ptr, ZB_ZCL_ATTR_BINARY_INPUT_PRESENT_VALUE_ID);
ZB_ZCL_GENRAL_SEND_READ_ATTR_REQ(zcl_cmd_buf, cmd_ptr, DUT_ADDR, DUT_ADDR_MODE, DUT_ENDPOINT,
TH_ENDPOINT, ZB_AF_HA_PROFILE_ID,

Read attributes response can be parsed as:

ZB_ZCL_GENERAL_GET_NEXT_READ_ATTR_RES(buf, read_attr_resp);

until allocated buffer space exceeds.

Read attributes request parsing and response filling and sending is implemented in ZCL library internal functions.

For more information see any HA sample

Typedef Documentation

ZCL Read Attribute Command frame.

See Also
ZCL spec, zb_zcl_read_attr 2.4.1 Read Attributes Command
Note
Command frame contains variable number of parameters

ZCL Read Attribute Response Command frame.

See Also
ZCL spec, zb_zcl_read_attr 2.4.2 Read Attributes Response Command
Note
Command frame contains variable number of parameters. Also, based on status value attr_type and attr_value maybe absent.

Documentation feedback | Developer Zone | Subscribe | Updated