Tizen Native API
5.0
|
The write attribute record.
#include <zigbee.h>
The write attributes record is generated when a device wishes to change the values of one or more attributes located on another device. Each write attribute record shall contain the identifier and the actual value of the attribute to be written.
Functions | |
int | zb_write_attr_record_create (zb_zcl_write_attr_record_h *handle) |
Creates a write attribute record. | |
int | zb_write_attr_record_destroy (zb_zcl_write_attr_record_h handle) |
Destroys a write attribute record handle. | |
int | zb_write_attr_record_set_id (zb_zcl_write_attr_record_h handle, zb_attribute_id id) |
Sets the attribute identifier of a write attribute record. | |
int | zb_write_attr_record_set_type (zb_zcl_write_attr_record_h handle, zb_zcl_data_type_e type) |
Sets the attribute data type of a write attribute record. | |
int | zb_write_attr_record_set_value (zb_zcl_write_attr_record_h handle, zb_zcl_data_type_e type, unsigned char *value, int count) |
Sets data value to write attribute status record. |
int zb_write_attr_record_create | ( | zb_zcl_write_attr_record_h * | handle | ) |
Creates a write attribute record.
[in] | handle | The handle of write attribute 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 |
int zb_write_attr_record_destroy | ( | zb_zcl_write_attr_record_h | handle | ) |
Destroys a write attribute record handle.
[in] | handle | The handle of write attribute record |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
int zb_write_attr_record_set_id | ( | zb_zcl_write_attr_record_h | handle, |
zb_attribute_id | id | ||
) |
Sets the attribute identifier of a write attribute record.
The attribute identifier field is 16 bits in length and shall contain the identifier of the attribute that is to be written.
[in] | handle | The handle of write attribute record |
[in] | id | Attribute identifier |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
int zb_write_attr_record_set_type | ( | zb_zcl_write_attr_record_h | handle, |
zb_zcl_data_type_e | type | ||
) |
Sets the attribute data type of a write attribute record.
The attribute data type field shall contain the data type of the attribute that is to be written.
[in] | handle | The handle of write attribute record |
[in] | type | attribute data type |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |
int zb_write_attr_record_set_value | ( | zb_zcl_write_attr_record_h | handle, |
zb_zcl_data_type_e | type, | ||
unsigned char * | value, | ||
int | count | ||
) |
Sets data value to write attribute status record.
The attribute data type field shall contain the data type of the attribute in the same attribute report field
[in] | handle | The handle of write attribute status record |
[in] | type | Attribute data type |
[in] | value | Attribute data value |
[in] | count | The number of items in value |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_OUT_OF_MEMORY | Out-of-memory |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |