Enum Class MessageFromAntType

java.lang.Object
java.lang.Enum<MessageFromAntType>
com.dsi.ant.message.fromant.MessageFromAntType
All Implemented Interfaces:
Serializable, Comparable<MessageFromAntType>, Constable

public enum MessageFromAntType extends Enum<MessageFromAntType>
The various message types which can be received from ANT. Descriptions of the specific message types can be found in the ANT Message Protocol and Usage document.
Since:
4.0
  • Enum Constant Details

  • Method Details

    • values

      public static MessageFromAntType[] 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 MessageFromAntType 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
    • create

      public static MessageFromAntType create(AntMessageParcel antParcel)
      Determines the type of this message received from the ANT Radio Service.

      Use this method for convenience when decoding messages rather than manually decoding the raw message IDs and contents.

      Returns:
      The message type of this message
      Since:
      4.0
    • create

      public static MessageFromAntType create(int messageId, byte[] messageContent)
      Determines the type of this message based on its message id and contents.

      Use this method for convenience when decoding messages rather than manually decoding the raw message IDs and contents.

      Returns:
      The message type of this message
      Since:
      4.0
    • getMessageId

      public int getMessageId()
      Gets the message ID of the message.
      Returns:
      The value of message ID corresponding to a value in MessageId.
      Since:
      4.0