Serial constructor

Serial(
  1. String path,
  2. Baudrate baudrate
)

Opens the tty device at the specified path (e.g. "/dev/ttyUSB0"), with the specified baudrate, and the defaults of 8 data bits, no parity, 1 stop bit, software flow control (xonxoff) off, hardware flow control (rtscts) off.

Implementation

Serial(this.path, this.baudrate)
    : databits = DataBits.db8,
      parity = Parity.parityNone,
      stopbits = StopBits.sb1,
      rtsct = false,
      xonxoff = false,
      _serialHandle = _openSerial(path, baudrate);