Skip to main content

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.

CapabilityTypeDefaultMeaning
has_flow_controlboolfalse
max_write_bytesu324096
supported_baudsstring[]["9600","19200","38400","57600","115200"]
supports_485boolfalseHalf-duplex RS-485 with direction control

Commands

configure

Set line parameters. Called by the consuming driver on bind.

ParameterTypeNotes
baudu32
databitsu8 5–8 (optional)
flowone of none · rtscts · xonxoff (optional)
parityone of none · even · odd · mark · space (optional)
stopbitsu8 1–2 (optional)

write

ParameterTypeNotes
databytes

Notifications

online_changed

ParameterTypeNotes
onlinebool

rx

Bytes received. Framing is the consuming driver's problem — this is a byte pipe.

ParameterTypeNotes
databytes

State

Last-known values core keeps for a binding of this proxy.

KeyTypeMeaning
baudu32
onlinebool