nrfxlib API 2.7.99
Loading...
Searching...
No Matches

◆ nrf_rpc_cmd_rsp()

static int nrf_rpc_cmd_rsp ( const struct nrf_rpc_group group,
uint8_t  cmd,
uint8_t *  packet,
size_t  len,
const uint8_t **  rsp_packet,
size_t *  rsp_len 
)
inlinestatic

#include <nrf_rpc/include/nrf_rpc.h>

Send a command and get response as an output parameter.

This variant of command send function outputs response as an output parameter. Caller is responsible to call nrf_rpc_decoding_done with a response packet just after response packet was decoded and can be deallocated.

Parameters
[in]groupGroup that command belongs to.
[in]cmdCommand id.
[in]packetPacket allocated by nrf_rpc_alloc_tx_buf and filled with an encoded data.
[in]lenLength of the packet. Can be smaller than allocated.
[out]rsp_packetPacket containing the response or NULL on error.
[out]rsp_lenLength of rsp_packet.
Returns
0 on success or negative error code if a transport layer reported a sending error.