Loading...
Searching...
No Matches
gain_group.hpp
Go to the documentation of this file.
//
// Copyright 2010-2011,2014 Ettus Research LLC
// Copyright 2018 Ettus Research, a National Instruments Company
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
#pragma once
#include <uhd/config.hpp>
#include <uhd/types/ranges.hpp>
#include <uhd/utils/noncopyable.hpp>
#include <cstddef>
#include <functional>
#include <memory>
#include <string>
#include <vector>
namespace uhd {
struct UHD_API gain_fcns_t
{
std::function<gain_range_t(void)> get_range;
std::function<double(void)> get_value;
std::function<void(double)> set_value;
};
class UHD_API gain_group : uhd::noncopyable
{
public:
typedef std::shared_ptr<gain_group> sptr;
virtual ~gain_group(void) = 0;
virtual gain_range_t get_range(const std::string& name = "") = 0;
virtual double get_value(const std::string& name = "") = 0;
virtual void set_value(double gain, const std::string& name = "") = 0;
virtual const std::vector<std::string> get_names(void) = 0;
virtual void register_fcns(
const std::string& name, const gain_fcns_t& gain_fcns, size_t priority = 0) = 0;
static sptr make(void);
static sptr make_zero();
};
} // namespace uhd
uhd::gain_group
Definition gain_group.hpp:32
uhd::gain_group::register_fcns
virtual void register_fcns(const std::string &name, const gain_fcns_t &gain_fcns, size_t priority=0)=0
uhd::gain_group::get_names
virtual const std::vector< std::string > get_names(void)=0
uhd::gain_group::get_range
virtual gain_range_t get_range(const std::string &name="")=0
uhd::gain_group::set_value
virtual void set_value(double gain, const std::string &name="")=0
uhd::gain_group::get_value
virtual double get_value(const std::string &name="")=0
uhd::gain_group::sptr
std::shared_ptr< gain_group > sptr
Definition gain_group.hpp:34
uhd::gain_group::make
static sptr make(void)
uhd::gain_group::make_zero
static sptr make_zero()
uhd::gain_group::~gain_group
virtual ~gain_group(void)=0
UHD_API
#define UHD_API
Definition config.h:87
config.hpp
uhd
Definition build_info.hpp:12
uhd::noncopyable
boost::noncopyable noncopyable
Definition noncopyable.hpp:45
uhd::gain_range_t
meta_range_t gain_range_t
Definition ranges.hpp:130
noncopyable.hpp
ranges.hpp
uhd::gain_fcns_t
Definition gain_group.hpp:25
uhd::gain_fcns_t::set_value
std::function< void(double)> set_value
Definition gain_group.hpp:28
uhd::gain_fcns_t::get_range
std::function< gain_range_t(void)> get_range
Definition gain_group.hpp:26
uhd::gain_fcns_t::get_value
std::function< double(void)> get_value
Definition gain_group.hpp:27