diff options
author | Brent Stapleton <brent.stapleton@ettus.com> | 2019-08-01 14:01:50 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 11:49:11 -0800 |
commit | d1a5b70a8f9a54a2a39e30415fbc0a4c607222f7 (patch) | |
tree | 46e36f89e15c1fc57246027d1f52895a81e8fe63 /host/include | |
parent | 75ad0c55164e8e2f08b4bfc9d5361f2445a80f52 (diff) | |
download | uhd-d1a5b70a8f9a54a2a39e30415fbc0a4c607222f7.tar.gz uhd-d1a5b70a8f9a54a2a39e30415fbc0a4c607222f7.tar.bz2 uhd-d1a5b70a8f9a54a2a39e30415fbc0a4c607222f7.zip |
gain_groups: Add zero-value gain groups
Add convenience factory for making a gain group that has a single
zero-valued element. This factory requires a name, which should
probably be ALL_GAINS, or something similar (these constants are
device-specific).
Using this new make_zero factory in the X300 radio control when we
don't find any gain elements so that our gain groups aren't empty. This
simplifies our later setters/getters because we know that we'll always
have _something_ cached.
Note that we only register this zero value gain group for TX, as our
ADC is registered as a gain element, so our RX gain groups are never
empty.
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/utils/gain_group.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/host/include/uhd/utils/gain_group.hpp b/host/include/uhd/utils/gain_group.hpp index f85e841dc..4a3a01a65 100644 --- a/host/include/uhd/utils/gain_group.hpp +++ b/host/include/uhd/utils/gain_group.hpp @@ -91,6 +91,13 @@ public: * \return a gain group object. */ static sptr make(void); + + /*! + * Make a new gain group with all zero values. + * \param name the name of the (only and zero-valued) gain element + * \return a gain group object populated with zeroes + */ + static sptr make_zero(); }; } // namespace uhd |