aboutsummaryrefslogtreecommitdiffstats
path: root/src/OutputUHD.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-09-18 11:43:09 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-09-18 11:43:09 +0200
commit19a8c5db77e29b5d8309e1c7589bc3fdc283efae (patch)
treeeb86216f9e157d9a65c5896558939fc9cfcb97e6 /src/OutputUHD.h
parentbdbe6b4f8e9ba8bfd703c6b7e9705ec645c64b78 (diff)
downloaddabmod-19a8c5db77e29b5d8309e1c7589bc3fdc283efae.tar.gz
dabmod-19a8c5db77e29b5d8309e1c7589bc3fdc283efae.tar.bz2
dabmod-19a8c5db77e29b5d8309e1c7589bc3fdc283efae.zip
Keep UHD settings across a modulator restart
Diffstat (limited to 'src/OutputUHD.h')
-rw-r--r--src/OutputUHD.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/OutputUHD.h b/src/OutputUHD.h
index c38f151..d55d38e 100644
--- a/src/OutputUHD.h
+++ b/src/OutputUHD.h
@@ -185,7 +185,9 @@ class UHDWorker {
void process_errhandler();
};
-/* This structure is used as initial configuration for OutputUHD */
+/* This structure is used as initial configuration for OutputUHD.
+ * It must also contain all remote-controllable settings, otherwise
+ * they will get lost on a modulator restart. */
struct OutputUHDConfig {
std::string device;
std::string usrpType; // e.g. b100, b200, usrp2
@@ -213,13 +215,19 @@ struct OutputUHDConfig {
/* What to do when the reference clock PLL loses lock */
refclk_lock_loss_behaviour_t refclk_lock_loss_behaviour;
+
+ // muting can only be changed using the remote control
+ bool muting;
+
+ // static delay in microseconds
+ int staticDelayUs;
};
class OutputUHD: public ModOutput, public RemoteControllable {
public:
- OutputUHD(const OutputUHDConfig& config);
+ OutputUHD(OutputUHDConfig& config);
~OutputUHD();
int process(Buffer* dataIn, Buffer* dataOut);
@@ -249,7 +257,7 @@ class OutputUHD: public ModOutput, public RemoteControllable {
OutputUHD& operator=(const OutputUHD& other);
EtiReader *myEtiReader;
- OutputUHDConfig myConf;
+ OutputUHDConfig& myConf;
uhd::usrp::multi_usrp::sptr myUsrp;
std::shared_ptr<boost::barrier> mySyncBarrier;
UHDWorker worker;
@@ -258,16 +266,13 @@ class OutputUHD: public ModOutput, public RemoteControllable {
struct UHDWorkerData uwd;
int activebuffer;
- // muting can only be changed using the remote control
- bool myMuting;
-
private:
// Resize the internal delay buffer according to the dabMode and
// the sample rate.
void SetDelayBuffer(unsigned int dabMode);
// data
- int myStaticDelayUs; // static delay in microseconds
+ // The remote-controllable static delay is in the OutputUHDConfig
int myTFDurationMs; // TF duration in milliseconds
std::vector<complexf> myDelayBuf;
size_t lastLen;