Package com.dsi.ant.message.fromhost
Class FrequencyAgilityMessage
java.lang.Object
com.dsi.ant.message.AntMessage
com.dsi.ant.message.fromhost.AntMessageFromHost
com.dsi.ant.message.fromhost.FrequencyAgilityMessage
Configures the frequency agility feature which changes frequency if
significant degradation is experienced.
- Since:
- 4.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The message content offset the first frequency valuestatic final int
The message content offset the third frequency valuestatic final int
The message content offset the second frequency valueFields 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
FrequencyAgilityMessage
(byte[] messageContent) FrequencyAgilityMessage
(int frequencyOne, int frequencyTwo, int frequencyThree) Constructs the message with the give values for the frequencies to be used. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the first frequency value.int
Gets the third frequency value.int
Gets the second frequency value.byte[]
getMessageContent
(int channelNumber, int networkNumber) The content of the message with specified channel number and network number set if required.The unique type of this message based on its message id, contents, and intended channel type.static int
getRealRfFrequency
(int rfFrequencyOffset) Converts an ANT Channel RF Frequency value to the real world frequency.toString()
Methods inherited from class com.dsi.ant.message.fromhost.AntMessageFromHost
createAntMessage, createAntMessage, getMessageContent, getMessageContent, getMessageId, getRawMessage, toStringHeader
Methods inherited from class com.dsi.ant.message.AntMessage
equals, getMessageContentString, getMessageIdString, hashCode, maskChannelNumber
-
Field Details
-
OFFSET_FREQUENCY_ONE
public static final int OFFSET_FREQUENCY_ONEThe message content offset the first frequency value- Since:
- 4.0
- See Also:
-
OFFSET_FREQUENCY_TWO
public static final int OFFSET_FREQUENCY_TWOThe message content offset the second frequency value- Since:
- 4.0
- See Also:
-
OFFSET_FREQUENCY_THREE
public static final int OFFSET_FREQUENCY_THREEThe message content offset the third frequency value- Since:
- 4.0
- See Also:
-
-
Constructor Details
-
FrequencyAgilityMessage
public FrequencyAgilityMessage(int frequencyOne, int frequencyTwo, int frequencyThree) Constructs the message with the give values for the frequencies to be used.- Parameters:
frequencyOne
- The first frequency value as an offset of 2400 MHzfrequencyTwo
- The first frequency value as an offset of 2400 MHzfrequencyThree
- The first frequency value as an offset of 2400 MHz- Since:
- 4.0
-
FrequencyAgilityMessage
protected FrequencyAgilityMessage(byte[] messageContent)
-
-
Method Details
-
getRealRfFrequency
public static int getRealRfFrequency(int rfFrequencyOffset) Converts an ANT Channel RF Frequency value to the real world frequency.- Parameters:
rfFrequencyOffset
- The set ANT Channel RF Frequency as an offset.- Returns:
- The channel period in 1/32768ths of a second units.
- Since:
- 4.5
-
getFrequencyOne
public int getFrequencyOne()Gets the first frequency value.- Returns:
- The frequency as an offset of 2400 MHz (e.g. 50MHz is 2450 MHz).
- Since:
- 4.0
-
getFrequencyTwo
public int getFrequencyTwo()Gets the second frequency value.- Returns:
- The frequency as an offset of 2400 MHz (e.g. 50MHz is 2450 MHz).
- Since:
- 4.0
-
getFrequencyThree
public int getFrequencyThree()Gets the third frequency value.- Returns:
- The frequency as an offset of 2400 MHz (e.g. 50MHz is 2450 MHz).
- Since:
- 4.0
-
getMessageContent
public byte[] getMessageContent(int channelNumber, int networkNumber) Description copied from class:AntMessageFromHost
The content of the message with specified channel number and network number set if required.- Specified by:
getMessageContent
in classAntMessageFromHost
- Parameters:
channelNumber
- Written to the channel number byte if requirednetworkNumber
- Written to the network number byte if required- Returns:
- Message content raw byte array.
- Since:
- 4.0
-
getMessageType
Description copied from class:AntMessageFromHost
The unique type of this message based on its message id, contents, and intended channel type.It is recommended to use this rather than the raw message ID.
- Specified by:
getMessageType
in classAntMessageFromHost
- Returns:
- The type of message returned by the host.
- Since:
- 4.0
-
toString
- Overrides:
toString
in classAntMessageFromHost
-