10#ifndef TR_ON_OFF_SERVER_H
11#define TR_ON_OFF_SERVER_H
27#if defined(TR_ON_OFF_SERVER_PLUGIN_PRINT_ENABLE) && (TR_ON_OFF_SERVER_PLUGIN_PRINT_ENABLE == 1)
28#define tr_on_off_server_printf(...) tr_zcl_printf(__VA_ARGS__)
29#define tr_on_off_server_println(...) tr_zcl_println(__VA_ARGS__)
31#define tr_on_off_server_printf(...)
32#define tr_on_off_server_println(...)
57 zb_uint8_t *new_value,
81 zb_uint8_t current_on_off_state);
zb_uint8_t on_off_control
Definition tr_zcl_cmd_structs.h:276
zb_uint16_t off_wait_time
Definition tr_zcl_cmd_structs.h:278
zb_uint8_t effect_variant
Definition tr_zcl_cmd_structs.h:37
zb_uint8_t effect_id
Definition tr_zcl_cmd_structs.h:36
zb_uint16_t on_time
Definition tr_zcl_cmd_structs.h:277
void tr_on_off_server_turn_on(zb_uint8_t endpoint)
API to handle local turn on. It will call the user tr_on_off_server_off_cb() callback and update attr...
void tr_on_off_server_init_endpoint(zb_uint8_t endpoint)
API to handle endpoint initialization. It will take care of the startup attribute if it is implemente...
void tr_on_off_server_turn_off(zb_uint8_t endpoint)
API to handle local turn off. It will call the user tr_on_off_server_off_cb() callback and update att...
void tr_on_off_server_init_cb(zb_uint8_t endpoint)
Callback fires when the On/off server cluster plugin is initialized.
zb_bool_t tr_on_off_server_command_received_cb(zb_zcl_parsed_hdr_t *cmd_info)
Callback that user can declare to handle any On/off server commands.
void tr_on_off_server_write_attr_cb(zb_uint8_t endpoint, zb_uint16_t attr_id, zb_uint8_t *new_value, zb_uint16_t manuf_code)
Callback fires when an On/off server attribute is about to be written.
zb_bool_t tr_on_off_server_on_cb(zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint)
Callback that user can declare to handle on/off cluster on command.
zb_bool_t tr_on_off_server_on_with_recall_global_scene_cb(zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint)
Callback that user can declare to handle on/off cluster on with recall global scene command.
zb_bool_t tr_on_off_server_off_cb(zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint)
Callback that user can declare to handle on/off cluster off command.
zb_bool_t tr_on_off_server_on_with_timed_off_cb(zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint8_t on_off_control, zb_uint16_t on_time, zb_uint16_t off_wait_time)
Callback that user can declare to handle on/off cluster on with timed off command.
zb_bool_t tr_on_off_server_toggle_cb(zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint8_t current_on_off_state)
Callback that user can declare to handle on/off cluster toggle command.
zb_bool_t tr_on_off_server_off_with_effect_cb(zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint8_t effect_id, zb_uint8_t effect_variant)
Callback that user can declare to handle on/off cluster off with effect command.
Trident application framework include.
zb_uint8_t endpoint
Definition tr_nvram_attr.h:176
zb_uint16_t manuf_code
Definition tr_nvram_attr.h:180
zb_uint16_t attr_id
Definition tr_nvram_attr.h:178
void tr_on_off_server_attributes_ready(void)
tr_on_off_server_states_t
Definition tr_on_off_server.h:17
@ TR_ON_OFF_SERVER_STATE_ON
Definition tr_on_off_server.h:19
@ TR_ON_OFF_SERVER_STATE_DELAYED_OFF
Definition tr_on_off_server.h:21
@ TR_ON_OFF_SERVER_STATE_TIMED_ON
Definition tr_on_off_server.h:20
@ TR_ON_OFF_SERVER_STATE_OFF
Definition tr_on_off_server.h:18
void tr_on_off_server_init(void)