Acknowledged message sending for the access layer.
More...
Acknowledged message sending for the access layer.
◆ 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()
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()
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()
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()
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. |