38 #ifndef APP_LIGHT_CTL_H__ 39 #define APP_LIGHT_CTL_H__ 43 #include "light_ctl_setup_server.h" 44 #include "light_lightness_setup_server.h" 45 #include "app_timer.h" 46 #include "app_transition.h" 47 #include "app_light_lightness.h" 49 #if (SCENE_SETUP_SERVER_INSTANCES_MAX > 0) || (DOXYGEN) 50 #include "app_scene.h" 118 #define APP_LIGHT_CTL_SETUP_SERVER_DEF(_name, _force_segmented, _mic_size, _light_ctl_set_cb, _light_ctl_get_cb, _light_ctl_transition_cb) \ 119 APP_TIMER_DEF(_name ## _timer); \ 120 static app_light_ctl_setup_server_t _name = \ 122 .light_ctl_setup_srv.settings.force_segmented = _force_segmented, \ 123 .light_ctl_setup_srv.settings.transmic_size = _mic_size, \ 124 .state.transition.timer.p_timer_id = &_name ## _timer, \ 125 .app_light_ctl_set_cb = _light_ctl_set_cb, \ 126 .app_light_ctl_get_cb = _light_ctl_get_cb, \ 127 .app_light_ctl_transition_cb = _light_ctl_transition_cb, \ 164 uint32_t published_ms;
215 uint32_t transition_time_ms,
249 #if (SCENE_SETUP_SERVER_INSTANCES_MAX > 0) || (DOXYGEN) 282 app_light_lightness_setup_server_t *
p_app_ll);
322 #if (SCENE_SETUP_SERVER_INSTANCES_MAX > 0) || (DOXYGEN) bool ctl_state_set_active
Internal variable.
app_scene_model_interface_t scene_if
Internal variable.
uint32_t present_temperature32
Present value of the temperature32 state.
uint16_t delta_uv
Delta UV value.
void(* app_light_ctl_transition_cb_t)(const app_light_ctl_setup_server_t *p_app, uint32_t transition_time_ms, app_light_ctl_temperature_duv_hw_state_t target_ctl_state)
Application Light CTL transition time callback prototype.
uint32_t init_present_temp32_snapshot
Present temperature32 value when message was received.
int16_t initial_present_delta_uv
Initial present delta_uv required for handling Set/Delta Set message.
int16_t target_duv_snapshot
Requested target DUV.
Light CTL hardware state format for transfer of temperature and delta UV between the mid app and top ...
bool abort_move
Internal variable.
int16_t present_delta_uv
Present value of the delta uv state.
uint32_t temperature32
Temperature32 value.
list_node_t node
Internal variable.
int16_t init_present_duv_snapshot
Present DUV value when message was received.
app_light_ctl_transition_cb_t app_light_ctl_transition_cb
The device Light CTL transition time.
app_light_ctl_get_cb_t app_light_ctl_get_cb
Get the device temp/duv value .
bool new_tid
To detect if TID is new while processing delta transition.
app_light_ctl_set_cb_t app_light_ctl_set_cb
Set the device temp/duv values.
void(* app_light_ctl_get_cb_t)(const app_light_ctl_setup_server_t *p_app, app_light_ctl_temperature_duv_hw_state_t *p_present_ctl_state)
Application Light CTL state read callback prototype.
void(* app_light_ctl_set_cb_t)(const app_light_ctl_setup_server_t *p_app, app_light_ctl_temperature_duv_hw_state_t *p_ctl_state)
Application Light CTL (temperature/delta UV) state set callback prototype.
app_scene_setup_server_t * p_app_scene
Internal variable.
uint32_t app_light_ctl_model_init(app_light_ctl_setup_server_t *p_app, uint8_t element_index, app_light_lightness_setup_server_t *p_app_ll)
Initializes the behavioral module for the Light CTL and Light Lightness models.
int16_t target_delta_uv
Target value of the delta_uv state, as received from the model interface.
uint32_t app_light_ctl_current_value_publish(app_light_ctl_setup_server_t *p_app)
Initiates value fetch from the user application by calling a get callback, updates internal state...
uint32_t app_light_ctl_scene_context_set(app_light_ctl_setup_server_t *p_app, app_scene_setup_server_t *p_app_scene)
Sets the scene context.
uint32_t target_temperature32
Target value of the temperature32 state, as received from the model interface.
Application level structure holding the Light CTL Setup Server model context, Light Lightness applica...
Internal structure to hold state and timing information.
app_transition_t transition
Structure for using transition module functionality.
app_light_lightness_setup_server_t * p_app_ll
app server for light lightness.
uint32_t target_temp32_snapshot
Requested target temperature32.
bool ctl_temperature_state_set_active
Internal variable.
app_light_ctl_state_t state
Internal variable.
uint32_t initial_present_temperature32
Initial present temperature32 required for handling Set/Delta Set message.
uint32_t app_light_ctl_binding_setup(app_light_ctl_setup_server_t *p_app)
Informs the model that the system is ready to have the powerup onoff bindings.
light_ctl_setup_server_t light_ctl_setup_srv
CTL setup server context.