Package com.dsi.ant.message.fromhost
Class DataMessageFromHost
java.lang.Object
com.dsi.ant.message.AntMessage
com.dsi.ant.message.fromhost.AntMessageFromHost
com.dsi.ant.message.fromhost.DataMessageFromHost
- Direct Known Subclasses:
AcknowledgedDataMessageFromHost
,BroadcastDataMessageFromHost
,BurstTransferDataMessageFromHost
Defines values for reading a
MessageFromHostType.BROADCAST_DATA
,
MessageFromHostType.ACKNOWLEDGED_DATA
, or MessageFromHostType.BURST_TRANSFER_DATA
type message.- Since:
- 4.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The length in bytes of the standard payload in a broadcast, acknowledged, or burst message.static final int
The message content offset to the first byte of the payload.Fields inherited from class com.dsi.ant.message.AntMessage
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static DataMessageFromHost
createDataMessageFromHost
(MessageFromHostType messageType, byte[] messageContent) abstract byte[]
Gets the payload of the data message.protected static byte[]
getStandardPayload
(byte[] messageContent) toString()
Methods inherited from class com.dsi.ant.message.fromhost.AntMessageFromHost
createAntMessage, createAntMessage, getMessageContent, getMessageContent, getMessageContent, getMessageId, getMessageType, getRawMessage, toStringHeader
Methods inherited from class com.dsi.ant.message.AntMessage
equals, getMessageContentString, getMessageIdString, hashCode, maskChannelNumber
-
Field Details
-
LENGTH_STANDARD_PAYLOAD
public static final int LENGTH_STANDARD_PAYLOADThe 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_STARTThe message content offset to the first byte of the payload.- Since:
- 4.0
- See Also:
-
-
Constructor Details
-
DataMessageFromHost
public DataMessageFromHost()
-
-
Method Details
-
getPayload
public abstract byte[] getPayload()Gets the payload of the data message.- Returns:
- The payload of the data message.
- Since:
- 4.0
-
getStandardPayload
protected static byte[] getStandardPayload(byte[] messageContent) -
createDataMessageFromHost
protected static DataMessageFromHost createDataMessageFromHost(MessageFromHostType messageType, byte[] messageContent) -
toString
- Overrides:
toString
in classAntMessageFromHost
-