atMETEO
An ATmega based weather station
|
Sensors::Demodulator transforms continuous streams with pulse widths (for example from RF receivers) into bits. More...
Files | |
file | demodulator.h |
Sensors::Demodulator transforms continuous streams with pulse widths (for example from RF receivers) into bits. | |
Classes | |
struct | Sensors::BiphaseMark< TShortMin, TShortMax, TLongMin, TLongMax > |
Configuration parameter for Demodulator that enables Biphase Mark demodulation. More... | |
class | Sensors::DemodulatorBase< Demodulator > |
Demodulator base implementation. More... | |
class | Sensors::Demodulator< TDemodulatorType > |
Transforms continuous streams with pulse widths (for example from RF receivers) into bits. More... | |
Enumerations | |
enum | Sensors::DemodulatorStatus : uint8_t { Sensors::DemodulatorStatus::Complete = 0, Sensors::DemodulatorStatus::Incomplete, Sensors::DemodulatorStatus::OutOfRangeError } |
Demodulator status returned from DemodulatorBase::addPulseWidth. More... | |
Sensors::Demodulator transforms continuous streams with pulse widths (for example from RF receivers) into bits.
struct Sensors::BiphaseMark |
Configuration parameter for Demodulator that enables Biphase Mark demodulation.
TShortMin | The minimum width of a pulse recognized as a short pulse. |
TShortMax | The maximum width of a pulse recognized as a short pulse. (TShortMin <= TShortMax ) |
TLongMin | The minimum width of a pulse recognized as a long pulse. (TShortMax <= TLongMin ) |
TLongMax | The maximum width of a pulse recognized as a long pulse. (TLongMin <= TLongMax ) |
class Sensors::DemodulatorBase |
Demodulator base implementation.
Public Member Functions | |
DemodulatorStatus | addPulseWidth (uint16_t pulseWidth) |
Adds the pulseWidth value to the Demodulator state. More... | |
bool | getData () const |
Returns the converted data. More... | |
void | reset () |
Resets the demodulator state. More... | |
|
inline |
Adds the pulseWidth
value to the Demodulator state.
pulseWidth | Pulse width to add. |
|
inline |
Returns the converted data.
|
inline |
Resets the demodulator state.
This method typically needs to be called when addPulseWidth() returned the status DemodulatorStatus::OutOfRangeError so that a fresh demodulator run starts.
class Sensors::Demodulator |
Transforms continuous streams with pulse widths (for example from RF receivers) into bits.
Usage:
TDemodulatorType | The demodulation algorithm to apply (for example BiphaseMark). |
Additional Inherited Members | |
![]() | |
DemodulatorStatus | addPulseWidth (uint16_t pulseWidth) |
Adds the pulseWidth value to the Demodulator state. More... | |
bool | getData () const |
Returns the converted data. More... | |
void | reset () |
Resets the demodulator state. More... | |
|
strong |
Demodulator status returned from DemodulatorBase::addPulseWidth.
Enumerator | |
---|---|
Complete | The Demodulator data is complete. The decoded bit can be accessed using Demodulator::getData(). |
Incomplete | The Demodulator data is incomplete. More pulse widths have to be added using Demodulator::addPulseWidth() before the data can be accessed. |
OutOfRangeError | The added pulse width is out of the specified range. This indicates that the received data is erroneous. Typically Demodulator::reset() needs to be called to start a fresh demodulator run. |