summaryrefslogtreecommitdiffstats
path: root/src/OutputUHD.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-01-23 10:18:17 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-01-23 10:51:26 +0100
commite12c679b8cc8a263507c556cb24819dc0d5559b9 (patch)
tree8f2cd06710d15ca64a4a86c1ce52bc975ec3f2b0 /src/OutputUHD.h
parentd82422fbb3d9d34a0566197245376548ce3ef14e (diff)
parent94c1f63b6fd07d74f3325274dd19fd6beaf53965 (diff)
downloaddabmod-e12c679b8cc8a263507c556cb24819dc0d5559b9.tar.gz
dabmod-e12c679b8cc8a263507c556cb24819dc0d5559b9.tar.bz2
dabmod-e12c679b8cc8a263507c556cb24819dc0d5559b9.zip
Merge raspine's ZeroMQ RC and UHD staticdelay
Merge raspine/master pull request, fix indentation, code style, and two minor conflicts in: doc/example.ini src/DabMod.cpp
Diffstat (limited to 'src/OutputUHD.h')
-rw-r--r--src/OutputUHD.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/OutputUHD.h b/src/OutputUHD.h
index 90d9d1b..7eb6733 100644
--- a/src/OutputUHD.h
+++ b/src/OutputUHD.h
@@ -36,10 +36,14 @@ DESCRIPTION:
#ifndef OUTPUT_UHD_H
#define OUTPUT_UHD_H
+#define FAKE_UHD 0
+
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
+#ifdef HAVE_OUTPUT_UHD
+
#include <uhd/utils/thread_priority.hpp>
#include <uhd/utils/safe_main.hpp>
#include <uhd/usrp/multi_usrp.hpp>
@@ -77,15 +81,14 @@ struct UHDWorkerFrameData {
// Full timestamp
struct frame_timestamp ts;
-
- // Frame counter
- uint32_t fct;
};
enum refclk_lock_loss_behaviour_t { CRASH, IGNORE };
struct UHDWorkerData {
+#if FAKE_UHD == 0
uhd::usrp::multi_usrp::sptr myUsrp;
+#endif
unsigned sampleRate;
// Double buffering between the two threads
@@ -117,7 +120,12 @@ struct UHDWorkerData {
// The common logger
Logger* logger;
-};
+
+ // What transmission mode we're using defines by how
+ // much the FCT should increment for each
+ // transmission frame.
+ int fct_increment;
+};
class UHDWorker {
@@ -160,7 +168,7 @@ struct OutputUHDConfig {
long masterClockRate;
unsigned sampleRate;
double frequency;
- int txgain;
+ double txgain;
bool enableSync;
bool muteNoTimestamps;
@@ -229,6 +237,7 @@ class OutputUHD: public ModOutput, public RemoteControllable {
size_t lastLen;
};
+#endif // HAVE_OUTPUT_UHD
#endif // OUTPUT_UHD_H