org.llrp.ltk.types
Class UnsignedIntegerArray

java.lang.Object
  extended by org.llrp.ltk.types.LLRPType
      extended by org.llrp.ltk.types.UnsignedIntegerArray

public class UnsignedIntegerArray
extends LLRPType

Array of unsigned 32bit integers. Length encoded in first 16 bits of binary encoding


Constructor Summary
UnsignedIntegerArray()
          Creates an empty UnsignedIntegerArray.
UnsignedIntegerArray(org.jdom.Element element)
          Creates a new UnsignedIntegerArray object from jdom element - used for xml decoding
UnsignedIntegerArray(int length)
          Creates a new UnsignedIntegerArray object.
UnsignedIntegerArray(LLRPBitList bits)
          first 16 bits of LLRPBitlist must indicate number of entries that follow
UnsignedIntegerArray(java.lang.String string)
           
UnsignedIntegerArray(UnsignedInteger[] ints)
          Creates a new UnsignedIntegerArray object.
 
Method Summary
 void add(UnsignedInteger aInteger)
           
 void decodeBinary(LLRPBitList list)
          first 16 bits of LLRPBitlist must indicate number of entries that follow
 void decodeXML(org.jdom.Element element)
          create objects from xml.
 LLRPBitList encodeBinary()
          encodes length before encoding containing values
 org.jdom.Content encodeXML(java.lang.String name, org.jdom.Namespace ns)
          create xml representation of this parameter.
 boolean equals(LLRPType other)
          compare each element
 UnsignedInteger get(int i)
          get UnsignedInteger at specified position
 int getByteLength()
          number of bytes used to represent this type
 boolean inRange(java.lang.String valueString)
          expects a string as formated for XML
static int length()
          length of BaseType not array - for array length call size()
 void set(int i, UnsignedInteger b)
          set UnsignedInteger at i to b
 int size()
          number of elements in array
 java.lang.String toString()
          String representation
 java.lang.String toString(int radix)
           
 
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

UnsignedIntegerArray

public UnsignedIntegerArray(UnsignedInteger[] ints)
Creates a new UnsignedIntegerArray object.

Parameters:
ints - to create UsnignedIntegerArray from

UnsignedIntegerArray

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

Parameters:
element - to be decoded

UnsignedIntegerArray

public UnsignedIntegerArray(int length)
Creates a new UnsignedIntegerArray object.

Parameters:
length - of array

UnsignedIntegerArray

public UnsignedIntegerArray(LLRPBitList bits)
first 16 bits of LLRPBitlist must indicate number of entries that follow

Parameters:
bits - to be decoded

UnsignedIntegerArray

public UnsignedIntegerArray(java.lang.String string)
Parameters:
string -

UnsignedIntegerArray

public UnsignedIntegerArray()
Creates an empty UnsignedIntegerArray. Do not call methood 'set' on an empty array. Add UnsignedInteger by calling the add method

Method Detail

encodeBinary

public LLRPBitList encodeBinary()
encodes length before encoding containing values

Specified by:
encodeBinary in class LLRPType
Returns:
LLRPBitList

getByteLength

public int getByteLength()
number of bytes used to represent this type

Returns:
Integer

length

public static int length()
length of BaseType not array - for array length call size()

Returns:
int

decodeBinary

public void decodeBinary(LLRPBitList list)
first 16 bits of LLRPBitlist must indicate number of entries that follow

Specified by:
decodeBinary in class LLRPType
Parameters:
list - to be decoded

get

public UnsignedInteger get(int i)
get UnsignedInteger at specified position

Parameters:
i - position
Returns:
UnsignedInteger

set

public void set(int i,
                UnsignedInteger b)
set UnsignedInteger at i to b

Parameters:
i - position
b - unsignedInteger to be set

size

public int size()
number of elements in array

Returns:
int

encodeXML

public org.jdom.Content encodeXML(java.lang.String name,
                                  org.jdom.Namespace ns)
Description copied from class: LLRPType
create xml representation of this parameter.

Specified by:
encodeXML in class LLRPType
Parameters:
name - returned content should have
ns - Namespace of elements

decodeXML

public void decodeXML(org.jdom.Element element)
Description copied from class: LLRPType
create objects from xml.

Specified by:
decodeXML in class LLRPType
Parameters:
element - to be decoded

add

public void add(UnsignedInteger aInteger)

toString

public java.lang.String toString(int radix)
Specified by:
toString in class LLRPType

toString

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

Overrides:
toString in class LLRPType
Returns:
String

inRange

public boolean inRange(java.lang.String valueString)
expects a string as formated for XML

Specified by:
inRange in class LLRPType

equals

public boolean equals(LLRPType other)
compare each element

Parameters:
other - to compare
Returns:
boolean


Copyright © 2007 ETH Zurich.