diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-10-06 19:47:19 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-10-06 19:47:19 +0200 |
commit | 8736f6160aeafe7a177cb6143fea80157e174e52 (patch) | |
tree | c73d39eda0db5341875b0fac34cdc89c0961c94a /src/PhaseReference.h | |
parent | b563b465e8b3df367da7799e789d29e0009cb96a (diff) | |
download | dabmod-8736f6160aeafe7a177cb6143fea80157e174e52.tar.gz dabmod-8736f6160aeafe7a177cb6143fea80157e174e52.tar.bz2 dabmod-8736f6160aeafe7a177cb6143fea80157e174e52.zip |
Implement fixed-point symbols, FFT and file output
Diffstat (limited to 'src/PhaseReference.h')
-rw-r--r-- | src/PhaseReference.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/PhaseReference.h b/src/PhaseReference.h index 6ecdc4e..735009c 100644 --- a/src/PhaseReference.h +++ b/src/PhaseReference.h @@ -32,25 +32,33 @@ #include "ModPlugin.h" -#include <cstddef> -#include <complex> #include <vector> +#include <cstddef> + +template <typename T> +struct PhaseRefGen { + std::vector<T> dataIn; + void fillData(unsigned int dabmode, size_t carriers); + + private: + T convert(uint8_t data); +}; + class PhaseReference : public ModInput { public: - PhaseReference(unsigned int dabmode); + PhaseReference(unsigned int dabmode, bool fixedPoint); int process(Buffer* dataOut) override; const char* name() override { return "PhaseReference"; } protected: unsigned int d_dabmode; + bool d_fixedPoint; size_t d_carriers; - size_t d_num; - const static uint8_t d_h[4][32]; - std::vector<std::complex<float> > d_dataIn; - void fillData(); + PhaseRefGen<complexf> d_phaseRefCF32; + PhaseRefGen<complexfix> d_phaseRefFixed; }; |