Package com.dsi.ant.message.fromant
Class ChannelStatusMessage
java.lang.Object
com.dsi.ant.message.AntMessage
com.dsi.ant.message.fromant.AntMessageFromAnt
com.dsi.ant.message.fromant.ChannelStatusMessage
Message that returns the status of the channel.
- Since:
- 4.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byteThe mask used to retrieve the channel statestatic final byteThe mask used to retrieve the channel typestatic final intThe shift applied to the retrieved channel state valuestatic final intThe shift applied to the retrieved channel type valuestatic final intThe message content offset to the channel status valueFields inherited from class com.dsi.ant.message.fromant.AntMessageFromAnt
mMessageContentFields 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
ConstructorsModifierConstructorDescriptionprotectedChannelStatusMessage(byte[] messageContent) ChannelStatusMessage(AntMessageParcel messageParcel) Parse message specific information from the given ANT message parcel. -
Method Summary
Modifier and TypeMethodDescriptionGets the channel state of the channelGets the channel type of the channel.The type of this message based on its message id and contents.toString()Methods inherited from class com.dsi.ant.message.fromant.AntMessageFromAnt
createAntMessage, createAntMessage, createAntMessage, extractCorrectMessageContent, getMessageContent, getMessageId, toStringHeaderMethods inherited from class com.dsi.ant.message.AntMessage
equals, getMessageContentString, getMessageIdString, hashCode, maskChannelNumber
-
Field Details
-
OFFSET_CHANNEL_STATUS
public static final int OFFSET_CHANNEL_STATUSThe message content offset to the channel status value- Since:
- 4.0
- See Also:
-
BITMASK_STATUS_CHANNEL_TYPE
public static final byte BITMASK_STATUS_CHANNEL_TYPEThe mask used to retrieve the channel type- Since:
- 4.0
- See Also:
-
BITMASK_STATUS_CHANNEL_STATE
public static final byte BITMASK_STATUS_CHANNEL_STATEThe mask used to retrieve the channel state- Since:
- 4.0
- See Also:
-
BITSHIFT_STATUS_CHANNEL_TYPE
public static final int BITSHIFT_STATUS_CHANNEL_TYPEThe shift applied to the retrieved channel type value- Since:
- 4.0
- See Also:
-
BITSHIFT_STATUS_CHANNEL_STATE
public static final int BITSHIFT_STATUS_CHANNEL_STATEThe shift applied to the retrieved channel state value- Since:
- 4.0
- See Also:
-
-
Constructor Details
-
ChannelStatusMessage
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
-
ChannelStatusMessage
protected ChannelStatusMessage(byte[] messageContent)
-
-
Method Details
-
getMessageType
Description copied from class:AntMessageFromAntThe 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:
getMessageTypein classAntMessageFromAnt- Returns:
- A message type corresponding to this message as defined in
MessageFromAntType. - Since:
- 4.0
-
getChannelType
Gets the channel type of the channel.- Returns:
- The
ChannelType. - Since:
- 4.0
-
getChannelState
Gets the channel state of the channel- Returns:
- The
ChannelState. - Since:
- 4.0
-
toString
- Overrides:
toStringin classAntMessageFromAnt- Since:
- 4.0
-