Class SerialAddress

    • Constructor Detail

      • SerialAddress

        public SerialAddress​(String name,
                             int bauds,
                             SerialAddress.DataBits dataBits,
                             SerialAddress.StopBits stopBits,
                             SerialAddress.Parity parity,
                             SerialAddress.FlowControl flowControl)
        Create an address for a serial communication, associating a serial interface and various serial signal carcteristics.
        Parameters:
        name - name of the device, COM1 COM2 for Windows, /dev/ttyS0 for Unix
        bauds - baud rate for the communication
        dataBits - number of data bits per bytes
        stopBits - number of stop bits
        parity - parity used
        flowControl - flow control used
    • Method Detail

      • getBauds

        public int getBauds()
        Bauds rate for the communication.
        Returns:
        the bauds (bits per seconds) for this serial link
      • getDataBits

        public SerialAddress.DataBits getDataBits()
        Number of data bits for each communicated bytes.
        Returns:
        the data bits
      • getFlowControl

        public SerialAddress.FlowControl getFlowControl()
        The flow control policie used for this communication.
        Returns:
        the flow control
      • getName

        public String getName()
        The name of the device. Can be COM1, COM2, /dev/ttyS0, /dev/ttyUSB1, etc..
        Returns:
        name
      • getParity

        public SerialAddress.Parity getParity()
        The parity check for this communication.
        Returns:
        parity type
      • getStopBits

        public SerialAddress.StopBits getStopBits()
        Number of stop bits used.
        Returns:
        stop bits number
      • toString

        public String toString()
        Convert this serial address to a human readable string.
        Overrides:
        toString in class Object