Serial Ports

The package core.io contains classes to access serial ports, both physical and virtual, on the local machine.

Serial Ports

The class core.io.SerialPort represents a serial port. There are two ways to create core.io.SerialPort objects. Either by retrieving a list by calling the core.Array<core.io.SerialPort> serialPorts() function and picking one, or by passing a system-specific identifier to the constructor of core.io.SerialPort (i.e. COMX on Windows, or /dev/ttySX on Linux).

The core.io.SerialPort class has the following members in addition to == and hash:

As mentioned previously, the following function can be used to enumerate all serial ports on the system:

Serial Streams

The open method of core.io.SerialPort returns a core.io.SerialStream object that represents an open serial port. The core.io.SerialOptions class is used to represent options of the serial connection. It has the following members:

The core.io.SerialStream has the following members: