Class DataMessage

Direct Known Subclasses:
AcknowledgedDataMessage, BroadcastDataMessage, BurstTransferDataMessage

public abstract class DataMessage extends AntMessageFromAnt
Since:
4.0
  • Field Details

    • LENGTH_STANDARD_PAYLOAD

      public static final int LENGTH_STANDARD_PAYLOAD
      The length in bytes of the standard payload in a broadcast, acknowledged, or burst message.
      Since:
      4.0
      See Also:
    • OFFSET_PAYLOAD_START

      public static final int OFFSET_PAYLOAD_START
      The message content offset to the first byte of the payload.
      Since:
      4.0
      See Also:
  • Constructor Details

    • DataMessage

      protected DataMessage(byte[] messageContent)
  • Method Details

    • getStandardPayload

      protected static byte[] getStandardPayload(byte[] messageContent)
    • getPayload

      public byte[] getPayload()
      Extracts the data payload of the data message received.
      Returns:
      The data payload.
      Since:
      4.0
    • hasExtendedData

      public boolean hasExtendedData()
      Checks if the received data message contains extended data.
      Returns:
      True, if there is extended data. False, otherwise.
      Since:
      4.0
    • getExtendedData

      public ExtendedData getExtendedData()
      Gets the extended data contained in the data message if it has extended data.
      Returns:
      The ExtendedData.
      Since:
      4.0
    • toString

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