Package org.harctoolbox.irp
Class BitspecIrstream
java.lang.Object
org.harctoolbox.irp.IrpObject
org.harctoolbox.irp.BitspecIrstream
- All Implemented Interfaces:
Serializable,IrStreamItem,XmlExport
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBitspecIrstream(String str) BitspecIrstream(BitSpec bitSpec, IrStream irStream) BitspecIrstream(BitSpec bitSpec, IrStream irStream, IrpParser.Bitspec_irstreamContext ctx) -
Method Summary
Modifier 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> inheritedBitSpecs, boolean isLast) endingDurationType(DurationType last, boolean gapFlashBitSpecs) booleanvoidevaluate(RenderData renderData, List<BitSpec> bitSpecStack) extractPass(IrSignal.Pass pass) 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()booleanbooleanbooleanbooleaninterleavingOk(DurationType last) booleaninterleavingOk(DurationType last, boolean gapFlashBitSpecsUnused) booleaninterleavingOk(DurationType toCheck, DurationType last) 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> inheritedBitSpecs) startingDuratingType(DurationType last, boolean gapFlashBitSpecs) startingDurationType(boolean gapFlashBitSpecs) 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.toIrpString(int radix, String separator) voidvoidintweight()Returns a (somewhat arbitrary) measure of the complexity of the object.Methods inherited from class org.harctoolbox.irp.IrpObject
getParseTree, prerender, propertiesMap, toDocument, toIrpString, toString, toString, toStringTree, toStringTree, toTreeViewer, toTreeViewer, toTreeViewerMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.harctoolbox.irp.IrStreamItem
propertiesMapMethods inherited from interface org.harctoolbox.xml.XmlExport
toDocument
-
Constructor Details
-
BitspecIrstream
-
BitspecIrstream
-
BitspecIrstream
-
BitspecIrstream
-
BitspecIrstream
-
BitspecIrstream
public BitspecIrstream()
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
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 interfaceIrStreamItem- Specified by:
toIrpStringin classIrpObject- Parameters:
radix- Radix for parameters.- Returns:
- Formatted string.
-
toIrpString
-
toElement
-
isEmpty
- Specified by:
isEmptyin interfaceIrStreamItem
-
numberOfBitSpecs
- Specified by:
numberOfBitSpecsin interfaceIrStreamItem- Overrides:
numberOfBitSpecsin classIrpObject
-
numberOfBits
Description 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 interfaceIrStreamItem- Overrides:
numberOfBitsin classIrpObject- Returns:
-
numberOfBareDurations
- Specified by:
numberOfBareDurationsin interfaceIrStreamItem
-
numberOfInfiniteRepeats
public int numberOfInfiniteRepeats()- Specified by:
numberOfInfiniteRepeatsin interfaceIrStreamItem- Overrides:
numberOfInfiniteRepeatsin classIrpObject
-
decode
public void decode(RecognizeData recognizeData, List<BitSpec> inheritedBitSpecs, boolean isLast) throws SignalRecognitionException - Specified by:
decodein interfaceIrStreamItem- Throws:
SignalRecognitionException
-
render
public void render(RenderData renderData, List<BitSpec> inheritedBitSpecs) throws NameUnassignedException - Specified by:
renderin interfaceIrStreamItem- Throws:
NameUnassignedException
-
updateStateWhenEntering
- Specified by:
updateStateWhenEnteringin interfaceIrStreamItem- Overrides:
updateStateWhenEnteringin classIrpObject
-
updateStateWhenExiting
- Specified by:
updateStateWhenExitingin interfaceIrStreamItem- Overrides:
updateStateWhenExitingin classIrpObject
-
extractPass
- Specified by:
extractPassin interfaceIrStreamItem
-
extractPass
-
interleavingOk
- Specified by:
interleavingOkin interfaceIrStreamItem- Parameters:
last-gapFlashBitSpecsUnused-- Returns:
-
interleavingOk
-
interleavingOk
- Specified by:
interleavingOkin interfaceIrStreamItem
-
interleavingOk
-
interleavingOk
public boolean interleavingOk() -
interleavingFlashOk
public boolean interleavingFlashOk() -
interleavingGapOk
public boolean interleavingGapOk() -
endingDurationType
- Specified by:
endingDurationTypein interfaceIrStreamItem
-
startingDuratingType
- Specified by:
startingDuratingTypein interfaceIrStreamItem
-
startingDurationType
-
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.- Specified by:
weightin interfaceIrStreamItem- Specified by:
weightin classIrpObject- Returns:
- non-negative integer.
-
hasExtent
public boolean hasExtent()- Specified by:
hasExtentin interfaceIrStreamItem
-
getBitSpec
-
getIrStream
-
assignmentVariables
- Specified by:
assignmentVariablesin interfaceIrStreamItem
-
propertiesMap
- Specified by:
propertiesMapin interfaceIrStreamItem
-
microSeconds
- Specified by:
microSecondsin interfaceIrStreamItem
-
numberOfDurations
Description 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 interfaceIrStreamItem- Returns:
- number of durations (not necessarily interleaving), or null if not possible to determine.
-
evaluate
- Specified by:
evaluatein interfaceIrStreamItem
-
nonConstantBitFieldLength
public boolean nonConstantBitFieldLength()- Specified by:
nonConstantBitFieldLengthin interfaceIrStreamItem
-
guessParameterLength
Description copied from interface:IrStreamItemTries to infer the bit-length of the parameter with name as the argument.- Specified by:
guessParameterLengthin interfaceIrStreamItem- Parameters:
name- Name of parameter sought.- Returns:
- length if success, null if failure.
-
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.- Specified by:
substituteConstantVariablesin interfaceIrStreamItem- Parameters:
constantVariables- Map<String, Long> of variables to replace.- Returns:
- IrStreamItem of the same type.
-
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- Parameters:
generalSpec-nameEngine-- Returns:
-
constant
- Specified by:
constantin interfaceIrStreamItem
-
createParameterSpecs
- Specified by:
createParameterSpecsin interfaceIrStreamItem- Overrides:
createParameterSpecsin classIrpObject- Throws:
InvalidNameException
-