Serial Port — serial_port v1
One RS-232/422/485 port. Devices with several ports expose one binding each.
The consuming driver writes bytes and receives bytes; it does not know whether the port is a
DB9 on the controller, an iTach IP2SL across the LAN, or a USB dongle. The consumer supplies
the line settings it needs via configure at bind time.
Capabilities
Declared in the driver manifest under [[proxy]] capabilities. Anything not declared takes the default below.
| Capability | Type | Default | Meaning |
|---|---|---|---|
has_flow_control | bool | false | |
max_write_bytes | u32 | 4096 | |
supported_bauds | string[] | ["9600","19200","38400","57600","115200"] | |
supports_485 | bool | false | Half-duplex RS-485 with direction control |
Commands
configure
Set line parameters. Called by the consuming driver on bind.
| Parameter | Type | Notes |
|---|---|---|
baud | u32 | |
databits | u8 5–8 (optional) | |
flow | one of none · rtscts · xonxoff (optional) | |
parity | one of none · even · odd · mark · space (optional) | |
stopbits | u8 1–2 (optional) |
write
| Parameter | Type | Notes |
|---|---|---|
data | bytes |
Notifications
online_changed
| Parameter | Type | Notes |
|---|---|---|
online | bool |
rx
Bytes received. Framing is the consuming driver's problem — this is a byte pipe.
| Parameter | Type | Notes |
|---|---|---|
data | bytes |
State
Last-known values core keeps for a binding of this proxy.
| Key | Type | Meaning |
|---|---|---|
baud | u32 | |
online | bool |