Class UdevSerialConfig

java.lang.Object
com.kosdev.kos.core.service.udev.UdevSerialConfig

public class UdevSerialConfig extends Object
Serial configuration for probing serial devices. The baud rate must be configured, but all other values default to -1, meaning they will be ignored. To adjust any particular config setting, determing the actual termios setting value and set the corresponding property. This does not support deltas (masking flags). This means that the actual termios structure value needs to be determined first and then set accordingly.
Since:
7
Version:
9
  • Constructor Details

    • UdevSerialConfig

      public UdevSerialConfig()
      Default constructor.
      Since:
      7
    • UdevSerialConfig

      public UdevSerialConfig(int baud)
      Baud rate constructor. This leaves all other settings unconfigured which is no parity, 8 bits, 1 stop bit (N81) which matches most default serial hardware.
      Parameters:
      baud - the baud rate
      Since:
      9
  • Method Details

    • getBaud

      public int getBaud()
    • getCflag

      public int getCflag()
    • getOflag

      public int getOflag()
    • getIflag

      public int getIflag()
    • getLflag

      public int getLflag()
    • getVmin

      public short getVmin()
    • getVtime

      public short getVtime()
    • setBaud

      public UdevSerialConfig setBaud(int baud)
      Returns:
      this .
    • setCflag

      public UdevSerialConfig setCflag(int cflag)
      Returns:
      this .
    • setOflag

      public UdevSerialConfig setOflag(int oflag)
      Returns:
      this .
    • setIflag

      public UdevSerialConfig setIflag(int iflag)
      Returns:
      this .
    • setLflag

      public UdevSerialConfig setLflag(int lflag)
      Returns:
      this .
    • setVmin

      public UdevSerialConfig setVmin(short vmin)
      Returns:
      this .
    • setVtime

      public UdevSerialConfig setVtime(short vtime)
      Returns:
      this .