public class TwoBitField extends LLRPType
| Constructor and Description |
|---|
TwoBitField()
Creates a new TwoBitField object.
|
TwoBitField(Bit[] bits)
Creates a TwoBitField.
|
TwoBitField(org.jdom.Element element)
Creates a new TwoBitField object.
|
TwoBitField(LLRPBitList list)
Creates a TwoBitField.
|
TwoBitField(LLRPBitList bitList,
int bitIndex,
int length) |
TwoBitField(java.lang.String string)
create new TwoBitField from String where the String is assumed to be in Decimal format
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear(java.lang.Integer i)
set Bit at specified position to 0
|
void |
decodeBinary(LLRPBitList list)
decode bits from BitList.
|
void |
decodeXML(org.jdom.Element element)
decode XML element.
|
LLRPBitList |
encodeBinary()
just like BitArray but does not encode length before values
MSB first
|
org.jdom.Content |
encodeXML(java.lang.String name,
org.jdom.Namespace ns)
create xml representation of this parameter.
|
Bit |
get(java.lang.Integer i)
get bit at I
|
boolean |
inRange(java.lang.String valueString)
expects a string as formated for XML
|
int |
intValue()
two bit field interpreted as two bit number
|
static int |
length()
number of bits used to represent this type
|
void |
set(java.lang.Integer i)
set Bit at specified position to 1
|
java.lang.String |
toString()
encodes TwoBitField to a string where the string represents the value in decimal format and bits are interpreted MSB first
|
java.lang.String |
toString(int radix)
encodes the TwoBitField to a string where the String represents the value in the given radix.
|
toXMLStringpublic TwoBitField(LLRPBitList bitList, int bitIndex, int length)
public TwoBitField(Bit[] bits)
bits - to be decodedpublic TwoBitField(LLRPBitList list)
list - to be decodedpublic TwoBitField(java.lang.String string)
string - public TwoBitField()
public TwoBitField(org.jdom.Element element)
element - to be decodedpublic void clear(java.lang.Integer i)
i - position to be set to 0public LLRPBitList encodeBinary()
encodeBinary in class LLRPTypepublic static int length()
public void decodeBinary(LLRPBitList list)
decodeBinary in class LLRPTypelist - to be decodedpublic Bit get(java.lang.Integer i)
i - position to be returnedpublic int intValue()
public void set(java.lang.Integer i)
i - position to be set to 1public org.jdom.Content encodeXML(java.lang.String name,
org.jdom.Namespace ns)
LLRPTypepublic void decodeXML(org.jdom.Element element)
public java.lang.String toString()
public java.lang.String toString(int radix)
Copyright © 2007 ETH Zurich.