Tizen Native API
5.0
|
The reporting configuration record.
#include <zigbee.h>
The Configure Reporting record is used to configure the reporting mechanism for one or more of the attributes of a cluster. The individual cluster definitions specify which attributes shall be available to this reporting mechanism, however specific implementations of a cluster may make additional attributes available.
Note that attributes with data types of array, structure, set or bag cannot be reported.
Functions | |
int | zb_report_config_record_create (zb_zcl_reporting_config_record_h *handle) |
Creates a reporting configuration record. | |
int | zb_report_config_record_clone (zb_zcl_reporting_config_record_h src, zb_zcl_reporting_config_record_h *dst) |
Clones a reporting configuration record. | |
int | zb_report_config_record_destroy (zb_zcl_reporting_config_record_h handle) |
Destroys a reporting configuration record. | |
int | zb_report_config_record_get_dir (zb_zcl_reporting_config_record_h handle, zb_zcl_fc_direction_e *dir) |
Gets the direction from a reporting configuration record. | |
int | zb_report_config_record_set_dir (zb_zcl_reporting_config_record_h handle, zb_zcl_fc_direction_e dir) |
Sets the direction of a reporting configuration record. | |
int | zb_report_config_record_get_id (zb_zcl_reporting_config_record_h handle, unsigned short *id) |
Gets the attribute identifier from a reporting configuration record. | |
int | zb_report_config_record_set_id (zb_zcl_reporting_config_record_h handle, unsigned short id) |
Sets the attribute identifier of a reporting configuration record. | |
int | zb_report_config_record_get_type (zb_zcl_reporting_config_record_h handle, zb_zcl_data_type_e *type) |
Gets the attribute data type from a reporting configuration record. | |
int | zb_report_config_record_get_min_interval (zb_zcl_reporting_config_record_h handle, unsigned short *min_i) |
Gets the minimum interval from a reporting configuration record. | |
int | zb_report_config_record_set_min_interval (zb_zcl_reporting_config_record_h handle, unsigned short min_i) |
Sets the minimum interval of a reporting configuration record. | |
int | zb_report_config_record_get_max_interval (zb_zcl_reporting_config_record_h handle, unsigned short *max_i) |
Gets the maximum interval from a reporting configuration record. | |
int | zb_report_config_record_set_max_interval (zb_zcl_reporting_config_record_h handle, unsigned short max_i) |
Sets the maximum interval of a reporting configuration record. | |
int | zb_report_config_record_get_timeout (zb_zcl_reporting_config_record_h handle, unsigned short *timeout) |
Gets the timeout from a reporting configuration record. | |
int | zb_report_config_record_set_timeout (zb_zcl_reporting_config_record_h handle, unsigned short timeout) |
Sets the timeout of a reporting configuration record. | |
int | zb_report_config_record_get_change (zb_zcl_reporting_config_record_h handle, zb_zcl_data_type_e *type, unsigned char **value, int *size) |
Gets the change from a reporting configuration record. | |
int | zb_report_config_record_set_change (zb_zcl_reporting_config_record_h handle, zb_zcl_data_type_e type, unsigned char *value) |
Sets the change to a reporting configuration record. |
int zb_report_config_record_clone | ( | zb_zcl_reporting_config_record_h | src, |
zb_zcl_reporting_config_record_h * | dst | ||
) |
Clones a reporting configuration record.
[in] | src | Source handle of reporting configuration record |
[in] | dst | Destination handle of reporting configuration record |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
ZIGBEE_ERROR_NO_DATA | No data |
int zb_report_config_record_create | ( | zb_zcl_reporting_config_record_h * | handle | ) |
Creates a reporting configuration record.
Allocate memory for reporting configuration record
[out] | handle | The handle of reporting configuration record |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_OUT_OF_MEMORY | Out-of-memory |
ZIGBEE_ERROR_PERMISSION_DENIED | Permission denied |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
Destroys a reporting configuration record.
[in] | handle | The handle of reporting configuration record |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
int zb_report_config_record_get_change | ( | zb_zcl_reporting_config_record_h | handle, |
zb_zcl_data_type_e * | type, | ||
unsigned char ** | value, | ||
int * | size | ||
) |
Gets the change from a reporting configuration record.
The reportable change field shall contain the minimum change to the attribute that will result in a report being issued. This field is of variable length.
For attributes with 'analog' data type the field has the same data type as the attribute.
The sign (if any) of the reportable change field is ignored. For attributes of 'discrete' data type this field is omitted.
[in] | handle | The handle of write attribute status record |
[out] | type | attribute type The attribute data type shall contain the data type of the attribute in the same read attributes status record (see zb_zcl_data_type_e). |
[out] | value | The reportable change value. The reportable change field shall contain the minimum change to the attribute that will result in a report being issued. For attributes with 'analog' data type (see zb_zcl_data_type_e) the field has the same data type as the attribute. If the reportable change has not been configured, this field shall contain the invalid value for the relevant data type. For attributes of 'discrete' data type (see zb_zcl_data_type_e) this field is not permitted. |
[out] | size | attribute data size |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
int zb_report_config_record_get_dir | ( | zb_zcl_reporting_config_record_h | handle, |
zb_zcl_fc_direction_e * | dir | ||
) |
Gets the direction from a reporting configuration record.
The direction field specifies whether values of the attribute are be reported, or whether reports of the attribute are to be received.
If this value is set to 0x00, then the attribute data type field, the minimum reporting interval field, the maximum reporting interval field and the reportable change field are included in the payload, and the timeout period field is omitted. The record is sent to a cluster server (or client) to configure how it sends reports to a client (or server) of the same cluster.
If this value is set to 0x01, then the timeout period field is included in the payload, and the attribute data type field, the minimum reporting interval field, the maximum reporting interval field and the reportable change field are omitted. The record is sent to a cluster client (or server) to configure how it should expect reports from a server (or client) of the same cluster.
[in] | handle | The handle of write attribute status record |
[out] | dir | 00 : The receiver of the Configure Reporting command shall configure reporting to send to each destination as resolved by the bindings for the cluster hosting the attributes to be reported. 01 : This indicates to the receiver of the Configure Reporting command that the sender has configured its reporting mechanism to transmit reports and that, based on the current state of the sender's bindings, the sender will send reports to the receiver. |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
int zb_report_config_record_get_id | ( | zb_zcl_reporting_config_record_h | handle, |
unsigned short * | id | ||
) |
Gets the attribute identifier from a reporting configuration record.
If the direction field is 0x00, this field contains the identifier of the attribute that is to be reported.
If instead the direction field is 0x01, the device shall expect reports of values of this attribute.
[in] | handle | The handle of write attribute status record |
[out] | id | Attribute identifier |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
int zb_report_config_record_get_max_interval | ( | zb_zcl_reporting_config_record_h | handle, |
unsigned short * | max_i | ||
) |
Gets the maximum interval from a reporting configuration record.
The maximum reporting interval field is 16 bits in length and shall contain the maximum interval, in seconds, between issuing reports of the specified attribute.
If this value is set to 0xffff, then the device shall not issue reports for the specified attribute, and the configuration information for that attribute need not be maintained.
[in] | handle | The handle of write attribute status record |
[out] | max_i | maximum interval time |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
int zb_report_config_record_get_min_interval | ( | zb_zcl_reporting_config_record_h | handle, |
unsigned short * | min_i | ||
) |
Gets the minimum interval from a reporting configuration record.
The minimum reporting interval field is 16 bits in length and shall contain the minimum interval, in seconds, between issuing reports of the specified attribute.
If this value is set to 0x0000, then there is no minimum limit, unless one is imposed by the specification of the cluster using this reporting mechanism or by the applicable profile.
[in] | handle | The handle of write attribute status record |
[out] | min_i | minimum interval time |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
int zb_report_config_record_get_timeout | ( | zb_zcl_reporting_config_record_h | handle, |
unsigned short * | timeout | ||
) |
Gets the timeout from a reporting configuration record.
The timeout period field is 16 bits in length and shall contain the maximum expected time, in seconds, between received reports for the attribute specified in the attribute identifier field. If more time than this elapses between reports, this may be an indication that there is a problem with reporting.
If this value is set to 0x0000, reports of the attribute are not subject to timeout. Note that, for a server/client connection to work properly using automatic reporting, the timeout value set for attribute reports to be received by the client (or server) cluster must be set somewhat higher than the maximum reporting interval set for the attribute on the server (or client) cluster.
[in] | handle | The handle of write attribute status record |
[out] | timeout | timeout |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
int zb_report_config_record_get_type | ( | zb_zcl_reporting_config_record_h | handle, |
zb_zcl_data_type_e * | type | ||
) |
Gets the attribute data type from a reporting configuration record.
The Attribute data type field contains the data type of the attribute that is to be reported.
[in] | handle | The handle of write attribute status record |
[out] | type | attribute data type |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
int zb_report_config_record_set_change | ( | zb_zcl_reporting_config_record_h | handle, |
zb_zcl_data_type_e | type, | ||
unsigned char * | value | ||
) |
Sets the change to a reporting configuration record.
The reportable change field shall contain the minimum change to the attribute that will result in a report being issued. This field is of variable length. For attributes with 'analog' data type the field has the same data type as the attribute.
The sign (if any) of the reportable change field is ignored. For attributes of 'discrete' data type this field is omitted.
[in] | handle | The handle of write attribute status record |
[in] | type | attribute type |
[in] | value | attribute data (only analog data type is allowed) |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
int zb_report_config_record_set_dir | ( | zb_zcl_reporting_config_record_h | handle, |
zb_zcl_fc_direction_e | dir | ||
) |
Sets the direction of a reporting configuration record.
The direction field specifies whether values of the attribute are be reported, or whether reports of the attribute are to be received.
If this value is set to 0x00, then the attribute data type field, the minimum reporting interval field, the maximum reporting interval field and the reportable change field are included in the payload, and the timeout period field is omitted. The record is sent to a cluster server (or client) to configure how it sends reports to a client (or server) of the same cluster.
If this value is set to 0x01, then the timeout period field is included in the payload, and the attribute data type field, the minimum reporting interval field, the maximum reporting interval field and the reportable change field are omitted. The record is sent to a cluster client (or server) to configure how it should expect reports from a server (or client) of the same cluster.
[in] | handle | The handle of write attribute status record |
[in] | dir | 00 : The receiver of the Configure Reporting command shall configure reporting to send to each destination as resolved by the bindings for the cluster hosting the attributes to be reported. 01 : This indicates to the receiver of the Configure Reporting command that the sender has configured its reporting mechanism to transmit reports and that, based on the current state of the sender's bindings, the sender will send reports to the receiver. |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
int zb_report_config_record_set_id | ( | zb_zcl_reporting_config_record_h | handle, |
unsigned short | id | ||
) |
Sets the attribute identifier of a reporting configuration record.
If the direction field is 0x00, this field contains the identifier of the attribute that is to be reported.
If instead the direction field is 0x01, the device shall expect reports of values of this attribute.
[in] | handle | The handle of write attribute status record |
[in] | id | Attribute identifier |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
int zb_report_config_record_set_max_interval | ( | zb_zcl_reporting_config_record_h | handle, |
unsigned short | max_i | ||
) |
Sets the maximum interval of a reporting configuration record.
The maximum reporting interval field is 16 bits in length and shall contain the maximum interval, in seconds, between issuing reports of the specified attribute.
If this value is set to 0xffff, then the device shall not issue reports for the specified attribute, and the configuration information for that attribute need not be maintained.
[in] | handle | The handle of write attribute status record |
[in] | max_i | maximum interval time |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
int zb_report_config_record_set_min_interval | ( | zb_zcl_reporting_config_record_h | handle, |
unsigned short | min_i | ||
) |
Sets the minimum interval of a reporting configuration record.
The minimum reporting interval field is 16 bits in length and shall contain the minimum interval, in seconds, between issuing reports of the specified attribute.
If this value is set to 0x0000, then there is no minimum limit, unless one is imposed by the specification of the cluster using this reporting mechanism or by the applicable profile.
[in] | handle | The handle of write attribute status record |
[in] | min_i | minimum interval time |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
int zb_report_config_record_set_timeout | ( | zb_zcl_reporting_config_record_h | handle, |
unsigned short | timeout | ||
) |
Sets the timeout of a reporting configuration record.
The timeout period field is 16 bits in length and shall contain the maximum expected time, in seconds, between received reports for the attribute specified in the attribute identifier field. If more time than this elapses between reports, this may be an indication that there is a problem with reporting.
If this value is set to 0x0000, reports of the attribute are not subject to timeout. Note that, for a server/client connection to work properly using automatic reporting, the timeout value set for attribute reports to be received by the client (or server) cluster must be set somewhat higher than the maximum reporting interval set for the attribute on the server (or client) cluster.
[in] | handle | The handle of write attribute status record |
[in] | timeout | timeout |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |