Data Structures | |
struct | scene_setup_server_state_cbs_t |
Transaction callbacks for the Scene states. More... | |
struct | scene_server_settings_t |
User provided settings and callbacks for the model instance. More... | |
struct | scene_server_t |
struct | scene_setup_server_callbacks_t |
Scene server callback list. More... | |
struct | scene_setup_server_settings_t |
User provided settings and callbacks for the model instance. More... | |
struct | scene_setup_server_t |
Macros | |
#define | SCENE_SERVER_MODEL_ID 0x1203 |
Server model ID. | |
#define | SCENE_SETUP_SERVER_MODEL_ID 0x1204 |
Server model ID. | |
Typedefs | |
typedef void(* | scene_state_store_cb_t) (const scene_setup_server_t *p_self, const access_message_rx_meta_t *p_meta, const scene_store_params_t *p_in, scene_register_status_params_t *p_out) |
Callback type for Scene Store/Store Unacknowledged message. More... | |
typedef void(* | scene_state_delete_cb_t) (const scene_setup_server_t *p_self, const access_message_rx_meta_t *p_meta, const scene_delete_params_t *p_in, scene_register_status_params_t *p_out) |
Callback type for Scene Delete/Delete Unacknowledged message. More... | |
typedef void(* | scene_state_get_cb_t) (const scene_setup_server_t *p_self, const access_message_rx_meta_t *p_meta, scene_status_params_t *p_out) |
Callback type for Scene Get message. More... | |
typedef void(* | scene_state_register_get_cb_t) (const scene_setup_server_t *p_self, const access_message_rx_meta_t *p_meta, scene_register_status_params_t *p_out) |
Callback type for Scene Register Get message. More... | |
typedef void(* | scene_state_recall_cb_t) (const scene_setup_server_t *p_self, const access_message_rx_meta_t *p_meta, const scene_recall_params_t *p_in, const model_transition_t *p_in_transition, scene_status_params_t *p_out) |
Callback type for Scene Recall/Recall Unacknowledged message. More... | |
Functions | |
uint32_t | scene_server_status_publish (const scene_server_t *p_server, const scene_status_params_t *p_params) |
Publishes unsolicited Status message. More... | |
uint32_t | scene_setup_server_init (scene_setup_server_t *p_s_server, uint8_t element_index) |
Initializes Scene Setup server. More... | |
typedef void(* scene_state_store_cb_t) (const scene_setup_server_t *p_self, const access_message_rx_meta_t *p_meta, const scene_store_params_t *p_in, scene_register_status_params_t *p_out) |
Callback type for Scene Store/Store 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. |
[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 75 of file scene_setup_server.h.
typedef void(* scene_state_delete_cb_t) (const scene_setup_server_t *p_self, const access_message_rx_meta_t *p_meta, const scene_delete_params_t *p_in, scene_register_status_params_t *p_out) |
Callback type for Scene Delete/Delete 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. |
[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 92 of file scene_setup_server.h.
typedef void(* scene_state_get_cb_t) (const scene_setup_server_t *p_self, const access_message_rx_meta_t *p_meta, scene_status_params_t *p_out) |
Callback type for Scene 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 104 of file scene_setup_server.h.
typedef void(* scene_state_register_get_cb_t) (const scene_setup_server_t *p_self, const access_message_rx_meta_t *p_meta, scene_register_status_params_t *p_out) |
Callback type for Scene Register 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 115 of file scene_setup_server.h.
typedef void(* scene_state_recall_cb_t) (const scene_setup_server_t *p_self, const access_message_rx_meta_t *p_meta, const scene_recall_params_t *p_in, const model_transition_t *p_in_transition, scene_status_params_t *p_out) |
Callback type for Scene Recall/Recall 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 131 of file scene_setup_server.h.
uint32_t scene_server_status_publish | ( | const scene_server_t * | p_server, |
const scene_status_params_t * | p_params | ||
) |
Publishes unsolicited Status message.
This API can be used to send unsolicited messages to report updated state value as a result of local action.
[in] | p_server | Scene server context pointer. |
[in] | p_params | Message parameters. |
NRF_SUCCESS | If the message is published successfully. |
NRF_ERROR_NULL | NULL pointer given to function. |
NRF_ERROR_NO_MEM | No memory available to send the message at this point. |
NRF_ERROR_NOT_FOUND | The model is not initialized. |
NRF_ERROR_INVALID_PARAM | Incorrect message parameters, the model not bound to application key, or publish address not set. |
NRF_ERROR_FORBIDDEN | Failed to allocate a sequence number from network. |
NRF_ERROR_INVALID_STATE | There's already a segmented packet that is being to sent to this destination. Wait for the transmission to finish before sending new segmented packets. |
uint32_t scene_setup_server_init | ( | scene_setup_server_t * | p_s_server, |
uint8_t | element_index | ||
) |
Initializes Scene Setup server.
[in] | p_s_server | Scene Setup Server model context pointer. |
[in] | element_index | Element index to add the model |
NRF_SUCCESS | The model is initialized successfully. |
NRF_ERROR_NULL | NULL pointer given to function. |
NRF_ERROR_NO_MEM | ACCESS_MODEL_COUNT number of models already allocated or no more subscription lists available in memory pool (see ACCESS_SUBSCRIPTION_LIST_COUNT). |
NRF_ERROR_FORBIDDEN | Multiple model instances per element are not allowed or changes to device composition are not allowed. Adding a new model after device is provisioned is not allowed. |
NRF_ERROR_NOT_FOUND | Invalid access element index. |
NRF_ERROR_RESOURCES | No more Scene Setup server instance can be allocated. Increase SCENE_SETUP_SERVER_INSTANCES_MAX. |