|
zb_ret_t | zb_zcl_start_attr_reporting (zb_uint8_t ep, zb_uint16_t cluster_id, zb_uint8_t cluster_role, zb_uint16_t attr_id) |
| Start attribute reporting. More...
|
|
zb_ret_t | zb_zcl_stop_attr_reporting (zb_uint8_t ep, zb_uint16_t cluster_id, zb_uint8_t cluster_role, zb_uint16_t attr_id) |
| Stop attribute reporting. More...
|
|
zb_bool_t | zcl_is_attr_reported (zb_uint8_t ep, zb_uint16_t cluster_id, zb_uint8_t cluster_role, zb_uint16_t attr_id) |
| Check if an attribute is configured for reporting or not. More...
|
|
zb_ret_t | zb_zcl_put_reporting_info (zb_zcl_reporting_info_t *rep_info_ptr, zb_bool_t override) |
|
ZCL attribute reporting being described in ZCL spec, subclauses 2.4.7 through 2.4.11, and subclauses covering clusters with reportable attributes.
API for attribute reporting configuring and configuration details reading documented in: Configure reporting command sending and parsing, and Report attribute command parsing respectively.
Since all events related to attribute reporting are being handled internally, application can be provided with information on attribute report receipt event, and attribute report not received within predefined interval event. To handle these events, application may set "report attribute" and "no reporting" callbacks with ZB_ZCL_SET_REPORT_ATTR_CB() and ZB_ZCL_SET_NO_REPORTING_CB() macros respectively.
- Example
-
{
ZVUNUSED(ep);
ZVUNUSED(attr_type);
ZVUNUSED(value);
TRACE_MSG(TRACE_APP1,
">> report_attribute_cb addr %d ep %hd, cluster 0x%x, attr %d",
(FMT__D_H_D_D, addr->u.
short_addr, ep, cluster_id, attr_id));
TRACE_MSG(TRACE_APP1,
"<< report_attribute_cb", (FMT__0));
}
◆ ZB_ZCL_MAX_REPORTING_INTERVAL_DEFAULT
#define ZB_ZCL_MAX_REPORTING_INTERVAL_DEFAULT 0x0000 |
Default value for maximum reporting interval
◆ ZB_ZCL_MIN_REPORTING_INTERVAL_DEFAULT
#define ZB_ZCL_MIN_REPORTING_INTERVAL_DEFAULT 0x0005 |
Default value for minimum reporting interval
◆ zb_zcl_no_reporting_cb_t
Informs application that some attribute value was not reported during defined time interval.
- Parameters
-
ep | - endpoint number |
cluster_id | - cluster ID |
attr_id | - attribute ID |
◆ zb_zcl_report_attr_cb_t
Informs application about received attribute report.
- Parameters
-
addr | - source address |
ep | - source endpoint number |
cluster_id | - cluster ID |
attr_id | - attribute ID |
attr_type | - attribute type |
value | - pointer to reported data value |
◆ zb_zcl_start_attr_reporting()
Start attribute reporting.
- Parameters
-
ep | - endpoint number |
cluster_id | - cluster ID |
cluster_role | - cluster role |
attr_id | - attribute ID |
- Returns
- RET_OK if reporting is successfully started
RET_DOES_NOT_EXIST if reporting can't be configured with given parameters (i.e cluster not present)
◆ zb_zcl_stop_attr_reporting()
Stop attribute reporting.
- Parameters
-
ep | - endpoint number |
cluster_id | - cluster ID |
cluster_role | - cluster role |
attr_id | - attribute ID |
- Returns
- RET_OK if reporting is successfully stopped
RET_DOES_NOT_EXIST if reporting was not set up with given parameters
◆ zcl_is_attr_reported()
Check if an attribute is configured for reporting or not.
- Parameters
-
ep | - endpoint number |
cluster_id | - cluster ID |
cluster_role | - cluster role |
attr_id | - attribute ID |
- Returns
- ZB_TRUE if attribute is reported