38 #ifndef GENERIC_ONOFF_SERVER_H__ 39 #define GENERIC_ONOFF_SERVER_H__ 43 #include "generic_onoff_common.h" 44 #include "model_common.h" 53 #define GENERIC_ONOFF_SERVER_MODEL_ID 0x1000 generic_onoff_server_state_cbs_t onoff_cbs
Callbacks for the OnOff state.
uint16_t access_model_handle_t
Access layer handle type.
Parameters for the Generic OnOff Status message.
uint8_t state_handle
State handle for this instance.
Structure for tracking TID expiry for the models.
tid_tracker_t tid_tracker
Tid tracker structure.
void(* generic_onoff_state_set_cb_t)(const generic_onoff_server_t *p_self, const access_message_rx_meta_t *p_meta, const generic_onoff_set_params_t *p_in, const model_transition_t *p_in_transition, generic_onoff_status_params_t *p_out)
Callback type for Generic OnOff Set/Set Unacknowledged message.
User provided settings and callbacks for the model instance.
const generic_onoff_server_callbacks_t * p_callbacks
Callback list.
bool force_segmented
If server should force outgoing messages as segmented messages.
uint32_t generic_onoff_server_status_publish(generic_onoff_server_t *p_server, const generic_onoff_status_params_t *p_params)
Publishes unsolicited Status message.
generic_onoff_server_settings_t settings
Model settings and callbacks for this instance.
OnOff server callback list.
uint32_t generic_onoff_server_state_set(generic_onoff_server_t *p_server, bool onoff)
Function to trigger onoff value set as a Generic OnOff server callback.
void(* generic_onoff_state_get_cb_t)(const generic_onoff_server_t *p_self, const access_message_rx_meta_t *p_meta, generic_onoff_status_params_t *p_out)
Callback type for Generic OnOff Get message.
Mandatory parameters for the Generic OnOff Set message.
nrf_mesh_transmic_size_t transmic_size
TransMIC size used by the outgoing server messages.
Transaction callbacks for the OnOff state.
nrf_mesh_transmic_size_t
Message MIC size selection.
access_model_handle_t model_handle
Model handle assigned to this instance.
uint32_t generic_onoff_server_init(generic_onoff_server_t *p_server, uint8_t element_index)
Initializes Generic OnOff server.
Generic Transition parameters for the model messages.