nRF5 SDK for Thread and Zigbee v3.2.0
Data Structures | Macros | Typedefs
Read reporting configuration command sending and parsing

Data Structures

struct  zb_zcl_read_reporting_cfg_req_s
 
struct  zb_zcl_read_reporting_cfg_rsp_s
 

Macros

#define ZB_ZCL_READ_REP_CFG_REQ_SIZE   sizeof(zb_zcl_read_reporting_cfg_req_t)
 Minimal size of Write attribute request, it will be more if attr_value size is more than 1 byte.
 
#define ZB_ZCL_GENERAL_GET_NEXT_READ_REP_CFG_REQ(data_buf, rep_cfg_req, rslt)
 Parses read reporting configuration request and returns next Read reporting configuration attribute record or NULL if there is no more data. More...
 
#define ZB_ZCL_GENERAL_INIT_READ_REPORTING_CONFIGURATION_SRV_REQ(buffer, ptr, def_resp)
 Initialize Read reporting configuration command (report send case) More...
 
#define ZB_ZCL_GENERAL_INIT_READ_REPORTING_CONFIGURATION_CLI_REQ(buffer, ptr, def_resp)
 Initialize Read reporting configuration command (report receive case) More...
 
#define ZB_ZCL_GENERAL_ADD_SEND_READ_REPORTING_CONFIGURATION_REQ(ptr, attr_id)
 Add Read reporting configuration record to command payload (report send case) More...
 
#define ZB_ZCL_GENERAL_ADD_RECV_READ_REPORTING_CONFIGURATION_REQ(ptr, attr_id)
 Add Read reporting configuration record to command payload (report receive case) More...
 
#define ZB_ZCL_GENERAL_SEND_READ_REPORTING_CONFIGURATION_REQ(buffer, ptr, addr, dst_addr_mode, dst_ep, ep, prfl_id, cluster_id, cb)
 Sends Read reporting configuration command. More...
 
#define ZB_ZCL_GENERAL_GET_READ_REPORTING_CONFIGURATION_RES(data_buf, read_rep_conf_res)
 Parses Read reporting configuration response and returns next read reporting configuration record or NULL if there is no more data. More...
 

Typedefs

typedef struct
zb_zcl_read_reporting_cfg_req_s 
zb_zcl_read_reporting_cfg_req_t
 
typedef struct
zb_zcl_read_reporting_cfg_rsp_s 
zb_zcl_read_reporting_cfg_rsp_t
 

Detailed Description

Most of actions related to the read attribute reporting configuration are implemented in ZCL internals. Read reportung configuration command is described in ZCL spec, subclause 2.4.9.

Macro Definition Documentation

#define ZB_ZCL_GENERAL_ADD_RECV_READ_REPORTING_CONFIGURATION_REQ (   ptr,
  attr_id 
)
Value:
{ \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8-bit value to packet.
Definition: zb_zcl_common.h:1353
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1371
Definition: zb_zcl_commands.h:1381

Add Read reporting configuration record to command payload (report receive case)

Parameters
ptr- command buffer pointer
attr_id- attribute identifier
#define ZB_ZCL_GENERAL_ADD_SEND_READ_REPORTING_CONFIGURATION_REQ (   ptr,
  attr_id 
)
Value:
{ \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8-bit value to packet.
Definition: zb_zcl_common.h:1353
Definition: zb_zcl_commands.h:1380
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1371

Add Read reporting configuration record to command payload (report send case)

Parameters
ptr- command buffer pointer
attr_id- attribute identifier
#define ZB_ZCL_GENERAL_GET_NEXT_READ_REP_CFG_REQ (   data_buf,
  rep_cfg_req,
  rslt 
)
Value:
{ \
(cfg_req) = ZB_BUF_LEN(data_buf) >= ZB_ZCL_READ_REP_CFG_REQ_SIZE ? \
if (cfg_req) \
{ \
rep_cfg_req.direction = cfg_req -> direction; \
rep_cfg_req.attr_id = cfg_req -> attr_id; \
ZB_ZCL_HTOLE16_INPLACE(&(read_rep_cfg_req).attr_id); \
ZB_BUF_CUT_LEFT2((data_buf), ZB_ZCL_READ_REP_CFG_REQ_SIZE); \
rslt = ZB_TRUE; \
} \
else \
{ \
rslt = ZB_FALSE; \
} \
}
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:767
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:776
#define ZB_ZCL_READ_REP_CFG_REQ_SIZE
Minimal size of Write attribute request, it will be more if attr_value size is more than 1 byte...
Definition: zb_zcl_commands.h:1707
struct zb_zcl_read_reporting_cfg_req_s zb_zcl_read_reporting_cfg_req_t
Definition: zb_types.h:101
Definition: zb_zcl_commands.h:1691
Definition: zb_types.h:100

Parses read reporting configuration request and returns next Read reporting configuration attribute record or NULL if there is no more data.

If request contains invlid data, NULL is returned.

Parameters
data_buf- pointer to zb_buf_t buffer containing read reporting configuration request data
rep_cfg_req- out pointer to zb_zcl_read_attr_req_t, containing read reporting configuration request
rslt- returns TRUE if record exist and FALSE if not
Note
data_buf buffer should contain read reporting configuration request payload, without ZCL header. Each parsed read reporting configuration request is exctracted from intial data_buf buffer
#define ZB_ZCL_GENERAL_GET_READ_REPORTING_CONFIGURATION_RES (   data_buf,
  read_rep_conf_res 
)

Parses Read reporting configuration response and returns next read reporting configuration record or NULL if there is no more data.

If response contains invlid data, NULL is returned.

Parameters
data_buf- pointer to zb_buf_t buffer containing Configure reporting response data
read_rep_conf_res- out pointer to zb_zcl_read_reporting_cfg_rsp_t, containing read reporting configuration record
Note
data_buf buffer should contain Read reporting configuration, without ZCL header. Each parsed Read reporting configuration record is exctracted from intial data_buf buffer
#define ZB_ZCL_GENERAL_INIT_READ_REPORTING_CONFIGURATION_CLI_REQ (   buffer,
  ptr,
  def_resp 
)
Value:
{ \
ptr = ZB_ZCL_START_PACKET(buffer); \
ZB_ZCL_CONSTRUCT_GENERAL_COMMAND_REQ_FRAME_CONTROL_A( \
}
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1250
Definition: zb_zcl_common.h:874
#define ZB_ZCL_START_PACKET(zbbuf)
Initializes zb_buf_t buffer and returns pointer to the beginning of array.
Definition: zb_zcl_common.h:1332
Standard profile command.
Definition: zb_zcl_common.h:844
#define ZB_ZCL_CONSTRUCT_COMMAND_HEADER(data_ptr, tsn, cmd_id)
Construct ZCL header.
Definition: zb_zcl_common.h:1207
Definition: zb_zcl_commands.h:86

Initialize Read reporting configuration command (report receive case)

Parameters
bufferto put packet to
ptr- command buffer pointer
def_resp- enable/disable default response
#define ZB_ZCL_GENERAL_INIT_READ_REPORTING_CONFIGURATION_SRV_REQ (   buffer,
  ptr,
  def_resp 
)
Value:
{ \
ptr = ZB_ZCL_START_PACKET(buffer); \
ZB_ZCL_CONSTRUCT_GENERAL_COMMAND_REQ_FRAME_CONTROL_A( \
}
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1250
#define ZB_ZCL_START_PACKET(zbbuf)
Initializes zb_buf_t buffer and returns pointer to the beginning of array.
Definition: zb_zcl_common.h:1332
Standard profile command.
Definition: zb_zcl_common.h:844
Definition: zb_zcl_common.h:872
#define ZB_ZCL_CONSTRUCT_COMMAND_HEADER(data_ptr, tsn, cmd_id)
Construct ZCL header.
Definition: zb_zcl_common.h:1207
Definition: zb_zcl_commands.h:86

Initialize Read reporting configuration command (report send case)

Parameters
bufferto put packet to
ptr- command buffer pointer
def_resp- enable/disable default response
#define ZB_ZCL_GENERAL_SEND_READ_REPORTING_CONFIGURATION_REQ (   buffer,
  ptr,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  cluster_id,
  cb 
)
Value:
{ \
ZB_ZCL_FINISH_PACKET(buffer, ptr) \
ZB_ZCL_SEND_COMMAND_SHORT(buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, cluster_id, cb); \
}
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1654

Sends Read reporting configuration command.

Parameters
bufferto put data to
ptr- pointer to the memory area to put data to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
cluster_id- cluster identifier
cb- callback for getting command send status

Typedef Documentation

Format of the Attribute Status Record Field Figure 2.20 in ZCL spec. NOTE: it can be variouse number of attribute status record fields in Read reporting configuration request

Format of the Attribute Reporting Configuration Record Field Figure 2.22 in ZCL spec. NOTE: it can be variouse number of attribute recording configuration record fields in Read reporting configuration responce


Documentation feedback | Developer Zone | Subscribe | Updated