org.llrp.ltk.types
Class LLRPParameter

java.lang.Object
  extended by org.llrp.ltk.types.LLRPParameter
Direct Known Subclasses:
TLVParameter, TVParameter

public abstract class LLRPParameter
extends java.lang.Object

Representing an LLRPParameter uniquely identified by its type number. Call empty constructor to create new parameter. Use constructor taking LLRPBitList or byte[] as a parameter to instantiate parameter from binary encoding. Use constructor taking JDOM element (www.jdom.org) to create parameter from XML encoding See also TLVParameter and TVParameter


Field Summary
protected  UnsignedShort bitLength
           
 
Constructor Summary
LLRPParameter()
           
 
Method Summary
abstract  void decodeBinary(LLRPBitList list)
          create objects from binary.
abstract  void decodeXML(org.jdom.Element element)
          create objects from xml.
abstract  LLRPBitList encodeBinary()
          create binary representation of this parameter.
abstract  org.jdom.Content encodeXML(java.lang.String name, org.jdom.Namespace ns)
          create xml representation of this parameter.
 int getByteLength()
          length in bytes.
abstract  java.lang.String getName()
          name of parameter (same as class name)
abstract  SignedShort getTypeNum()
          type number uniquely identifies a parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bitLength

protected UnsignedShort bitLength
Constructor Detail

LLRPParameter

public LLRPParameter()
Method Detail

getTypeNum

public abstract SignedShort getTypeNum()
type number uniquely identifies a parameter.

Returns:
typeNum

getName

public abstract java.lang.String getName()
name of parameter (same as class name)

Returns:
String

decodeBinary

public abstract void decodeBinary(LLRPBitList list)
create objects from binary.

Parameters:
list - - created by calling encodeBinary()

encodeBinary

public abstract LLRPBitList encodeBinary()
create binary representation of this parameter.

Returns:
LLRPBitList - a list of bits

encodeXML

public abstract org.jdom.Content encodeXML(java.lang.String name,
                                           org.jdom.Namespace ns)
create xml representation of this parameter.

Parameters:
name - of element
ns - Namespace of elements

decodeXML

public abstract void decodeXML(org.jdom.Element element)
                        throws InvalidLLRPMessageException
create objects from xml.

Parameters:
element - to be decoded
Throws:
InvalidLLRPMessageException

getByteLength

public int getByteLength()
length in bytes.

Returns:
length of message in bytes (octet)


Copyright © 2007 ETH Zurich.