USRP Hardware Driver and USRP Manual  Version: 4.6.0.0
UHD and USRP Manual
uhd::gain_group Class Referenceabstract

#include <uhd/utils/gain_group.hpp>

Inheritance diagram for uhd::gain_group:

Public Types

typedef std::shared_ptr< gain_groupsptr
 

Public Member Functions

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 Public Member Functions

static sptr make (void)
 
static sptr make_zero ()
 

Member Typedef Documentation

◆ sptr

typedef std::shared_ptr<gain_group> uhd::gain_group::sptr

Constructor & Destructor Documentation

◆ ~gain_group()

virtual uhd::gain_group::~gain_group ( void  )
pure virtual

Member Function Documentation

◆ get_names()

virtual const std::vector<std::string> uhd::gain_group::get_names ( void  )
pure virtual

Get a list of names of registered gain elements. The names are in the order that they were registered.

Returns
a vector of gain name strings

◆ get_range()

virtual gain_range_t uhd::gain_group::get_range ( const std::string &  name = "")
pure virtual

Get the gain range for the gain element specified by name. For an empty name, get the overall gain range for this group. Overall step is defined as the minimum step size.

Parameters
namename of the gain element (optional)
Returns
a gain range with overall min, max, step

◆ get_value()

virtual double uhd::gain_group::get_value ( const std::string &  name = "")
pure virtual

Get the gain value for the gain element specified by name. For an empty name, get the overall gain value for this group.

Parameters
namename of the gain element (optional)
Returns
a gain value of the element or all elements

◆ make()

static sptr uhd::gain_group::make ( void  )
static

Make a new empty gain group.

Returns
a gain group object.

◆ make_zero()

static sptr uhd::gain_group::make_zero ( )
static

Make a new gain group with all zero values.

Returns
a gain group object populated with zeroes

◆ register_fcns()

virtual void uhd::gain_group::register_fcns ( const std::string &  name,
const gain_fcns_t gain_fcns,
size_t  priority = 0 
)
pure virtual

Register a set of gain functions into this group:

The name should be a unique and non-empty name. Otherwise, the implementation will rename it.

Priority determines how power will be distributed with higher priorities getting the power first, and lower priorities getting the remainder power.

Parameters
namethe name of the gain element
gain_fcnsthe set of gain functions
prioritythe priority of the gain element

◆ set_value()

virtual void uhd::gain_group::set_value ( double  gain,
const std::string &  name = "" 
)
pure virtual

Set the gain value for the gain element specified by name. For an empty name, set the overall gain value for this group. The power will be distributed across individual gain elements. The semantics of how to do this are determined by the priority.

Parameters
gainthe gain to set for the element or across the group
namename of the gain element (optional)

The documentation for this class was generated from the following file: