Package com.dsi.ant.message.fromant
Class CapabilitiesMessage
java.lang.Object
com.dsi.ant.message.AntMessage
com.dsi.ant.message.fromant.AntMessageFromAnt
com.dsi.ant.message.fromant.CapabilitiesMessage
Provides possible ANT capabilities, and whether they are supported or not. Constants defined in
Options are used to access the capability option information.
See the ANT Message Protocol and Usage document for more details.
- Since:
- 4.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal class
Capabilities under advanced optionsfinal class
Capabilities under advanced options 2final class
Capabilities under advanced options 3final class
Capabilities under advanced options 4final class
Offsets used to parse the capabilities message message contentstatic enum
Summary of the ANT device's capability options.final class
Capabilities under standard options -
Field Summary
Fields inherited from class com.dsi.ant.message.fromant.AntMessageFromAnt
mMessageContent
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
ConstructorsModifierConstructorDescriptionprotected
CapabilitiesMessage
(byte[] messageContent) Creates a capabilities messageCapabilitiesMessage
(AntMessageParcel messageParcel) Parse message specific information from the given ANT message parcel. -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
Accessor method for the various capabilities settings.The type of this message based on its message id and contents.int
Returns the number of channels supported by the ANT hardware.int
Returns how many networks are supported by this channel.int
hashCode()
toString()
Methods inherited from class com.dsi.ant.message.fromant.AntMessageFromAnt
createAntMessage, createAntMessage, createAntMessage, extractCorrectMessageContent, getMessageContent, getMessageId, toStringHeader
Methods inherited from class com.dsi.ant.message.AntMessage
getMessageContentString, getMessageIdString, maskChannelNumber
-
Constructor Details
-
CapabilitiesMessage
Parse message specific information from the given ANT message parcel.- Parameters:
messageParcel
- Raw ANT message received form the ANT Radio Service.- Throws:
IllegalArgumentException
- If the parcel is for the wrong message type.- Since:
- 4.0
-
CapabilitiesMessage
protected CapabilitiesMessage(byte[] messageContent) Creates a capabilities message- Parameters:
messageContent
- adapter capabilities
-
-
Method Details
-
getCapability
Accessor method for the various capabilities settings.- Parameters:
option
- An enum of the Capability type- Returns:
- true if capability is available, false otherwise.
- Since:
- 4.0
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAntMessage
- Since:
- 4.0
-
equals
- Overrides:
equals
in classAntMessage
- Since:
- 4.0
-
toString
- Overrides:
toString
in classAntMessageFromAnt
- Since:
- 4.0
-
getNumberOfChannels
public int getNumberOfChannels()Returns the number of channels supported by the ANT hardware.- Returns:
- The number of channels supported.
- Since:
- 4.0
-
getNumberOfNetworks
public int getNumberOfNetworks()Returns how many networks are supported by this channel.- Returns:
- The number of networks supported.
- Since:
- 4.0
-
getMessageType
Description copied from class:AntMessageFromAnt
The type of this message based on its message id and contents.It is recommended to use this rather than the raw message ID.
- Specified by:
getMessageType
in classAntMessageFromAnt
- Returns:
- A message type corresponding to this message as defined in
MessageFromAntType
. - Since:
- 4.0
-