USRP Hardware Driver and Device Manual  Version: 4.11.0.0-0-g0d7ed3b1
UHD and USRP Manual
uhd::features::discoverable_feature_getter_iface Class Referenceabstract

#include <uhd/features/discoverable_feature_getter_iface.hpp>

Inheritance diagram for uhd::features::discoverable_feature_getter_iface:
uhd::rfnoc::mb_controller uhd::rfnoc::radio_control

Detailed Description

Interface for discovering and accessing discoverable features.

Public Member Functions

virtual ~discoverable_feature_getter_iface ()=default
 
template<typename T >
T & get_feature ()
 Retrieves a feature of the specified type. More...
 
template<typename T >
bool has_feature ()
 Determines whether a given feature exists. More...
 
virtual std::vector< std::string > enumerate_features ()=0
 Enumerate all discoverable features present on the device. More...
 

Constructor & Destructor Documentation

◆ ~discoverable_feature_getter_iface()

virtual uhd::features::discoverable_feature_getter_iface::~discoverable_feature_getter_iface ( )
virtualdefault

Member Function Documentation

◆ enumerate_features()

virtual std::vector<std::string> uhd::features::discoverable_feature_getter_iface::enumerate_features ( )
pure virtual

Enumerate all discoverable features present on the device.

Returns a vector (in no particular order) of the features that this device supports.

◆ get_feature()

template<typename T >
T& uhd::features::discoverable_feature_getter_iface::get_feature ( )
inline

Retrieves a feature of the specified type.

Note that if the given feature type does not exist, this function will assert. The user should first check that the feature exists via the has_feature method. Usage: auto feature_ref = radio.get_feature<desired_feature_class>();

◆ has_feature()

template<typename T >
bool uhd::features::discoverable_feature_getter_iface::has_feature ( )
inline

Determines whether a given feature exists.

This function should be used to gate functionality before calling get_feature().


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