org.jnetstream.protocol
Enum Characteristic.Frame

java.lang.Object
  extended by java.lang.Enum<Characteristic.Frame>
      extended by org.jnetstream.protocol.Characteristic.Frame
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Characteristic.Frame>, Characteristic
Enclosing interface:
Characteristic

public static enum Characteristic.Frame
extends java.lang.Enum<Characteristic.Frame>
implements Characteristic

Describes frame characteristics of a protocol. Can be encoded into its 27-24 of a 32-bit unsigned integer.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jnetstream.protocol.Characteristic
Characteristic.BitCodec, Characteristic.Frame, Characteristic.Kind, Characteristic.Physical
 
Enum Constant Summary
HasCrc
          Frame has CRC field at the end of the frame
HasPreamble
          Frame contains 8 byte preamble at the front of the frame
None
          No special frame characteristics present
 
Method Summary
 int getValue()
           
static java.util.Set<? extends Characteristic> valueOf(int value)
          Returns an efficient EnumSet of all the frame characteristics that are encoded into the integer value.
static Characteristic.Frame valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Characteristic.Frame[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

HasCrc

public static final Characteristic.Frame HasCrc
Frame has CRC field at the end of the frame


HasPreamble

public static final Characteristic.Frame HasPreamble
Frame contains 8 byte preamble at the front of the frame


None

public static final Characteristic.Frame None
No special frame characteristics present

Method Detail

values

public static final Characteristic.Frame[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(Characteristic.Frame c : Characteristic.Frame.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static Characteristic.Frame valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

getValue

public int getValue()
Specified by:
getValue in interface Characteristic

valueOf

public static java.util.Set<? extends Characteristic> valueOf(int value)
Returns an efficient EnumSet of all the frame characteristics that are encoded into the integer value.

Parameters:
value - integer value with bit encoded frame properties
Returns:
a set containing the decoded constants