| USRP Hardware Driver and Device Manual Version: 4.10.0.0 UHD and USRP Manual |

Loading...
Searching...
No Matches
uhd::gain_group Class Referenceabstract

`#include <uhd/utils/gain_group.hpp>`

Inheritance diagram for uhd::gain_group:

## Public Types
typedef std::shared_ptr< gain_group > | sptr

## 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

  name | name 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

  name | name of the gain element (optional)

Returns
  a gain value of the element or all elements

## ◆ make()

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

Make a new empty gain group.

Returns
  a gain group object.

## ◆ make_zero()

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

  name | the name of the gain element
  gain_fcns | the set of gain functions
  priority | the 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

  gain | the gain to set for the element or across the group
  name | name of the gain element (optional)

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

- gain_group.hpp