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 classCapabilities under advanced optionsfinal classCapabilities under advanced options 2final classCapabilities under advanced options 3final classCapabilities under advanced options 4final classOffsets used to parse the capabilities message message contentstatic enumSummary of the ANT device's capability options.final classCapabilities under standard options -
Field Summary
Fields inherited from class com.dsi.ant.message.fromant.AntMessageFromAnt
mMessageContentFields 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
ConstructorsModifierConstructorDescriptionprotectedCapabilitiesMessage(byte[] messageContent) Creates a capabilities messageCapabilitiesMessage(AntMessageParcel messageParcel) Parse message specific information from the given ANT message parcel. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanAccessor method for the various capabilities settings.The type of this message based on its message id and contents.intReturns the number of channels supported by the ANT hardware.intReturns how many networks are supported by this channel.inthashCode()toString()Methods inherited from class com.dsi.ant.message.fromant.AntMessageFromAnt
createAntMessage, createAntMessage, createAntMessage, extractCorrectMessageContent, getMessageContent, getMessageId, toStringHeaderMethods 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:
hashCodein classAntMessage- Since:
- 4.0
-
equals
- Overrides:
equalsin classAntMessage- Since:
- 4.0
-
toString
- Overrides:
toStringin 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:AntMessageFromAntThe 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:
getMessageTypein classAntMessageFromAnt- Returns:
- A message type corresponding to this message as defined in
MessageFromAntType. - Since:
- 4.0
-