Serial Port Arbiter
This is a Linux-only serial port library that offers the following benefits
over directly using /dev/tty:
- Opens the
/dev/ttyfile with flags for non-blocking access. - Sets the
termiosflags to use the TTY in raw mode. - Prevents deadlocks caused by input buffer starvation.
- Prevents data garbling by implementing transaction arbitration.
- Gracefully handles interrupts and timeout errors.
- Gracefully handles connection errors and automatically reconnects.
- Provides a more convenient API than the raw
io::Readandio::Write.
This is an "async-less" library, and it is intended to remain that way. If you need asynchronous behavior, you can easily make it async-compatible in your own code.
Example
use ;
use *;
Go to the examples directory to see how automatic reconnection is working or how to use jsonrpc.