Data Structures | |
| struct | generic_dtt_server_state_cbs_t |
| Transaction callbacks for the Default Transition Time state. More... | |
| struct | generic_dtt_server_callbacks_t |
| Default Transition Time server callback list. More... | |
| struct | generic_dtt_server_settings_t |
| User provided settings and callbacks for the model instance. More... | |
| struct | generic_dtt_server_t |
Macros | |
| #define | GENERIC_DTT_SERVER_MODEL_ID 0x1004 |
| Server model ID. | |
Typedefs | |
| typedef void(* | generic_dtt_state_set_cb_t) (const generic_dtt_server_t *p_self, const access_message_rx_meta_t *p_meta, const generic_dtt_set_params_t *p_in, generic_dtt_status_params_t *p_out) |
| Callback type for Generic Default Transition Time Set/Set Unacknowledged message. More... | |
| typedef void(* | generic_dtt_state_get_cb_t) (const generic_dtt_server_t *p_self, const access_message_rx_meta_t *p_meta, generic_dtt_status_params_t *p_out) |
| Callback type for Generic Default Transition Time Get message. More... | |
Functions | |
| uint32_t | generic_dtt_server_init (generic_dtt_server_t *p_server, uint8_t element_index) |
| Initializes Generic Default Transition Time server. More... | |
| uint32_t | generic_dtt_server_status_publish (generic_dtt_server_t *p_server, const generic_dtt_status_params_t *p_params) |
| Publishes unsolicited Status message. More... | |
Detailed Description
Typedef Documentation
◆ generic_dtt_state_set_cb_t
| typedef void(* generic_dtt_state_set_cb_t) (const generic_dtt_server_t *p_self, const access_message_rx_meta_t *p_meta, const generic_dtt_set_params_t *p_in, generic_dtt_status_params_t *p_out) |
Callback type for Generic Default Transition Time Set/Set Unacknowledged message.
- Parameters
-
[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 68 of file generic_dtt_server.h.
◆ generic_dtt_state_get_cb_t
| typedef void(* generic_dtt_state_get_cb_t) (const generic_dtt_server_t *p_self, const access_message_rx_meta_t *p_meta, generic_dtt_status_params_t *p_out) |
Callback type for Generic Default Transition Time Get message.
- Parameters
-
[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 80 of file generic_dtt_server.h.
Function Documentation
◆ generic_dtt_server_init()
| uint32_t generic_dtt_server_init | ( | generic_dtt_server_t * | p_server, |
| uint8_t | element_index | ||
| ) |
Initializes Generic Default Transition Time server.
- Note
- The server handles the model allocation and adding.
- Parameters
-
[in] p_server Generic Default Transition Time server context pointer. [in] element_index Element index to add the model to.
- Return values
-
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.
◆ generic_dtt_server_status_publish()
| uint32_t generic_dtt_server_status_publish | ( | generic_dtt_server_t * | p_server, |
| const generic_dtt_status_params_t * | p_params | ||
| ) |
Publishes unsolicited Status message.
This function can be used to send unsolicited messages to report updated state value as a result of local action.
- Parameters
-
[in] p_server Status server context pointer. [in] p_params Message parameters.
- Return values
-
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 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.