| USRP Hardware Driver and USRP Manual Version: 4.8.0.makepkg-0-g308126a4 UHD and USRP Manual |

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
uhd::rfnoc::rf_control::enumerated_antenna Class Reference

`#include <uhd/rfnoc/rf_control/antenna_iface.hpp>`

Inheritance diagram for uhd::rfnoc::rf_control::enumerated_antenna:

## Public Types
using | prop_path = std::function<fs_path(const size_t chan)>
Public Types inherited from uhd::rfnoc::rf_control::antenna_iface
using | sptr = std::shared_ptr<antenna_iface>

## Public Member Functions
| enumerated_antenna (uhd::property_tree::sptr tree, prop_path prop_path_generator, const std::vector< std::string > &possible_antennas, const std::unordered_map< std::string, std::string > &compat_map)
virtual | ~enumerated_antenna ()=default
std::vector< std::string > | get_antennas (const size_t chan) const override
void | set_antenna (const std::string &ant, const size_t chan) override
std::string | get_antenna (const size_t chan) const override
Public Member Functions inherited from uhd::rfnoc::rf_control::antenna_iface
virtual | ~antenna_iface ()=default

## Detailed Description

Class for getting and setting antennas out of an enumerated set, where the API calls for the antenna actually map to property nodes.

## Member Typedef Documentation

## ◆ prop_path

using uhd::rfnoc::rf_control::enumerated_antenna::prop_path = std::function<fs_path(const size_t chan)>

## Constructor & Destructor Documentation

## ◆ enumerated_antenna()

uhd::rfnoc::rf_control::enumerated_antenna::enumerated_antenna | ( | uhd::property_tree::sptr | tree,
|  | prop_path | prop_path_generator,
|  | const std::vector< std::string > & | possible_antennas,
|  | const std::unordered_map< std::string, std::string > & | compat_map )

Constructs an enumerated_antenna class.

Parameters

  tree | The property tree the nodes are on
  prop_path_generator | Closure to generate the property path given the channel.
  possible_antennas | A vector of legal antennas.
  compat_map | A map of alternative names for antennas.

## ◆ ~enumerated_antenna()

virtual uhd::rfnoc::rf_control::enumerated_antenna::~enumerated_antenna | ( |  | ) |
| virtual default

## Member Function Documentation

## ◆ get_antenna()

std::string uhd::rfnoc::rf_control::enumerated_antenna::get_antenna | ( | const size_t | chan | ) | const
| override virtual

Return the selected antenna for channel `chan`.

Returns
  The selected antenna.

Implements uhd::rfnoc::rf_control::antenna_iface.

## ◆ get_antennas()

std::vector< std::string > uhd::rfnoc::rf_control::enumerated_antenna::get_antennas | ( | const size_t | chan | ) | const
| override virtual

Return a list of valid antenna for channel `chan`.

Returns
  The selected antenna.

Implements uhd::rfnoc::rf_control::antenna_iface.

## ◆ set_antenna()

void uhd::rfnoc::rf_control::enumerated_antenna::set_antenna | ( | const std::string & | ant,
|  | const size_t | chan )
| override virtual

Select antenna `for` channel `chan`.

Exceptions

  uhd::value_error | if `ant` is not a valid value.

Implements uhd::rfnoc::rf_control::antenna_iface.

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

- antenna_iface.hpp