Class SerialNumberMessage


public class SerialNumberMessage extends AntMessageFromAnt
Returns the serial number of the ANT hardware.
Since:
4.0
  • Field Details

    • SIZE_SERIAL_NUMBER

      public static final int SIZE_SERIAL_NUMBER
      The number of bytes used for the serial number
      Since:
      4.0
      See Also:
    • OFFSET_SERIAL_NUMBER

      public static final int OFFSET_SERIAL_NUMBER
      The message content offset to the serial number
      Since:
      4.0
      See Also:
  • Constructor Details

    • SerialNumberMessage

      public SerialNumberMessage(AntMessageParcel messageParcel)
      Parse message specific information from the given ANT message parcel.
      Parameters:
      messageParcel - Raw ANT message received form the ANT Radio Service.
      Throws:
      IllegalArgumentException - If the parcel is for the wrong message type.
      Since:
      4.0
    • SerialNumberMessage

      protected SerialNumberMessage(byte[] messageContent)
  • Method Details

    • getSerialNumber

      public long getSerialNumber()
      Gets the serial number for the ANT hardware.
      Returns:
      The serial number.
      Since:
      4.0
    • getMessageType

      public MessageFromAntType getMessageType()
      Description copied from class: AntMessageFromAnt
      The type of this message based on its message id and contents.

      It is recommended to use this rather than the raw message ID.

      Specified by:
      getMessageType in class AntMessageFromAnt
      Returns:
      A message type corresponding to this message as defined in MessageFromAntType.
      Since:
      4.0
    • toString

      public String toString()
      Overrides:
      toString in class AntMessageFromAnt
      Since:
      4.0