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.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.
|
static String |
getDebugProtocolRegExp() |
(package private) Collection<NamedProtocol> |
getParsedProtocols()
Basically for testing; therefore package private.
|
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
IrpParseExceptionpublic Decoder()
throws IrpParseException,
IOException
IrpParseExceptionIOExceptionpublic Decoder(String... names) throws IOException, IrpParseException
names - IOExceptionIrpParseExceptionpublic 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.IrpParseExceptionpublic 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)
Collection<NamedProtocol> getParsedProtocols()
Copyright © 2019. All rights reserved.