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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallDurationsInMicros
(GeneralSpec generalSpec, NameEngine nameEngine) boolean
constant
(NameEngine nameEngine) void
createParameterSpecs
(ParameterSpecs parameterSpecs) boolean
get
(int index) int
boolean
int
hashCode()
boolean
isEmpty()
boolean
isPWM()
boolean
isPWM
(int length) boolean
isStandardBiPhase
(GeneralSpec generalSpec, NameEngine nameEngine) Checks if the BitSpec is of type <a,-a|-a,a> (a != 0)boolean
isTrivial
(GeneralSpec generalSpec, NameEngine nameEngine) Checks if the BitSpec is of type <a|-a> (a != 0)boolean
isTrivial
(GeneralSpec generalSpec, NameEngine nameEngine, boolean inverted) Checks if the BitSpec is of type <a|-a> (a != 0)int
propertiesMap
(GeneralSpec generalSpec, NameEngine nameEngine) int
size()
toIrpString
(int radix) Returns a computed IRP (-segment) string representation of current IrpObject.int
weight()
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:
numberOfInfiniteRepeats
in classIrpObject
-
get
-
toIrpString
Description copied from class:IrpObject
Returns 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:
toIrpString
in 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:
nameEngine
-generalSpec
-- Returns:
-
isTrivial
Checks if the BitSpec is of type <a|-a> (a != 0)- Parameters:
nameEngine
-generalSpec
-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:
nameEngine
-generalSpec
-- Returns:
-
toElement
-
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
- Specified by:
propertiesMap
in interfaceAggregateLister
-
allDurationsInMicros
-
constant
-
createParameterSpecs
- Overrides:
createParameterSpecs
in classIrpObject
- Throws:
InvalidNameException
-