Class BurstTransferDataMessageFromHost


public final class BurstTransferDataMessageFromHost extends DataMessageFromHost
A burst transfer data packet sent when performing a burst transfer.
Since:
4.0
  • Field Details

    • OFFSET_SEQUENCE_NUMBER

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

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

      public static final int SHIFT_SEQUENCE_NUMBER
      The shift to be applied to the retrieved sequence number bits
      Since:
      4.0
      See Also:
    • FLAG_IS_LAST_MESSAGE

      public static final int FLAG_IS_LAST_MESSAGE
      The mask to be used to get the flag indicating if is last message
      Since:
      4.0
      See Also:
    • SEQUENCE_FIRST_MESSAGE

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

      public static final int SEQUENCE_NUMBER_INC
      The number used to increment the sequence number of the message by 1
      Since:
      4.0
      See Also:
    • SEQUENCE_NUMBER_ROLLOVER

      public static final int SEQUENCE_NUMBER_ROLLOVER
      The last sequence number before a rollover occurs
      Since:
      4.0
      See Also:
    • sequenceNumber

      public final int sequenceNumber
      The sequence number of the burst message
      Since:
      4.0
  • Constructor Details

    • BurstTransferDataMessageFromHost

      public BurstTransferDataMessageFromHost(int sequenceNumberByte, byte[] payload)
      Constructs the message from the message bytes.
      Parameters:
      payload - The received message bytes.
      Since:
      4.0
  • Method Details

    • 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
    • getPayload

      public byte[] getPayload()
      Description copied from class: DataMessageFromHost
      Gets the payload of the data message.
      Specified by:
      getPayload in class DataMessageFromHost
      Returns:
      The payload of the data message.
      Since:
      4.0
    • getMessageContent

      public byte[] getMessageContent(int channelNumber, int networkNumber)
      Description copied from class: AntMessageFromHost
      The content of the message with specified channel number and network number set if required.
      Specified by:
      getMessageContent in class AntMessageFromHost
      Parameters:
      channelNumber - Written to the channel number byte if required
      networkNumber - Written to the network number byte if required
      Returns:
      Message content raw byte array.
      Since:
      4.0
    • getMessageType

      public MessageFromHostType getMessageType()
      Description copied from class: AntMessageFromHost
      The unique type of this message based on its message id, contents, and intended channel type.

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

      Specified by:
      getMessageType in class AntMessageFromHost
      Returns:
      The type of message returned by the host.
      Since:
      4.0
    • toString

      public String toString()
      Overrides:
      toString in class DataMessageFromHost