org.llrp.ltk.types
Class UnsignedByte

java.lang.Object
  extended by org.llrp.ltk.types.LLRPType
      extended by org.llrp.ltk.types.LLRPNumberType
          extended by org.llrp.ltk.types.UnsignedByte
Direct Known Subclasses:
AccessReportTriggerType, AccessSpecStopTriggerType, AirProtocols, AISpecEventType, AISpecStopTriggerType, AntennaEventType, C1G2BlockEraseResultType, C1G2BlockWriteResultType, C1G2ForwardLinkModulation, C1G2KillResultType, C1G2LockDataField, C1G2LockPrivilege, C1G2LockResultType, C1G2MValue, C1G2ReadResultType, C1G2SpectralMaskIndicator, C1G2StateAwareAction, C1G2StateAwareTarget, C1G2StateUnawareAction, C1G2WriteResultType, GetReaderCapabilitiesRequestedData, GetReaderConfigRequestedData, GPIPortState, IdentificationType, KeepaliveTriggerType, RFSurveyEventType, RFSurveySpecStopTriggerType, ROReportTriggerType, ROSpecEventType, ROSpecStartTriggerType, ROSpecState, ROSpecStopTriggerType, TagObservationTriggerType, UnsignedByte_HEX

public class UnsignedByte
extends LLRPNumberType

unsigned 16 bit short


Field Summary
protected  int value
           
 
Fields inherited from class org.llrp.ltk.types.LLRPNumberType
signed
 
Constructor Summary
UnsignedByte()
          Creates a new UnsignedByte object.
UnsignedByte(byte value)
          Creates a new UnsignedByte object from byte
UnsignedByte(org.jdom.Element element)
           
UnsignedByte(int value)
          Creates a new UnsignedByte object.
UnsignedByte(LLRPBitList bitList)
          Creates a new UnsignedByte object.
UnsignedByte(java.lang.String valueString)
          Creates a new UnsignedByte object.
UnsignedByte(java.lang.String valueString, int radix)
          String representation in specified radix.
 
Method Summary
 void decodeBinary(LLRPBitList list)
          decode
 void decodeXML(org.jdom.Element element)
          create objects from xml.
 LLRPBitList encodeBinary()
          encode this value
 org.jdom.Content encodeXML(java.lang.String name, org.jdom.Namespace ns)
          create xml representation of this parameter.
 boolean inRange(long value)
           
 boolean inRange(java.lang.String valueString)
           
static int length()
          number of bits used to represent this type
 byte toByte()
          to java byte - might loose precision
 java.lang.Integer toInteger()
          to java Integer
 java.lang.String toString()
          String representation
 java.lang.String toString(int radix)
           
 
Methods inherited from class org.llrp.ltk.types.LLRPNumberType
equals, hashCode, intValue
 
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
 

Field Detail

value

protected int value
Constructor Detail

UnsignedByte

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

Parameters:
value - to set

UnsignedByte

public UnsignedByte(byte value)
Creates a new UnsignedByte object from byte

Parameters:
value - interpreted as unsigned byte

UnsignedByte

public UnsignedByte(java.lang.String valueString)
Creates a new UnsignedByte object.

Parameters:
valueString - value as string

UnsignedByte

public UnsignedByte(LLRPBitList bitList)
Creates a new UnsignedByte object.

Parameters:
bitList - to be decoded

UnsignedByte

public UnsignedByte()
Creates a new UnsignedByte object.


UnsignedByte

public UnsignedByte(java.lang.String valueString,
                    int radix)
String representation in specified radix.


UnsignedByte

public UnsignedByte(org.jdom.Element element)
Method Detail

length

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

Returns:
Integer

toByte

public byte toByte()
to java byte - might loose precision

Returns:
byte

toInteger

public java.lang.Integer toInteger()
to java Integer

Specified by:
toInteger in class LLRPNumberType
Returns:
Integer

decodeBinary

public void decodeBinary(LLRPBitList list)
Description copied from class: LLRPType
decode

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

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

encodeBinary

public LLRPBitList encodeBinary()
Description copied from class: LLRPType
encode this value

Specified by:
encodeBinary in class LLRPType
Returns:
LLRPBitList

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

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 LLRPNumberType
Returns:
String

inRange

public boolean inRange(long value)
Specified by:
inRange in class LLRPNumberType

inRange

public boolean inRange(java.lang.String valueString)
Specified by:
inRange in class LLRPType


Copyright © 2007 ETH Zurich.