Class FrequencyAgilityMessage


public final class FrequencyAgilityMessage extends AntMessageFromHost
Configures the frequency agility feature which changes frequency if significant degradation is experienced.
Since:
4.0
  • Field Details

    • OFFSET_FREQUENCY_ONE

      public static final int OFFSET_FREQUENCY_ONE
      The message content offset the first frequency value
      Since:
      4.0
      See Also:
    • OFFSET_FREQUENCY_TWO

      public static final int OFFSET_FREQUENCY_TWO
      The message content offset the second frequency value
      Since:
      4.0
      See Also:
    • OFFSET_FREQUENCY_THREE

      public static final int OFFSET_FREQUENCY_THREE
      The 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 MHz
      frequencyTwo - The first frequency value as an offset of 2400 MHz
      frequencyThree - 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 class AntMessageFromHost
      Parameters:
      channelNumber - Written to the channel number byte if required
      networkNumber - Written to the network number byte if required
      Returns:
      Message content raw byte array.
      Since:
      4.0
    • getMessageType

      public MessageFromHostType 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 class AntMessageFromHost
      Returns:
      The type of message returned by the host.
      Since:
      4.0
    • toString

      public String toString()
      Overrides:
      toString in class AntMessageFromHost