Data Structures | |
struct | generic_onoff_server_state_cbs_t |
Transaction callbacks for the OnOff state. More... | |
struct | generic_onoff_server_callbacks_t |
OnOff server callback list. More... | |
struct | generic_onoff_server_settings_t |
User provided settings and callbacks for the model instance. More... | |
struct | generic_onoff_server_t |
Macros | |
#define | GENERIC_ONOFF_SERVER_MODEL_ID 0x1000 |
Server model ID. | |
Typedefs | |
typedef 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. More... | |
typedef 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. More... | |
Functions | |
uint32_t | generic_onoff_server_init (generic_onoff_server_t *p_server, uint8_t element_index) |
Initializes Generic OnOff server. More... | |
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. More... | |
typedef 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.
[in] | p_self | Pointer to the model structure. |
[in] | p_meta | Access metadata for the received message. |
[in] | p_in | Pointer to the input parameters for the user application. |
[in] | p_in_transition | Pointer to transition parameters, if present in the incoming message, otherwise set to null. |
[out] | p_out | Pointer to store the output parameters from the user application. If null, indicates that it is UNACKNOWLEDGED message and no output params are required. |
Definition at line 70 of file generic_onoff_server.h.
typedef 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.
[in] | p_self | Pointer to the model structure. |
[in] | p_meta | Access metadata for the received message. |
[out] | p_out | Pointer to store the output parameters from the user application. |
Definition at line 83 of file generic_onoff_server.h.
uint32_t generic_onoff_server_init | ( | generic_onoff_server_t * | p_server, |
uint8_t | element_index | ||
) |
Initializes Generic OnOff server.
[in] | p_server | Generic OnOff server context pointer. |
[in] | element_index | Element index to add the model to. |
NRF_SUCCESS | If the model is initialized successfully. |
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.
This function can be used to send unsolicited messages to report the updated state value as a result of local action.
[in] | p_server | Status server context pointer. |
[in] | p_params | Message parameters. |
NRF_SUCCESS | If the message is published successfully. |