|
Arduino PulseWire Transceiver Library
|
Custom Manchester preamble detector: run-in of alternating edges plus unique start pulse. More...
#include <Preamble.h>


Public Member Functions | |
| ManchesterPreamble (uint8_t runInCycles=2) | |
| bool | begin (uint16_t bitFrequencyHz) override |
| void | setEdges (const pulsewire::Vector< pulsewire::OutputEdge > &edges) |
| void | addEdge (const pulsewire::OutputEdge &edge) |
| void | addEdge (bool level, uint32_t pulseUs) |
| void | addEdge (bool level, uint16_t pulseCount, uint32_t frequencyHz) |
| void | clear () |
| int | getEdges (Vector< OutputEdge > &output) const override |
| Returns the expected preamble edges for this protocol. | |
| size_t | preambleLength () const override |
| 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 |
Custom Manchester preamble detector: run-in of alternating edges plus unique start pulse.
This preamble consists of several cycles of alternating HIGH/LOW pulses (run-in), followed by a unique longer start pulse. This pattern is highly reliable for Manchester encoding, as it provides both clock synchronization and a unique start marker that cannot occur in normal Manchester data. The detector is efficient: it only needs to check the last N edges for the pattern, minimizing processing time.
Example (bitPeriod = 500us, runInCycles = 4): [HIGH 500us, LOW 500us, HIGH 500us, LOW 500us, HIGH 500us, LOW 500us, HIGH 500us, LOW 500us, HIGH 1000us]
Definition at line 202 of file Preamble.h.
|
inline |
Definition at line 204 of file Preamble.h.
|
inlineinherited |
Definition at line 142 of file Preamble.h.
Definition at line 138 of file Preamble.h.
|
inlineinherited |
Definition at line 137 of file Preamble.h.
Reimplemented from pulsewire::Preamble.
Definition at line 206 of file Preamble.h.
|
inlineinherited |
Definition at line 147 of file Preamble.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.
|
inlineoverridevirtualinherited |
Returns the expected preamble edges for this protocol.
Implements pulsewire::Preamble.
Definition at line 148 of file Preamble.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.
|
inlineoverridevirtualinherited |
Implements pulsewire::Preamble.
Definition at line 154 of file Preamble.h.
|
inlineinherited |
Definition at line 49 of file Preamble.h.
|
inlineinherited |
Definition at line 134 of file Preamble.h.
|
protectedinherited |
Definition at line 102 of file Preamble.h.
|
protectedinherited |
Definition at line 101 of file Preamble.h.