7 #ifndef GOLIOTH_INCLUDE_NET_GOLIOTH_RPC_H_
8 #define GOLIOTH_INCLUDE_NET_GOLIOTH_RPC_H_
11 #include <zephyr/net/coap.h>
12 #include <zephyr/kernel.h>
15 #include <zcbor_decode.h>
16 #include <zcbor_encode.h>
119 #if defined(CONFIG_GOLIOTH_RPC)
122 struct k_mutex mutex;
149 const char *method_name,
int golioth_rpc_register(struct golioth_client *client, const char *method_name, golioth_rpc_cb_fn callback, void *callback_arg)
Register an RPC method.
int golioth_rpc_init(struct golioth_client *client)
Initialize RPC.
enum golioth_rpc_status(* golioth_rpc_cb_fn)(zcbor_state_t *request_params_array, zcbor_state_t *response_detail_map, void *callback_arg)
Callback function type for remote procedure call.
golioth_rpc_status
Enumeration of RPC status codes, sent in the RPC response.
int golioth_rpc_observe(struct golioth_client *client)
Observe for RPC method invocations.
@ GOLIOTH_RPC_UNAVAILABLE
@ GOLIOTH_RPC_OUT_OF_RANGE
@ GOLIOTH_RPC_ALREADYEXISTS
@ GOLIOTH_RPC_INVALID_ARGUMENT
@ GOLIOTH_RPC_PERMISSION_DENIED
@ GOLIOTH_RPC_RESOURCE_EXHAUSTED
@ GOLIOTH_RPC_UNAUTHENTICATED
@ GOLIOTH_RPC_DEADLINE_EXCEEDED
@ GOLIOTH_RPC_FAILED_PRECONDITION
@ GOLIOTH_RPC_UNIMPLEMENTED
Represents a Golioth client instance.
Data for each registered RPC method.
golioth_rpc_cb_fn callback
Global/shared RPC state data, placed in struct golioth_client.