diff options
author | Matthias P. Braendli (think) <matthias@mpb.li> | 2012-09-04 15:18:20 +0200 |
---|---|---|
committer | Matthias P. Braendli (think) <matthias@mpb.li> | 2012-09-04 15:18:20 +0200 |
commit | d02e2ecc13a741fac7d5a0ce65acaa0ecd3a621c (patch) | |
tree | f8fa1162a6943b53dc90b78ced504b4f3b4ecf8d /src/OutputUHD.h | |
parent | c84de18fa8448c76426c60257c7ae8dac72a4039 (diff) | |
download | dabmod-d02e2ecc13a741fac7d5a0ce65acaa0ecd3a621c.tar.gz dabmod-d02e2ecc13a741fac7d5a0ce65acaa0ecd3a621c.tar.bz2 dabmod-d02e2ecc13a741fac7d5a0ce65acaa0ecd3a621c.zip |
crc-dabmod: added clock_config parameters to configuration file
Diffstat (limited to 'src/OutputUHD.h')
-rw-r--r-- | src/OutputUHD.h | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/src/OutputUHD.h b/src/OutputUHD.h index b7e570a..6bffe04 100644 --- a/src/OutputUHD.h +++ b/src/OutputUHD.h @@ -82,6 +82,7 @@ struct UHDWorkerFrameData { uint32_t fct; }; +enum refclk_lock_loss_behaviour_t { CRASH, IGNORE }; struct UHDWorkerData { uhd::usrp::multi_usrp::sptr myUsrp; @@ -108,6 +109,9 @@ struct UHDWorkerData { // A barrier to synchronise the two threads shared_ptr<barrier> sync_barrier; + // What to do when the reference clock PLL loses lock + refclk_lock_loss_behaviour_t refclk_lock_loss_behaviour; + // The common logger Logger* logger; }; @@ -141,15 +145,33 @@ class UHDWorker { uhd::tx_streamer::sptr myTxStream; }; +/* This structure is used as initial configuration for OutputUHD */ +struct OutputUHDConfig { + const char* device; + unsigned sampleRate; + double frequency; + int txgain; + bool enableSync; + bool muteNoTimestamps; + + /* allowed values : auto, int, sma, mimo */ + std::string refclk_src; + + /* allowed values : int, sma, mimo */ + std::string pps_src; + + /* allowed values : pos, neg */ + std::string pps_polarity; + + /* What to do when the reference clock PLL loses lock */ + refclk_lock_loss_behaviour_t refclk_lock_loss_behaviour; +}; + class OutputUHD: public ModOutput, public RemoteControllable { public: - OutputUHD(const char* device, - unsigned sampleRate, - double frequency, - int txgain, - bool enableSync, - bool muteNoTimestamps, + OutputUHD( + OutputUHDConfig& config, Logger& logger); ~OutputUHD(); |