aboutsummaryrefslogtreecommitdiffstats
path: root/host/include/uhd/utils/gain_group.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/include/uhd/utils/gain_group.hpp')
-rw-r--r--host/include/uhd/utils/gain_group.hpp30
1 files changed, 14 insertions, 16 deletions
diff --git a/host/include/uhd/utils/gain_group.hpp b/host/include/uhd/utils/gain_group.hpp
index 128577c39..9822f3620 100644
--- a/host/include/uhd/utils/gain_group.hpp
+++ b/host/include/uhd/utils/gain_group.hpp
@@ -10,24 +10,26 @@
#include <uhd/config.hpp>
#include <uhd/types/ranges.hpp>
-#include <boost/shared_ptr.hpp>
#include <boost/function.hpp>
+#include <boost/shared_ptr.hpp>
#include <boost/utility.hpp>
-#include <vector>
#include <string>
+#include <vector>
-namespace uhd{
+namespace uhd {
/*!
* A set of function to control a gain element.
*/
-struct UHD_API gain_fcns_t{
+struct UHD_API gain_fcns_t
+{
boost::function<gain_range_t(void)> get_range;
- boost::function<double(void)> get_value;
- boost::function<void(double)> set_value;
+ boost::function<double(void)> get_value;
+ boost::function<void(double)> set_value;
};
-class UHD_API gain_group : boost::noncopyable{
+class UHD_API gain_group : boost::noncopyable
+{
public:
typedef boost::shared_ptr<gain_group> sptr;
@@ -40,7 +42,7 @@ public:
* \param name name of the gain element (optional)
* \return a gain range with overall min, max, step
*/
- virtual gain_range_t get_range(const std::string &name = "") = 0;
+ virtual gain_range_t get_range(const std::string& name = "") = 0;
/*!
* Get the gain value for the gain element specified by name.
@@ -48,7 +50,7 @@ public:
* \param name name of the gain element (optional)
* \return a gain value of the element or all elements
*/
- virtual double get_value(const std::string &name = "") = 0;
+ virtual double get_value(const std::string& name = "") = 0;
/*!
* Set the gain value for the gain element specified by name.
@@ -58,7 +60,7 @@ public:
* \param gain the gain to set for the element or across the group
* \param name name of the gain element (optional)
*/
- virtual void set_value(double gain, const std::string &name = "") = 0;
+ virtual void set_value(double gain, const std::string& name = "") = 0;
/*!
* Get a list of names of registered gain elements.
@@ -82,10 +84,7 @@ public:
* \param priority the priority of the gain element
*/
virtual void register_fcns(
- const std::string &name,
- const gain_fcns_t &gain_fcns,
- size_t priority = 0
- ) = 0;
+ const std::string& name, const gain_fcns_t& gain_fcns, size_t priority = 0) = 0;
/*!
* Make a new empty gain group.
@@ -94,7 +93,6 @@ public:
static sptr make(void);
};
-} //namespace uhd
+} // namespace uhd
#endif /* INCLUDED_UHD_UTILS_GAIN_GROUP_HPP */
-