Enum Class DeviceState
- All Implemented Interfaces:
Serializable
,Comparable<DeviceState>
,Constable
Defines the possible states of a device.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe device is not connected and not trying to connect but will still respond to new commands.The device access is no longer usable and will not respond to commands.The plugin is currently processing a command request from a client.The device is attempting to establish a connection.The device has an open connection, and can receive and transmit data.The value sent by the plugin service was unrecognized indicating an upgrade of the PCC may be required to handle the value. -
Method Summary
Modifier and TypeMethodDescriptionint
Convert enum to equivalent int valuestatic DeviceState
getValueFromInt
(int intValue) Convert int to equivalent enum valuestatic DeviceState
Returns the enum constant of this class with the specified name.static DeviceState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
The device is not connected and not trying to connect but will still respond to new commands. -
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 toDEAD
. -
TRACKING
The device has an open connection, and can receive and transmit data. -
PROCESSING_REQUEST
The plugin is currently processing a command request from a client. -
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
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
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 nameNullPointerException
- if the argument is null
-
getIntValue
public int getIntValue()Convert enum to equivalent int value- Returns:
- integer value equivalent
-
getValueFromInt
Convert int to equivalent enum value- Parameters:
intValue
- integer to convert- Returns:
- enum value equivalent
-