Tizen Native API  5.0
Write Attribute Status Record

The write attribute status record.

Required Header

#include <zigbee.h>

Overview

The write attributes response status record is generated in response to a write attributes command.

Functions

int zb_write_attr_status_create (zb_zcl_write_attr_status_record_h *handle)
 Creates write attribute status record.
int zb_write_attr_status_clone (zb_zcl_write_attr_status_record_h src, zb_zcl_write_attr_status_record_h *dst)
 Clones a write attribute status record.
int zb_write_attr_status_destroy (zb_zcl_write_attr_status_record_h handle)
 Destroys a write attribute status record.
int zb_write_attr_status_get_status (zb_zcl_write_attr_status_record_h handle, zb_zcl_status_e *status)
 Gets the status from a write attribute status record.
int zb_write_attr_status_set_status (zb_zcl_write_attr_status_record_h handle, zb_zcl_status_e status)
 Sets the status to a write attribute status record.
int zb_write_attr_status_get_id (zb_zcl_write_attr_status_record_h handle, zb_attribute_id *id)
 Gets the identifier from a write attribute status record.
int zb_write_attr_status_set_id (zb_zcl_write_attr_status_record_h handle, zb_attribute_id id)
 Sets the identifier to a write attribute status record.

Function Documentation

Clones a write attribute status record.

Since :
5.0
Remarks:
The dst should be released using zb_write_attr_status_destroy().
Parameters:
[in]srcSource handle of write attribute status record
[in]dstDestination handle of write attribute status 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_cb()
zb_write_attr_status_create()
zb_write_attr_status_destroy()
zb_write_attr_status_get_status()
zb_write_attr_status_set_status()
zb_write_attr_status_get_id()
zb_write_attr_status_set_id()

Creates write attribute status record.

This allocates heap for write attribute status record

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/zigbee
Remarks:
The handle should be released using zb_write_attr_status_destroy().
Parameters:
[out]handleThe handle of write attribute status record
Returns:
0 on success, otherwise a negative error value.
Return values:
ZIGBEE_ERROR_NONESuccessful
ZIGBEE_ERROR_INVALID_PARAMETERInvalid parameter
ZIGBEE_ERROR_IO_ERRORUnexpected d-bus error
ZIGBEE_ERROR_PERMISSION_DENIEDPermission denied
See also:
zb_zcl_global_attr_write_cb()
zb_write_attr_status_clone()
zb_write_attr_status_destroy()
zb_write_attr_status_get_status()
zb_write_attr_status_set_status()
zb_write_attr_status_get_id()
zb_write_attr_status_set_id()

Destroys a write attribute status record.

Since :
5.0
Parameters:
[in]handleThe handle of write attribute status 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_cb()
zb_write_attr_status_create()
zb_write_attr_status_clone()
zb_write_attr_status_get_status()
zb_write_attr_status_set_status()
zb_write_attr_status_get_id()
zb_write_attr_status_set_id()

Gets the identifier from a write attribute status record.

The attribute identifier field is 16 bits in length and shall contain the identifier of the attribute that has been write (or of which an element has been write).

This field shall contain the same value that was included in the corresponding attribute identifier field of the original write attributes or write attributes structured command.

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_attr_write_cb()
zb_write_attr_status_create()
zb_write_attr_status_clone()
zb_write_attr_status_destroy()
zb_write_attr_status_get_status()
zb_write_attr_status_set_status()
zb_write_attr_status_set_id()

Gets the status from a write 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.

Since :
5.0
Parameters:
[in]handleThe handle of read attribute status record
[out]statuserror code
See also:
zb_zcl_status_e
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_cb()
zb_write_attr_status_create()
zb_write_attr_status_clone()
zb_write_attr_status_destroy()
zb_write_attr_status_get_id()
zb_write_attr_status_set_id()
zb_write_attr_status_set_status()

Sets the identifier to a write attribute status record.

The attribute identifier field is 16 bits in length and shall contain the identifier of the attribute that has been write (or of which an element has been write).

This field shall contain the same value that was included in the corresponding attribute identifier field of the original write attributes or write attributes structured command.

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_attr_write_cb()
zb_write_attr_status_create()
zb_write_attr_status_clone()
zb_write_attr_status_destroy()
zb_write_attr_status_get_status()
zb_write_attr_status_set_status()
zb_write_attr_status_get_id()

Sets the status to a write attribute status record.

The status field is 8 bits in length and specifies the status of the read operation on this attribute.

Since :
5.0
Parameters:
[in]handleThe handle of read attribute status record
[in]statuserror code
See also:
zb_zcl_status_e
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_cb()
zb_write_attr_status_create()
zb_write_attr_status_clone()
zb_write_attr_status_destroy()
zb_write_attr_status_get_status()
zb_write_attr_status_get_id()
zb_write_attr_status_set_id()