aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/SDR.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-06-18 15:57:26 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-06-18 15:57:26 +0200
commitb76ebdb856b20a8078c6386bc20e79aa0d8db741 (patch)
treed3cef5c00205ea1e755267e9e8f805c179a71ffb /src/output/SDR.cpp
parent753fb5451b3f31aff2c389126467efa626975d78 (diff)
downloaddabmod-b76ebdb856b20a8078c6386bc20e79aa0d8db741.tar.gz
dabmod-b76ebdb856b20a8078c6386bc20e79aa0d8db741.tar.bz2
dabmod-b76ebdb856b20a8078c6386bc20e79aa0d8db741.zip
Rework GPSDO fix check
Accelerate startup, take advantage of new UHD sensor, fix startup issue.
Diffstat (limited to 'src/output/SDR.cpp')
-rw-r--r--src/output/SDR.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/output/SDR.cpp b/src/output/SDR.cpp
index 7c1b585..9be9aa2 100644
--- a/src/output/SDR.cpp
+++ b/src/output/SDR.cpp
@@ -78,6 +78,8 @@ SDR::SDR(SDRDeviceConfig& config, std::shared_ptr<SDRDevice> device) :
RC_ADD_PARAMETER(underruns, "Counter of number of underruns");
RC_ADD_PARAMETER(latepackets, "Counter of number of late packets");
RC_ADD_PARAMETER(frames, "Counter of number of frames modulated");
+ RC_ADD_PARAMETER(gpsdo_num_sv, "Number of Satellite Vehicles tracked by GPSDO");
+ RC_ADD_PARAMETER(gpsdo_holdover, "1 if the GPSDO is in holdover, 0 if it is using gnss");
}
SDR::~SDR()
@@ -381,7 +383,9 @@ void SDR::set_parameter(const string& parameter, const string& value)
}
else if (parameter == "underruns" or
parameter == "latepackets" or
- parameter == "frames") {
+ parameter == "frames" or
+ parameter == "gpsdo_num_sv" or
+ parameter == "gpsdo_holdover") {
throw ParameterError("Parameter " + parameter + " is read-only.");
}
else {
@@ -426,6 +430,14 @@ const string SDR::get_parameter(const string& parameter) const
ss << stat.num_frames_modulated;
}
}
+ else if (parameter == "gpsdo_num_sv") {
+ const auto stat = m_device->get_run_statistics();
+ ss << stat.gpsdo_num_sv;
+ }
+ else if (parameter == "gpsdo_holdover") {
+ const auto stat = m_device->get_run_statistics();
+ ss << (stat.gpsdo_holdover ? 1 : 0);
+ }
else {
ss << "Parameter '" << parameter <<
"' is not exported by controllable " << get_rc_name();