Class SerialPortConfiguration

java.lang.Object
org.osgi.service.serial.SerialPortConfiguration

public class SerialPortConfiguration extends Object
An object represents the Serial port configuration.
"Immutable"
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of the serial port configuration with the following configuration: Baud rate = auto, Data bits = 8, Flow control = none, Parity = none, Stop bits = 1.
    Creates an instance of the serial port configuration with the specified Baud rate and the following configuration: Data bits = 8, Flow control = none, Parity = none, Stop bits = 1.
    SerialPortConfiguration(int baudRate, int dataBits, int flowControl, int parity, int stopBits)
    Creates an instance of the serial port configuration with the specified Baud rate, Data bits, Flow control, Parity and Stop bits.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the baud rate.
    int
    Returns the data bits.
    int
    Returns the flow control.
    int
    Returns the parity.
    int
    Returns the stop bits.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SerialPortConfiguration

      public SerialPortConfiguration(int baudRate, int dataBits, int flowControl, int parity, int stopBits)
      Creates an instance of the serial port configuration with the specified Baud rate, Data bits, Flow control, Parity and Stop bits.
      Parameters:
      baudRate - Baud rate.
      dataBits - Data bits.
      flowControl - Flow control.
      parity - Parity.
      stopBits - Stop bits.
    • SerialPortConfiguration

      public SerialPortConfiguration(int baudRate)
      Creates an instance of the serial port configuration with the specified Baud rate and the following configuration: Data bits = 8, Flow control = none, Parity = none, Stop bits = 1.
      Parameters:
      baudRate - Baud rate.
    • SerialPortConfiguration

      public SerialPortConfiguration()
      Creates an instance of the serial port configuration with the following configuration: Baud rate = auto, Data bits = 8, Flow control = none, Parity = none, Stop bits = 1.
  • Method Details

    • getBaudRate

      public int getBaudRate()
      Returns the baud rate.
      Returns:
      The baud rate.
    • getDataBits

      public int getDataBits()
      Returns the data bits.
      Returns:
      The data bits.
    • getFlowControl

      public int getFlowControl()
      Returns the flow control.
      Returns:
      The flow control.
    • getParity

      public int getParity()
      Returns the parity.
      Returns:
      The parity.
    • getStopBits

      public int getStopBits()
      Returns the stop bits.
      Returns:
      The stop bits.