From d02e2ecc13a741fac7d5a0ce65acaa0ecd3a621c Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli (think)" Date: Tue, 4 Sep 2012 15:18:20 +0200 Subject: crc-dabmod: added clock_config parameters to configuration file --- src/OutputUHD.h | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) (limited to 'src/OutputUHD.h') 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 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(); -- cgit v1.2.3