Tizen Native API  5.0
Simple Descriptor

The simple descriptor.

Required Header

#include <zigbee.h>

Overview

The simple descriptor ties everything together on an endpoint, and an endpoint defines an application. The simple descriptor contains many of the fields: an endpoint ID, a profile ID, cluster IDs and a device ID.

Functions

int zb_simple_desc_create (zb_zdo_simple_desc_h *handle)
 Creates a simple descriptor.
int zb_simple_desc_clone (zb_zdo_simple_desc_h src, zb_zdo_simple_desc_h *dst)
 Clones a simple descriptor.
int zb_simple_desc_destroy (zb_zdo_simple_desc_h handle)
 Destroys a simple a descriptor handle.
int zb_simple_desc_get_ep (zb_zdo_simple_desc_h handle, zb_end_point *ep)
 Gets active endpoint number from a simple descriptor handle.
int zb_simple_desc_set_ep (zb_zdo_simple_desc_h handle, zb_end_point ep)
 Sets active endpoint number to a simple descriptor handle.
int zb_simple_desc_get_profile_id (zb_zdo_simple_desc_h handle, zb_profile_id *profileid)
 Gets profile id from a simple descriptor handle.
int zb_simple_desc_set_profile_id (zb_zdo_simple_desc_h handle, zb_profile_id profileid)
 Sets profile id to a simple descriptor handle.
int zb_simple_desc_get_device_id (zb_zdo_simple_desc_h handle, zb_device_id *deviceid)
 Gets device id from a simple descriptor handle.
int zb_simple_desc_set_device_id (zb_zdo_simple_desc_h handle, zb_device_id deviceid)
 Sets device id to a simple descriptor handle.
int zb_simple_desc_get_device_ver (zb_zdo_simple_desc_h handle, unsigned short *device_ver)
 Gets device version from a simple descriptor handle.
int zb_simple_desc_set_device_ver (zb_zdo_simple_desc_h handle, unsigned short device_ver)
 Sets device version to a simple descriptor handle.
int zb_simple_desc_get_num_of_in_clusters (zb_zdo_simple_desc_h handle, unsigned char *num_of_in_clusters)
 Gets the number of items in input clusters from a simple descriptor handle.
int zb_simple_desc_set_num_of_in_clusters (zb_zdo_simple_desc_h handle, unsigned char num_of_in_clusters)
 Sets the number of input clusters to a simple descriptor handle.
int zb_simple_desc_get_num_of_out_clusters (zb_zdo_simple_desc_h handle, unsigned char *num_of_out_clusters)
 Gets number of output clusters from a simple descriptor handle.
int zb_simple_desc_set_num_of_out_clusters (zb_zdo_simple_desc_h handle, unsigned char num_of_out_clusters)
 Sets number of output clusters to a simple descriptor handle.
int zb_simple_desc_get_in_clusters (zb_zdo_simple_desc_h handle, zb_cluster_id **in_clusters)
 Gets input cluster list from a simple descriptor handle.
int zb_simple_desc_set_in_clusters (zb_zdo_simple_desc_h handle, zb_cluster_id *in_clusters, int num)
 Sets input cluster list to a simple descriptor handle.
int zb_simple_desc_get_out_clusters (zb_zdo_simple_desc_h handle, zb_cluster_id **out_clusters)
 Gets output cluster list from a simple descriptor handle.
int zb_simple_desc_set_out_clusters (zb_zdo_simple_desc_h handle, zb_cluster_id *out_clusters, int num)
 Sets output cluster list to a simple descriptor handle.

Function Documentation

Clones a simple descriptor.

Since :
5.0
Remarks:
The dst should be released using zb_simple_desc_destroy().
Parameters:
[in]srchandle of a source simple descriptor
[in]dsthandle of a destination simple descriptor
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_simple_desc_create()
zb_simple_desc_destroy()

Creates a simple descriptor.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/zigbee
Remarks:
The handle should be released using zb_simple_desc_destroy().
Parameters:
[out]handleThe handle of a simple descriptor
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_simple_desc_clone()
zb_simple_desc_destroy()

Destroys a simple a descriptor handle.

Since :
5.0
Parameters:
[in]handleThe handle of a simple descriptor
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_simple_desc_create()
zb_simple_desc_clone()

Gets device id from a simple descriptor handle.

Since :
5.0
Parameters:
[in]handleThe handle of a simple descriptor
[out]deviceid16-bit device 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_simple_desc_set_device_id()
int zb_simple_desc_get_device_ver ( zb_zdo_simple_desc_h  handle,
unsigned short *  device_ver 
)

Gets device version from a simple descriptor handle.

Since :
5.0
Parameters:
[in]handleThe handle of a simple descriptor
[out]device_verdevice version
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_simple_desc_set_device_ver()

Gets active endpoint number from a simple descriptor handle.

Since :
5.0
Parameters:
[in]handleThe handle of a simple descriptor
[out]ependpoint number
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_simple_desc_set_ep()

Gets input cluster list from a simple descriptor handle.

Since :
5.0
Remarks:
The in_clusters should not be released.
The in_clusters is available until handle is released
Parameters:
[in]handleThe handle of simple descriptor
[out]in_clustersinput clusters
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_simple_desc_set_in_clusters()
int zb_simple_desc_get_num_of_in_clusters ( zb_zdo_simple_desc_h  handle,
unsigned char *  num_of_in_clusters 
)

Gets the number of items in input clusters from a simple descriptor handle.

Since :
5.0
Parameters:
[in]handleHandle of a simple descriptor
[out]num_of_in_clustersThe number of input clusters
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_simple_desc_set_num_of_in_clusters()
int zb_simple_desc_get_num_of_out_clusters ( zb_zdo_simple_desc_h  handle,
unsigned char *  num_of_out_clusters 
)

Gets number of output clusters from a simple descriptor handle.

Since :
5.0
Parameters:
[in]handleThe handle of a simple descriptor
[out]num_of_out_clustersnumber of output clusters
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_simple_desc_set_num_of_out_clusters()

Gets output cluster list from a simple descriptor handle.

Since :
5.0
Remarks:
The out_clusters should not be released.
The out_clusters is available until handle is released
Parameters:
[in]handleThe handle of a simple descriptor
[out]out_clustersoutput clusters
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_simple_desc_get_in_clusters()

Gets profile id from a simple descriptor handle.

Since :
5.0
Parameters:
[in]handleThe handle of a simple descriptor
[out]profileidprofile id
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_simple_desc_set_profile_id()

Sets device id to a simple descriptor handle.

Since :
5.0
Parameters:
[in]handleThe handle of a simple descriptor
[in]deviceid16-bit device 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_simple_desc_get_device_ver()
int zb_simple_desc_set_device_ver ( zb_zdo_simple_desc_h  handle,
unsigned short  device_ver 
)

Sets device version to a simple descriptor handle.

Since :
5.0
Parameters:
[in]handleThe handle of a simple descriptor
[in]device_verdevice version
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_simple_desc_set_device_ver()

Sets active endpoint number to a simple descriptor handle.

Since :
5.0
Parameters:
[in]handleThe handle of a simple descriptor
[in]ependpoint number
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_simple_desc_get_ep()
int zb_simple_desc_set_in_clusters ( zb_zdo_simple_desc_h  handle,
zb_cluster_id in_clusters,
int  num 
)

Sets input cluster list to a simple descriptor handle.

Since :
5.0
Parameters:
[in]handleThe handle of a simple descriptor
[in]in_clustersinput clusters
[in]numnumber of input clusters
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_simple_desc_get_in_clusters()
int zb_simple_desc_set_num_of_in_clusters ( zb_zdo_simple_desc_h  handle,
unsigned char  num_of_in_clusters 
)

Sets the number of input clusters to a simple descriptor handle.

Since :
5.0
Parameters:
[in]handleThe handle of a simple descriptor
[in]num_of_in_clustersnumber of input clusters
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_simple_desc_get_num_of_in_clusters()
int zb_simple_desc_set_num_of_out_clusters ( zb_zdo_simple_desc_h  handle,
unsigned char  num_of_out_clusters 
)

Sets number of output clusters to a simple descriptor handle.

Since :
5.0
Parameters:
[in]handleThe handle of a simple descriptor
[in]num_of_out_clustersnumber of output clusters
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_simple_desc_get_num_of_out_clusters()
int zb_simple_desc_set_out_clusters ( zb_zdo_simple_desc_h  handle,
zb_cluster_id out_clusters,
int  num 
)

Sets output cluster list to a simple descriptor handle.

Since :
5.0
Parameters:
[in]handleThe handle of a simple descriptor
[in]out_clustersoutput clusters
[in]numnumber of output clusters
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_simple_desc_get_in_clusters()

Sets profile id to a simple descriptor handle.

Since :
5.0
Parameters:
[in]handleThe handle of a simple descriptor
[in]profileidprofile id
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_simple_desc_get_device_id()