SerialPortHandler class

Constructors

SerialPortHandler({required String portName, required SerialDeviceConfig config, bool enableLogging = true})

Properties

config SerialDeviceConfig
final
enableLogging bool
enable/disable debug logs
final
etx int
final
hashCode int
The hash code for this object.
no setterinherited
isConnected bool
no setter
isOpen bool
no setter
onData Stream<DataReceive>
no setter
pinPollInterval Duration
getter/setter pair
portName String
final
portStatus ValueNotifier<PortStatus>
PORT STATUS (notify UI about port lifecycle)
final
reader SerialPortReader?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
savedHandler ↔ dynamic
getter/setter pair
statusMgr StatusManager
final
stx int
final

Methods

close() Future<bool>
dispose() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open() Future<bool>
openReader(void handler(dynamic data)) Future<bool>
scheduleTask<T>(Future<T> task(), {bool isPrinting = false}) Future<T>
Schedules a task to be executed sequentially in the command queue. isPrinting : If true, sets the device status to 'Busy'/'Printing' before starting.
sendBytes(List<int> message) Future<bool>
Use this method for general writing. It will be queued.
sendBytesImmediate(List<int> message) Future<bool>
Use this method ONLY inside a scheduled task to avoid deadlock.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited