|
librpc
|
#include <stdint.h>

Go to the source code of this file.
Classes | |
| struct | rpc_bus_node |
Macros | |
| #define | RPC_BUS_EVENT_HANDLER(_fn, _arg) |
Typedefs | |
| typedef void(^ | rpc_bus_event_handler_t) (rpc_bus_event_t event, struct rpc_bus_node *_Nonnull node) |
Enumerations | |
| enum | rpc_bus_event_t { RPC_BUS_ATTACHED, RPC_BUS_DETACHED } |
Functions | |
| int | rpc_bus_open (void) |
| int | rpc_bus_close (void) |
| int | rpc_bus_ping (const char *_Nonnull serial) |
| int | rpc_bus_enumerate (struct rpc_bus_node *_Nullable *_Nonnull result) |
| void | rpc_bus_free_result (struct rpc_bus_node *_Nonnull result) |
| void | rpc_bus_register_event_handler (_Nonnull rpc_bus_event_handler_t handler) |
| void | rpc_bus_unregister_event_handler (void) |
Bus transport API
Definition in file bus.h.
| #define RPC_BUS_EVENT_HANDLER | ( | _fn, | |
| _arg | |||
| ) |
Converts function pointer to an rpc_bus_event_t block type.
| typedef void(^ rpc_bus_event_handler_t) (rpc_bus_event_t event, struct rpc_bus_node *_Nonnull node) |
| enum rpc_bus_event_t |
| int rpc_bus_close | ( | void | ) |
| int rpc_bus_enumerate | ( | struct rpc_bus_node *_Nullable *_Nonnull | result | ) |
Enumerates connected devices on the RPC bus.
| result | Array of rpc_bus_node elements |
| void rpc_bus_free_result | ( | struct rpc_bus_node *_Nonnull | result | ) |
Frees struct rpc_bus_node array obtained in rpc_bus_enumerate call.
| result | Array of struct rpc_bus_node elements |
| int rpc_bus_open | ( | void | ) |
| int rpc_bus_ping | ( | const char *_Nonnull | serial | ) |
Checks whether a node with specified serial is reachable.
| serial | Node serial number |
| void rpc_bus_register_event_handler | ( | _Nonnull rpc_bus_event_handler_t | handler | ) |
Configures an event handler block to be called whenever a bus event occurs.
| handler | Bus event handler |
| void rpc_bus_unregister_event_handler | ( | void | ) |
Unsets the previously set event handler. If there was no handler previously configured, does nothing.
1.8.13