public enum PacketType extends Enum<PacketType>
Modifier and Type | Field and Description |
---|---|
static int |
TYPE1_WORD_COUNT_MASK
Packet Type 1 Word Count [10:0]
|
static int |
TYPE2_WORD_COUNT_MASK
Packet Type 2 Word Count [26:0]
|
static PacketType[] |
values
A static final (cached) copy of values()
|
Modifier and Type | Method and Description |
---|---|
int |
getHeaderValue()
Gets the packet header representation for this packet type
|
int |
getMaxNumWords()
Gets the maximum number of words that can exist in the
payload of this packet type.
|
static PacketType |
getPacketType(int header)
Gets the packet type from a 32-bit packet header
|
int |
getWordCountMask()
Gets the bit mask for the word count field for packets of this type.
|
static PacketType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PacketType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PacketType ONE
public static final PacketType TWO
public static final PacketType RESERVED
public static int TYPE1_WORD_COUNT_MASK
public static int TYPE2_WORD_COUNT_MASK
public static final PacketType[] values
public static PacketType[] values()
for (PacketType c : PacketType.values()) System.out.println(c);
public static PacketType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getMaxNumWords()
public int getWordCountMask()
public static PacketType getPacketType(int header)
header
- The packet header of interestpublic int getHeaderValue()