|
Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
|
#include <zephyr/device.h>#include <zephyr/kernel.h>#include <zephyr/net_buf.h>#include <infuse/epacket/packet.h>Go to the source code of this file.
Functions | |
| void | rpc_command_runner (struct net_buf *request) |
| Execute a command contained in the buffer. | |
| void | rpc_command_runner_request_unref (struct net_buf *request) |
| Free the request buffer inside the RPC implementation. | |
| void | rpc_command_runner_early_response (struct epacket_rx_metadata *rx_meta, uint32_t request_id, uint16_t command_id, struct net_buf *response) |
| Send the response buffer before returning from the RPC implementation. | |
SPDX-License-Identifier: FSL-1.1-ALv2
| void rpc_command_runner | ( | struct net_buf * | request | ) |
Execute a command contained in the buffer.
| request | Command request |
| void rpc_command_runner_early_response | ( | struct epacket_rx_metadata * | rx_meta, |
| uint32_t | request_id, | ||
| uint16_t | command_id, | ||
| struct net_buf * | response ) |
Send the response buffer before returning from the RPC implementation.
Send the response buffer before the RPC implementation returns. This allows RPCs with long post-processing steps to signal the result early, allowing the command initiator to move onto future work while this device finishes up.
| rx_meta | Metadata of the request packet |
| request_id | Request ID associated with the response |
| command_id | Command ID associated with the response |
| response | Response message to send |
| void rpc_command_runner_request_unref | ( | struct net_buf * | request | ) |
Free the request buffer inside the RPC implementation.
Free the request buffer inside the RPC implementation instead of relying on the server to free the buffer after the command returns. This is useful for long running commands with INFUSE_RPC_DATA packets.
| request | Request message to free |