From 7f815e124f217f37eb5e612a34ec84c33043aa87 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 25 Oct 2011 18:04:32 -0700 Subject: usrp: placeholder for potential set_next_command_time call --- host/include/uhd/usrp/multi_usrp.hpp | 15 +++++++++++++++ host/lib/usrp/multi_usrp.cpp | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/host/include/uhd/usrp/multi_usrp.hpp b/host/include/uhd/usrp/multi_usrp.hpp index 9bb5b4381..319301784 100644 --- a/host/include/uhd/usrp/multi_usrp.hpp +++ b/host/include/uhd/usrp/multi_usrp.hpp @@ -22,6 +22,7 @@ #define UHD_USRP_MULTI_USRP_REF_SOURCES_API #define UHD_USRP_MULTI_USRP_GET_RATES_API #define UHD_USRP_MULTI_USRP_FRONTEND_CAL_API +#define UHD_USRP_MULTI_USRP_COMMAND_TIME_API #include #include @@ -225,6 +226,20 @@ public: */ virtual bool get_time_synchronized(void) = 0; + /*! + * Set the time at which the next control command will take effect. + * + * The time spec setting only takes effect on the first command. + * Subsequent commands will be sent ASAP unless user set time again. + * A timed command will throttle/back-pressure all subsequent commands, + * assuming that the subsequent commands occur within the time-window. + * If the time spec is late, the command will be activated upon arrival. + * + * \param time_spec the time at which the next command will activate + * \param mboard which motherboard to set the config + */ + virtual void set_next_command_time(const time_spec_t &time_spec, size_t mboard = ALL_MBOARDS) = 0; + /*! * Issue a stream command to the usrp device. * This tells the usrp to send samples into the host. diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index 7383fa3c0..2e7c76a06 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -347,6 +347,10 @@ public: return true; } + void set_next_command_time(const time_spec_t &, size_t){ + throw uhd::not_implemented_error("Not implemented yet, but we have a very good idea of how to do it."); + } + void issue_stream_cmd(const stream_cmd_t &stream_cmd, size_t chan){ if (chan != ALL_CHANS){ _tree->access(rx_dsp_root(chan) / "stream_cmd").set(stream_cmd); -- cgit v1.2.3