#include <nrf_rpc/include/nrf_rpc.h>
Send a command and provide callback to handle response.
- Parameters
-
group | Group that command belongs to. |
cmd | Command id. |
packet | Packet allocated by nrf_rpc_alloc_tx_buf and filled with an encoded data. |
len | Length of the packet. Can be smaller than allocated. |
handler | Callback that handles the response. In case of error (e.g. malformed response packet was received) it is undefined if the handler will be called. |
handler_data | Opaque pointer that will be passed to handler . |
- Returns
- 0 on success or negative error code if a transport layer reported a sending error.