com.moxa.mxnportapi

## Enum MxException.ErrorCode

- java.lang.Object
- - java.lang.Enum<MxException.ErrorCode>
  - - com.moxa.mxnportapi.MxException.ErrorCode

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<MxException.ErrorCode>
  Enclosing class:
    MxException

      public static enum MxException.ErrorCode
      extends java.lang.Enum<MxException.ErrorCode>

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `CommandTimeout` The Command Reply timeout.
    `InvalidParameter` The parameter is invalid.
    `InvalidResource` The required resource is not available.
    `NotSupported` This function is not supported by this model.
    `PortIsNotOpened` This port is not opened.
    `PortOpenFail` The port is opened failed.
    `PortReopened` The port is reopened or has not been closed properly.
    `ReadOverflow` The read buffer has overflowed.
    `Unsuccessful` An implicit exception from underlayer.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getString()` Get the description of this error.
    `static MxException.ErrorCode` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static MxException.ErrorCode[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### CommandTimeout

          public static final MxException.ErrorCode CommandTimeout

      The Command Reply timeout. After this API send command to NPort and wait over 5 seconds, this API will throw this Exception.

    - #### InvalidParameter

          public static final MxException.ErrorCode InvalidParameter

      The parameter is invalid.

    - #### InvalidResource

          public static final MxException.ErrorCode InvalidResource

      The required resource is not available.

    - #### NotSupported

          public static final MxException.ErrorCode NotSupported

      This function is not supported by this model.

    - #### PortIsNotOpened

          public static final MxException.ErrorCode PortIsNotOpened

      This port is not opened.

    - #### PortOpenFail

          public static final MxException.ErrorCode PortOpenFail

      The port is opened failed.

    - #### PortReopened

          public static final MxException.ErrorCode PortReopened

      The port is reopened or has not been closed properly.

    - #### ReadOverflow

          public static final MxException.ErrorCode ReadOverflow

      The read buffer has overflowed.

    - #### Unsuccessful

          public static final MxException.ErrorCode Unsuccessful

      An implicit exception from underlayer. User should use underlining `Exception` to extract more information.

  - ### Method Detail

    - #### getString

          public java.lang.String getString()

      Get the description of this error.
      Returns:
        The string describe to the error.

    - #### valueOf

          public static MxException.ErrorCode valueOf(java.lang.String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.NullPointerException` - if the argument is null

    - #### values

          public static MxException.ErrorCode[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (MxException.ErrorCode c : MxException.ErrorCode.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared