SerialDeviceConfig constructor
const
SerialDeviceConfig({
- required String portName,
- int baudRate = 9600,
- int dataBits = 8,
- int parity = 0,
- int stopBits = 1,
- bool dtrEnable = true,
- bool rtsEnable = true,
- int flowControl = SerialPortFlowControl.none,
- Duration readTimeout = const Duration(milliseconds: 500),
- Duration writeTimeout = const Duration(milliseconds: 500),
- ProtocolMode protocolMode = ProtocolMode.framed,
Implementation
const SerialDeviceConfig({
required this.portName,
this.baudRate = 9600,
this.dataBits = 8,
this.parity = 0,
this.stopBits = 1,
this.dtrEnable = true,
this.rtsEnable = true,
this.flowControl = SerialPortFlowControl.none,
this.readTimeout = const Duration(milliseconds: 500),
this.writeTimeout = const Duration(milliseconds: 500),
this.protocolMode = ProtocolMode.framed,
});