UsbPort class

UsbPort handles the communication with the USB Serial port.

Constructors

UsbPort(String methodChannelName)
Factory to create UsbPort object. [...]
factory

Properties

inputStream → Stream<Uint8List>
returns the asynchronous input stream. [...]
read-only
hashCode → int
The hash code for this object. [...]
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

close() → Future<bool>
Closes the com port.
open() → Future<bool>
Opens the uart communication channel. [...]
setDTR(bool dtr) → Future<void>
Sets or clears the DTR port to value dtr.
setFlowControl(int flowControl) → Future<void>
Sets the flow control parameter.
setPortParameters(int baudRate, int dataBits, int stopBits, int parity) → Future<void>
Sets the port parameters to the requested values. [...]
setRTS(bool rts) → Future<void>
Sets or clears the RTS port to value rts.
write(Uint8List data) → Future<void>
Asynchronously writes data.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator. [...]
inherited

Constants

DATABITS_5 → const int
Constant to configure port with 5 databits.
5
DATABITS_6 → const int
Constant to configure port with 6 databits.
6
DATABITS_7 → const int
Constant to configure port with 7 databits.
7
DATABITS_8 → const int
Constant to configure port with 8 databits.
8
FLOW_CONTROL_DSR_DTR → const int
Constant to configure port with flow contorl DSR / DTR
2
FLOW_CONTROL_OFF → const int
Constant to configure port with no flow control
0
FLOW_CONTROL_RTS_CTS → const int
Constant to configure port with flow control RTS/CTS
1
FLOW_CONTROL_XON_XOFF → const int
Constant to configure port with flow control XON XOFF
3
PARITY_MARK → const int
Constant to configure port with mark parity.
3
PARITY_NONE → const int
Constant to configure port with parity none
0
PARITY_ODD → const int
Constant to configure port with odd parity.
1
PARITY_SPACE → const int
Constant to configure port with space parity.
4
STOPBITS_1 → const int
Constant to configure port with 1 stop bits
1
STOPBITS_1_5 → const int
Constant to configure port with 1.5 stop bits
3
STOPBITS_2 → const int
Constant to configure port with 2 stop bits
2