Package com.dsi.ant.channel
Class AntCommandFailedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.dsi.ant.channel.AntCommandFailedException
- All Implemented Interfaces:
Serializable
The ANT Radio Service sent a response which indicates failure.
- Since:
- 4.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAntCommandFailedException
(MessageFromHostType attemptedMessageType, ServiceResult serviceResult) Used in library after receiving ServiceResult over IPC -
Method Summary
Modifier and TypeMethodDescriptionThe ANT message related to this exception.Which message failed.Why was this exception thrown.The ANT Adapter response if result type isAntCommandFailureReason.CHANNEL_RESPONSE
.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AntCommandFailedException
public AntCommandFailedException(MessageFromHostType attemptedMessageType, ServiceResult serviceResult) Used in library after receiving ServiceResult over IPC- Parameters:
attemptedMessageType
- The type of message that was sent to the ANT Radio Service.serviceResult
- The result of the message sent to the ANT Radio Service.- Since:
- 4.0
-
-
Method Details
-
getFailureReason
Why was this exception thrown.- Returns:
- The reason type sent by the ANT Radio Service.
- Since:
- 4.0
-
getAttemptedMessageType
Which message failed.- Returns:
- The type of the message that requested, and failed.
- Since:
- 4.0
-
getAntMessage
The ANT message related to this exception. You probably do not want to use this directly, instead get the specific message related with the failure code. eg.getResponseMessage()
forAntCommandFailureReason.CHANNEL_RESPONSE
.- Returns:
- The ANT message if applicable, or null.
- Since:
- 4.0
-
getResponseMessage
The ANT Adapter response if result type isAntCommandFailureReason.CHANNEL_RESPONSE
.- Returns:
- Null if this exception is not due to an Adapter response that was not "No Error".
- Since:
- 4.0
-