public class ChannelId
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
ANY_DEVICE_NUMBER
The wildcard used to connect to any device number
|
static int |
ANY_DEVICE_TYPE
The wildcard used to connect to any device type.
|
static int |
ANY_TRANSMISSION_TYPE
The wildcard used to connect to any transmission type.
|
static int |
BITMASK_DEVICE_TYPE
The mask to be used to get the device type.
|
static int |
BITMASK_PAIR
The mask to be used to get the pairing bit.
|
static int |
BITMASK_SHARED_ADDRESS_TYPE
The mask to be used to get the shared address.
|
static int |
MAX_DEVICE_NUMBER
The maximum device number accepted by ANT
|
static int |
MAX_DEVICE_TYPE
The maximum number that can be used for the device type.
|
static int |
MAX_TRANSMISSION_TYPE
The maximum number that can be used for the transmission type.
|
static int |
MIN_DEVICE_NUMBER
The minimum device number accepted by ANT
|
static int |
MIN_DEVICE_TYPE
The minimum number that can be used for the device type.
|
static int |
MIN_TRANSMISSION_TYPE
The minimum number that can be used for the transmission type.
|
static int |
OFFSET_DEVICE_NUMBER
The message content offset to the device number byte.
|
static int |
OFFSET_DEVICE_TYPE
The message content offset to the device type byte.
|
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 device transmission type byte.
|
static int |
SIZE_CHANNEL_ID
Number of bytes for the channel ID
|
static int |
SIZE_DEVICE_NUMBER
Number of bytes for device number
|
static int |
SIZE_DEVICE_TYPE
Number of bytes for device type
|
static int |
SIZE_TRANSMISSION_TYPE
Number of bytes for device transmission type
|
Constructor and Description |
---|
ChannelId(byte[] messageContent,
int startOffset)
Constructs the channel ID from the message byte array.
|
ChannelId(int deviceNumber,
int deviceType,
int transmissionType)
Constructs the channel ID from the given parameters.
|
ChannelId(int deviceNumber,
int deviceType,
int transmissionType,
boolean pair)
Constructs the channel ID from the given parameters, including the
pairing bit.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
getDeviceNumber()
Returns the device number.
|
int |
getDeviceType()
The value of the device type.
|
byte[] |
getMessageContent()
Returns the message byte array representing the channel ID.
|
int |
getNumberofBytesForSharedAddress()
Get the number of bytes that will be used for the shared address field
based on the transmission type.
|
boolean |
getPair()
Returns the value of the pairing bit.
|
int |
getTransmissionType()
The value of the transmission type.
|
int |
hashCode() |
java.lang.String |
toString() |
public static final int SIZE_DEVICE_NUMBER
public static final int SIZE_DEVICE_TYPE
public static final int SIZE_TRANSMISSION_TYPE
public static final int SIZE_CHANNEL_ID
public static final int OFFSET_DEVICE_NUMBER
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 static final int BITMASK_SHARED_ADDRESS_TYPE
public static final int ANY_DEVICE_NUMBER
public static final int ANY_DEVICE_TYPE
public static final int ANY_TRANSMISSION_TYPE
public static final int MIN_DEVICE_NUMBER
public static final int MAX_DEVICE_NUMBER
public static final int MIN_DEVICE_TYPE
public static final int MAX_DEVICE_TYPE
public static final int MIN_TRANSMISSION_TYPE
public static final int MAX_TRANSMISSION_TYPE
public ChannelId(byte[] messageContent, int startOffset)
messageContent
- A byte array that contains the channel ID bytesstartOffset
- The offset in the array where the channel ID bytes start.public ChannelId(int deviceNumber, int deviceType, int transmissionType)
deviceNumber
- The unique number identifying the ANT devicedeviceType
- The class or type of the ANT devicetransmissionType
- Denotes certain transmission characteristics of a devicepublic ChannelId(int deviceNumber, int deviceType, int transmissionType, boolean pair)
deviceNumber
- The unique number identifying the ANT devicedeviceType
- The class or type of the ANT devicetransmissionType
- Denotes certain transmission characteristics of a
device.pair
- For devices to connect during a wildcard search, both must
have matching pairing bits.public int getDeviceNumber()
public boolean getPair()
public int getDeviceType()
public int getTransmissionType()
public int getNumberofBytesForSharedAddress()
ChannelType
.public byte[] getMessageContent()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2015 Dynastream Innovations Inc. All Rights Reserved.