Package org.harctoolbox.irp
Interface IrStreamItem
- All Superinterfaces:
XmlExport
- All Known Implementing Classes:
Assignment
,BareIrStream
,BitspecIrstream
,Duration
,Extent
,FiniteBitField
,Flash
,Gap
,IrStream
,Variation
This interface describes the things that make up an IRStream.
-
Method Summary
Modifier and TypeMethodDescriptionallDurationsInMicros
(GeneralSpec generalSpec, NameEngine nameEngine) Delivers a set of all the contained durations in microseconds.boolean
constant
(NameEngine nameEngine) void
createParameterSpecs
(ParameterSpecs parameterSpecs) void
decode
(RecognizeData recognizeData, List<BitSpec> bitSpecStack, boolean isLast) endingDurationType
(DurationType last, boolean gapFlashBitSpecs) void
evaluate
(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.boolean
boolean
interleavingOk
(DurationType last, boolean gapFlashBitSpecs) boolean
interleavingOk
(DurationType toCheck, DurationType last, boolean gapFlashBitSpecs) boolean
isEmpty
(NameEngine nameEngine) microSeconds
(GeneralSpec generalSpec, NameEngine nameEngine) static IrStreamItem
newIrStreamItem
(String str) static IrStreamItem
static IrStreamItem
newIrStreamItem
(ParserDriver parserDriver) boolean
Computes 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.int
propertiesMap
(int noProperites) propertiesMap
(GeneralSpec generalSpec, NameEngine nameEngine) void
render
(RenderData renderData, List<BitSpec> bitSpecs) startingDuratingType
(DurationType last, 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) void
void
int
weight()
Methods inherited from interface org.harctoolbox.xml.XmlExport
toDocument, toElement
-
Method Details
-
newIrStreamItem
-
newIrStreamItem
-
newIrStreamItem
-
isEmpty
-
interleavingOk
- Parameters:
last
-gapFlashBitSpecs
-- Returns:
-
interleavingOk
-
endingDurationType
-
startingDuratingType
-
numberOfBits
Integer numberOfBits()Computes the number of encoded bits, which may differ from the number of payload bits, in the case of redundancy.- Returns:
-
numberOfBareDurations
Integer numberOfBareDurations() -
numberOfDurations
Integer numberOfDurations()Upper limit of the number of (interleaving) durations in the rendered signal. Only intended to be used on intro/repeat/ending IrStreams.- Returns:
- number of durations (not necessarily interleaving), or null if not possible to determine.
-
numberOfBitSpecs
Integer numberOfBitSpecs() -
allDurationsInMicros
Delivers 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.- Parameters:
generalSpec
-nameEngine
-- Returns:
-
extractPass
-
updateStateWhenEntering
-
updateStateWhenExiting
-
render
- Throws:
NameUnassignedException
-
hasExtent
boolean hasExtent() -
assignmentVariables
-
propertiesMap
-
propertiesMap
-
microSeconds
-
toIrpString
-
numberOfInfiniteRepeats
int numberOfInfiniteRepeats() -
weight
int weight() -
constant
-
evaluate
- Throws:
NameUnassignedException
-
decode
void decode(RecognizeData recognizeData, List<BitSpec> bitSpecStack, boolean isLast) throws SignalRecognitionException - Throws:
SignalRecognitionException
-
nonConstantBitFieldLength
boolean nonConstantBitFieldLength() -
guessParameterLength
Tries to infer the bit-length of the parameter with name as the argument.- Parameters:
name
- Name of parameter sought.- Returns:
- length if success, null if failure.
-
substituteConstantVariables
Returns 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.
-
createParameterSpecs
- Throws:
InvalidNameException
-