Tizen Native API  5.0
On/Off Cluster

Zigbee on/off cluster commands.

Required Header

#include <zigbee.h>

Overview

Attributes and commands for switching devices between 'On' and 'Off' states.

Functions

int zb_zcl_on_off_control (zb_zigbee_h handle, zb_nwk_addr addr16, zb_end_point ep, zb_zcl_on_off_e on_off_type)
 Sends 'on/off/toggle' command.

Enumeration Type Documentation

On/Off/Toggle value.

Since :
5.0
Enumerator:
ZB_ZCL_OFF 

Off

ZB_ZCL_ON 

On

ZB_ZCL_TOGGLE 

Toggle


Function Documentation

int zb_zcl_on_off_control ( zb_zigbee_h  handle,
zb_nwk_addr  addr16,
zb_end_point  ep,
zb_zcl_on_off_e  on_off_type 
)

Sends 'on/off/toggle' command.

On receipt of 'on' command, a device shall enter its 'Off' state. This state is device dependent, but it is recommended that it is used for power off or similar functions.

On receipt of 'off' command, a device shall enter its 'On' state. This state is device dependent, but it is recommended that it is used for power on or similar functions.

On receipt of 'toggle' command, if a device is in its 'Off' state it shall enter its 'On' state. Otherwise, if it is in its 'On' state it shall enter its 'Off' state.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/zigbee
Parameters:
[in]handleThe handle of zigbee
[in]addr16Network address
[in]epEndpoint ID
[in]on_off_typeZB_ZCL_OFF
ZB_ZCL_ON
ZB_ZCL_TOGGLE
Returns:
0 on success, otherwise a negative error value.
Return values:
ZIGBEE_ERROR_NONESuccessful
ZIGBEE_ERROR_INVALID_PARAMETERInvalid parameter
ZIGBEE_ERROR_INVALID_ENDPOINTInvalid endpoint. 0 is reserved for ZDP
ZIGBEE_ERROR_INVALID_ADDRESSInvalid address
ZIGBEE_ERROR_IO_ERRORUnexpected d-bus error
ZIGBEE_ERROR_PERMISSION_DENIEDPermission denied
ZIGBEE_ERROR_NOT_SUPPORTEDNot supported