diff options
Diffstat (limited to 'host/lib/include/uhdlib')
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp b/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp index 6b50cc31c..fc90035f7 100644 --- a/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp +++ b/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp @@ -256,6 +256,22 @@ public: static const uhd::fs_path FE_PATH; protected: + /*! Helper function for property propagation: Like set_rate(), but called + * during a different context. + * + * This function is called from the samp_rate property resolver. The + * difference to set_rate() is that the latter is a user API, and may + * trigger different kinds of warnings or errors. + * If the radio supports changing its sampling rate at runtime, it is OK to + * call set_rate() within this function. + * + * Default implementation is to simply return the current rate. + */ + virtual double coerce_rate(const double /* rate */) + { + return _rate; + } + //! Properties for samp_rate (one per port) std::vector<property_t<double>> _samp_rate_in; //! Properties for samp_rate (one per port) |