Class AntCommandFailedException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.dsi.ant.channel.AntCommandFailedException
All Implemented Interfaces:
Serializable

public class AntCommandFailedException extends Exception
The ANT Radio Service sent a response which indicates failure.
Since:
4.0
See Also:
  • 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

      public AntCommandFailureReason getFailureReason()
      Why was this exception thrown.
      Returns:
      The reason type sent by the ANT Radio Service.
      Since:
      4.0
    • getAttemptedMessageType

      public MessageFromHostType getAttemptedMessageType()
      Which message failed.
      Returns:
      The type of the message that requested, and failed.
      Since:
      4.0
    • getAntMessage

      public AntMessageParcel 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() for AntCommandFailureReason.CHANNEL_RESPONSE.
      Returns:
      The ANT message if applicable, or null.
      Since:
      4.0
    • getResponseMessage

      public ChannelResponseMessage getResponseMessage()
      The ANT Adapter response if result type is AntCommandFailureReason.CHANNEL_RESPONSE.
      Returns:
      Null if this exception is not due to an Adapter response that was not "No Error".
      Since:
      4.0