org.llrp.ltk.generated.parameters
Class Uptime

java.lang.Object
  extended by org.llrp.ltk.types.LLRPParameter
      extended by org.llrp.ltk.types.TLVParameter
          extended by org.llrp.ltk.generated.parameters.Uptime
All Implemented Interfaces:
Timestamp

public class Uptime
extends TLVParameter
implements Timestamp

The timestamps in LLRP messages or parameters can be either the uptime or the UTC time [UTC]. If a Reader has an UTC clock, all timestamps reported by the Reader SHALL use an UTC timestamp parameter. If a Reader has no UTC clock capability, all timestamps reported by the Reader SHALL use the uptime parameter. See also LLRP Specification Section 7.1.3.1.1.2 and LLRP Specification Section 16.2.2.2 .


Field Summary
protected  UnsignedLong microseconds
           
static SignedShort TYPENUM
           
 
Fields inherited from class org.llrp.ltk.types.TLVParameter
RESERVEDLENGTH, TYPENUMBERLENGTH
 
Fields inherited from class org.llrp.ltk.types.LLRPParameter
bitLength
 
Constructor Summary
Uptime()
          empty constructor to create new parameter.
Uptime(org.jdom.Element element)
          Constructor to create parameter from xml encoded parameter calls decodeXML to decode parameter.
Uptime(LLRPBitList list)
          Constructor to create parameter from binary encoded parameter calls decodeBinary to decode parameter.
 
Method Summary
protected  void decodeBinarySpecific(LLRPBitList binary)
          decoding function to be implemented by each parameter
 void decodeXML(org.jdom.Element element)
          create objects from xml.
 LLRPBitList encodeBinarySpecific()
          protected method to force subclasses to implement their specific encoding
 org.jdom.Content encodeXML(java.lang.String name, org.jdom.Namespace ns)
          create xml representation of this parameter.
 UnsignedLong getMicroseconds()
          get microseconds of type UnsignedLong.
 java.lang.String getName()
          name of parameter (same as class name)
 SignedShort getTypeNum()
          type number uniquely identifies a parameter.
static java.lang.Integer length()
          For TLV Parameter length can not be determined at compile time.
 void setMicroseconds(UnsignedLong microseconds)
          set microseconds of type UnsignedLong .
 java.lang.String toString()
          return string representation.
 
Methods inherited from class org.llrp.ltk.types.TLVParameter
decodeBinary, encodeBinary
 
Methods inherited from class org.llrp.ltk.types.LLRPParameter
getByteLength
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.llrp.ltk.generated.interfaces.Timestamp
decodeBinary, encodeBinary
 

Field Detail

TYPENUM

public static final SignedShort TYPENUM

microseconds

protected UnsignedLong microseconds
Constructor Detail

Uptime

public Uptime()
empty constructor to create new parameter.


Uptime

public Uptime(LLRPBitList list)
Constructor to create parameter from binary encoded parameter calls decodeBinary to decode parameter.

Parameters:
list - to be decoded

Uptime

public Uptime(org.jdom.Element element)
       throws InvalidLLRPMessageException
Constructor to create parameter from xml encoded parameter calls decodeXML to decode parameter.

Parameters:
element - to be decoded
Throws:
InvalidLLRPMessageException
Method Detail

encodeBinarySpecific

public LLRPBitList encodeBinarySpecific()
protected method to force subclasses to implement their specific encoding

Specified by:
encodeBinarySpecific in class TLVParameter
Returns:
LLRPBitList

encodeXML

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

Specified by:
encodeXML in interface Timestamp
Specified by:
encodeXML in class LLRPParameter
Parameters:
name - of element
ns - Namespace of elements
Returns:
JDom Content object

decodeBinarySpecific

protected void decodeBinarySpecific(LLRPBitList binary)
decoding function to be implemented by each parameter

Specified by:
decodeBinarySpecific in class TLVParameter
Parameters:
binary - binary representation of the parameter

decodeXML

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

Specified by:
decodeXML in interface Timestamp
Specified by:
decodeXML in class LLRPParameter
Parameters:
element - to be decoded
Throws:
InvalidLLRPMessageException

setMicroseconds

public void setMicroseconds(UnsignedLong microseconds)
set microseconds of type UnsignedLong .

Parameters:
microseconds - to be set

getMicroseconds

public UnsignedLong getMicroseconds()
get microseconds of type UnsignedLong.

Returns:
type UnsignedLong to be set

length

public static java.lang.Integer length()
For TLV Parameter length can not be determined at compile time. This method therefore always returns 0.

Returns:
Integer always zero

getTypeNum

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

Specified by:
getTypeNum in class LLRPParameter
Returns:
typeNum

getName

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

Specified by:
getName in class LLRPParameter
Returns:
String

toString

public java.lang.String toString()
return string representation. All field values but no parameters are included

Overrides:
toString in class java.lang.Object
Returns:
String


Copyright © 2007 ETH Zurich.