summaryrefslogtreecommitdiffstats
path: root/src/OutputUHD.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-03-16 22:34:05 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-03-16 22:50:55 +0100
commit173f1d8bf78f59320c95148dd21611ea3b6b7153 (patch)
tree1bd242bb737b8d1a3871186b9773fae97ba63db5 /src/OutputUHD.h
parentdef2ae4de143572f10949d18075f1977a861815f (diff)
downloaddabmod-173f1d8bf78f59320c95148dd21611ea3b6b7153.tar.gz
dabmod-173f1d8bf78f59320c95148dd21611ea3b6b7153.tar.bz2
dabmod-173f1d8bf78f59320c95148dd21611ea3b6b7153.zip
Handle master_clock_rate better, add verification
The configuration file supports type and master_clock_rate in the [uhd] section. The device option is still supported. But the master_clock_rate can only be verified if it is set !
Diffstat (limited to 'src/OutputUHD.h')
-rw-r--r--src/OutputUHD.h27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/OutputUHD.h b/src/OutputUHD.h
index e30f897..86ecaae 100644
--- a/src/OutputUHD.h
+++ b/src/OutputUHD.h
@@ -2,16 +2,18 @@
Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Her Majesty the
Queen in Right of Canada (Communications Research Center Canada)
- Includes modifications for which no copyright is claimed
- 2012, Matthias P. Braendli, matthias.braendli@mpb.li
+ Copyright (C) 2014
+ Matthias P. Braendli, matthias.braendli@mpb.li
+
+ http://opendigitalradio.org
DESCRIPTION:
- It is an output driver for the USRP family of devices, and uses
- the UHD library. This version is multi-threaded. One thread runs
- the whole modulator, and the second threads sends the data to the
- device. The two threads are synchronised using a barrier. Communication
- between the two threads is implemented using double buffering. At the
- barrier, they exchange the buffers.
+ It is an output driver for the USRP family of devices, and uses the UHD
+ library. This version is multi-threaded. A separate thread sends the data to
+ the device.
+
+ Data between the modulator and the UHD thread is exchanged by swapping
+ buffers at a synchronisation barrier.
*/
/*
@@ -149,6 +151,8 @@ class UHDWorker {
/* This structure is used as initial configuration for OutputUHD */
struct OutputUHDConfig {
std::string device;
+ std::string usrpType; // e.g. b100, b200, usrp2
+ long masterClockRate;
unsigned sampleRate;
double frequency;
int txgain;
@@ -199,18 +203,13 @@ class OutputUHD: public ModOutput, public RemoteControllable {
protected:
Logger& myLogger;
EtiReader *myEtiReader;
- std::string myDevice;
- unsigned mySampleRate;
- int myTxGain;
- double myFrequency;
+ OutputUHDConfig myConf;
uhd::usrp::multi_usrp::sptr myUsrp;
shared_ptr<barrier> mySyncBarrier;
UHDWorker worker;
bool first_run;
struct UHDWorkerData uwd;
int activebuffer;
- bool mute_no_timestamps;
- bool enable_sync;
// muting can only be changed using the remote control
bool myMuting;