org.llrp.ltk.types
Class TwoBitEnumeration

java.lang.Object
  extended by org.llrp.ltk.types.LLRPType
      extended by org.llrp.ltk.types.LLRPNumberType
          extended by org.llrp.ltk.types.SignedByte
              extended by org.llrp.ltk.types.TwoBitEnumeration
Direct Known Subclasses:
C1G2TruncateAction

public class TwoBitEnumeration
extends SignedByte

Enumerations that can hold 4 values (2 bits) at most


Field Summary
 
Fields inherited from class org.llrp.ltk.types.SignedByte
value
 
Fields inherited from class org.llrp.ltk.types.LLRPNumberType
signed
 
Constructor Summary
TwoBitEnumeration()
          Creates a new TwoBitEnumeration object.
TwoBitEnumeration(org.jdom.Element element)
          Creates a new TwoBitEnumeration object from jdom element - used for xml decoding
TwoBitEnumeration(int value)
          Creates a new TwoBitEnumeration object.
 
Method Summary
 LLRPBitList encodeBinary()
          overwritte encode
static int length()
          number of bits to represent this type
 
Methods inherited from class org.llrp.ltk.types.SignedByte
decodeBinary, decodeXML, encodeXML, inRange, inRange, intValue, toByte, toInteger, toString, toString
 
Methods inherited from class org.llrp.ltk.types.LLRPNumberType
equals, hashCode
 
Methods inherited from class org.llrp.ltk.types.LLRPType
toXMLString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TwoBitEnumeration

public TwoBitEnumeration()
Creates a new TwoBitEnumeration object.


TwoBitEnumeration

public TwoBitEnumeration(org.jdom.Element element)
Creates a new TwoBitEnumeration object from jdom element - used for xml decoding

Parameters:
element - to be decoded

TwoBitEnumeration

public TwoBitEnumeration(int value)
Creates a new TwoBitEnumeration object.

Parameters:
value - to set
Method Detail

encodeBinary

public LLRPBitList encodeBinary()
overwritte encode

Overrides:
encodeBinary in class SignedByte
Returns:
LLRPBitList of length 2

length

public static int length()
number of bits to represent this type

Returns:
Integer


Copyright © 2007 ETH Zurich.