org.llrp.ltk.types
Class BitArray_HEX

java.lang.Object
  extended by org.llrp.ltk.types.LLRPType
      extended by org.llrp.ltk.types.BitArray
          extended by org.llrp.ltk.types.BitArray_HEX

public class BitArray_HEX
extends BitArray


Field Summary
 
Fields inherited from class org.llrp.ltk.types.BitArray
bits, LENGTH
 
Constructor Summary
BitArray_HEX()
          empty bit array.
BitArray_HEX(Bit[] bits)
          Array of Bits encoded in HEX Format.
BitArray_HEX(org.jdom.Element element)
           
BitArray_HEX(int length)
          create a new BitArray_HEX.
BitArray_HEX(LLRPBitList list)
          create a new BitArray_HEX.
BitArray_HEX(java.lang.String hexString)
           
 
Method Summary
 void decodeXML(org.jdom.Element element)
          decode JDOM Element
 org.jdom.Content encodeXML(java.lang.String name, org.jdom.Namespace ns)
          encode to XML
static int length()
          length in number of bits used to represent this type.
 java.lang.String toString()
          String representation
 
Methods inherited from class org.llrp.ltk.types.BitArray
add, clear, decodeBinary, encodeBinary, get, inRange, set, size, toString
 
Methods inherited from class org.llrp.ltk.types.LLRPType
toXMLString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BitArray_HEX

public BitArray_HEX(Bit[] bits)
Array of Bits encoded in HEX Format. XML element has count attribute if number of bits is not evenly divisible my 8

Parameters:
bits - to be decoded

BitArray_HEX

public BitArray_HEX(LLRPBitList list)
create a new BitArray_HEX. When encoded, BitArray_HEX also encodes its length.

Parameters:
list - to be decoded

BitArray_HEX

public BitArray_HEX(int length)
create a new BitArray_HEX. When encoded, BitArray_HEX also encodes its length. Initially all bits set to 0

Parameters:
length - of array

BitArray_HEX

public BitArray_HEX()
empty bit array.


BitArray_HEX

public BitArray_HEX(org.jdom.Element element)
Parameters:
element - to be decoded

BitArray_HEX

public BitArray_HEX(java.lang.String hexString)
Parameters:
hexString - String in Hexadecimal format
Method Detail

length

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

Returns:
Integer representing number of bits used for this type

encodeXML

public org.jdom.Content encodeXML(java.lang.String name,
                                  org.jdom.Namespace ns)
encode to XML

Overrides:
encodeXML in class BitArray
Parameters:
name - of element
ns - Namespace

decodeXML

public void decodeXML(org.jdom.Element element)
decode JDOM Element

Overrides:
decodeXML in class BitArray
Parameters:
element - to decode

toString

public java.lang.String toString()
Description copied from class: LLRPType
String representation

Overrides:
toString in class BitArray
Returns:
String


Copyright © 2007 ETH Zurich.