diff options
Diffstat (limited to 'SoapyDummy.hpp')
-rw-r--r-- | SoapyDummy.hpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/SoapyDummy.hpp b/SoapyDummy.hpp index e1ca79a..e89932d 100644 --- a/SoapyDummy.hpp +++ b/SoapyDummy.hpp @@ -25,6 +25,7 @@ #pragma once #include <string.h> #include <mutex> +#include <chrono> #include <condition_variable> #include <SoapySDR/Device.hpp> #include <SoapySDR/Logger.hpp> @@ -184,6 +185,18 @@ class SoapyDummy : public SoapySDR::Device std::vector<double> listBandwidths( const int direction, const size_t channel ) const; /******************************************************************* + * Time API + ******************************************************************/ + + virtual std::vector<std::string> listTimeSources(void) const; + virtual void setTimeSource(const std::string &source); + virtual std::string getTimeSource(void) const; + + virtual bool hasHardwareTime(const std::string &what = "") const; + virtual long long getHardwareTime(const std::string &what = "") const; + virtual void setHardwareTime(const long long timeNs, const std::string &what = ""); + + /******************************************************************* * Dummy callback ******************************************************************/ int dummy_tx_callback( int8_t *buffer, int32_t length ); @@ -204,4 +217,6 @@ class SoapyDummy : public SoapySDR::Device SoapyDummySession m_session; double m_samplerate = 0; double m_frequency = 0; + + long long m_time_epoch; }; |