Package com.dsi.ant.message.fromhost
Class ProximitySearchMessage
java.lang.Object
com.dsi.ant.message.AntMessage
com.dsi.ant.message.fromhost.AntMessageFromHost
com.dsi.ant.message.fromhost.ProximitySearchMessage
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe maximum bin number accepted by ANTstatic final intThe minimum bin number accepted by ANTstatic final intThe message content offset to the search threshold valuestatic final intThe value that will disable proximity search for the channelstatic final intThe number of bytes to be used for the search threshold 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
ConstructorsModifierConstructorDescriptionprotectedProximitySearchMessage(byte[] messageContent) ProximitySearchMessage(int searchThreshold) Constructs the message from the given search threshold. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getMessageContent(int channelNumber, int networkNumbe) 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.intGets the search threshold for the message.toString()Methods inherited from class com.dsi.ant.message.fromhost.AntMessageFromHost
createAntMessage, createAntMessage, getMessageContent, getMessageContent, getMessageId, getRawMessage, toStringHeaderMethods inherited from class com.dsi.ant.message.AntMessage
equals, getMessageContentString, getMessageIdString, hashCode, maskChannelNumber
-
Field Details
-
SIZE_SEARCH_THRESHOLD
public static final int SIZE_SEARCH_THRESHOLDThe 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_THRESHOLDThe message content offset to the search threshold value- Since:
- 4.0
- See Also:
-
PROXIMITY_SEARCH_DISABLED
public static final int PROXIMITY_SEARCH_DISABLEDThe value that will disable proximity search for the channel- Since:
- 4.0
- See Also:
-
MIN_SEARCH_THRESHOLD
public static final int MIN_SEARCH_THRESHOLDThe minimum bin number accepted by ANT- Since:
- 4.0
- See Also:
-
MAX_SEARCH_THRESHOLD
public static final int MAX_SEARCH_THRESHOLDThe 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:AntMessageFromHostThe content of the message with specified channel number and network number set if required.- Specified by:
getMessageContentin classAntMessageFromHost- Parameters:
channelNumber- Written to the channel number byte if requirednetworkNumbe- Written to the network number byte if required- Returns:
- Message content raw byte array.
- Since:
- 4.0
-
getMessageType
Description copied from class:AntMessageFromHostThe 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:
getMessageTypein classAntMessageFromHost- Returns:
- The type of message returned by the host.
- Since:
- 4.0
-
toString
- Overrides:
toStringin classAntMessageFromHost
-