Package org.harctoolbox.irp
Class BitField
java.lang.Object
org.harctoolbox.irp.IrpObject
org.harctoolbox.irp.BitField
- All Implemented Interfaces:
Serializable
,EquationSolving
,Numerical
,XmlExport
- Direct Known Subclasses:
FiniteBitField
,InfiniteBitField
This class implements Bitfields as described in Chapter 5, except for that it does not
know how to transform itself into a bitstream -- that is what the class BitStream does.
Accordingly, it does not know bit directions.
- See Also:
-
BitStream
- Serialized Form
-
Constructor Summary
ModifierConstructorDescriptionprotected
BitField
(org.antlr.v4.runtime.tree.ParseTree ctx, PrimaryItem data, PrimaryItem chop, boolean complement) -
Method Summary
Modifier and TypeMethodDescriptionboolean
constant
(NameEngine nameEngine) boolean
getChop()
getChop
(RecognizeData recognizeData) getData()
abstract long
getWidth
(NameEngine nameEngine) protected abstract BitwiseParameter
getWidth
(RecognizeData nameResolver) boolean
hasChop()
boolean
int
hashCode()
abstract BitwiseParameter
invert
(BitwiseParameter rhs, RecognizeData nameResolver) boolean
boolean
isEmpty
(NameEngine nameEngine) final PrimaryItem
microSeconds
(GeneralSpec generalSpec, NameEngine nameEngine) static BitField
newBitField
(String str) static BitField
static BitField
newBitField
(ParserDriver parserDriver) static long
parse
(String str, NameEngine nameEngine) propertiesMap
(boolean eval, GeneralSpec generalSpec, NameEngine nameEngine) abstract BitField
substituteConstantVariables
(Map<String, Long> constantVariables) long
toLong()
abstract String
toString
(NameEngine nameEngine) int
weight()
Returns a (somewhat arbitrary) measure of the complexity of the object.Methods inherited from class org.harctoolbox.irp.IrpObject
createParameterSpecs, getParseTree, numberOfBits, numberOfBitSpecs, numberOfInfiniteRepeats, prerender, propertiesMap, toDocument, toElement, toIrpString, toIrpString, toString, toString, toStringTree, toStringTree, toTreeViewer, toTreeViewer, toTreeViewer, updateStateWhenEntering, updateStateWhenExiting
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.harctoolbox.irp.Numerical
toBitwiseParameter, toLong
-
Constructor Details
-
BitField
protected BitField(org.antlr.v4.runtime.tree.ParseTree ctx, PrimaryItem data, PrimaryItem chop, boolean complement)
-
-
Method Details
-
newBitField
-
newBitField
-
newBitField
-
parse
- Throws:
NameUnassignedException
-
equals
-
hashCode
public int hashCode() -
toLong
- Specified by:
toLong
in interfaceNumerical
- Throws:
NameUnassignedException
-
toString
-
getWidth
- Throws:
NameUnassignedException
-
getWidth
protected abstract BitwiseParameter getWidth(RecognizeData nameResolver) throws NameUnassignedException - Throws:
NameUnassignedException
-
getChop
-
isComplement
public boolean isComplement()- Returns:
- the complement
-
getData
- Returns:
- the data
-
getChop
-
isEmpty
- Throws:
NameUnassignedException
-
hasChop
public boolean hasChop() -
weight
public int weight()Description copied from class:IrpObject
Returns a (somewhat arbitrary) measure of the complexity of the object. Can be used for determining if a decode is "simpler" than another decode. -
hasExtent
public boolean hasExtent() -
propertiesMap
public Map<String,Object> propertiesMap(boolean eval, GeneralSpec generalSpec, NameEngine nameEngine) -
microSeconds
-
numberOfBareDurations
-
substituteConstantVariables
-
constant
-
invert
public abstract BitwiseParameter invert(BitwiseParameter rhs, RecognizeData nameResolver) throws NameUnassignedException - Specified by:
invert
in interfaceEquationSolving
- Throws:
NameUnassignedException
-
leftHandSide
- Specified by:
leftHandSide
in interfaceEquationSolving
-