SerialPortInterface class abstract
An interface to a serial port.
- Inheritance
- Implementers
Constructors
- SerialPortInterface(String portName)
- Creates a serial port at the given name.
Properties
- bytesAvailable → int
-
How many bytes are available to be read.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isOpen → bool
-
Whether this port is open.
no setter
- portName → String
-
The name of the port.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → Future< void> -
Closes the connection to the device.
inherited
-
init(
) → Future< bool> -
Initializes the connection to the device.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onDisconnect(
) → Future< void> -
A callback to run when the program has disconnected from the Dashboard.
inherited
-
read(
int count) → Uint8List - Reads the given number of bytes from the port.
-
toString(
) → String -
A string representation of this object.
inherited
-
write(
Uint8List bytes) → void - Writes data to the port.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- factory ↔ SerialPortInterface Function(String)
-
The default kind of port to create. Use this when mocking with different ports.
getter/setter pair