Package com.dsi.ant.message.fromhost
Class AssignChannelMessage
java.lang.Object
com.dsi.ant.message.AntMessage
com.dsi.ant.message.fromhost.AntMessageFromHost
com.dsi.ant.message.fromhost.AssignChannelMessage
Message that assigns a channel with the contained parameters.
- Since:
- 4.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The message content offset to the channel typestatic final int
The message content offset to the extended assignmentstatic final int
The message content offset to the network numberstatic final int
The number of bytes used for the network numberFields 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
AssignChannelMessage
(byte[] messageContent) 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. -
Method Summary
Modifier and TypeMethodDescriptionGets the channel type of the assign channel message.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.The unique type of this message based on its message id, contents, and intended channel type.int
Should generally usegetChannelType()
instead.toString()
Methods inherited from class com.dsi.ant.message.fromhost.AntMessageFromHost
createAntMessage, createAntMessage, getMessageContent, getMessageContent, getMessageId, getRawMessage, toStringHeader
Methods inherited from class com.dsi.ant.message.AntMessage
equals, getMessageContentString, getMessageIdString, hashCode, maskChannelNumber
-
Field Details
-
OFFSET_CHANNEL_TYPE
public static final int OFFSET_CHANNEL_TYPEThe message content offset to the channel type- Since:
- 4.0
- See Also:
-
OFFSET_NETWORK_NUMBER
public static final int OFFSET_NETWORK_NUMBERThe message content offset to the network number- Since:
- 4.0
- See Also:
-
OFFSET_EXTENDED_ASSIGNMENT
public static final int OFFSET_EXTENDED_ASSIGNMENTThe message content offset to the extended assignment- Since:
- 4.0
- See Also:
-
SIZE_NETWORK_NUMBER
public static final int SIZE_NETWORK_NUMBERThe number of bytes used for the network number- Since:
- 4.0
- See Also:
-
-
Constructor Details
-
AssignChannelMessage
Constructs the message from a specified channel type.- Parameters:
channelType
- TheChannelType
the channel will be assigned as.- Since:
- 4.0
-
AssignChannelMessage
Constructs the message from the specified channel type and extended assignment.- Parameters:
channelType
- TheChannelType
the channel will be assigned as.extendedAssignment
- TheExtendedAssignment
the channel will be assigned as.- Since:
- 4.0
-
AssignChannelMessage
protected AssignChannelMessage(byte[] messageContent)
-
-
Method Details
-
getRawChannelType
public int getRawChannelType()Should generally usegetChannelType()
instead.- Returns:
- The raw value of the channel type.
- Since:
- 4.1
-
getChannelType
Gets the channel type of the assign channel message. The channel will be assigned as this type.- Returns:
- The
ChannelType
of the assign message. - Since:
- 4.0
-
getExtendedAssignment
Gets the extended assignment of the assign channel message, which specifies which additional features to be enabled.- Returns:
- The
ExtendedAssignment
of the assign message. - Since:
- 4.0
-
getMessageContent
public byte[] getMessageContent(int channelNumber, int networkNumber) Description copied from class:AntMessageFromHost
The content of the message with specified channel number and network number set if required.- Specified by:
getMessageContent
in classAntMessageFromHost
- Parameters:
channelNumber
- Written to the channel number byte if requirednetworkNumber
- Written to the network number byte if required- Returns:
- Message content raw byte array.
- Since:
- 4.0
-
getMessageType
Description copied from class:AntMessageFromHost
The unique type of this message based on its message id, contents, and intended channel type.It is recommended to use this rather than the raw message ID.
- Specified by:
getMessageType
in classAntMessageFromHost
- Returns:
- The type of message returned by the host.
- Since:
- 4.0
-
toString
- Overrides:
toString
in classAntMessageFromHost
-