Package org.harctoolbox.irp
Class GeneralSpec
java.lang.Object
org.harctoolbox.irp.IrpObject
org.harctoolbox.irp.GeneralSpec
- All Implemented Interfaces:
Serializable
,AggregateLister
,XmlExport
This class implements GeneralSpec as given in Chapter 2 of Dixon: "Specification of IRP Notation", second draft.
This class is immutable; can only be build by the constructor, and not altered.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final BitDirection
static final double
static final double
-
Constructor Summary
ConstructorDescriptionThis constructor is intended for debugging and testing onlyGeneralSpec
(String str) GeneralSpec
(BitDirection bitDirection, Double unit, Double frequency) GeneralSpec
(BitDirection bitDirection, Double unit, Double frequency, Double dutyCycle) This constructor is intended for debugging and testing only.GeneralSpec
(GeneralSpec src) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
double
double
getUnit()
int
hashCode()
propertiesMap
(GeneralSpec generalSpec, NameEngine nameEngine) toIrpString
(boolean usePeriods) 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
createParameterSpecs, getParseTree, numberOfBits, numberOfBitSpecs, numberOfInfiniteRepeats, prerender, propertiesMap, toDocument, toIrpString, toString, toString, toStringTree, toStringTree, toTreeViewer, toTreeViewer, toTreeViewer, updateStateWhenEntering, updateStateWhenExiting
-
Field Details
-
DEFAULT_BITDIRECTION
-
DEFAULT_FREQUENCY
public static final double DEFAULT_FREQUENCY- See Also:
-
DEFAULT_UNIT
public static final double DEFAULT_UNIT- See Also:
-
-
Constructor Details
-
GeneralSpec
This constructor is intended for debugging and testing only.- Parameters:
bitDirection
-unit
-frequency
-dutyCycle
-
-
GeneralSpec
-
GeneralSpec
Copy constructor.- Parameters:
src
-
-
GeneralSpec
public GeneralSpec()This constructor is intended for debugging and testing only -
GeneralSpec
- Throws:
IrpInvalidArgumentException
-
GeneralSpec
- Throws:
IrpInvalidArgumentException
-
GeneralSpec
- Throws:
IrpInvalidArgumentException
-
GeneralSpec
- Parameters:
ctx
-- Throws:
IrpInvalidArgumentException
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
getBitDirection
-
getFrequency
-
getFrequencyWitDefault
public double getFrequencyWitDefault() -
getUnit
public double getUnit() -
getDutyCycle
-
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.
-
toIrpString
-
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. -
propertiesMap
- Specified by:
propertiesMap
in interfaceAggregateLister
-