com.moxa.mxnportapi

## Class MxNPort.IoctlMode

- java.lang.Object
- - com.moxa.mxnportapi.MxNPort.IoctlMode

- Enclosing interface:
    MxNPort

      public static class MxNPort.IoctlMode
      extends java.lang.Object

  This class represents serial parameters such as baud rate, data bits, parity, and stop bits.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `baudRate` Actual baud rate.
    `int` | `dataBits` Available constants: `DATA_BITS_5`, `DATA_BITS_6`, `DATA_BITS_7`, `DATA_BITS_8`.
    `int` | `parity` Available constants: `PARITY_NONE`, `PARITY_ODD`, `PARITY_EVEN`, `PARITY_MARK`, `PARITY_SPACE`.
    `int` | `stopBits` Available constants: `STOP_BITS_1`, `STOP_BITS_1_5`, `STOP_BITS_2`.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IoctlMode()` Constructor of IoctlMode, initial the serial parameters by default values.
    `IoctlMode(int baudRate, int dataBits, int parity, int stopBits)` Constructor of IoctlMode, initial the serial parameters by input values.

  - ### Method Summary

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### baudRate

          public int baudRate

      Actual baud rate. For example, set to 9600 for 9600bps. The available range is dependent on NPort.
      The default value is 38400.

    - #### dataBits

          public int dataBits

      Available constants: `DATA_BITS_5`, `DATA_BITS_6`, `DATA_BITS_7`, `DATA_BITS_8`.
      The default value is `DATA_BITS_8`.

    - #### parity

          public int parity

      Available constants: `PARITY_NONE`, `PARITY_ODD`, `PARITY_EVEN`, `PARITY_MARK`, `PARITY_SPACE`.
      The default value is `PARITY_NONE`.

    - #### stopBits

          public int stopBits

      Available constants: `STOP_BITS_1`, `STOP_BITS_1_5`, `STOP_BITS_2`.
      The default value is `STOP_BITS_1`.

  - ### Constructor Detail

    - #### IoctlMode

          public IoctlMode()

      Constructor of IoctlMode, initial the serial parameters by default values.
      Default values:

      Baud rate | Data bits | Stop bits | Parity
      38400 bps | 8 | 1 | None

    - #### IoctlMode

          public IoctlMode(int baudRate,
                           int dataBits,
                           int parity,
                           int stopBits)

      Constructor of IoctlMode, initial the serial parameters by input values.
      Parameters:
        `baudRate` - The baud rate.
        `dataBits` - The data bits.
        `parity` - The parity.
        `stopBits` - The stop bits.