nRF5 SDK for Mesh v5.0.0
Modules | Functions
Acknowledged messages

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_reliableacknowledged message parameter structure pointer.
Return values
NRF_SUCCESSSuccessfully started the acknowledged message publication.
NRF_ERROR_NULLNULL pointer given to function.
NRF_ERROR_NO_MEMNo memory available to send the message at this point.
NRF_ERROR_NOT_FOUNDInvalid model handle or model not bound to element.
NRF_ERROR_INVALID_PARAMModel not bound to application key, publish address not set or wrong opcode format.
NRF_ERROR_INVALID_STATEMessage already scheduled for an acknowledged transfer.
NRF_ERROR_INVALID_LENGTHAttempted 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_handleAccess layer model handle that owns the transfer.
Return values
NRF_SUCCESSSuccessfully canceled the acknowledged message.
NRF_ERROR_NOT_FOUNDNo active acknowledged message for given handle.
NRF_ERROR_NOT_FOUNDInvalid 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_handleModel handle that received the message
[in]p_messageMessage pointer.
[in]p_argsGeneric 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_handleModel handle of the model
Return values
TrueIf the model context is free for sending new acknowledged message.
FalseIf the model context is busy.

Documentation feedback | Developer Zone | Subscribe | Updated