|
Arduino PulseWire Transceiver Library
|
Abstract base class for preamble detection and generation. More...
#include <Preamble.h>


Public Member Functions | |
| virtual bool | begin (uint16_t bitFrequencyHz) |
| void | reset () |
| virtual bool | detect (const OutputEdge &edge) |
| Detects if the incoming edge matches the expected preamble pattern. | |
| virtual int | getEdges (pulsewire::Vector< pulsewire::OutputEdge > &output) const =0 |
| Returns the expected preamble edges for this protocol. | |
| virtual size_t | preambleLength () const =0 |
| bool | inRange (uint32_t value, uint32_t target, uint32_t tolerance) const |
Protected Attributes | |
| pulsewire::Vector< pulsewire::OutputEdge > | _history |
| pulsewire::Vector< pulsewire::OutputEdge > | _expected |
Abstract base class for preamble detection and generation.
Provides an interface for detecting protocol-specific preambles in incoming pulse streams and generating preamble edges for transmission. This allows Codec classes to use different preamble detection strategies without coupling to specific implementations.
Definition at line 40 of file Preamble.h.
Definition at line 44 of file Preamble.h.
|
inlinevirtual |
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.
|
pure virtual |
Returns the expected preamble edges for this protocol.
Implemented in pulsewire::NoPreamble, pulsewire::IRProtocol, pulsewire::IRMultiProtocol, and pulsewire::CustomPreambleUs.
|
inline |
Utility function to check if a value is within a specified tolerance range of a target
Definition at line 95 of file Preamble.h.
Implemented in pulsewire::IRProtocol, and pulsewire::IRMultiProtocol.
|
inline |
Definition at line 49 of file Preamble.h.
|
protected |
Definition at line 102 of file Preamble.h.
|
protected |
Definition at line 101 of file Preamble.h.