public final class AddChannelIdToListMessage extends AntMessageFromHost
Modifier and Type | Field and Description |
---|---|
static int |
MAX_LIST_INDEX
The maximum index allowed for the list
|
static int |
MIN_LIST_INDEX
The minimum index allowed for the list
|
static int |
OFFSET_CHANNEL_ID
The message content offset to the channel ID
|
static int |
OFFSET_LIST_INDEX
The message content offset to the type of list being added to
|
static int |
SIZE_LIST_INDEX
The number of bytes used for the list index
|
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 |
---|
AddChannelIdToListMessage(ChannelId channelId,
int listIndex)
Constructs the message given the channel ID and list index.
|
Modifier and Type | Method and Description |
---|---|
ChannelId |
getChannelId()
Gets the channel ID being added to a list.
|
int |
getListIndex()
Gets the index the channel ID is being placed in.
|
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.
|
java.lang.String |
toString() |
createAntMessage, getMessageContent, getMessageContent, getMessageId, getRawMessage
equals, getMessageContentString, getMessageIdString, hashCode, maskChannelNumber
public static final int OFFSET_CHANNEL_ID
public static final int OFFSET_LIST_INDEX
public static final int SIZE_LIST_INDEX
public static final int MIN_LIST_INDEX
public static final int MAX_LIST_INDEX
public AddChannelIdToListMessage(ChannelId channelId, int listIndex)
channelId
- The channel ID to be inserted to the list.listIndex
- The position the channel ID will be placed.public ChannelId getChannelId()
ChannelId
.public int getListIndex()
public byte[] getMessageContent(int channelNumber, int networkNumber)
AntMessageFromHost
getMessageContent
in class AntMessageFromHost
channelNumber
- Written to the channel number byte if requirednetworkNumber
- Written to the network number byte if requiredpublic MessageFromHostType getMessageType()
AntMessageFromHost
It is recommended to use this rather than the raw message ID.
getMessageType
in class AntMessageFromHost
public java.lang.String toString()
toString
in class AntMessageFromHost
Copyright © 2015 Dynastream Innovations Inc. All Rights Reserved.