Tizen Native API
5.0
|
The read attribute status record.
#include <zigbee.h>
The read attributes status record is generated in response to a read attributes or read attributes structured command. The command frame shall contain a read attribute status record for each attribute identifier specified in the original read attributes or read attributes structured command. For each read attribute status record, the attribute identifier field shall contain the identifier specified in the original read attributes or read attributes structured command. The status field shall contain a suitable status code.
int zb_read_attr_status_record_clone | ( | zb_zcl_read_attr_status_record_h | src, |
zb_zcl_read_attr_status_record_h * | dst | ||
) |
Clones a read attribute status record.
[in] | src | Source handle of read attribute status record |
[in] | dst | Destination handle of read attribute status 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_read_attr_status_record_create | ( | zb_zcl_read_attr_status_record_h * | handle | ) |
Creates a read attribute status record.
[in] | handle | The handle of read attribute status record |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_IO_ERROR | Unexpected d-bus error |
ZIGBEE_ERROR_PERMISSION_DENIED | Permission denied |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
Destroys a read attribute status record.
[in] | handle | The handle of read attribute status record |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
int zb_read_attr_status_record_get_id | ( | zb_zcl_read_attr_status_record_h | handle, |
zb_attribute_id * | id | ||
) |
Gets identifier from read attribute status record.
The attribute identifier field is 16 bits in length and shall contain the identifier of the attribute that has been read (or of which an element has been read).
This field shall contain the same value that was included in the corresponding attribute identifier field of the original read attributes or read attributes structured command.
[in] | handle | The handle of read 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_read_attr_status_record_get_status | ( | zb_zcl_read_attr_status_record_h | handle, |
zb_zcl_status_e * | status | ||
) |
Gets status from read attribute status record.
The status field is 8 bits in length and specifies the status of the read operation on this attribute.
This field shall be set to ZB_ZCL_STATUS_SUCCESS, if the operation was successful, or an error code, as specified in zb_zcl_status_e if the operation was not successful.
[in] | handle | The handle of read attribute status record |
[out] | status | error code |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
int zb_read_attr_status_record_get_type | ( | zb_zcl_read_attr_status_record_h | handle, |
zb_zcl_data_type_e * | type | ||
) |
Gets type from read attribute status record.
The attribute data type field shall contain the data type of the attribute in the same read attributes status record.
This field shall only be included if the associated status field contains a value of ZB_ZCL_STATUS_SUCCESS.
[in] | handle | The handle of read attribute status record |
[out] | type | Data type |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
int zb_read_attr_status_record_get_value | ( | zb_zcl_read_attr_status_record_h | handle, |
zb_zcl_data_type_e * | type, | ||
unsigned char ** | value, | ||
int * | count | ||
) |
Gets data value from read attribute status record.
The attribute value field is variable in length and shall contain the current value of this attribute.
This field shall only be included if the associated status field contains a value of ZB_ZCL_STATUS_SUCCESS. For an attribute or element of simple type, this field has the format shown in the Table of Data Types .
[in] | handle | The handle of read attribute status record |
[out] | type | Attribute data 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). This field shall only be included if the status code is ZB_ZCL_STATUS_SUCCESS. |
[out] | value | Attribute value. The attribute value field is variable in length and shall contain the current value of this attribute. This field shall only be included if the associated status field contains a value of ZB_ZCL_STATUS_SUCCESS. For an attribute or element of simple type (not array, structure, set or bag), this field has the format shown in the Table of Data Types (see zb_zcl_data_type_e). |
[out] | count | The number of attribute data |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NO_DATA | No data available |
ZIGBEE_ERROR_OUT_OF_MEMORY | Out-of-memory |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
int zb_read_attr_status_record_set_id | ( | zb_zcl_read_attr_status_record_h | handle, |
zb_attribute_id | id | ||
) |
Sets identifier to read attribute status record.
The attribute identifier field is 16 bits in length and shall contain the identifier of the attribute that has been read (or of which an element has been read).
This field shall contain the same value that was included in the corresponding attribute identifier field of the original read attributes or read attributes structured command.
[in] | handle | The handle of read 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_read_attr_status_record_set_status | ( | zb_zcl_read_attr_status_record_h | handle, |
zb_zcl_status_e | status | ||
) |
Sets status to read attribute status record.
The status field is 8 bits in length and specifies the status of the read operation on this attribute.
[in] | handle | The handle of read attribute status record |
[in] | status | error code |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
int zb_read_attr_status_record_set_type | ( | zb_zcl_read_attr_status_record_h | handle, |
zb_zcl_data_type_e | type | ||
) |
Sets type to read attribute status record.
The attribute data type field shall contain the data type of the attribute in the same read attributes status record.
[in] | handle | The handle of read attribute status record |
[in] | type | Data type |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
int zb_read_attr_status_record_set_value | ( | zb_zcl_read_attr_status_record_h | handle, |
zb_zcl_data_type_e | type, | ||
unsigned char * | value, | ||
int | count | ||
) |
Sets data value to read attribute status record.
The attribute value field is variable in length and shall contain the current value of this attribute.
For an attribute or element of simple type, this field has the format shown in the zb_zcl_data_type_e.
[in] | handle | The handle of read attribute status record |
[in] | type | Attribute data type |
[in] | value | Attribute data value |
[in] | count | The length of attribute data |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NO_DATA | No data available |
ZIGBEE_ERROR_OUT_OF_MEMORY | Out-of-memory |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |