|
Arduino PulseWire Transceiver Library
|
IRProtocol: Represents a specific IR protocol with all its parameters. More...
#include <IRProtocol.h>


Public Member Functions | |
| IRProtocol (IRProtocolEnum proto, CodecEnum codecType, uint32_t frequency, size_t dataLength, uint32_t shortPulse, uint32_t longPulse, uint32_t tolerance, Vector< OutputEdge > edges) | |
| void | begin (IRProtocolEnum proto, uint32_t frequency, size_t dataLength, uint32_t shortPulse, uint32_t longPulse, uint32_t tolerance, Vector< OutputEdge > edges, CodecEnum codecType=CodecEnum::PulseDistance) |
| Set all fields for this IR protocol, including preamble edges. | |
| void | copyFrom (const IRProtocol &other) |
| Copy all fields from another IRProtocol instance. | |
| virtual IRProtocolEnum | getProtocolID () const |
| Returns the protocol enum identifier for this IR protocol. | |
| const char * | name () const |
| virtual int | getEdges (Vector< OutputEdge > &output) const override |
| Returns the preamble edges for this protocol. | |
| virtual size_t | preambleLength () const override |
| Returns the number of edges in the preamble. | |
| virtual uint32_t | frequency () const |
| Returns the carrier frequency in Hz. | |
| virtual size_t | dataLength () const |
| Returns the expected data length in bytes (not including preamble) | |
| virtual uint32_t | shortPulseUs () const |
| Returns the duration of the short pulse in microseconds. | |
| virtual uint32_t | longPulseUs () const |
| Returns the duration of the long pulse in microseconds. | |
| virtual uint32_t | toleranceUs () const |
| Tolerance in microseconds for pulse duration matching during detection. | |
| virtual Codec & | codec () |
| Provides the codec associated with this protocol. | |
| virtual bool | begin (uint16_t bitFrequencyHz) |
| void | reset () |
| virtual bool | detect (const OutputEdge &edge) |
| Detects if the incoming edge matches the expected preamble pattern. | |
| bool | inRange (uint32_t value, uint32_t target, uint32_t tolerance) const |
Protected Attributes | |
| pulsewire::Vector< pulsewire::OutputEdge > | _history |
| pulsewire::Vector< pulsewire::OutputEdge > | _expected |
IRProtocol: Represents a specific IR protocol with all its parameters.
Use one of the predefined static instances for common protocols:
Definition at line 124 of file IRProtocol.h.
|
inline |
Definition at line 127 of file IRProtocol.h.
|
inline |
Definition at line 140 of file IRProtocol.h.
|
inline |
Set all fields for this IR protocol, including preamble edges.
Definition at line 148 of file IRProtocol.h.
Definition at line 44 of file Preamble.h.
Provides the codec associated with this protocol.
Definition at line 205 of file IRProtocol.h.
|
inline |
Copy all fields from another IRProtocol instance.
Definition at line 165 of file IRProtocol.h.
Returns the expected data length in bytes (not including preamble)
Reimplemented in pulsewire::IRMultiProtocol.
Definition at line 197 of file IRProtocol.h.
|
inlinevirtualinherited |
Detects if the incoming edge matches the expected preamble pattern.
Reimplemented in pulsewire::IRMultiProtocol, and pulsewire::NoPreamble.
Definition at line 52 of file Preamble.h.
Returns the carrier frequency in Hz.
Reimplemented in pulsewire::IRMultiProtocol.
Definition at line 195 of file IRProtocol.h.
|
inlineoverridevirtual |
Returns the preamble edges for this protocol.
Implements pulsewire::Preamble.
Reimplemented in pulsewire::IRMultiProtocol.
Definition at line 185 of file IRProtocol.h.
|
inlinevirtual |
Returns the protocol enum identifier for this IR protocol.
Reimplemented in pulsewire::IRMultiProtocol.
Definition at line 180 of file IRProtocol.h.
|
inlineinherited |
Utility function to check if a value is within a specified tolerance range of a target
Definition at line 95 of file Preamble.h.
Returns the duration of the long pulse in microseconds.
Reimplemented in pulsewire::IRMultiProtocol.
Definition at line 201 of file IRProtocol.h.
Definition at line 182 of file IRProtocol.h.
Returns the number of edges in the preamble.
Implements pulsewire::Preamble.
Reimplemented in pulsewire::IRMultiProtocol.
Definition at line 193 of file IRProtocol.h.
|
inlineinherited |
Definition at line 49 of file Preamble.h.
Returns the duration of the short pulse in microseconds.
Reimplemented in pulsewire::IRMultiProtocol.
Definition at line 199 of file IRProtocol.h.
Tolerance in microseconds for pulse duration matching during detection.
Reimplemented in pulsewire::IRMultiProtocol.
Definition at line 203 of file IRProtocol.h.
|
protectedinherited |
Definition at line 102 of file Preamble.h.
|
protectedinherited |
Definition at line 101 of file Preamble.h.