Package org.harctoolbox.irp
Class BitSpec
java.lang.Object
org.harctoolbox.irp.IrpObject
org.harctoolbox.irp.BitSpec
- All Implemented Interfaces:
Serializable,AggregateLister,XmlExport
This class implements BitSpecs, as described in Chapter 7.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallDurationsInMicros(GeneralSpec generalSpec, NameEngine nameEngine) booleanconstant(NameEngine nameEngine) voidcreateParameterSpecs(ParameterSpecs parameterSpecs) booleanget(int index) intbooleaninthashCode()booleanisEmpty()booleanisPWM()booleanisPWM(int length) booleanisStandardBiPhase(GeneralSpec generalSpec, NameEngine nameEngine) Checks if the BitSpec is of type <a,-a|-a,a> (a != 0)booleanisTrivial(GeneralSpec generalSpec, NameEngine nameEngine) Checks if the BitSpec is of type <a|-a> (a != 0)booleanisTrivial(GeneralSpec generalSpec, NameEngine nameEngine, boolean inverted) Checks if the BitSpec is of type <a|-a> (a != 0)intpropertiesMap(GeneralSpec generalSpec, NameEngine nameEngine) intsize()toIrpString(int radix) Returns a computed IRP (-segment) string representation of current IrpObject.intweight()Returns a (somewhat arbitrary) measure of the complexity of the object.Methods inherited from class org.harctoolbox.irp.IrpObject
getParseTree, numberOfBits, numberOfBitSpecs, prerender, propertiesMap, toDocument, toIrpString, toString, toString, toStringTree, toStringTree, toTreeViewer, toTreeViewer, toTreeViewer, updateStateWhenEntering, updateStateWhenExiting
-
Constructor Details
-
BitSpec
-
BitSpec
-
BitSpec
- Throws:
NonUniqueBitCodeException
-
BitSpec
public BitSpec()
-
-
Method Details
-
numberOfDurations
-
equals
-
hashCode
public int hashCode() -
size
public int size() -
numberOfInfiniteRepeats
public int numberOfInfiniteRepeats()- Overrides:
numberOfInfiniteRepeatsin classIrpObject
-
get
-
toIrpString
Description copied from class:IrpObjectReturns a computed IRP (-segment) string representation of current IrpObject. Numerical parameters, but not durations etc, will be printed using the radix in the argument.- Specified by:
toIrpStringin classIrpObject- Parameters:
radix- Radix for parameters.- Returns:
- Formatted string.
-
getChunkSize
public int getChunkSize() -
isEmpty
public boolean isEmpty() -
numberOfBitspecDurations
-
isPWM
public boolean isPWM() -
isPWM
public boolean isPWM(int length) -
isStandardBiPhase
Checks if the BitSpec is of type <a,-a|-a,a> (a != 0)- Parameters:
generalSpec-nameEngine-- Returns:
-
isTrivial
Checks if the BitSpec is of type <a|-a> (a != 0)- Parameters:
generalSpec-nameEngine-inverted- If true then a > 0, i.e., starts with a flash.- Returns:
-
isTrivial
Checks if the BitSpec is of type <a|-a> (a != 0)- Parameters:
generalSpec-nameEngine-- Returns:
-
toElement
-
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
- Specified by:
propertiesMapin interfaceAggregateLister
-
allDurationsInMicros
-
constant
-
createParameterSpecs
- Overrides:
createParameterSpecsin classIrpObject- Throws:
InvalidNameException
-