aboutsummaryrefslogtreecommitdiffstats
path: root/src/OutputUHD.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-09-14 00:08:53 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-09-14 00:08:53 +0200
commit685095418bc8fd27dcd0b1d73ad1741114aeda6a (patch)
tree5d959800a98b294cdc08278c8eaf181730190e07 /src/OutputUHD.h
parent0b7bc4a405ea4d6f24fade9420e9919420c64d8e (diff)
downloaddabmod-685095418bc8fd27dcd0b1d73ad1741114aeda6a.tar.gz
dabmod-685095418bc8fd27dcd0b1d73ad1741114aeda6a.tar.bz2
dabmod-685095418bc8fd27dcd0b1d73ad1741114aeda6a.zip
SFN: carry FCT along with timestamps
This is the first step to fix issue #6. The goal is to enable the OutputUHD to check for FCT consistency. Once it can do that, it will also be able to reset the UHD streamer if necessary.
Diffstat (limited to 'src/OutputUHD.h')
-rw-r--r--src/OutputUHD.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/OutputUHD.h b/src/OutputUHD.h
index 69e5b20..3a047bf 100644
--- a/src/OutputUHD.h
+++ b/src/OutputUHD.h
@@ -36,6 +36,8 @@ DESCRIPTION:
#ifndef OUTPUT_UHD_H
#define OUTPUT_UHD_H
+#define FAKE_UHD 0
+
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@@ -77,15 +79,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 +118,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 {