init method
override
Initializes the connection to the device.
Implementation
@override
Future<bool> init() async {
if (_controller.isClosed) throw StateError("A SerialDevice cannot be used after shutdown() is called");
try {
return await _port.init();
} catch (error) {
logger.warning("Could not open port $portName", body: "$error");
return false;
}
}