Package org.harctoolbox.irp
Class Variation
java.lang.Object
org.harctoolbox.irp.IrpObject
org.harctoolbox.irp.Variation
- All Implemented Interfaces:
- Serializable,- IrStreamItem,- XmlExport
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionVariation(BareIrStream intro, BareIrStream repeat, BareIrStream ending) Variation(IrpParser.VariationContext variation) Variation(ParserDriver parserDriver) 
- 
Method SummaryModifier and TypeMethodDescriptionallDurationsInMicros(GeneralSpec generalSpec, NameEngine nameEngine) Delivers a set of all the contained durations in microseconds.booleanconstant(NameEngine nameEngine) voidcreateParameterSpecs(ParameterSpecs parameterSpecs) voiddecode(RecognizeData recognizeData, List<BitSpec> bitSpecs, boolean isLast) endingDurationType(DurationType last, boolean gapFlashBitSpecs) booleanvoidevaluate(RenderData renderData, List<BitSpec> bitSpecStack) extractPass(IrSignal.Pass pass, IrStream.PassExtractorState state) guessParameterLength(String name) Tries to infer the bit-length of the parameter with name as the argument.booleaninthashCode()booleanhasPart(IrSignal.Pass part) booleaninterleavingOk(DurationType last, boolean gapFlashBitSpecs) booleaninterleavingOk(DurationType toCheck, DurationType last, boolean gapFlashBitSpecs) booleanisEmpty(NameEngine nameEngine) microSeconds(GeneralSpec generalSpec, NameEngine nameEngine) booleanComputes the number of encoded bits, which may differ from the number of payload bits, in the case of redundancy.Upper limit of the number of (interleaving) durations in the rendered signal.intpropertiesMap(GeneralSpec generalSpec, NameEngine nameEngine) voidrender(RenderData renderData, List<BitSpec> bitSpecs) select(IrSignal.Pass pass) startingDuratingType(DurationType last, boolean gapFlashBitSpecs) booleansubstituteConstantVariables(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.voidintweight()Returns a (somewhat arbitrary) measure of the complexity of the object.Methods inherited from class org.harctoolbox.irp.IrpObjectgetParseTree, numberOfBitSpecs, prerender, propertiesMap, toDocument, toIrpString, toString, toString, toStringTree, toStringTree, toTreeViewer, toTreeViewer, toTreeViewer, updateStateWhenExitingMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.harctoolbox.irp.IrStreamItemnumberOfBitSpecs, propertiesMap, updateStateWhenExitingMethods inherited from interface org.harctoolbox.xml.XmlExporttoDocument
- 
Constructor Details- 
Variation
- 
Variation
- 
Variation
- 
Variation
 
- 
- 
Method Details- 
substituteConstantVariablesDescription 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.- Specified by:
- substituteConstantVariablesin interface- IrStreamItem
- Parameters:
- constantVariables- Map<String, Long> of variables to replace.
- Returns:
- IrStreamItem of the same type.
 
- 
isEmpty- Specified by:
- isEmptyin interface- IrStreamItem
 
- 
select
- 
numberOfInfiniteRepeatspublic int numberOfInfiniteRepeats()- Specified by:
- numberOfInfiniteRepeatsin interface- IrStreamItem
- Overrides:
- numberOfInfiniteRepeatsin class- IrpObject
 
- 
toElement
- 
numberOfBareDurations- Specified by:
- numberOfBareDurationsin interface- IrStreamItem
 
- 
numberOfBitsDescription copied from interface:IrStreamItemComputes the number of encoded bits, which may differ from the number of payload bits, in the case of redundancy.- Specified by:
- numberOfBitsin interface- IrStreamItem
- Overrides:
- numberOfBitsin class- IrpObject
- Returns:
 
- 
toIrpStringDescription 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 interface- IrStreamItem
- Specified by:
- toIrpStringin class- IrpObject
- Parameters:
- radix- Radix for parameters.
- Returns:
- Formatted string.
 
- 
decode- Specified by:
- decodein interface- IrStreamItem
 
- 
extractPass- Specified by:
- extractPassin interface- IrStreamItem
 
- 
updateStateWhenEntering- Specified by:
- updateStateWhenEnteringin interface- IrStreamItem
- Overrides:
- updateStateWhenEnteringin class- IrpObject
 
- 
interleavingOk- Specified by:
- interleavingOkin interface- IrStreamItem
- Parameters:
- last-
- gapFlashBitSpecs-
- Returns:
 
- 
interleavingOk- Specified by:
- interleavingOkin interface- IrStreamItem
 
- 
endingDurationType- Specified by:
- endingDurationTypein interface- IrStreamItem
 
- 
startingDuratingType- Specified by:
- startingDuratingTypein interface- IrStreamItem
 
- 
weightpublic 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.- Specified by:
- weightin interface- IrStreamItem
- Specified by:
- weightin class- IrpObject
- Returns:
- non-negative integer.
 
- 
equals
- 
hashCodepublic int hashCode()
- 
hasExtentpublic boolean hasExtent()- Specified by:
- hasExtentin interface- IrStreamItem
 
- 
hasPart
- 
assignmentVariables- Specified by:
- assignmentVariablesin interface- IrStreamItem
 
- 
propertiesMap- Specified by:
- propertiesMapin interface- IrStreamItem
 
- 
microSeconds- Specified by:
- microSecondsin interface- IrStreamItem
 
- 
numberOfDurationsDescription copied from interface:IrStreamItemUpper limit of the number of (interleaving) durations in the rendered signal. Only intended to be used on intro/repeat/ending IrStreams.- Specified by:
- numberOfDurationsin interface- IrStreamItem
- Returns:
- number of durations (not necessarily interleaving), or null if not possible to determine.
 
- 
render- Specified by:
- renderin interface- IrStreamItem
 
- 
evaluate- Specified by:
- evaluatein interface- IrStreamItem
 
- 
startsWithFlashpublic boolean startsWithFlash()
- 
nonConstantBitFieldLengthpublic boolean nonConstantBitFieldLength()- Specified by:
- nonConstantBitFieldLengthin interface- IrStreamItem
 
- 
guessParameterLengthDescription copied from interface:IrStreamItemTries to infer the bit-length of the parameter with name as the argument.- Specified by:
- guessParameterLengthin interface- IrStreamItem
- Parameters:
- name- Name of parameter sought.
- Returns:
- length if success, null if failure.
 
- 
allDurationsInMicrosDescription 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 interface- IrStreamItem
- Parameters:
- generalSpec-
- nameEngine-
- Returns:
 
- 
constant- Specified by:
- constantin interface- IrStreamItem
 
- 
createParameterSpecs- Specified by:
- createParameterSpecsin interface- IrStreamItem
- Overrides:
- createParameterSpecsin class- IrpObject
- Throws:
- InvalidNameException
 
 
-