Class BurstTransferDataMessage


public class BurstTransferDataMessage extends DataMessage
Message received when receiving burst data from a connected device and every burst packet is acknowledged.
Since:
4.0
  • Field Details

    • OFFSET_SEQUENCE_NUMBER

      public static final int OFFSET_SEQUENCE_NUMBER
      The message content offset to the sequence number
      Since:
      4.0
      See Also:
    • BITMASK_SEQUENCE_NUMBER

      public static final int BITMASK_SEQUENCE_NUMBER
      The mask used to retrieve the sequence number
      Since:
      4.0
      See Also:
    • SHIFT_SEQUENCE_NUMBER

      public static final int SHIFT_SEQUENCE_NUMBER
      The shift applied to the retrieved sequence number after applying the mask
      Since:
      4.0
      See Also:
    • SEQUENCE_FIRST_MESSAGE

      public static final int SEQUENCE_FIRST_MESSAGE
      The sequence number for the first message of the burst transfer
      Since:
      4.0
      See Also:
    • SEQUENCE_NUMBER_INC

      public static final int SEQUENCE_NUMBER_INC
      The value the sequence number increments with each received message
      Since:
      4.0
      See Also:
    • SEQUENCE_NUMBER_ROLLOVER

      public static final int SEQUENCE_NUMBER_ROLLOVER
      The sequence number before a rollover of sequence numbers occurs
      Since:
      4.0
      See Also:
    • SEQUENCE_FLAG_IS_LAST_MESSAGE

      public static final int SEQUENCE_FLAG_IS_LAST_MESSAGE
      The mask used to get the flag indicating if this message is the last message in the burst transfer.
      Since:
      4.1
      See Also:
  • Constructor Details

    • BurstTransferDataMessage

      public BurstTransferDataMessage(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
    • BurstTransferDataMessage

      protected BurstTransferDataMessage(byte[] messageContent)
  • Method Details

    • getSequenceNumber

      public int getSequenceNumber()
      Gets the sequence number of this received message in the burst transfer
      Returns:
      The sequence number of the message.
      Since:
      4.0
    • isFirstMessage

      public boolean isFirstMessage()
      Checks if the message is the first message of the burst transfer.
      Returns:
      True, if message is the first message. False, otherwise.
      Since:
      4.0
    • isLastMessage

      public boolean isLastMessage()
      Checks if the message is the last message of the burst transfer.
      Returns:
      True, if message is the last message. False, otherwise.
      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 DataMessage
      Since:
      4.0