Local non-blocking UDP channel used by USHER's development pipeline. More...

Go to the source code of this file.
Functions | |
| int | socket_init (int is_server) |
| Create the loopback UDP endpoint and, for a server, claim USHER ownership. | |
| void | socket_deinit (void) |
| Close the owned UDP endpoint; repeated calls are harmless. | |
| int | socket_get_fd (void) |
| Return the active UDP descriptor for polling. | |
| int | socket_recv (char *buffer, int len) |
| Receive one datagram without blocking. | |
| void | socket_send (char *buffer, int len) |
| Send one loopback datagram without blocking. | |
Detailed Description
Local non-blocking UDP channel used by USHER's development pipeline.
This is intentionally loopback-only infrastructure for local SODA and simulator integration, not a network-facing control protocol.
Definition in file socket.h.
Function Documentation
◆ socket_deinit()
| void socket_deinit | ( | void | ) |
◆ socket_get_fd()
| int socket_get_fd | ( | void | ) |
◆ socket_init()
| int socket_init | ( | int | is_server | ) |
Create the loopback UDP endpoint and, for a server, claim USHER ownership.
- Parameters
-
is_server Nonzero to bind the fixed local port; zero for an unbound sender.
- Returns
- 0 on success, or -1 on failure; EALREADY preserves an active endpoint.
The server bind doubles as the physical-mode single-instance claim. A second USHER must fail rather than share the port because it would also compete for the same UART and camera resources.
◆ socket_recv()
| int socket_recv | ( | char * | buffer, |
| int | len ) |