|
atMETEO
An ATmega based weather station
|
Sensors::BitDecoder transforms continuous bit streams (for example from RF demodulation) into bytes. More...
Files | |
| file | bitdecoder.h |
| Sensors::BitDecoder transforms continuous bit streams (for example from RF demodulation) into bytes. | |
Classes | |
| struct | Sensors::MsbBitNumbering< T > |
| Configuration parameter for BitDecoder that leads to new bits being added with MSB bit numbering (most significant bit first). More... | |
| struct | Sensors::LsbBitNumbering< T > |
| Configuration parameter for BitDecoder that leads to new bits being added with LSB bit numbering (least significant bit first). More... | |
| struct | Sensors::NoParity< T > |
| Configuration parameter for BitDecoder that disables parity checking. More... | |
| struct | Sensors::EvenParity< T > |
| Configuration parameter for BitDecoder that enables even parity checking. More... | |
| struct | Sensors::OddParity< T > |
| Configuration parameter for BitDecoder that enables odd parity checking. More... | |
| class | Sensors::BitDecoderBase< T, BitDecoder > |
| BitDecoder base implementation. More... | |
| class | Sensors::BitDecoder< T, TParity, TBitNumbering > |
| Applies bit numbering and a parity method to transform continuous bit streams (for example from RF demodulation) into bytes. More... | |
Typedefs | |
| template<template< typename > class TParity, template< typename > class TBitNumbering> | |
| using | Sensors::ByteDecoder = BitDecoder< uint8_t, TParity, TBitNumbering > |
| A ByteDecoder is a BitDecoder operating on a single data byte. More... | |
Enumerations | |
| enum | Sensors::BitDecoderStatus : uint8_t { Sensors::BitDecoderStatus::Complete = 0, Sensors::BitDecoderStatus::Incomplete, Sensors::BitDecoderStatus::ParityError } |
| BitDecoder status returned from BitDecoder::addBit(). More... | |
Sensors::BitDecoder transforms continuous bit streams (for example from RF demodulation) into bytes.
| struct Sensors::MsbBitNumbering |
Configuration parameter for BitDecoder that leads to new bits being added with MSB bit numbering (most significant bit first).
| struct Sensors::LsbBitNumbering |
Configuration parameter for BitDecoder that leads to new bits being added with LSB bit numbering (least significant bit first).
| struct Sensors::NoParity |
Configuration parameter for BitDecoder that disables parity checking.
| struct Sensors::EvenParity |
Configuration parameter for BitDecoder that enables even parity checking.
| struct Sensors::OddParity |
Configuration parameter for BitDecoder that enables odd parity checking.
| class Sensors::BitDecoderBase |
BitDecoder base implementation.
Public Member Functions | |
| BitDecoderStatus | addBit (bool value) |
Adds the bit value to the BitDecoder state. More... | |
| T | getData () const |
| Returns the converted data. More... | |
| void | reset () |
| Resets the decoder state. More... | |
|
inline |
Adds the bit value to the BitDecoder state.
| value | Bit value to add. |
value.
|
inline |
Returns the converted data.
|
inline |
Resets the decoder state.
This method typically needs to be called when addBit() returned the status BitDecoderStatus::ParityError so that a fresh decoder run starts.
| class Sensors::BitDecoder |
Applies bit numbering and a parity method to transform continuous bit streams (for example from RF demodulation) into bytes.
Usage:
| T | The data type to convert to (for example uint8_t or uint16_t). |
| TParity | The parity algorithm to be applied (NoParity, EvenParity, OddParity). |
| TBitNumbering | The bit numbering to be applied (MsbBitNumbering, LsbBitNumbering). |
Additional Inherited Members | |
Public Member Functions inherited from Sensors::BitDecoderBase< T, BitDecoder< T, TParity, TBitNumbering > > | |
| BitDecoderStatus | addBit (bool value) |
Adds the bit value to the BitDecoder state. More... | |
| T | getData () const |
| Returns the converted data. More... | |
| void | reset () |
| Resets the decoder state. More... | |
| using Sensors::ByteDecoder = typedef BitDecoder<uint8_t, TParity, TBitNumbering> |
A ByteDecoder is a BitDecoder operating on a single data byte.
|
strong |
BitDecoder status returned from BitDecoder::addBit().
| Enumerator | |
|---|---|
| Complete | The BitDecoder data is complete. The decoded data can be accessed using BitDecoder::getData(). |
| Incomplete | The BitDecoder data is incomplete. More bits have to be added using BitDecoder::addBit() before the data can be accessed. |
| ParityError | The parity bit in the BitDecoder data is incorrect. Typically BitDecoder::reset() needs to be called to start a fresh decoder run. |
1.8.13