nrfxlib API 2.8.99
Loading...
Searching...
No Matches

◆ nrf_rpc_cbor_cmd_rsp()

int nrf_rpc_cbor_cmd_rsp ( const struct nrf_rpc_group * group,
uint8_t cmd,
struct nrf_rpc_cbor_ctx * ctx )

#include <nrf_rpc/include/nrf_rpc_cbor.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_cbor_decoding_done just after response packet was decoded and can be deallocated. ctx->value can be used to decode the response.

Parameters
groupGroup that command belongs to.
cmdCommand id.
ctxContext allocated by NRF_RPC_CBOR_ALLOC.
Returns
0 on success or negative error code if a transport layer reported a sending error.