public abstract class SetNetworkKeyMessage extends AntMessageFromHost
Modifier and Type | Field and Description |
---|---|
static int |
OFFSET_NETWORK_KEY
The message content offset to the network key
|
static int |
OFFSET_NETWORK_NUMBER
The message content offset to the network number.
|
static int |
SIZE_NETWORK_NUMBER
The size in bytes of 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 |
---|
SetNetworkKeyMessage(byte[] networkKey)
Constructs the message with given network key byte array
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getMessageContent(int channelNumber,
int networkNumber)
The content of the message with specified channel number and network number set if required.
|
byte[] |
getRawNetworkKey()
Get the network key contained in this message.
|
java.lang.String |
toString() |
createAntMessage, getMessageContent, getMessageContent, getMessageId, getMessageType, getRawMessage
equals, getMessageContentString, getMessageIdString, hashCode, maskChannelNumber
public static final int OFFSET_NETWORK_NUMBER
public static final int OFFSET_NETWORK_KEY
public static final int SIZE_NETWORK_NUMBER
public SetNetworkKeyMessage(byte[] networkKey)
networkKey
- The byte array containing the network key.java.lang.IllegalArgumentException
- Occurs when received an invalid network
key byte array (null or invalid length)public byte[] getRawNetworkKey()
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 java.lang.String toString()
toString
in class AntMessageFromHost
Copyright © 2015 Dynastream Innovations Inc. All Rights Reserved.