Hi
I have reported this before and now that you are a quarter away from a fully featured mesh sdk can I ask you to please enhance the SDK so that you supply a function that takes "access_message_rx_t * p_message" and returns a smaller struct that contains only the relevant information required for the stack to successfully send out the reply.
Why?
That is best explained using use case..
Imagine there is a mesh message that results in having to trigger some action that will take say 1000milliseconds to start and finish and *only then* can it send the reply.
At the moment in your sample light switch onoff app the reply is sent in the same 'thread' context as when the callback for the message happened.
For the reply to be sent in 'future' at the moment I have to save a deep copy if the entire "access_message_rx_t * p_message" which means making a deep copy of "nrf_mesh_rx_metadata_t * p_core_metadata". I have no option but to do that as I do not know (and care) what information the stack uses to send out the response.
Ideally the function
uint32_t access_model_reply(access_model_handle_t handle,
const access_message_rx_t * p_message,
const access_message_tx_t * p_reply)
should be changed to
uint32_t access_model_reply(access_model_handle_t handle,
const access_reply_context_t * p_reply_context,
const access_message_tx_t * p_reply)
And you add a new routine like ...
uint32_t access_extract_reply_context( const access_reply_context_t * p_reply_context
access_reply_context p_reply_context)
Or if this is not feasible please demonstrate how best to do what I wish to do with minimal memory usage.
Look forward to hearing from you
Regards
Mahendra