public abstract class AntMessageFromHost extends 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 and Description |
---|
AntMessageFromHost() |
Modifier and Type | Method and Description |
---|---|
static AntMessageFromHost |
createAntMessage(AntMessageParcel antParcel,
ChannelType channelType)
Takes a message received over IPC and converts it to an AntMessageFromHost object
|
byte[] |
getMessageContent()
The content of the message with no channel number or network number set.
|
byte[] |
getMessageContent(int channelNumber)
The content of the message with specified channel number set if required.
|
abstract byte[] |
getMessageContent(int channelNumber,
int networkNumber)
The content of the message with specified channel number and network number set if required.
|
int |
getMessageId()
Get the ANT message ID.
|
abstract MessageFromHostType |
getMessageType()
The unique type of this message based on its message id, contents, and intended channel
type.
|
byte[] |
getRawMessage(int channelNumber,
int networkNumber)
Creates a message which can be written to the chip.
|
java.lang.String |
toString() |
equals, getMessageContentString, getMessageIdString, hashCode, maskChannelNumber
public int getMessageId()
AntMessage
getMessageId
in class AntMessage
public abstract MessageFromHostType getMessageType()
It is recommended to use this rather than the raw message ID.
public byte[] getMessageContent()
getMessageContent
in class AntMessage
public byte[] getMessageContent(int channelNumber)
channelNumber
- Written to the channel number byte if requiredpublic abstract byte[] getMessageContent(int channelNumber, int networkNumber)
channelNumber
- Written to the channel number byte if requirednetworkNumber
- Written to the network number byte if requiredpublic byte[] getRawMessage(int channelNumber, int networkNumber)
channelNumber
- Specific channel to write in to this message, if required.networkNumber
- Specific network to write in to this message, if required.public static AntMessageFromHost createAntMessage(AntMessageParcel antParcel, ChannelType channelType)
antParcel
- The basic ANT message data received over IPC.MessageFromHostType
.public java.lang.String toString()
toString
in class AntMessage
Copyright © 2015 Dynastream Innovations Inc. All Rights Reserved.