Tizen Native API
5.0
|
Zigbee on/off cluster commands.
#include <zigbee.h>
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. |
enum zb_zcl_on_off_e |
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.
[in] | handle | The handle of zigbee |
[in] | addr16 | Network address |
[in] | ep | Endpoint ID |
[in] | on_off_type | ZB_ZCL_OFF ZB_ZCL_ON ZB_ZCL_TOGGLE |
ZIGBEE_ERROR_NONE | Successful |
ZIGBEE_ERROR_INVALID_PARAMETER | Invalid parameter |
ZIGBEE_ERROR_INVALID_ENDPOINT | Invalid endpoint. 0 is reserved for ZDP |
ZIGBEE_ERROR_INVALID_ADDRESS | Invalid address |
ZIGBEE_ERROR_IO_ERROR | Unexpected d-bus error |
ZIGBEE_ERROR_PERMISSION_DENIED | Permission denied |
ZIGBEE_ERROR_NOT_SUPPORTED | Not supported |