public class ChannelResponseMessage extends AntMessageFromAnt
Modifier and Type | Field and Description |
---|---|
static int |
OFFSET_INITIATING_MESSAGE_ID
The message content offset to the previously sent message ID that the response is for.
|
static int |
OFFSET_RESPONSE_CODE
The message content offset to the response code (
ResponseCode ). |
static int |
SIZE_INITIATING_MESSAGE_ID
The number of bytes used for the initiating message ID
|
static int |
SIZE_RESPONSE_CODE
The number of bytes used for the response code
|
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 and Description |
---|
ChannelResponseMessage(AntMessageParcel messageParcel)
Parse message specific information from the given ANT message parcel.
|
Modifier and Type | Method and Description |
---|---|
int |
getInitiatingMessageId()
Gets the message ID of the message that was sent to ANT.
|
MessageFromAntType |
getMessageType()
The type of this message based on its message id and contents.
|
int |
getRawResponseCode()
Should generally use
getResponseCode() instead. |
ResponseCode |
getResponseCode()
Gets the response code associated with the response message.
|
java.lang.String |
toString() |
createAntMessage, createAntMessage, getMessageContent, getMessageId
equals, getMessageContentString, getMessageIdString, hashCode, maskChannelNumber
public static final int SIZE_INITIATING_MESSAGE_ID
public static final int SIZE_RESPONSE_CODE
public static final int OFFSET_INITIATING_MESSAGE_ID
public static final int OFFSET_RESPONSE_CODE
ResponseCode
).public ChannelResponseMessage(AntMessageParcel messageParcel)
messageParcel
- Raw ANT message received form the ANT Radio Service.java.lang.IllegalArgumentException
- If the parcel is for the wrong message type.public int getInitiatingMessageId()
MessageId
.public int getRawResponseCode()
getResponseCode()
instead.public ResponseCode getResponseCode()
ResponseCode
.public MessageFromAntType getMessageType()
AntMessageFromAnt
It is recommended to use this rather than the raw message ID.
getMessageType
in class AntMessageFromAnt
MessageFromAntType
.public java.lang.String toString()
toString
in class AntMessageFromAnt
Copyright © 2015 Dynastream Innovations Inc. All Rights Reserved.