Tizen Native API  5.0
Reporting Configuration Record

The reporting configuration record.

Required Header

#include <zigbee.h>

Overview

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.

Function Documentation

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.

Since :
5.0
Remarks:
The value should be released using free().
Parameters:
[in]handleThe handle of write attribute status record
[out]typeattribute 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]valueThe 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]sizeattribute data size
Returns:
0 on success, otherwise a negative error value.
Return values:
ZIGBEE_ERROR_NONESuccessful
ZIGBEE_ERROR_INVALID_PARAMETERInvalid parameter
ZIGBEE_ERROR_NOT_SUPPORTEDNot supported
See also:
zb_zcl_global_config_report_read_cb()
zb_report_config_record_create()
zb_report_config_record_clone()
zb_report_config_record_destroy()
zb_report_config_record_get_id()
zb_report_config_record_set_id()
zb_report_config_record_get_dir()
zb_report_config_record_set_dir()
zb_report_config_record_get_min_interval()
zb_report_config_record_set_min_interval()
zb_report_config_record_get_max_interval()
zb_report_config_record_set_max_interval()
zb_report_config_record_get_change()
zb_report_config_record_set_change()
zb_report_config_record_get_timeout()
zb_report_config_record_set_timeout()

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.

Since :
5.0
Parameters:
[in]handleThe handle of write attribute status record
[out]dir00 : 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.
Returns:
0 on success, otherwise a negative error value.
Return values:
ZIGBEE_ERROR_NONESuccessful
ZIGBEE_ERROR_INVALID_PARAMETERInvalid parameter
ZIGBEE_ERROR_NOT_SUPPORTEDNot supported
See also:
zb_zcl_global_config_report_read_cb()
zb_report_config_record_create()
zb_report_config_record_clone()
zb_report_config_record_destroy()
zb_report_config_record_get_id()
zb_report_config_record_set_id()
zb_report_config_record_set_dir()
zb_report_config_record_get_type()
zb_report_config_record_get_min_interval()
zb_report_config_record_set_min_interval()
zb_report_config_record_get_max_interval()
zb_report_config_record_set_max_interval()
zb_report_config_record_get_change()
zb_report_config_record_set_change()
zb_report_config_record_get_timeout()
zb_report_config_record_set_timeout()
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.

Since :
5.0
Parameters:
[in]handleThe handle of write attribute status record
[out]idAttribute identifier
Returns:
0 on success, otherwise a negative error value.
Return values:
ZIGBEE_ERROR_NONESuccessful
ZIGBEE_ERROR_INVALID_PARAMETERInvalid parameter
ZIGBEE_ERROR_NOT_SUPPORTEDNot supported
See also:
zb_zcl_global_config_report_read_cb()
zb_report_config_record_create()
zb_report_config_record_clone()
zb_report_config_record_destroy()
zb_report_config_record_set_id()
zb_report_config_record_get_dir()
zb_report_config_record_set_dir()
zb_report_config_record_get_type()
zb_report_config_record_get_min_interval()
zb_report_config_record_set_min_interval()
zb_report_config_record_get_max_interval()
zb_report_config_record_set_max_interval()
zb_report_config_record_get_change()
zb_report_config_record_set_change()
zb_report_config_record_get_timeout()
zb_report_config_record_set_timeout()
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.

Since :
5.0
Parameters:
[in]handleThe handle of write attribute status record
[out]max_imaximum interval time
Returns:
0 on success, otherwise a negative error value.
Return values:
ZIGBEE_ERROR_NONESuccessful
ZIGBEE_ERROR_INVALID_PARAMETERInvalid parameter
ZIGBEE_ERROR_NOT_SUPPORTEDNot supported
See also:
zb_zcl_global_config_report_read_cb()
zb_report_config_record_create()
zb_report_config_record_clone()
zb_report_config_record_destroy()
zb_report_config_record_get_id()
zb_report_config_record_set_id()
zb_report_config_record_get_dir()
zb_report_config_record_set_dir()
zb_report_config_record_get_min_interval()
zb_report_config_record_set_min_interval()
zb_report_config_record_set_max_interval()
zb_report_config_record_get_change()
zb_report_config_record_set_change()
zb_report_config_record_get_timeout()
zb_report_config_record_set_timeout()
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.

Since :
5.0
Parameters:
[in]handleThe handle of write attribute status record
[out]min_iminimum interval time
Returns:
0 on success, otherwise a negative error value.
Return values:
ZIGBEE_ERROR_NONESuccessful
ZIGBEE_ERROR_INVALID_PARAMETERInvalid parameter
ZIGBEE_ERROR_NOT_SUPPORTEDNot supported
See also:
zb_zcl_global_config_report_read_cb()
zb_report_config_record_create()
zb_report_config_record_clone()
zb_report_config_record_destroy()
zb_report_config_record_get_id()
zb_report_config_record_set_id()
zb_report_config_record_get_dir()
zb_report_config_record_set_dir()
zb_report_config_record_set_min_interval()
zb_report_config_record_get_max_interval()
zb_report_config_record_set_max_interval()
zb_report_config_record_get_change()
zb_report_config_record_set_change()
zb_report_config_record_get_timeout()
zb_report_config_record_set_timeout()
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.

Since :
5.0
Parameters:
[in]handleThe handle of write attribute status record
[out]timeouttimeout
Returns:
0 on success, otherwise a negative error value.
Return values:
ZIGBEE_ERROR_NONESuccessful
ZIGBEE_ERROR_INVALID_PARAMETERInvalid parameter
ZIGBEE_ERROR_NOT_SUPPORTEDNot supported
See also:
zb_zcl_global_config_report_read_cb()
zb_report_config_record_create()
zb_report_config_record_clone()
zb_report_config_record_destroy()
zb_report_config_record_get_id()
zb_report_config_record_set_id()
zb_report_config_record_get_dir()
zb_report_config_record_set_dir()
zb_report_config_record_get_min_interval()
zb_report_config_record_set_min_interval()
zb_report_config_record_get_max_interval()
zb_report_config_record_set_max_interval()
zb_report_config_record_get_change()
zb_report_config_record_set_change()
zb_report_config_record_set_timeout()
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.

Since :
5.0
Parameters:
[in]handleThe handle of write attribute status record
[in]typeattribute type
[in]valueattribute data (only analog data type is allowed)
Returns:
0 on success, otherwise a negative error value.
Return values:
ZIGBEE_ERROR_NONESuccessful
ZIGBEE_ERROR_INVALID_PARAMETERInvalid parameter
ZIGBEE_ERROR_NOT_SUPPORTEDNot supported
See also:
zb_zcl_global_config_report_read_cb()
zb_report_config_record_create()
zb_report_config_record_clone()
zb_report_config_record_destroy()
zb_report_config_record_get_id()
zb_report_config_record_set_id()
zb_report_config_record_get_dir()
zb_report_config_record_set_dir()
zb_report_config_record_get_type()
zb_report_config_record_get_min_interval()
zb_report_config_record_set_min_interval()
zb_report_config_record_get_max_interval()
zb_report_config_record_set_max_interval()
zb_report_config_record_get_change()
zb_report_config_record_set_change()
zb_report_config_record_get_timeout()
zb_report_config_record_set_timeout()

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.

Since :
5.0
Parameters:
[in]handleThe handle of write attribute status record
[in]dir00 : 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.
Returns:
0 on success, otherwise a negative error value.
Return values:
ZIGBEE_ERROR_NONESuccessful
ZIGBEE_ERROR_INVALID_PARAMETERInvalid parameter
ZIGBEE_ERROR_NOT_SUPPORTEDNot supported
See also:
zb_zcl_global_config_report_read_cb()
zb_report_config_record_create()
zb_report_config_record_clone()
zb_report_config_record_destroy()
zb_report_config_record_get_id()
zb_report_config_record_set_id()
zb_report_config_record_get_dir()
zb_report_config_record_get_type()
zb_report_config_record_get_min_interval()
zb_report_config_record_set_min_interval()
zb_report_config_record_get_max_interval()
zb_report_config_record_set_max_interval()
zb_report_config_record_get_change()
zb_report_config_record_set_change()
zb_report_config_record_get_timeout()
zb_report_config_record_set_timeout()
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.

Since :
5.0
Parameters:
[in]handleThe handle of write attribute status record
[in]idAttribute identifier
Returns:
0 on success, otherwise a negative error value.
Return values:
ZIGBEE_ERROR_NONESuccessful
ZIGBEE_ERROR_INVALID_PARAMETERInvalid parameter
ZIGBEE_ERROR_NOT_SUPPORTEDNot supported
See also:
zb_zcl_global_config_report_read_cb()
zb_report_config_record_create()
zb_report_config_record_clone()
zb_report_config_record_destroy()
zb_report_config_record_get_id()
zb_report_config_record_get_dir()
zb_report_config_record_set_dir()
zb_report_config_record_get_type()
zb_report_config_record_get_min_interval()
zb_report_config_record_set_min_interval()
zb_report_config_record_get_max_interval()
zb_report_config_record_set_max_interval()
zb_report_config_record_get_change()
zb_report_config_record_set_change()
zb_report_config_record_get_timeout()
zb_report_config_record_set_timeout()

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.

Since :
5.0
Parameters:
[in]handleThe handle of write attribute status record
[in]max_imaximum interval time
Returns:
0 on success, otherwise a negative error value.
Return values:
ZIGBEE_ERROR_NONESuccessful
ZIGBEE_ERROR_INVALID_PARAMETERInvalid parameter
ZIGBEE_ERROR_NOT_SUPPORTEDNot supported
See also:
zb_zcl_global_config_report_read_cb()
zb_report_config_record_create()
zb_report_config_record_clone()
zb_report_config_record_destroy()
zb_report_config_record_get_id()
zb_report_config_record_set_id()
zb_report_config_record_get_dir()
zb_report_config_record_set_dir()
zb_report_config_record_get_min_interval()
zb_report_config_record_set_min_interval()
zb_report_config_record_get_max_interval()
zb_report_config_record_get_change()
zb_report_config_record_set_change()
zb_report_config_record_get_timeout()
zb_report_config_record_set_timeout()

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.

Since :
5.0
Parameters:
[in]handleThe handle of write attribute status record
[in]min_iminimum interval time
Returns:
0 on success, otherwise a negative error value.
Return values:
ZIGBEE_ERROR_NONESuccessful
ZIGBEE_ERROR_INVALID_PARAMETERInvalid parameter
ZIGBEE_ERROR_NOT_SUPPORTEDNot supported
See also:
zb_zcl_global_config_report_read_cb()
zb_report_config_record_create()
zb_report_config_record_clone()
zb_report_config_record_destroy()
zb_report_config_record_get_id()
zb_report_config_record_set_id()
zb_report_config_record_get_dir()
zb_report_config_record_set_dir()
zb_report_config_record_get_min_interval()
zb_report_config_record_get_max_interval()
zb_report_config_record_set_max_interval()
zb_report_config_record_get_change()
zb_report_config_record_set_change()
zb_report_config_record_get_timeout()
zb_report_config_record_set_timeout()
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.

Since :
5.0
Parameters:
[in]handleThe handle of write attribute status record
[in]timeouttimeout
Returns:
0 on success, otherwise a negative error value.
Return values:
ZIGBEE_ERROR_NONESuccessful
ZIGBEE_ERROR_INVALID_PARAMETERInvalid parameter
ZIGBEE_ERROR_NOT_SUPPORTEDNot supported
See also:
zb_zcl_global_config_report_read_cb()
zb_report_config_record_create()
zb_report_config_record_clone()
zb_report_config_record_destroy()
zb_report_config_record_get_id()
zb_report_config_record_set_id()
zb_report_config_record_get_dir()
zb_report_config_record_set_dir()
zb_report_config_record_get_min_interval()
zb_report_config_record_set_min_interval()
zb_report_config_record_get_max_interval()
zb_report_config_record_set_max_interval()
zb_report_config_record_get_change()
zb_report_config_record_set_change()
zb_report_config_record_get_timeout()