Infrared4Arduino 1.2.3
Loading...
Searching...
No Matches
Static Public Member Functions | Static Public Attributes | List of all members
Pronto Class Reference

Static class consisting of functions for parsing a Pronto Hex string (like 0000 006C 0022 0002 015B 00AD ...) into an IrSignal, and vice versa. More...

#include <Pronto.h>

Static Public Member Functions

static IrSignalparse (const uint16_t *data, size_t size)
 Function for parsing its input data into an IrSignal. More...
 
static IrSignalparse (const char *str)
 Function for parsing its input data into an IrSignal. More...
 
static IrSignalparse_PF (const uint_farptr_t str)
 Function for parsing its input data into an IrSignal. More...
 
static IrSignalparse_PF (const char *ptr)
 
static IrSignalparse (const __FlashStringHelper *str)
 Function for parsing its input data into an IrSignal. More...
 
static char * toProntoHex (const IrSignal &irSignal)
 Function for generating a Pronto Hex string from the argument. More...
 
static char * toProntoHex (const IrSequence &introSequence, const IrSequence &repeatSequence=IrSequence::emptyInstance, frequency_t frequency=IrSignal::defaultFrequency)
 Function for generating a Pronto Hex string from the arguments. More...
 
static char * toProntoHex (const microseconds_t *introData, size_t introLength, frequency_t frequency=IrSignal::defaultFrequency)
 Function for generating a Pronto Hex string from the arguments. More...
 
static char * toProntoHex (const microseconds_t *introData, size_t introLength, const microseconds_t *repeatData=nullptr, size_t repeatLength=0, frequency_t frequency=IrSignal::defaultFrequency)
 Function for generating a Pronto Hex string from the arguments. More...
 
static void dump (Stream &stream, const IrSignal &irSignal)
 Function for printing data as Pronto Hex string on the stream given as argument. More...
 
static void dump (Stream &stream, const IrSequence &introSequence, const IrSequence &repeatSequence=IrSequence::emptyInstance, frequency_t frequency=IrSignal::defaultFrequency)
 Function for printing data as Pronto Hex string on the stream given as argument. More...
 
static void dump (Stream &stream, const microseconds_t *introData, size_t introLength, const microseconds_t *repeatData=nullptr, size_t repeatLength=0, frequency_t frequency=IrSignal::defaultFrequency)
 Function for printing data as Pronto Hex string on the stream given as argument. More...
 

Static Public Attributes

static constexpr unsigned int digitsInProntoNumber = 4U
 
static constexpr unsigned int numbersInPreamble = 4U
 

Detailed Description

Static class consisting of functions for parsing a Pronto Hex string (like 0000 006C 0022 0002 015B 00AD ...) into an IrSignal, and vice versa.

Reference.

Note: Unless you have "infinitely much" memory, it is a very bad idea to put Pronto Hex in your source files. Better is to use, for example IrScruitinizer to convert the signals offline, and put the converted version in your source files instead.

Definition at line 20 of file Pronto.h.

Member Function Documentation

◆ dump() [1/3]

static void Pronto::dump ( Stream &  stream,
const IrSequence introSequence,
const IrSequence repeatSequence = IrSequence::emptyInstance,
frequency_t  frequency = IrSignal::defaultFrequency 
)
inlinestatic

Function for printing data as Pronto Hex string on the stream given as argument.

Parameters
streamStream on which to write
introSequence
repeatSequence
frequency

Definition at line 171 of file Pronto.h.

◆ dump() [2/3]

static void Pronto::dump ( Stream &  stream,
const IrSignal irSignal 
)
inlinestatic

Function for printing data as Pronto Hex string on the stream given as argument.

Parameters
streamStream on which to write
irSignal

Definition at line 159 of file Pronto.h.

◆ dump() [3/3]

void Pronto::dump ( Stream &  stream,
const microseconds_t introData,
size_t  introLength,
const microseconds_t repeatData = nullptr,
size_t  repeatLength = 0,
frequency_t  frequency = IrSignal::defaultFrequency 
)
static

Function for printing data as Pronto Hex string on the stream given as argument.

Parameters
stream
introData
introLength
repeatData
repeatLength
frequency

Definition at line 154 of file Pronto.cpp.

◆ parse() [1/3]

IrSignal * Pronto::parse ( const __FlashStringHelper *  str)
static

Function for parsing its input data into an IrSignal.

The ending sequence will always be empty.

Parameters
strText string containing a Pronto form signal. This form handles the F(...) form. Available only on platforms implementing the str*_PF functions.
Returns
IrSignal

Definition at line 66 of file Pronto.cpp.

◆ parse() [2/3]

IrSignal * Pronto::parse ( const char *  str)
static

Function for parsing its input data into an IrSignal.

The ending sequence will always be empty.

Parameters
strText string containing a Pronto form signal.
Returns
IrSignal

Definition at line 34 of file Pronto.cpp.

◆ parse() [3/3]

IrSignal * Pronto::parse ( const uint16_t *  data,
size_t  size 
)
static

Function for parsing its input data into an IrSignal.

The ending sequence will always be empty.

Parameters
dataNumerical data, the number in the Pronto form.
sizeNumber of data points.
Returns
IrSignal

Definition at line 10 of file Pronto.cpp.

◆ parse_PF() [1/2]

IrSignal * Pronto::parse_PF ( const char *  ptr)
static

Definition at line 62 of file Pronto.cpp.

◆ parse_PF() [2/2]

IrSignal * Pronto::parse_PF ( const uint_farptr_t  str)
static

Function for parsing its input data into an IrSignal.

The ending sequence will always be empty.

Parameters
strText string containing a Pronto form signal.
Returns
IrSignal

Definition at line 55 of file Pronto.cpp.

◆ toProntoHex() [1/4]

static char * Pronto::toProntoHex ( const IrSequence introSequence,
const IrSequence repeatSequence = IrSequence::emptyInstance,
frequency_t  frequency = IrSignal::defaultFrequency 
)
inlinestatic

Function for generating a Pronto Hex string from the arguments.

Parameters
introSequence
repeatSequence
frequency
Returns
Zero terminated string. Has been generated by new[], and must be manually delete[]-d by the user.

Definition at line 126 of file Pronto.h.

◆ toProntoHex() [2/4]

static char * Pronto::toProntoHex ( const IrSignal irSignal)
inlinestatic

Function for generating a Pronto Hex string from the argument.

Parameters
irSignal
Returns
Zero terminated string. Has been generated by new[], and must be manually delete[]-d by the user.

Definition at line 114 of file Pronto.h.

◆ toProntoHex() [3/4]

char * Pronto::toProntoHex ( const microseconds_t introData,
size_t  introLength,
const microseconds_t repeatData = nullptr,
size_t  repeatLength = 0,
frequency_t  frequency = IrSignal::defaultFrequency 
)
static

Function for generating a Pronto Hex string from the arguments.

Parameters
introData
introLength
repeatData
repeatLength
frequency
Returns
Zero terminated string. Has been generated by new[], and must be manually delete[]-d by the user.

Definition at line 144 of file Pronto.cpp.

◆ toProntoHex() [4/4]

static char * Pronto::toProntoHex ( const microseconds_t introData,
size_t  introLength,
frequency_t  frequency = IrSignal::defaultFrequency 
)
inlinestatic

Function for generating a Pronto Hex string from the arguments.

Parameters
introData
introLength
frequency
Returns
Zero terminated string. Has been generated by new[], and must be manually delete[]-d by the user.

Definition at line 138 of file Pronto.h.

Member Data Documentation

◆ digitsInProntoNumber

constexpr unsigned int Pronto::digitsInProntoNumber = 4U
staticconstexpr

Definition at line 22 of file Pronto.h.

◆ numbersInPreamble

constexpr unsigned int Pronto::numbersInPreamble = 4U
staticconstexpr

Definition at line 23 of file Pronto.h.


The documentation for this class was generated from the following files: