public final class NamedProtocol extends Protocol implements HasPreferOvers, Comparable<NamedProtocol>
Protocol class with a few more
properties, in particular a name. It corresponds to an entry in the protocol data
base IrpProtocols.xml.Protocol.ProtocolNotDecodableException, Protocol.ProtocolNotRenderableException| Constructor and Description |
|---|
NamedProtocol(String name,
String irp,
DocumentFragment documentation) |
NamedProtocol(String name,
String cName,
String irp,
DocumentFragment htmlDocumentation,
String frequencyTolerance,
String frequencyLower,
String frequencyUpper,
String absoluteTolerance,
String relativeTolerance,
String minimumLeadout,
String decodable,
String rejectRepeatless,
List<String> preferOver,
Map<String,List<String>> map) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkFrequency(Double frequency,
Decoder.DecoderParameters params) |
(package private) ItemCodeGenerator |
code(CodeGenerator codeGenerator,
Map<String,String> parameters,
Double absoluteTolerance,
Double relativeTolerance,
Double frequencyTolerance) |
int |
compareTo(NamedProtocol namedProtocol) |
void |
dumpPreferOvers(PrintStream out) |
void |
dumpPreferOvers(PrintStream out,
IrpDatabase irpDatabase) |
void |
dumpPreferOvers(PrintStream out,
IrpDatabase irpDatabase,
int level) |
boolean |
equals(Object obj) |
double |
getAbsoluteTolerance() |
double |
getAbsoluteTolerance(Double userValue,
boolean override) |
String |
getCName() |
DocumentFragment |
getDocumentation() |
double |
getFrequencyTolerance() |
double |
getFrequencyTolerance(Double userValue,
boolean override) |
double |
getMinimumLeadout() |
double |
getMinimumLeadout(Double userValue,
boolean override) |
String |
getName() |
(package private) List<PreferOver> |
getPreferOver() |
Set<String> |
getPreferOverNames()
Returns the prefer-overs.
|
double |
getRelativeTolerance() |
double |
getRelativeTolerance(Double userValue,
boolean override) |
int |
hashCode() |
boolean |
isDecodeable() |
boolean |
isRejectRepeats() |
Set<String> |
preferredOvers() |
Set<String> |
preferredOvers(IrpDatabase irpDatabase) |
Set<String> |
preferredOvers(IrpDatabase irpDatabase,
int level) |
Set<String> |
preferredOvers(Map<String,Long> params) |
Map<String,Long> |
recognize(IrSignal irSignal,
boolean strict)
This version overrides a version in
Protocol. |
Map<String,Long> |
recognize(IrSignal irSignal,
Decoder.DecoderParameters params) |
Decoder.Decode |
recognize(ModulatedIrSequence irSequence,
int beginPos,
Decoder.DecoderParameters params)
Tries to match the ModulatedIrSequence in the argument, if match, return the matching parameters.
|
IrSignal |
render(NameEngine nameEngine) |
Document |
toDocument() |
static Document |
toDocument(Iterable<NamedProtocol> protocols) |
Element |
toElement(Document document) |
Element |
toElement(Document document,
Double absoluteTolerance,
Double relativeTolerance,
Double frequencyTolerance,
boolean override) |
String |
toString() |
String |
toString(int radix) |
String |
toString(int radix,
String separator) |
String |
warningsString()
This is sort-of a version of classificationString, but for another audience.
|
allDurationsInMicros, classificationString, constantNonEmptySequence, constantSequence, getBitDirection, getBitspecIrstream, getDecoderName, getDefinitions, getDutyCycle, getFrequency, getFrequencyWithDefault, getGeneralSpec, getIrp, getMemoryVariable, getParameterDefault, getParameterMax, getParameterMin, getParameterSpecs, getUnit, guessParameterLength, hasExtent, hasMemoryVariable, hasNonStandardParameters, hasParameter, hasParameterDefault, hasParameterMemory, hasVariation, interleavingFlashOk, interleavingGapOk, interleavingOk, isBiphase, isEmpty, isPWM16, isPWM2, isPWM4, isRPlus, isSonyType, isTrivial, isTrivial, minDurationDiff, nonConstantBitFieldLength, normalBareIrStream, normalForm, normalFormElement, normalFormIrpString, normalFormProtocol, numberOfInfiniteRepeats, propertiesMap, randomParameters, randomParameters, recognize, recognize, recognize, recognize, removeDefaulteds, startsWithFlash, substituteConstantVariables, toIrpString, toIrpString, toIrpString, toIrpString, toIrSignal, toIrSignal, toModulatedIrSequence, toStringTree, toTreeViewer, warningFrequency, warningNonConstantLengthBitFields, warningNoParameterSpecs, warningRepeatPlus, warningsInterleaving, warningStartsWithFlash, warningTrivialBitspec, weightgetParseTree, numberOfBits, numberOfBitSpecs, prerender, propertiesMap, stateWhenEntering, stateWhenExiting, toIrpString, toStringTree, toStringTree, toTreeViewer, toTreeViewer, toTreeViewerpublic NamedProtocol(String name, String cName, String irp, DocumentFragment htmlDocumentation, String frequencyTolerance, String frequencyLower, String frequencyUpper, String absoluteTolerance, String relativeTolerance, String minimumLeadout, String decodable, String rejectRepeatless, List<String> preferOver, Map<String,List<String>> map) throws InvalidNameException, UnsupportedRepeatException, NameUnassignedException, IrpInvalidArgumentException
public NamedProtocol(String name, String irp, DocumentFragment documentation) throws InvalidNameException, UnsupportedRepeatException, NameUnassignedException, IrpInvalidArgumentException
public static Document toDocument(Iterable<NamedProtocol> protocols)
public Set<String> preferredOvers(IrpDatabase irpDatabase) throws InvalidNameException, UnsupportedRepeatException, IrpInvalidArgumentException, NameUnassignedException
public Set<String> preferredOvers(IrpDatabase irpDatabase, int level) throws UnsupportedRepeatException, IrpInvalidArgumentException, NameUnassignedException
public void dumpPreferOvers(PrintStream out)
public void dumpPreferOvers(PrintStream out, IrpDatabase irpDatabase)
public void dumpPreferOvers(PrintStream out, IrpDatabase irpDatabase, int level)
public Map<String,Long> recognize(IrSignal irSignal, boolean strict) throws SignalRecognitionException, Protocol.ProtocolNotDecodableException
Protocol. It uses protocol specific parameter values for
frequencyTolerance, absoluteTolerance, relativeTolerance,
and minimumLeadout, if defined.recognize in class ProtocolirSignal - strict - SignalRecognitionExceptionProtocol.ProtocolNotDecodableExceptionpublic Map<String,Long> recognize(IrSignal irSignal, Decoder.DecoderParameters params) throws Protocol.ProtocolNotDecodableException, SignalRecognitionException
recognize in class ProtocolProtocol.ProtocolNotDecodableExceptionSignalRecognitionExceptionpublic Decoder.Decode recognize(ModulatedIrSequence irSequence, int beginPos, Decoder.DecoderParameters params) throws SignalRecognitionException, Protocol.ProtocolNotDecodableException
irSequence - ModulatedIrSequence to be matchedbeginPos - Where the match is effectively started, normally 0.params - SignalRecognitionExceptionProtocol.ProtocolNotDecodableExceptionprotected void checkFrequency(Double frequency, Decoder.DecoderParameters params) throws SignalRecognitionException
checkFrequency in class ProtocolSignalRecognitionExceptionpublic String warningsString()
ProtocolwarningsString in class Protocolpublic IrSignal render(NameEngine nameEngine) throws DomainViolationException, NameUnassignedException, IrpInvalidArgumentException, InvalidNameException, Protocol.ProtocolNotRenderableException, OddSequenceLengthException
public String toString(int radix, String separator)
toString in interface HasPreferOverspublic String getName()
getName in interface HasPreferOverspublic String getCName()
public DocumentFragment getDocumentation()
public boolean isDecodeable()
public boolean isRejectRepeats()
public double getRelativeTolerance(Double userValue, boolean override) throws NumberFormatException
NumberFormatExceptionpublic double getAbsoluteTolerance(Double userValue, boolean override) throws NumberFormatException
NumberFormatExceptionpublic double getFrequencyTolerance(Double userValue, boolean override) throws NumberFormatException
NumberFormatExceptionpublic double getMinimumLeadout(Double userValue, boolean override) throws NumberFormatException
NumberFormatExceptionpublic double getRelativeTolerance()
public double getAbsoluteTolerance()
public double getFrequencyTolerance()
public double getMinimumLeadout()
List<PreferOver> getPreferOver()
public Set<String> getPreferOverNames()
HasPreferOversgetPreferOverNames in interface HasPreferOverspublic Document toDocument()
toDocument in interface XmlExporttoDocument in class IrpObjectpublic Element toElement(Document document, Double absoluteTolerance, Double relativeTolerance, Double frequencyTolerance, boolean override)
ItemCodeGenerator code(CodeGenerator codeGenerator, Map<String,String> parameters, Double absoluteTolerance, Double relativeTolerance, Double frequencyTolerance)
public int compareTo(NamedProtocol namedProtocol)
compareTo in interface Comparable<NamedProtocol>Copyright © 2020. All rights reserved.