public final class SerialNumberSetChannelIdMessage extends AntMessageFromHost
Modifier and Type | Field and Description |
---|---|
static int |
BITMASK_DEVICE_TYPE
The mask used to retrieve the device type
|
static int |
BITMASK_PAIR
The mask used to retrieve the pairing bit
|
static int |
OFFSET_DEVICE_TYPE
The message content offset to the device type
|
static int |
OFFSET_PAIRING_BIT
The message content offset to the byte containing the pairing bit
|
static int |
OFFSET_TRANSMISSION_TYPE
The message content offset to the transmission type
|
static int |
SIZE_DEVICE_TYPE
The number of bytes used for the device type
|
static int |
SIZE_TRANSMISSION_TYPE
The number of bytes used for the transmission type
|
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 |
---|
SerialNumberSetChannelIdMessage(boolean pair,
int deviceType,
int transmissionType)
Constructs the message from the given channel ID parameters.
|
Modifier and Type | Method and Description |
---|---|
int |
getDeviceType()
The value of the device type.
|
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.
|
boolean |
getPair()
Returns the value of the pairing bit.
|
int |
getTransmissionType()
The value of the transmission type.
|
java.lang.String |
toString() |
createAntMessage, getMessageContent, getMessageContent, getMessageId, getRawMessage
equals, getMessageContentString, getMessageIdString, hashCode, maskChannelNumber
public static final int SIZE_DEVICE_TYPE
public static final int SIZE_TRANSMISSION_TYPE
public static final int OFFSET_PAIRING_BIT
public static final int OFFSET_DEVICE_TYPE
public static final int OFFSET_TRANSMISSION_TYPE
public static final int BITMASK_DEVICE_TYPE
public static final int BITMASK_PAIR
public SerialNumberSetChannelIdMessage(boolean pair, int deviceType, int transmissionType)
pair
- The pairing bit.deviceType
- The class or type of the ANT devicetransmissionType
- Denotes certain transmission characteristics of a devicepublic boolean getPair()
public int getDeviceType()
public int getTransmissionType()
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.