38 #ifndef LIGHT_LC_SETUP_SERVER_H__ 39 #define LIGHT_LC_SETUP_SERVER_H__ 43 #include "model_common.h" 46 #include "generic_onoff_server.h" 47 #include "light_lc_common.h" 48 #include "timer_scheduler.h" 64 #define LIGHT_LC_SERVER_MODEL_ID 0x130F 67 #define LIGHT_LC_SETUP_SERVER_MODEL_ID 0x1310 87 const void *p_set_value);
111 uint16_t actual_lightness);
122 uint16_t * p_actual_lightness);
326 timer_event_t onoff_timer;
364 uint8_t element_index);
408 bool * p_lc_control);
void(* light_lc_persist_state_set_cb_t)(const light_lc_setup_server_t *p_s_server, const light_lc_state_t lc_state, const void *p_set_value)
Callback type for storing data to the persistent memory after Set messages affecting the persistent s...
uint16_t access_model_handle_t
Access layer handle type.
bool requested_light_onoff
Requested light_onoff from incoming message.
void(* light_lc_actual_get_cb_t)(const light_lc_setup_server_t *p_s_server, uint16_t *p_actual_lightness)
Callback type for getting the actual lightness.
bool transition_time_is_provided
Transition time is provided.
uint32_t requested_transition_time_ms
Requested transition from incoming message.
generic_onoff_server_t generic_onoff_srv
Parent model context for - Generic OnOff server.
Structure for tracking TID expiry for the models.
uint32_t light_lc_setup_server_ponoff_binding_setup(light_lc_setup_server_t *p_s_server, uint8_t onpowerup, bool *p_lc_control)
Function to do the OnPowerup binding.
Parameters for the Light LC Property Status message.
Internal structure to hold state and timing information.
uint32_t requested_delay_ms
Requested delay from incoming message.
Parameters for the Light LC Light OnOff Status message.
User provided settings and callbacks for the non-setup server model instance.
Structure for model timers.
light_lc_state_t
Enum for to determine which state data variable is being set/gotten.
Parameters for the Light LC Occupancy Mode Status message.
Transaction callbacks for the Light LC states.
bool force_segmented
If server should force outgoing messages as segmented messages.
nrf_mesh_transmic_size_t transmic_size
TransMIC size used by the outgoing server messages.
uint32_t initial_present_luxlevel
Initial lux level.
Parameters for the Light LC Mode Status message.
The Light OnOff message is the only one that has transition and delay, though we need to keep informa...
uint32_t light_lc_server_occ_mode_status_publish(light_lc_server_t *p_server, const light_lc_occupancy_mode_status_params_t *p_params)
Publishes unsolicited Status message.
uint8_t element_index
Element Index.
light_lc_server_settings_t settings
Settings and callbacks for this instance.
uint32_t target_luxlevel
Target lux level.
uint8_t present_light_onoff
Current light_onoff state for currently active command.
uint16_t target_lightness
Target lightness (linear)
uint8_t element_index
Element Index.
uint32_t light_lc_server_light_onoff_status_publish(light_lc_server_t *p_server, const light_lc_light_onoff_status_params_t *p_params)
Publishes unsolicited Status message.
tid_tracker_t tid_tracker
Tid tracker structure.
bool ambient_luxlevel_valid
if true, ble ambient lux level is valid (written since boot time)
light_lc_setup_server_state_cbs_t light_lc_cbs
Transaction callbacks for the Light LC states.
User provided settings and callbacks for the model instance.
light_lc_server_t lc_srv
Parent model context for - LC server.
bool force_segmented
If server should force outgoing messages as segmented messages.
access_model_handle_t model_handle
Model handle assigned to this instance.
void(* light_lc_actual_set_cb_t)(const light_lc_setup_server_t *p_s_server, uint16_t actual_lightness)
Callback type for setting the actual lightness.
uint16_t lightness_out
lightness output from FSM
uint8_t handle
flash handle - only used by flash system
uint32_t light_lc_setup_server_init(light_lc_setup_server_t *p_s_server, uint8_t element_index)
Initializes Light LC Setup server.
nrf_mesh_transmic_size_t
Message MIC size selection.
uint32_t light_lc_server_mode_status_publish(const light_lc_server_t *p_server, const light_lc_mode_status_params_t *p_params)
Publishes unsolicited Status message.
uint8_t target_light_onoff
Target light_onoff state for currently active command.
uint32_t transition_time_ms
Current transition time for currently active command.
light_lc_setup_server_settings_t settings
Model settings and callbacks for this instance.
void(* light_lc_persist_state_get_cb_t)(const light_lc_setup_server_t *p_s_server, const light_lc_state_t lc_state, void *p_get_value)
Callback type for getting data from the persistent memory after Get messages are received.
uint32_t ambient_luxlevel
Data Received from ambient light sensor.
uint16_t initial_present_lightness
Initial present lightness (linear)
nrf_mesh_transmic_size_t transmic_size
TransMIC size used by the outgoing server messages.
const light_lc_setup_server_callbacks_t * p_callbacks
Callback list.
access_model_handle_t model_handle
Model handle assigned to this instance.
Light LC setup server callback list.
light_lc_setup_server_state_t state
LC server state variables (not FSM state)
uint32_t luxlevel_out
lux level output from FSM
uint32_t light_lc_setup_server_property_status_publish(const light_lc_setup_server_t *p_s_server, const light_lc_property_status_params_t *p_params)
Publishes unsolicited Status message.