diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-02-05 15:13:19 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-02-05 15:13:19 +0100 |
commit | 05d2210e4336dc98966683b6e725c65e729b7216 (patch) | |
tree | 9fa1ced79cc79cacd3b360d3a9beb09effc93257 /src/TII.h | |
parent | af8fb6c3210f3c3923cdfe8660687f8a330dd6b2 (diff) | |
download | dabmod-05d2210e4336dc98966683b6e725c65e729b7216.tar.gz dabmod-05d2210e4336dc98966683b6e725c65e729b7216.tar.bz2 dabmod-05d2210e4336dc98966683b6e725c65e729b7216.zip |
Review TII phase definition
Diffstat (limited to 'src/TII.h')
-rw-r--r-- | src/TII.h | 23 |
1 files changed, 11 insertions, 12 deletions
@@ -43,11 +43,9 @@ struct tii_config_t { - tii_config_t() : enable(false), comb(0), pattern(0), old_variant(false) {} - - bool enable; - int comb; - int pattern; + bool enable = false; + int comb = 0; + int pattern = 0; /* EN 300 401 clause 14.8 describes how to generate the TII signal, and * defines z_{m,0,k}: @@ -69,7 +67,7 @@ struct tii_config_t * The option 'old_variant' allows the user to choose between this * old incorrect implementation and the new conforming one. */ - bool old_variant; + bool old_variant = false; }; class TIIError : public std::runtime_error { @@ -96,11 +94,11 @@ class TII : public ModCodec, public RemoteControllable const std::string& parameter) const; protected: - // Fill m_enabled_carriers with the correct carriers for the pattern/comb + // Fill m_Acp with the correct carriers for the pattern/comb // combination void prepare_pattern(void); - // prerequisites: calling thread must hold m_enabled_carriers mutex + // prerequisites: calling thread must hold m_Acp mutex void enable_carrier(int k); // Configuration settings @@ -116,12 +114,13 @@ class TII : public ModCodec, public RemoteControllable std::string m_name; - // m_enabled_carriers is read by modulator thread, and written + // m_Acp is read by modulator thread, and written // to by RC thread. mutable std::mutex m_enabled_carriers_mutex; - // m_enabled_carriers is true only for the first carrier in the - // active pair - std::vector<bool> m_enabled_carriers; + // m_Acp corresponds to the A_{c,p}(k) function from the spec, except + // that the leftmost carrier is at index 0, and not at -m_carriers/2 like + // in the spec. + std::vector<bool> m_Acp; }; |