|
Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
|
Run RPCs on remote devices. More...
#include <zephyr/net_buf.h>#include <infuse/epacket/interface.h>#include <infuse/epacket/packet.h>#include <infuse/rpc/types.h>Go to the source code of this file.
Data Structures | |
| struct | rpc_client_cmd_ctx |
| struct | rpc_client_ctx |
| struct | rpc_client_auto_load_params |
| State for auto loader control. More... | |
Typedefs | |
| typedef void(* | rpc_client_rsp_fn) (const struct net_buf *buf, void *user_data) |
| Callback run when the response arrives. | |
| typedef int(* | rpc_client_data_loader) (void *user_data, uint32_t offset, void *data, size_t data_len) |
| Callback to load more data for queueing. | |
Functions | |
| void | rpc_client_init (struct rpc_client_ctx *ctx, const struct device *dev, union epacket_interface_address address) |
| Initialise RPC client object for use. | |
| static uint32_t | rpc_client_last_request_id (const struct rpc_client_ctx *ctx) |
| Get the request ID used by the last command. | |
| int | rpc_client_update_response_timeout (struct rpc_client_ctx *ctx, uint32_t request_id, k_timeout_t timeout) |
| Update the response timeout of an executing command. | |
| int | rpc_client_command_queue (struct rpc_client_ctx *ctx, enum rpc_builtin_id cmd, void *req_params, size_t req_params_len, rpc_client_rsp_fn cb, void *user_data, k_timeout_t ctx_timeout, k_timeout_t response_timeout) |
| Queue a command for execution on a remote device. | |
| int | rpc_client_ack_wait (struct rpc_client_ctx *ctx, uint32_t request_id, k_timeout_t timeout) |
| Wait for an INFUSE_RPC_DATA_ACK from the remote device. | |
| int | rpc_client_data_queue (struct rpc_client_ctx *ctx, uint32_t request_id, uint32_t offset, const void *data, size_t data_len) |
| Queue data associated with a previously queued command. | |
| int | rpc_client_data_queue_auto_load (struct rpc_client_ctx *ctx, uint32_t request_id, uint32_t offset, void *buffer, size_t buffer_len, const struct rpc_client_auto_load_params *loader_params) |
| Queue data associated with a previously queued command, loaded via callback. | |
| int | rpc_client_command_sync (struct rpc_client_ctx *ctx, enum rpc_builtin_id cmd, void *req_params, size_t req_params_len, k_timeout_t ctx_timeout, k_timeout_t response_timeout, struct net_buf **rsp) |
| Queue a command for execution on a remote device and wait for the response. | |
| void | rpc_client_cleanup (struct rpc_client_ctx *ctx) |
| Cleanup a RPC client object. | |
Run RPCs on remote devices.
SPDX-License-Identifier: FSL-1.1-ALv2