Class ProximitySearchMessage


public final class ProximitySearchMessage extends AntMessageFromHost
Configures the proximity search value that the channel will use. The channel will only discover devices in bins less than or equal to the bin number specified.
Since:
4.0
  • Field Details

    • SIZE_SEARCH_THRESHOLD

      public static final int SIZE_SEARCH_THRESHOLD
      The number of bytes to be used for the search threshold value
      Since:
      4.0
      See Also:
    • OFFSET_SEARCH_THRESHOLD

      public static final int OFFSET_SEARCH_THRESHOLD
      The message content offset to the search threshold value
      Since:
      4.0
      See Also:
    • PROXIMITY_SEARCH_DISABLED

      public static final int PROXIMITY_SEARCH_DISABLED
      The value that will disable proximity search for the channel
      Since:
      4.0
      See Also:
    • MIN_SEARCH_THRESHOLD

      public static final int MIN_SEARCH_THRESHOLD
      The minimum bin number accepted by ANT
      Since:
      4.0
      See Also:
    • MAX_SEARCH_THRESHOLD

      public static final int MAX_SEARCH_THRESHOLD
      The maximum bin number accepted by ANT
      Since:
      4.0
      See Also:
  • Constructor Details

    • ProximitySearchMessage

      public ProximitySearchMessage(int searchThreshold)
      Constructs the message from the given search threshold.
      Parameters:
      searchThreshold - The bin number. ANT will discover devices in bins less than or equal to the bin number.
      Since:
      4.0
    • ProximitySearchMessage

      protected ProximitySearchMessage(byte[] messageContent)
  • Method Details

    • getSearchThreshold

      public int getSearchThreshold()
      Gets the search threshold for the message.
      Returns:
      The bin number. ANT will discover devices in bins less than or equal to the bin number.
      Since:
      4.0
    • getMessageContent

      public byte[] getMessageContent(int channelNumber, int networkNumbe)
      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
      networkNumbe - 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