USRP Hardware Driver and USRP Manual  Version: 4.4.0.HEAD-0-g5fac246b
UHD and USRP Manual
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:
uhd::rfnoc::rf_control::antenna_iface

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
treeThe property tree the nodes are on
prop_path_generatorClosure to generate the property path given the channel.
possible_antennasA vector of legal antennas.
compat_mapA map of alternative names for antennas.

◆ ~enumerated_antenna()

virtual uhd::rfnoc::rf_control::enumerated_antenna::~enumerated_antenna ( )
virtualdefault

Member Function Documentation

◆ get_antenna()

std::string uhd::rfnoc::rf_control::enumerated_antenna::get_antenna ( const size_t  chan) const
overridevirtual

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
overridevirtual

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 
)
overridevirtual

Select antenna for channel chan.

Exceptions
uhd::value_errorif ant is not a valid value.

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


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