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) |
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
public 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 IrpObjectItemCodeGenerator code(CodeGenerator codeGenerator, Map<String,String> parameters, Double absoluteTolerance, Double relativeTolerance, Double frequencyTolerance)
public int compareTo(NamedProtocol namedProtocol)
compareTo in interface Comparable<NamedProtocol>public HasPreferOvers getDecode()
getDecode in interface HasPreferOversCopyright © 2019. All rights reserved.