Enum Class DeviceState

java.lang.Object
java.lang.Enum<DeviceState>
com.dsi.ant.plugins.antplus.pcc.defines.DeviceState
All Implemented Interfaces:
Serializable, Comparable<DeviceState>, Constable

public enum DeviceState extends Enum<DeviceState>
Defines the possible states of a device.
  • Enum Constant Details

    • DEAD

      public static final DeviceState DEAD
      The device access is no longer usable and will not respond to commands. This can occur if the device id determined to no longer be present and the channel is closed or for any critical failure in the plugins or ARS services. Another case this commonly occurs is when removing a removable adapter such as an ANT USB Stick adapter. Any time the DEAD state is received but it is still desired access the device, you must request access to the device again. If the critical failure still exists or the device is no longer present the access request result will give you the specific reason.
    • CLOSED

      public static final DeviceState CLOSED
      The device is not connected and not trying to connect but will still respond to new commands.
    • SEARCHING

      public static final DeviceState SEARCHING
      The device is attempting to establish a connection. Note: The plugins will attempt to automatically search for lost devices. If the device is determined to no longer be present then the channel will close and the device state will change to DEAD.
    • TRACKING

      public static final DeviceState TRACKING
      The device has an open connection, and can receive and transmit data.
    • PROCESSING_REQUEST

      public static final DeviceState PROCESSING_REQUEST
      The plugin is currently processing a command request from a client.
    • UNRECOGNIZED

      public static final DeviceState UNRECOGNIZED
      The value sent by the plugin service was unrecognized indicating an upgrade of the PCC may be required to handle the value.
  • Method Details

    • values

      public static DeviceState[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DeviceState valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getIntValue

      public int getIntValue()
      Convert enum to equivalent int value
      Returns:
      integer value equivalent
    • getValueFromInt

      public static DeviceState getValueFromInt(int intValue)
      Convert int to equivalent enum value
      Parameters:
      intValue - integer to convert
      Returns:
      enum value equivalent