public class AntVersionMessage extends AntMessageFromAnt
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 |
---|
AntVersionMessage(AntMessageParcel messageParcel)
Parse message specific information from the given ANT message parcel.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(AntVersionMessage right)
Check the return value of
isComparable(AntVersionMessage) as true before using this
method. |
int |
getBuildNumber()
Returns the build number for the version.
|
float |
getMajorVersion()
Returns the major version contained within the version message.
|
MessageFromAntType |
getMessageType()
The type of this message based on its message id and contents.
|
java.lang.String |
getModule()
Returns the module the version pertains to.
|
java.lang.String |
getProductFamily()
Returns the product family this version belongs to.
|
char |
getRevision()
Returns the specific revision of this version.
|
java.lang.String |
getVersionString()
Returns human readable version string
|
boolean |
isComparable(AntVersionMessage right)
Checks to see if the firmware version message can be compared, namely they
have the same format, from the same chip maker or within the same module.
|
java.lang.String |
toString() |
createAntMessage, createAntMessage, getMessageContent, getMessageId
equals, getMessageContentString, getMessageIdString, hashCode, maskChannelNumber
public AntVersionMessage(AntMessageParcel messageParcel)
messageParcel
- Raw ANT message received form the ANT Radio Service.java.lang.IllegalArgumentException
- If the parcel is for the wrong message type.public int compareTo(AntVersionMessage right) throws java.lang.IllegalArgumentException
isComparable(AntVersionMessage)
as true before using this
method. This method compares the given FirmwareVersions for less than, greater than or
equality. Only version, revision and build number are compared.right
- java.lang.IllegalArgumentException
public boolean isComparable(AntVersionMessage right)
compareTo(AntVersionMessage)
is invoked.right
- Version message to be compared withpublic java.lang.String getVersionString()
public java.lang.String getProductFamily()
public float getMajorVersion()
public char getRevision()
public int getBuildNumber()
public java.lang.String getModule()
public java.lang.String toString()
toString
in class AntMessageFromAnt
public MessageFromAntType getMessageType()
AntMessageFromAnt
It is recommended to use this rather than the raw message ID.
getMessageType
in class AntMessageFromAnt
MessageFromAntType
.Copyright © 2015 Dynastream Innovations Inc. All Rights Reserved.