Package com.dsi.ant.message
Enum Class ResponseCode
- All Implemented Interfaces:
Serializable
,Comparable<ResponseCode>
,Constable
The possible response codes a
ChannelResponseMessage
can contain.- Since:
- 4.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionreturned on attempt to open a channel without setting the channel IDreturned on attempt to perform an action from the wrong channel statereturned on attempt to communicate on a channel that is not openreturned when the provided list ID or size exceeds the limitreturned when the message has an invalid parameterreturned when an invalid parameter is specified in a configuration messagereturned if a data message is provided that is too largeReturned to indicate success.The value sent from the ANT Radio Service is not defined in this version of the API -
Method Summary
Modifier and TypeMethodDescriptionstatic ResponseCode
create
(int rawValue) Creates the ResponseCode from the raw value.int
Gets the raw value of this ResponseCode.static ResponseCode
Returns the enum constant of this class with the specified name.static ResponseCode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RESPONSE_NO_ERROR
Returned to indicate success.- Since:
- 4.0
-
CHANNEL_IN_WRONG_STATE
returned on attempt to perform an action from the wrong channel state- Since:
- 4.0
-
CHANNEL_NOT_OPENED
returned on attempt to communicate on a channel that is not open- Since:
- 4.0
-
CHANNEL_ID_NOT_SET
returned on attempt to open a channel without setting the channel ID- Since:
- 4.0
-
MESSAGE_SIZE_EXCEEDS_LIMIT
returned if a data message is provided that is too large- Since:
- 4.0
-
INVALID_MESSAGE
returned when the message has an invalid parameter- Since:
- 4.0
-
INVALID_LIST_ID
returned when the provided list ID or size exceeds the limit- Since:
- 4.0
-
INVALID_PARAMETER_PROVIDED
returned when an invalid parameter is specified in a configuration message- Since:
- 4.0
-
UNKNOWN
The value sent from the ANT Radio Service is not defined in this version of the API- Since:
- 4.0
-
-
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
-
getRawValue
public int getRawValue()Gets the raw value of this ResponseCode. Applications should use the enumeration values directly.- Returns:
- The raw value.
- Since:
- 4.0
-
create
Creates the ResponseCode from the raw value. Applications should access the enumeration values directly.- Parameters:
rawValue
- The raw value.- Returns:
- The response code.
- Since:
- 4.0
-