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" 115 #define APP_LIGHT_CTL_SETUP_SERVER_DEF(_name, _force_segmented, _mic_size, _light_ctl_set_cb, _light_ctl_get_cb, _light_ctl_transition_cb) \ 116 APP_TIMER_DEF(_name ## _timer); \ 117 static app_light_ctl_setup_server_t _name = \ 119 .light_ctl_setup_srv.settings.force_segmented = _force_segmented, \ 120 .light_ctl_setup_srv.settings.transmic_size = _mic_size, \ 121 .state.transition.timer.p_timer_id = &_name ## _timer, \ 122 .app_light_ctl_set_cb = _light_ctl_set_cb, \ 123 .app_light_ctl_get_cb = _light_ctl_get_cb, \ 124 .app_light_ctl_transition_cb = _light_ctl_transition_cb, \ 152 uint32_t published_ms;
203 uint32_t transition_time_ms,
262 app_light_lightness_setup_server_t *
p_app_ll);
bool ctl_state_set_active
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.
int16_t initial_present_delta_uv
Initial present delta_uv required for handling Set/Delta Set message.
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.
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.
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 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.
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.