Tizen Native API  5.0
Write Attribute Record

The write attribute record.

Required Header

#include <zigbee.h>

Overview

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.

Function Documentation

Creates a write attribute record.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/zigbee
Parameters:
[in]handleThe handle of write attribute record
Returns:
0 on success, otherwise a negative error value.
Return values:
ZIGBEE_ERROR_NONESuccessful
ZIGBEE_ERROR_INVALID_PARAMETERInvalid parameter
ZIGBEE_ERROR_OUT_OF_MEMORYOut-of-memory
ZIGBEE_ERROR_PERMISSION_DENIEDPermission denied
ZIGBEE_ERROR_NOT_SUPPORTEDNot supported
See also:
zb_zcl_global_attr_write()
zb_zcl_global_attr_write_undivided()
zb_zcl_global_attr_write_no_rsp()
zb_write_attr_record_destroy()
zb_write_attr_record_set_id()
zb_write_attr_record_set_value()

Destroys a write attribute record handle.

Since :
5.0
Parameters:
[in]handleThe handle of write attribute record
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_attr_write()
zb_zcl_global_attr_write_undivided()
zb_zcl_global_attr_write_no_rsp()
zb_write_attr_record_create()
zb_write_attr_record_set_id()
zb_write_attr_record_set_value()

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.

Since :
5.0
Parameters:
[in]handleThe handle of write attribute 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_attr_write()
zb_zcl_global_attr_write_undivided()
zb_zcl_global_attr_write_no_rsp()
zb_write_attr_record_create()
zb_write_attr_record_destroy()
zb_write_attr_record_set_value()

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.

Since :
5.0
Parameters:
[in]handleThe handle of write attribute record
[in]typeattribute data type
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_attr_write()
zb_zcl_global_attr_write_undivided()
zb_zcl_global_attr_write_no_rsp()
zb_write_attr_record_create()
zb_write_attr_record_destroy()
zb_write_attr_record_set_id()
zb_write_attr_record_set_value()
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

Since :
5.0
Parameters:
[in]handleThe handle of write attribute status record
[in]typeAttribute data type
[in]valueAttribute data value
[in]countThe number of items in value
Returns:
0 on success, otherwise a negative error value.
Return values:
ZIGBEE_ERROR_NONESuccessful
ZIGBEE_ERROR_INVALID_PARAMETERInvalid parameter
ZIGBEE_ERROR_OUT_OF_MEMORYOut-of-memory
ZIGBEE_ERROR_NOT_SUPPORTEDNot supported
See also:
zb_zcl_global_attr_write()
zb_zcl_global_attr_write_undivided()
zb_zcl_global_attr_write_no_rsp()
zb_write_attr_record_create()
zb_write_attr_record_destroy()
zb_write_attr_record_set_id()
zb_write_attr_record_set_value()