public abstract class AntMessageFromAnt 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
Modifier and Type | Method and Description |
---|---|
static AntMessageFromAnt |
createAntMessage(AntMessageParcel antParcel)
Takes a message received over IPC and converts it to an
AntMessageFromAnt object |
static AntMessageFromAnt |
createAntMessage(byte[] rawMessage)
Takes a message read from the chip and converts it to an
AntMessageFromAnt object |
byte[] |
getMessageContent()
The content of the message.
|
int |
getMessageId()
Get the ANT message ID.
|
abstract MessageFromAntType |
getMessageType()
The type of this message based on its message id and contents.
|
java.lang.String |
toString() |
equals, getMessageContentString, getMessageIdString, hashCode, maskChannelNumber
public int getMessageId()
AntMessage
getMessageId
in class AntMessage
public byte[] getMessageContent()
AntMessage
getMessageContent
in class AntMessage
public abstract MessageFromAntType getMessageType()
It is recommended to use this rather than the raw message ID.
MessageFromAntType
.public static AntMessageFromAnt createAntMessage(byte[] rawMessage)
AntMessageFromAnt
objectrawMessage
- The basic ANT message data received from the chip.com.dsi.ant.message.fromant
message instance, or NULL if
not a From ANT message or not a known MessageFromAntType
.public static AntMessageFromAnt createAntMessage(AntMessageParcel antParcel)
AntMessageFromAnt
objectantParcel
- The basic ANT message data received over IPC.com.dsi.ant.message.fromant
message instance, or NULL if
not a From ANT message or not a known MessageFromAntType
.public java.lang.String toString()
toString
in class AntMessage
Copyright © 2015 Dynastream Innovations Inc. All Rights Reserved.