Developing with ZBOSS
|
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 |
Macros | |
#define | ZB_ZCL_GENERAL_GET_NEXT_CONFIGURE_REPORTING_REQ(data_buf, config_rep_req) |
Parses Configure reporting command request and returns next Attribute reporting configuration record or NULL if there is no more data. More... | |
#define | ZB_ZCL_GENERAL_GET_NEXT_CONFIGURE_REPORTING_RES(data_buf, config_rep_res) |
Parses Configure reporting response and returns next configure attribute status record or NULL if there is no more data. More... | |
#define | ZB_ZCL_GENERAL_INIT_CONFIGURE_REPORTING_SRV_REQ(buffer, ptr, def_resp) |
Initialize Configure reporting command (report send case) More... | |
#define | ZB_ZCL_GENERAL_INIT_CONFIGURE_REPORTING_CLI_REQ(buffer, ptr, def_resp) |
Initialize Configure reporting command (report receive case) More... | |
#define | ZB_ZCL_GENERAL_ADD_SEND_REPORT_CONFIGURE_REPORTING_REQ( ptr, attr_id, attr_type, min_interval, max_interval, report_change) |
Add attribute reporting configuration record to command payload (report send case) More... | |
#define | ZB_ZCL_GENERAL_ADD_RECV_REPORT_CONFIGURE_REPORTING_REQ(ptr, attr_id, timeout) |
Add attribute reporting configuration record to command payload (report receive case) More... | |
#define | ZB_ZCL_GENERAL_SEND_CONFIGURE_REPORTING_REQ( buffer, ptr, addr, dst_addr_mode, dst_ep, ep, prfl_id, cluster_id, cb) |
Sends Configure reporting command. More... | |
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 } |
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:
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:
Configure Reporting response command will be generated automatically by ZCL internals. Response record to the Configure Reporting command can be parsed as:
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 HA samples
#define ZB_ZCL_GENERAL_ADD_RECV_REPORT_CONFIGURE_REPORTING_REQ | ( | ptr, | |
attr_id, | |||
timeout | |||
) |
Add attribute reporting configuration record to command payload (report receive case)
ptr | - command buffer pointer |
attr_id | - attribute identifier |
timeout | - reporting timeout |
#define ZB_ZCL_GENERAL_ADD_SEND_REPORT_CONFIGURE_REPORTING_REQ | ( | ptr, | |
attr_id, | |||
attr_type, | |||
min_interval, | |||
max_interval, | |||
report_change | |||
) |
Add attribute reporting configuration record to command payload (report send case)
ptr | - command buffer pointer |
attr_id | - attribute identifier |
attr_type | - type of the attribute |
min_interval | - reporting minimum interval |
max_interval | - reporting maximum interval |
report_change | - reportable value change |
#define ZB_ZCL_GENERAL_GET_NEXT_CONFIGURE_REPORTING_REQ | ( | data_buf, | |
config_rep_req | |||
) |
Parses Configure reporting command request and returns next Attribute reporting configuration record or NULL if there is no more data.
If request contains invlid data, NULL is returned.
data_buf | - ID zb_bufid_t of a buffer containing Parses Configure reporting command data |
config_rep_req | - out pointer to zb_zcl_configure_reporting_req_t, containing Attribute reporting configuration record |
#define ZB_ZCL_GENERAL_GET_NEXT_CONFIGURE_REPORTING_RES | ( | data_buf, | |
config_rep_res | |||
) |
Parses Configure reporting response and returns next configure attribute status record or NULL if there is no more data.
If response contains invlid data, NULL is returned.
data_buf | - ID zb_bufid_t of a buffer containing Configure reporting response data |
config_rep_res | - out pointer to zb_zcl_configure_reporting_res_t, containing Configure attribute status record |
#define ZB_ZCL_GENERAL_INIT_CONFIGURE_REPORTING_CLI_REQ | ( | buffer, | |
ptr, | |||
def_resp | |||
) |
Initialize Configure reporting command (report receive case)
buffer | to put packet to |
ptr | - command buffer pointer |
def_resp | - enable/disable default response |
#define ZB_ZCL_GENERAL_INIT_CONFIGURE_REPORTING_SRV_REQ | ( | buffer, | |
ptr, | |||
def_resp | |||
) |
Initialize Configure reporting command (report send case)
buffer | to put packet to |
ptr | - command buffer pointer |
def_resp | - enable/disable default response |
#define ZB_ZCL_GENERAL_SEND_CONFIGURE_REPORTING_REQ | ( | buffer, | |
ptr, | |||
addr, | |||
dst_addr_mode, | |||
dst_ep, | |||
ep, | |||
prfl_id, | |||
cluster_id, | |||
cb | |||
) |
Sends Configure reporting command.
buffer | to 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 enum zb_zcl_configure_reporting_direction_value_e zb_zcl_configure_reporting_direction_value_t |
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
typedef struct zb_zcl_configure_reporting_req_s zb_zcl_configure_reporting_req_t |
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
typedef struct zb_zcl_configure_reporting_res_s zb_zcl_configure_reporting_res_t |
One chunk of Configure reporting response command
Attribute status record