Package org.harctoolbox.irp
Class ShortPronto
java.lang.Object
org.harctoolbox.ircore.Pronto
org.harctoolbox.irp.ShortPronto
Extends org.harctoolbox.ircore with functions for handling short Pronto format for the protocols rc5, rc5x, rc6, and nec1.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.harctoolbox.ircore.Pronto
Pronto.NonProntoFormatException
-
Field Summary
Fields inherited from class org.harctoolbox.ircore.Pronto
CHARS_IN_DIGIT, FREQUENCY_CONSTANT, FREQUENCY_INDEX, HEX_STRING_FORMAT, INTRO_LENGTH_INDEX, LEARNED_CODE, LEARNED_UNMODULATED_CODE, MIN_CCF_LENGTH, NUMBER_METADATA, REPEAT_LENGTH_INDEX, TYPE_INDEX
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
long2short
(String longString) Equivalent to parse(String) followed by parse(IrString).static IrSignal
parse
(int[] ccf) Creates a new IrSignals by interpreting its argument as CCF signal.static IrSignal
Creates a new IrSignals by interpreting its argument as CCF string.static String
Computes the "short" Pronto form of some signals, given by protocol number and parameter values.static String
Computes the "short" Pronto form of some signals, if possible,.static String
Computes the "short" Pronto form of some signals, if possible,.Methods inherited from class org.harctoolbox.ircore.Pronto
formatInteger, frequency, frequencyCode, main, parse, parse, parse, parseAsInts, parseAsInts, parseAsInts, parseLoose, pulses, pulsesMicroSeconds, pulseTime, toArray, toString
-
Method Details
-
parse
Creates a new IrSignals by interpreting its argument as CCF signal.- Parameters:
ccf
- CCF signal as array of integers- Returns:
- IrSignal
- Throws:
OddSequenceLengthException
InvalidArgumentException
-
long2short
public static String long2short(String longString) throws InvalidArgumentException, Pronto.NonProntoFormatException Equivalent to parse(String) followed by parse(IrString).- Parameters:
longString
-- Returns:
- Throws:
InvalidArgumentException
Pronto.NonProntoFormatException
-
parse
public static IrSignal parse(String hexstring) throws InvalidArgumentException, Pronto.NonProntoFormatException Creates a new IrSignals by interpreting its argument as CCF string.- Parameters:
hexstring
- String in Pronto hex format- Returns:
- IrSignal
- Throws:
InvalidArgumentException
Pronto.NonProntoFormatException
-
toString
public static String toString(String protocolName, Long D, Long S, Long F) throws InvalidArgumentException Computes the "short" Pronto form of some signals, given by protocol number and parameter values.- Parameters:
protocolName
- Name of protocol, presently "rc5", "rc5x", "rc6", and "nec1" are recognized.D
- As in protocol definitionS
- As in protocol definitionF
- As in protocol definition- Returns:
- CCF as string, or null on failure.
- Throws:
InvalidArgumentException
-
toString
Computes the "short" Pronto form of some signals, if possible,.- Parameters:
irSignal
-fallback
- If true, if no short form, return the long form, otherwise null.- Returns:
- CCF as string, or null on failure.
-
toString
Computes the "short" Pronto form of some signals, if possible,.- Parameters:
irSignal
-- Returns:
- CCF as string, or null on failure.
-