public final class Decoder extends Object
decode
, operating
on IrSignal
or ModulatedIrSequence
respectively.
These have slightly different semantics.Modifier and Type | Class and Description |
---|---|
static class |
Decoder.AbstractDecodesCollection<T extends ElementaryDecode> |
static class |
Decoder.Decode |
static class |
Decoder.DecoderParameters |
static class |
Decoder.DecodeTree |
static class |
Decoder.SimpleDecodesSet |
static class |
Decoder.TrunkDecodeTree |
Constructor and Description |
---|
Decoder() |
Decoder(IrpDatabase irpDatabase) |
Decoder(IrpDatabase irpDatabase,
List<String> names)
This is the main constructor.
|
Decoder(String... names)
Mainly for testing and debugging.
|
Modifier and Type | Method and Description |
---|---|
Decoder.DecodeTree |
decode(ModulatedIrSequence irSequence,
Decoder.DecoderParameters params)
Delivers a List of Map of Decodes from a ModulatedIrSequence.
|
Decoder.SimpleDecodesSet |
decodeIrSignal(IrSignal irSignal) |
Decoder.SimpleDecodesSet |
decodeIrSignal(IrSignal irSignal,
Decoder.DecoderParameters parameters)
Delivers a Map of Decodes from an IrSignal.
|
Decoder.AbstractDecodesCollection<? extends ElementaryDecode> |
decodeLoose(IrSignal irSignal,
Decoder.DecoderParameters decoderParams) |
static String |
getDebugProtocolRegExp() |
static void |
main(String[] args)
Allows to invoke the decoding from the command line.
|
static void |
setDebugProtocolRegExp(String regexp)
For debugging only.
|
public Decoder(IrpDatabase irpDatabase) throws IrpParseException
IrpParseException
public Decoder() throws IrpParseException, IOException, SAXException
IrpParseException
IOException
SAXException
public Decoder(String... names) throws IOException, IrpParseException, SAXException
names
- IOException
IrpParseException
SAXException
public Decoder(IrpDatabase irpDatabase, List<String> names) throws IrpParseException
irpDatabase
- will be expanded.names
- If non-null and non-empty, include only the protocols with these names.IrpParseException
public static void setDebugProtocolRegExp(String regexp)
regexp
- public static String getDebugProtocolRegExp()
public static void main(String[] args)
args
- Pronto hex type IR signal.public Decoder.DecodeTree decode(ModulatedIrSequence irSequence, Decoder.DecoderParameters params)
irSequence
- params
- public Decoder.SimpleDecodesSet decodeIrSignal(IrSignal irSignal, Decoder.DecoderParameters parameters)
strict == true
, the intro, repeat, and ending sequences are required to match exactly.
Otherwise, the irSignal's intro may match a Protocol's repeat, and a missing ending sequence is considered
to match a Protocol's non-empty ending. on return, a dictionary (Map) is returned, containing all possible decodes of the given
input signal.
Unless allDecodes == true
, decodes are eliminated from this list according to the
NamedProtocol's prefer-over
property.irSignal
- Input dataparameters
- public Decoder.SimpleDecodesSet decodeIrSignal(IrSignal irSignal)
public Decoder.AbstractDecodesCollection<? extends ElementaryDecode> decodeLoose(IrSignal irSignal, Decoder.DecoderParameters decoderParams)
Copyright © 2020. All rights reserved.