Acknowledged message sending for the access layer. More...
Modules | |
| Message sequence charts | |
| Acknowledged publishing sequence diagrams. | |
| Defines | |
| Access acknowledged message defines. | |
| Types | |
| Access acknowledged message types. | |
Functions | |
| void | access_reliable_init (void) |
| Initializes the acknowledged publication framework. | |
| void | access_reliable_cancel_all (void) |
| Cancels all ongoing transfers. More... | |
| uint32_t | access_model_reliable_publish (const access_reliable_t *p_reliable) |
| Starts publishing an acknowledged message. More... | |
| uint32_t | access_model_reliable_cancel (access_model_handle_t model_handle) |
| Cancels an ongoing acknowledged message. More... | |
| void | access_reliable_message_rx_cb (access_model_handle_t model_handle, const access_message_rx_t *p_message, void *p_args) |
| Callback called by access layer when a model receives a message. More... | |
| bool | access_reliable_model_is_free (access_model_handle_t model_handle) |
| Checks if the model context for the given model handle is free for acknowledged message publishing. More... | |
Detailed Description
Acknowledged message sending for the access layer.
Function Documentation
◆ access_reliable_cancel_all()
| void access_reliable_cancel_all | ( | void | ) |
Cancels all ongoing transfers.
- Warning
- This will not notify the about the canceled transfer. Thus calling this function in the middle of an acknowledged transfer may cause unexpected behavior for the affected models.
◆ access_model_reliable_publish()
| uint32_t access_model_reliable_publish | ( | const access_reliable_t * | p_reliable | ) |
Starts publishing an acknowledged message.
- Note
- The user must retain the data provided in access_message_tx_t::p_buffer until the acknowledged transfer has ended (see access_reliable_t::status_cb) or the message is cancelled by access_model_reliable_cancel.
- Parameters
-
[in] p_reliable acknowledged message parameter structure pointer.
- Return values
-
NRF_SUCCESS Successfully started the acknowledged message publication. 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 Invalid model handle or model not bound to element. NRF_ERROR_INVALID_PARAM Model not bound to application key, publish address not set or wrong opcode format. NRF_ERROR_INVALID_STATE Message already scheduled for an acknowledged transfer. NRF_ERROR_INVALID_LENGTH Attempted to send message larger than ACCESS_MESSAGE_LENGTH_MAX.
◆ access_model_reliable_cancel()
| uint32_t access_model_reliable_cancel | ( | access_model_handle_t | model_handle | ) |
Cancels an ongoing acknowledged message.
- Parameters
-
[in] model_handle Access layer model handle that owns the transfer.
- Return values
-
NRF_SUCCESS Successfully canceled the acknowledged message. NRF_ERROR_NOT_FOUND No active acknowledged message for given handle. NRF_ERROR_NOT_FOUND Invalid model handle or model not bound to element.
◆ access_reliable_message_rx_cb()
| void access_reliable_message_rx_cb | ( | access_model_handle_t | model_handle, |
| const access_message_rx_t * | p_message, | ||
| void * | p_args | ||
| ) |
Callback called by access layer when a model receives a message.
- Parameters
-
[in] model_handle Model handle that received the message [in] p_message Message pointer. [in] p_args Generic argument pointer for the model.
◆ access_reliable_model_is_free()
| bool access_reliable_model_is_free | ( | access_model_handle_t | model_handle | ) |
Checks if the model context for the given model handle is free for acknowledged message publishing.
- Parameters
-
[in] model_handle Model handle of the model
- Return values
-
True If the model context is free for sending new acknowledged message. False If the model context is busy.