nRF5 SDK for Thread and Zigbee v1.0.0
Data Structures | Typedefs | Enumerations
Configure reporting command sending and parsing

Data Structures

struct  zb_zcl_configure_reporting_req_clnt_s
 
struct  zb_zcl_configure_reporting_req_srv_s
 
union  zb_zcl_configure_reporting_req_u_s
 General type for Configure Reporting Request command. More...
 
struct  zb_zcl_configure_reporting_req_s
 One chunk of Configure reporting command request. More...
 
struct  zb_zcl_configure_reporting_res_s
 

Typedefs

typedef struct
zb_zcl_configure_reporting_req_clnt_s 
zb_zcl_configure_reporting_req_clnt_t
 
typedef struct
zb_zcl_configure_reporting_req_srv_s 
zb_zcl_configure_reporting_req_srv_t
 
typedef union
zb_zcl_configure_reporting_req_u_s 
zb_zcl_configure_reporting_req_u_t
 General type for Configure Reporting Request command. More...
 
typedef struct
zb_zcl_configure_reporting_req_s 
zb_zcl_configure_reporting_req_t
 One chunk of Configure reporting command request. More...
 
typedef enum
zb_zcl_configure_reporting_direction_value_e 
zb_zcl_configure_reporting_direction_value_t
 
typedef struct
zb_zcl_configure_reporting_res_s 
zb_zcl_configure_reporting_res_t
 

Enumerations

enum  zb_zcl_configure_reporting_direction_value_e { ZB_ZCL_CONFIGURE_REPORTING_SEND_REPORT = 0x00, ZB_ZCL_CONFIGURE_REPORTING_RECV_REPORT = 0x01 }
 

Detailed Description

Most of actions related to the attribute reporting configuration are implemented in ZCL internals.

As described in ZCL spec, subclause 2.4.7, Configure Reporting command has two forms:

Request to configure server for attribute reporting can be filled like in the snippet below:

ZB_ZCL_GENERAL_INIT_CONFIGURE_REPORTING_SRV_REQ(zcl_cmd_buf,
cmd_ptr,
ZB_ZCL_GENERAL_ADD_SEND_REPORT_CONFIGURE_REPORTING_REQ(
cmd_ptr, ZB_ZCL_ATTR_CUSTOM_ATTR_BOOL_ID, ZB_ZCL_ATTR_TYPE_BOOL, TEST_MIN_INTERVAL, TEST_MAX_INTERVAL, 0);
ZB_ZCL_GENERAL_ADD_SEND_REPORT_CONFIGURE_REPORTING_REQ(
cmd_ptr, ZB_ZCL_ATTR_CUSTOM_ATTR_BOOL_ID, ZB_ZCL_ATTR_TYPE_BOOL, TEST_MIN_INTERVAL, TEST_MAX_INTERVAL, 0);
ZB_ZCL_GENERAL_ADD_SEND_REPORT_CONFIGURE_REPORTING_REQ(
cmd_ptr, ZB_ZCL_ATTR_CUSTOM_ATTR_BOOL_ID, ZB_ZCL_ATTR_TYPE_BOOL, TEST_MIN_INTERVAL, TEST_MAX_INTERVAL, 0);
ZB_ZCL_GENERAL_ADD_SEND_REPORT_CONFIGURE_REPORTING_REQ(
cmd_ptr, ZB_ZCL_ATTR_CUSTOM_ATTR_BOOL_ID, ZB_ZCL_ATTR_TYPE_BOOL, TEST_MIN_INTERVAL, TEST_MAX_INTERVAL, 0);
ZB_ZCL_GENERAL_SEND_CONFIGURE_REPORTING_REQ(zcl_cmd_buf, cmd_ptr, DST_ADDR, DST_ADDR_MODE,
DST_ENDPOINT, HA_SWITCH_ENDPOINT,

Other variant of the command can be filled in a similar way with ZB_ZCL_GENERAL_INIT_CONFIGURE_REPORTING_CLI_REQ() and ZB_ZCL_GENERAL_ADD_RECV_REPORT_CONFIGURE_REPORTING_REQ() macros, and scheduled for sending with ZB_ZCL_GENERAL_SEND_CONFIGURE_REPORTING_REQ() macro.

Configure reporting request record can be parsed as:

zb_buf_t* buffer = pointer_to_the_packet_buffer;
...
do
{
ZB_ZCL_GENERAL_GET_NEXT_CONFIGURE_REPORTING_REQ(buffer, req_record);
if (! req_record)
{
break;
}
process_request_record(req_record);
} while (1);

Configure Reporting response command will be generated automatically by ZCL internals. Response record to the Configure Reporting command can be parsed as:

ZB_ZCL_GENERAL_GET_NEXT_CONFIGURE_REPORTING_RES(buf, config_res);

If there are several Configure Reporting response records, they could be processed cyclically in the same manner as Configure Reporting request ones.

For more information see any HA sample

Typedef Documentation

Configure reporting command, direction field values

u.clnt: as usual, cluster with client role sends this request

to a server to configure reporting: how attribute should be reprted by a server

u.srv: as usual, cluster with server role sends this request

to a client, to inform him how an attribute will be reported by a server

One chunk of Configure reporting command request.

Attribute reporting configuration record

General type for Configure Reporting Request command.

see zb_zcl_configure_reporting_req_srv_t see zb_zcl_configure_reporting_req_clnt_t

One chunk of Configure reporting response command

Attribute status record

Enumeration Type Documentation

Configure reporting command, direction field values

Enumerator
ZB_ZCL_CONFIGURE_REPORTING_SEND_REPORT 

Report should be send by a cluster.

ZB_ZCL_CONFIGURE_REPORTING_RECV_REPORT 

Report should be received by a cluster.


Documentation feedback | Developer Zone | Subscribe | Updated