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:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBitField(org.antlr.v4.runtime.tree.ParseTree ctx, PrimaryItem data, PrimaryItem chop, boolean complement) -
Method Summary
Modifier and TypeMethodDescriptionbooleanconstant(NameEngine nameEngine) booleangetChop()getChop(RecognizeData recognizeData) getData()abstract longgetWidth(NameEngine nameEngine) protected abstract BitwiseParametergetWidth(RecognizeData nameResolver) booleanhasChop()booleaninthashCode()abstract BitwiseParameterinvert(BitwiseParameter rhs, RecognizeData nameResolver) booleanbooleanisEmpty(NameEngine nameEngine) final PrimaryItemmicroSeconds(GeneralSpec generalSpec, NameEngine nameEngine) static BitFieldnewBitField(String str) static BitFieldstatic BitFieldnewBitField(ParserDriver parserDriver) static longparse(String str, NameEngine nameEngine) propertiesMap(boolean eval, GeneralSpec generalSpec, NameEngine nameEngine) abstract BitFieldsubstituteConstantVariables(Map<String, Long> constantVariables) longtoLong()abstract StringtoString(NameEngine nameEngine) intweight()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, updateStateWhenExitingMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
toLongin 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:IrpObjectReturns 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:
invertin interfaceEquationSolving- Throws:
NameUnassignedException
-
leftHandSide
- Specified by:
leftHandSidein interfaceEquationSolving
-