Package org.harctoolbox.irp
Class Extent
java.lang.Object
org.harctoolbox.irp.IrpObject
org.harctoolbox.irp.Duration
org.harctoolbox.irp.Extent
- All Implemented Interfaces:
Serializable,Floatable,IrStreamItem,XmlExport
This class implements Extents as per Chapter 4.
- See Also:
-
Field Summary
Fields inherited from class org.harctoolbox.irp.Duration
nameOrNumber, time_periods, time_units, unit, us -
Constructor Summary
ConstructorsConstructorDescriptionExtent(double d) Extent(NameOrNumber non, String unit) Extent(ParserDriver parserDriver) -
Method Summary
Modifier and TypeMethodDescriptionallDurationsInMicros(GeneralSpec generalSpec, NameEngine nameEngine) Delivers a set of all the contained durations in microseconds.voiddecode(RecognizeData recognizeData, List<BitSpec> bitSpecStack, boolean isLast) booleandoubleevaluate(GeneralSpec generalSpec, NameEngine nameEngine, double elapsed) protected ExtentevaluatedDuration(GeneralSpec generalSpec, NameEngine nameEngine) Deliver an "evaluated" Duration (variables resolved) of the same subclass.doubleevaluateWithSign(GeneralSpec generalSpec, NameEngine nameEngine, double elapsed) booleaninthashCode()protected booleanisOn()propertiesMap(int noProperties) substituteConstantVariables(Map<String, Long> constantVariables) Returns an IrStreamItem of the same type with all occurrences of the variables in the dictionary replaced by their values in the dictionary.toIrpString(int radix) Returns a computed IRP (-segment) string representation of current IrpObject.Methods inherited from class org.harctoolbox.irp.Duration
assignmentVariables, constant, endingDurationType, evaluate, evaluate, extractPass, getTimeInUnits, getUnit, guessParameterLength, interleavingOk, interleavingOk, isEmpty, isOn, microSeconds, newDuration, newDuration, newDuration, newDuration, nonConstantBitFieldLength, numberOfBareDurations, numberOfBits, numberOfDurations, propertiesMap, recognize, render, startingDuratingType, toElement, toFloat, weightMethods inherited from class org.harctoolbox.irp.IrpObject
createParameterSpecs, getParseTree, numberOfBitSpecs, numberOfInfiniteRepeats, prerender, propertiesMap, toDocument, 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.IrStreamItem
createParameterSpecs, numberOfBitSpecs, numberOfInfiniteRepeats, propertiesMap, updateStateWhenEntering, updateStateWhenExitingMethods inherited from interface org.harctoolbox.xml.XmlExport
toDocument
-
Constructor Details
-
Extent
-
Extent
-
Extent
-
Extent
-
Extent
public Extent(double d) -
Extent
-
-
Method Details
-
substituteConstantVariables
Description copied from interface:IrStreamItemReturns an IrStreamItem of the same type with all occurrences of the variables in the dictionary replaced by their values in the dictionary. Does not change the containing object. May return the object itself, or share sub-objects with it.- Parameters:
constantVariables- Map<String, Long> of variables to replace.- Returns:
- IrStreamItem of the same type.
-
equals
-
evaluate
public double evaluate(GeneralSpec generalSpec, NameEngine nameEngine, double elapsed) throws NameUnassignedException, IrpInvalidArgumentException - Overrides:
evaluatein classDuration- Throws:
NameUnassignedExceptionIrpInvalidArgumentException
-
evaluateWithSign
public double evaluateWithSign(GeneralSpec generalSpec, NameEngine nameEngine, double elapsed) throws NameUnassignedException, IrpInvalidArgumentException - Specified by:
evaluateWithSignin classDuration- Throws:
NameUnassignedExceptionIrpInvalidArgumentException
-
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 interfaceFloatable- Specified by:
toIrpStringin interfaceIrStreamItem- Overrides:
toIrpStringin classDuration- Parameters:
radix- Radix for parameters.- Returns:
- Formatted string.
-
decode
public void decode(RecognizeData recognizeData, List<BitSpec> bitSpecStack, boolean isLast) throws SignalRecognitionException - Specified by:
decodein interfaceIrStreamItem- Overrides:
decodein classDuration- Throws:
SignalRecognitionException
-
isOn
protected boolean isOn() -
hashCode
public int hashCode() -
hasExtent
public boolean hasExtent()- Specified by:
hasExtentin interfaceIrStreamItem- Overrides:
hasExtentin classDuration
-
evaluatedDuration
protected Extent evaluatedDuration(GeneralSpec generalSpec, NameEngine nameEngine) throws NameUnassignedException, IrpInvalidArgumentException Description copied from class:DurationDeliver an "evaluated" Duration (variables resolved) of the same subclass.- Specified by:
evaluatedDurationin classDuration- Parameters:
generalSpec-nameEngine-- Returns:
- Throws:
NameUnassignedExceptionIrpInvalidArgumentException
-
allDurationsInMicros
Description copied from interface:IrStreamItemDelivers a set of all the contained durations in microseconds. Dumb, in that it does not consider consecutive flashes or consecutive gaps. Also, durations that cannot be statically computed may be omitted, as well as duration arising from extents.- Specified by:
allDurationsInMicrosin interfaceIrStreamItem- Overrides:
allDurationsInMicrosin classDuration- Parameters:
generalSpec-nameEngine-- Returns:
-
numberOfBitSpecs
Integer numberOfBitSpecs() -
propertiesMap
-