Package com.dsi.ant.message.fromant
Class SerialNumberMessage
java.lang.Object
com.dsi.ant.message.AntMessage
com.dsi.ant.message.fromant.AntMessageFromAnt
com.dsi.ant.message.fromant.SerialNumberMessage
Returns the serial number of the ANT hardware.
- Since:
- 4.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The message content offset to the serial numberstatic final int
The number of bytes used for the serial numberFields inherited from class com.dsi.ant.message.fromant.AntMessageFromAnt
mMessageContent
Fields 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
SerialNumberMessage
(byte[] messageContent) SerialNumberMessage
(AntMessageParcel messageParcel) Parse message specific information from the given ANT message parcel. -
Method Summary
Modifier and TypeMethodDescriptionThe type of this message based on its message id and contents.long
Gets the serial number for the ANT hardware.toString()
Methods inherited from class com.dsi.ant.message.fromant.AntMessageFromAnt
createAntMessage, createAntMessage, createAntMessage, extractCorrectMessageContent, getMessageContent, getMessageId, toStringHeader
Methods inherited from class com.dsi.ant.message.AntMessage
equals, getMessageContentString, getMessageIdString, hashCode, maskChannelNumber
-
Field Details
-
SIZE_SERIAL_NUMBER
public static final int SIZE_SERIAL_NUMBERThe number of bytes used for the serial number- Since:
- 4.0
- See Also:
-
OFFSET_SERIAL_NUMBER
public static final int OFFSET_SERIAL_NUMBERThe message content offset to the serial number- Since:
- 4.0
- See Also:
-
-
Constructor Details
-
SerialNumberMessage
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
-
SerialNumberMessage
protected SerialNumberMessage(byte[] messageContent)
-
-
Method Details
-
getSerialNumber
public long getSerialNumber()Gets the serial number for the ANT hardware.- Returns:
- The serial number.
- Since:
- 4.0
-
getMessageType
Description copied from class:AntMessageFromAnt
The 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:
getMessageType
in classAntMessageFromAnt
- Returns:
- A message type corresponding to this message as defined in
MessageFromAntType
. - Since:
- 4.0
-
toString
- Overrides:
toString
in classAntMessageFromAnt
- Since:
- 4.0
-