public final class AssignChannelMessage extends AntMessageFromHost
| Modifier and Type | Field and Description |
|---|---|
static int |
OFFSET_CHANNEL_TYPE
The message content offset to the channel type
|
static int |
OFFSET_EXTENDED_ASSIGNMENT
The message content offset to the extended assignment
|
static int |
OFFSET_NETWORK_NUMBER
The message content offset to the network number
|
static int |
SIZE_NETWORK_NUMBER
The number of bytes used for the network number
|
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 |
|---|
AssignChannelMessage(ChannelType channelType)
Constructs the message from a specified channel type.
|
AssignChannelMessage(ChannelType channelType,
ExtendedAssignment extendedAssignment)
Constructs the message from the specified channel type and extended
assignment.
|
| Modifier and Type | Method and Description |
|---|---|
ChannelType |
getChannelType()
Gets the channel type of the assign channel message.
|
ExtendedAssignment |
getExtendedAssignment()
Gets the extended assignment of the assign channel message, which
specifies which additional features to be enabled.
|
byte[] |
getMessageContent(int channelNumber,
int networkNumber)
The content of the message with specified channel number and network number set if required.
|
MessageFromHostType |
getMessageType()
The unique type of this message based on its message id, contents, and intended channel
type.
|
int |
getRawChannelType()
Should generally use
getChannelType() instead. |
java.lang.String |
toString() |
createAntMessage, getMessageContent, getMessageContent, getMessageId, getRawMessageequals, getMessageContentString, getMessageIdString, hashCode, maskChannelNumberpublic static final int OFFSET_CHANNEL_TYPE
public static final int OFFSET_NETWORK_NUMBER
public static final int OFFSET_EXTENDED_ASSIGNMENT
public static final int SIZE_NETWORK_NUMBER
public AssignChannelMessage(ChannelType channelType)
channelType - The ChannelType the channel will be assigned
as.public AssignChannelMessage(ChannelType channelType, ExtendedAssignment extendedAssignment)
channelType - The ChannelType the channel will be assigned
as.extendedAssignment - The ExtendedAssignment the channel will
be assigned as.public int getRawChannelType()
getChannelType() instead.public ChannelType getChannelType()
ChannelType of the assign message.public ExtendedAssignment getExtendedAssignment()
ExtendedAssignment of the assign message.public byte[] getMessageContent(int channelNumber,
int networkNumber)
AntMessageFromHostgetMessageContent in class AntMessageFromHostchannelNumber - Written to the channel number byte if requirednetworkNumber - Written to the network number byte if requiredpublic MessageFromHostType getMessageType()
AntMessageFromHostIt is recommended to use this rather than the raw message ID.
getMessageType in class AntMessageFromHostpublic java.lang.String toString()
toString in class AntMessageFromHostCopyright © 2015 Dynastream Innovations Inc. All Rights Reserved.