public final class BurstTransferDataMessageFromHost extends DataMessageFromHost
Modifier and Type | Field and Description |
---|---|
static int |
BITMASK_SEQUENCE_NUMBER
The mask to be used to retrieve the sequence number
|
static int |
FLAG_IS_LAST_MESSAGE
The mask to be used to get the flag indicating if is last message
|
static int |
OFFSET_SEQUENCE_NUMBER
The message content offset to the sequence number of this burst packet
|
static int |
SEQUENCE_FIRST_MESSAGE
The sequence number of the first message in the burst transfer
|
static int |
SEQUENCE_NUMBER_INC
The number used to increment the sequence number of the message by 1
|
static int |
SEQUENCE_NUMBER_ROLLOVER
The last sequence number before a rollover occurs
|
int |
sequenceNumber
The sequence number of the burst message
|
static int |
SHIFT_SEQUENCE_NUMBER
The shift to be applied to the retrieved sequence number bits
|
LENGTH_STANDARD_PAYLOAD, OFFSET_PAYLOAD_START
BITMASK_CHANNEL_NUMBER, FILLER_BYTE, OFFSET_CHANNEL_NUMBER, RAW_OFFSET_MESSAGE_CONTENT_START, RAW_OFFSET_MESSAGE_ID, RAW_OFFSET_MESSAGE_SIZE, SIZE_CHANNEL_NUMBER, SIZE_FILLER_BYTE
Constructor and Description |
---|
BurstTransferDataMessageFromHost(int sequenceNumberByte,
byte[] payload)
Constructs the message from the message bytes.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getMessageContent(int channelNumber,
int networkNumber)
The content of the message with specified channel number and network number set if required.
|
MessageFromHostType |
getMessageType()
The unique type of this message based on its message id, contents, and intended channel
type.
|
byte[] |
getPayload()
Gets the payload of the data message.
|
boolean |
isFirstMessage()
Checks if the message is the first message of the burst transfer.
|
boolean |
isLastMessage()
Checks if the message is the last message of the burst transfer.
|
java.lang.String |
toString() |
createAntMessage, getMessageContent, getMessageContent, getMessageId, getRawMessage
equals, getMessageContentString, getMessageIdString, hashCode, maskChannelNumber
public static final int OFFSET_SEQUENCE_NUMBER
public static final int BITMASK_SEQUENCE_NUMBER
public static final int SHIFT_SEQUENCE_NUMBER
public static final int FLAG_IS_LAST_MESSAGE
public static final int SEQUENCE_FIRST_MESSAGE
public static final int SEQUENCE_NUMBER_INC
public static final int SEQUENCE_NUMBER_ROLLOVER
public final int sequenceNumber
public BurstTransferDataMessageFromHost(int sequenceNumberByte, byte[] payload)
payload
- The received message bytes.public boolean isFirstMessage()
public boolean isLastMessage()
public byte[] getPayload()
DataMessageFromHost
getPayload
in class DataMessageFromHost
public byte[] getMessageContent(int channelNumber, int networkNumber)
AntMessageFromHost
getMessageContent
in class AntMessageFromHost
channelNumber
- Written to the channel number byte if requirednetworkNumber
- Written to the network number byte if requiredpublic MessageFromHostType getMessageType()
AntMessageFromHost
It is recommended to use this rather than the raw message ID.
getMessageType
in class AntMessageFromHost
public java.lang.String toString()
toString
in class DataMessageFromHost
Copyright © 2015 Dynastream Innovations Inc. All Rights Reserved.