Module serial

Module serial 

Source
Expand description

Entry points and types for serial

Structs§

SerialSettings
serial port settings

Enums§

DataBits
Number of bits per character
FlowControl
Flow control modes
Parity
Parity checking modes
PortState
State of the serial port
StopBits
Number of stop bits

Functions§

spawn_master_serial
Spawn a master task onto the Tokio runtime. The task runs until the returned handle, and any AssociationHandle created from it, are dropped.
spawn_outstation_serial
Spawn an outstation task onto the Tokio runtime. The task runs until the returned handle is dropped or a serial port error occurs, e.g. a serial port is removed from the OS. It attempts to open the serial port immediately, and fails if it cannot.
spawn_outstation_serial_2
Spawns an outstation task onto the Tokio runtime. The task runs until the returned handle is dropped. It is tolerant to the serial port being unavailable at startup or being removed from the OS. It uses the provided RetryStrategy to determine when to retry the port if the port cannot be opened or fails.
spawn_outstation_serial_fault_tolerant
This function was added post 1.0 to provide fault tolerance for outstation serial ports.