Package org.harctoolbox.analyze
Class CleanerParser
java.lang.Object
org.harctoolbox.ircore.AbstractIrParser
org.harctoolbox.ircore.MultiParser
org.harctoolbox.analyze.CleanerParser
-
Constructor Summary
ConstructorDescriptionCleanerParser
(List<IrSignalParser> parsers, Iterable<? extends CharSequence> args, Double absoluteTolerance, Double relativeTolerance) CleanerParser
(List<IrSignalParser> parsers, String source, Double absoluteTolerance, Double relativeTolerance) -
Method Summary
Modifier and TypeMethodDescriptiontoIrSequence
(Double dummyGap) toIrSignal
(Double fallbackFrequency, Double dummyGap) Tries to interpret the string argument as one of our known formats, and return an IrSignal.toIrSignalChop
(Double fallbackFrequency, double threshold) toListChop
(double threshold, Double dummyGap) Equivalent to toIrSequence().chop(threshold);toModulatedIrSequence
(Double fallbackFrequency, Double dummyGap) Methods inherited from class org.harctoolbox.ircore.MultiParser
addParser, ircoreParsersList, newIrCoreParser, newIrCoreParser
Methods inherited from class org.harctoolbox.ircore.AbstractIrParser
fixIrRemoteSilliness, getSource, mkIrSignal, mkIrSignal, toIrSequence, toIrSignal, toIrSignal, toList, toList, toListChop, toModulatedIrSequence, toModulatedIrSequence, toString
-
Constructor Details
-
CleanerParser
public CleanerParser(List<IrSignalParser> parsers, String source, Double absoluteTolerance, Double relativeTolerance) -
CleanerParser
public CleanerParser(List<IrSignalParser> parsers, Iterable<? extends CharSequence> args, Double absoluteTolerance, Double relativeTolerance)
-
-
Method Details
-
getCleaner
-
toIrSequence
public IrSequence toIrSequence(Double dummyGap) throws OddSequenceLengthException, InvalidArgumentException - Overrides:
toIrSequence
in classMultiParser
- Throws:
OddSequenceLengthException
InvalidArgumentException
-
toList
public List<IrSequence> toList(Double dummmyGap) throws OddSequenceLengthException, InvalidArgumentException - Overrides:
toList
in classMultiParser
- Returns:
- Throws:
org.harctoolbox.ircore.OddSequenceLengthException
InvalidArgumentException
-
toListChop
public List<IrSequence> toListChop(double threshold, Double dummyGap) throws OddSequenceLengthException, InvalidArgumentException Description copied from class:AbstractIrParser
Equivalent to toIrSequence().chop(threshold);- Overrides:
toListChop
in classAbstractIrParser
- Returns:
- Throws:
OddSequenceLengthException
InvalidArgumentException
-
toModulatedIrSequence
public ModulatedIrSequence toModulatedIrSequence(Double fallbackFrequency, Double dummyGap) throws InvalidArgumentException - Overrides:
toModulatedIrSequence
in classMultiParser
- Throws:
InvalidArgumentException
-
toIrSignal
public IrSignal toIrSignal(Double fallbackFrequency, Double dummyGap) throws InvalidArgumentException Tries to interpret the string argument as one of our known formats, and return an IrSignal. Same as ProntoRawParser, but cleans up the IrSignal.- Overrides:
toIrSignal
in classMultiParser
- Parameters:
fallbackFrequency
- Modulation frequency to use, if it cannot be inferred from the first parameter.dummyGap
-- Returns:
- IrSignal, or null on failure.
- Throws:
InvalidArgumentException
-
toIrSignalChop
public IrSignal toIrSignalChop(Double fallbackFrequency, double threshold) throws OddSequenceLengthException, InvalidArgumentException - Overrides:
toIrSignalChop
in classAbstractIrParser
- Throws:
OddSequenceLengthException
InvalidArgumentException
-