USRP Hardware Driver and USRP Manual: core_iface.hpp Source File

| USRP Hardware Driver and USRP Manual Version: 4.9.0.makepkg-0-g9ec1f582 UHD and USRP Manual |

Loading...
Searching...
No Matches
core_iface.hpp
Go to the documentation of this file.
1//
2// Copyright 2020 Ettus Research, a National Instruments Brand
3//
4// SPDX-License-Identifier: GPL-3.0-or-later
5//
6
7#pragma once
8
9#include <uhd/types/device_addr.hpp>
10#include <uhd/types/ranges.hpp>
11#include <stdint.h>
12#include <memory>
13#include <string>
14#include <vector>
15
16namespace uhd { namespace rfnoc { namespace rf_control {
17
25 class core_iface
26{
27public:
28 using sptr = std::shared_ptr<core_iface>;
29
30 virtual ~core_iface() = default;
31
36 virtual std::string get_tx_antenna(const size_t chan) const = 0;
37
42 virtual std::vector<std::string> get_tx_antennas(const size_t chan) const = 0;
43
48 virtual void set_tx_antenna(const std::string& ant, const size_t chan) = 0;
49
54 virtual std::string get_rx_antenna(const size_t chan) const = 0;
55
60 virtual std::vector<std::string> get_rx_antennas(const size_t chan) const = 0;
61
66 virtual void set_rx_antenna(const std::string& ant, const size_t chan) = 0;
67
72 virtual double get_tx_frequency(const size_t chan) = 0;
73
96 virtual double set_tx_frequency(const double freq, size_t chan) = 0;
97
100 virtual void set_tx_tune_args(const uhd::device_addr_t& args, const size_t chan) = 0;
101
106 virtual uhd::freq_range_t get_tx_frequency_range(const size_t chan) const = 0;
107
112 virtual double get_rx_frequency(const size_t chan) = 0;
113
135 virtual double set_rx_frequency(const double freq, const size_t chan) = 0;
136
139 virtual void set_rx_tune_args(const uhd::device_addr_t& args, const size_t chan) = 0;
140
145 virtual uhd::freq_range_t get_rx_frequency_range(const size_t chan) const = 0;
146
149 virtual std::vector<std::string> get_tx_gain_names(const size_t chan) const = 0;
150
153 virtual uhd::gain_range_t get_tx_gain_range(const size_t chan) const = 0;
154
157 virtual uhd::gain_range_t get_tx_gain_range(
158 const std::string& name, const size_t chan) const = 0;
159
164 virtual double get_tx_gain(const size_t chan) = 0;
165
170 virtual double get_tx_gain(const std::string& name, const size_t chan) = 0;
171
182 virtual double set_tx_gain(const double gain, const size_t chan) = 0;
183
191 virtual double set_tx_gain(
192 const double gain, const std::string& name, const size_t chan) = 0;
193
196 virtual std::vector<std::string> get_rx_gain_names(const size_t chan) const = 0;
197
200 virtual uhd::gain_range_t get_rx_gain_range(const size_t chan) const = 0;
201
204 virtual uhd::gain_range_t get_rx_gain_range(
205 const std::string& name, const size_t chan) const = 0;
206
211 virtual double get_rx_gain(const size_t chan) = 0;
212
217 virtual double get_rx_gain(const std::string& name, const size_t chan) = 0;
218
226 virtual double set_rx_gain(const double gain, const size_t chan) = 0;
227
235 virtual double set_rx_gain(
236 const double gain, const std::string& name, const size_t chan) = 0;
237
242 virtual void set_rx_agc(const bool enable, const size_t chan) = 0;
243
246 virtual meta_range_t get_tx_bandwidth_range(size_t chan) const = 0;
247
252 virtual double get_tx_bandwidth(const size_t chan) = 0;
253
260 virtual double set_tx_bandwidth(const double bandwidth, const size_t chan) = 0;
261
264 virtual meta_range_t get_rx_bandwidth_range(size_t chan) const = 0;
265
270 virtual double get_rx_bandwidth(const size_t chan) = 0;
271
278 virtual double set_rx_bandwidth(const double bandwidth, const size_t chan) = 0;
279
280 /**************************************************************************
281 * LO Controls
282 *************************************************************************/
288 virtual std::vector<std::string> get_rx_lo_names(const size_t chan) const = 0;
289
298 virtual std::vector<std::string> get_rx_lo_sources(
299 const std::string& name, const size_t chan) const = 0;
300
309 virtual freq_range_t get_rx_lo_freq_range(
310 const std::string& name, const size_t chan) const = 0;
311
321 virtual void set_rx_lo_source(
322 const std::string& src, const std::string& name, const size_t chan) = 0;
323
332 virtual std::string get_rx_lo_source(const std::string& name, const size_t chan) = 0;
333
342 virtual void set_rx_lo_export_enabled(
343 bool enabled, const std::string& name, const size_t chan) = 0;
344
350 virtual bool get_rx_lo_export_enabled(const std::string& name, const size_t chan) = 0;
351
359 virtual double set_rx_lo_freq(
360 double freq, const std::string& name, const size_t chan) = 0;
361
370 virtual double get_rx_lo_freq(const std::string& name, const size_t chan) = 0;
371
377 virtual std::vector<std::string> get_tx_lo_names(const size_t chan) const = 0;
378
387 virtual std::vector<std::string> get_tx_lo_sources(
388 const std::string& name, const size_t chan) const = 0;
389
398 virtual freq_range_t get_tx_lo_freq_range(
399 const std::string& name, const size_t chan) = 0;
400
410 virtual void set_tx_lo_source(
411 const std::string& src, const std::string& name, const size_t chan) = 0;
412
421 virtual std::string get_tx_lo_source(const std::string& name, const size_t chan) = 0;
422
431 virtual void set_tx_lo_export_enabled(
432 const bool enabled, const std::string& name, const size_t chan) = 0;
433
439 virtual bool get_tx_lo_export_enabled(const std::string& name, const size_t chan) = 0;
440
450 virtual double set_tx_lo_freq(
451 const double freq, const std::string& name, const size_t chan) = 0;
452
464 virtual double get_tx_lo_freq(const std::string& name, const size_t chan) = 0;
465};
466
467}}} // namespace uhd::rfnoc::rf_control
uhd::device_addr_t
Definition device_addr.hpp:39
uhd::rfnoc::rf_control::core_iface
Definition core_iface.hpp:26
uhd::rfnoc::rf_control::core_iface::set_rx_lo_freq
virtual double set_rx_lo_freq(double freq, const std::string &name, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::get_rx_bandwidth_range
virtual meta_range_t get_rx_bandwidth_range(size_t chan) const =0
uhd::rfnoc::rf_control::core_iface::get_rx_bandwidth
virtual double get_rx_bandwidth(const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::get_rx_antenna
virtual std::string get_rx_antenna(const size_t chan) const =0
uhd::rfnoc::rf_control::core_iface::set_rx_lo_source
virtual void set_rx_lo_source(const std::string &src, const std::string &name, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::set_tx_lo_freq
virtual double set_tx_lo_freq(const double freq, const std::string &name, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::get_rx_frequency_range
virtual uhd::freq_range_t get_rx_frequency_range(const size_t chan) const =0
uhd::rfnoc::rf_control::core_iface::get_rx_gain
virtual double get_rx_gain(const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::get_tx_lo_export_enabled
virtual bool get_tx_lo_export_enabled(const std::string &name, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::get_tx_gain
virtual double get_tx_gain(const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::get_rx_lo_export_enabled
virtual bool get_rx_lo_export_enabled(const std::string &name, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::get_tx_bandwidth
virtual double get_tx_bandwidth(const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::set_tx_gain
virtual double set_tx_gain(const double gain, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::set_rx_bandwidth
virtual double set_rx_bandwidth(const double bandwidth, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::get_tx_gain
virtual double get_tx_gain(const std::string &name, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::set_rx_gain
virtual double set_rx_gain(const double gain, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::set_rx_tune_args
virtual void set_rx_tune_args(const uhd::device_addr_t &args, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::set_rx_gain
virtual double set_rx_gain(const double gain, const std::string &name, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::set_rx_lo_export_enabled
virtual void set_rx_lo_export_enabled(bool enabled, const std::string &name, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::set_rx_agc
virtual void set_rx_agc(const bool enable, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::set_tx_lo_source
virtual void set_tx_lo_source(const std::string &src, const std::string &name, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::set_rx_antenna
virtual void set_rx_antenna(const std::string &ant, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::get_tx_bandwidth_range
virtual meta_range_t get_tx_bandwidth_range(size_t chan) const =0
uhd::rfnoc::rf_control::core_iface::get_tx_frequency
virtual double get_tx_frequency(const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::get_tx_antenna
virtual std::string get_tx_antenna(const size_t chan) const =0
uhd::rfnoc::rf_control::core_iface::get_rx_lo_names
virtual std::vector< std::string > get_rx_lo_names(const size_t chan) const =0
uhd::rfnoc::rf_control::core_iface::get_rx_gain_names
virtual std::vector< std::string > get_rx_gain_names(const size_t chan) const =0
uhd::rfnoc::rf_control::core_iface::get_rx_gain
virtual double get_rx_gain(const std::string &name, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::get_rx_gain_range
virtual uhd::gain_range_t get_rx_gain_range(const std::string &name, const size_t chan) const =0
uhd::rfnoc::rf_control::core_iface::set_tx_bandwidth
virtual double set_tx_bandwidth(const double bandwidth, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::get_rx_lo_source
virtual std::string get_rx_lo_source(const std::string &name, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::get_tx_gain_range
virtual uhd::gain_range_t get_tx_gain_range(const std::string &name, const size_t chan) const =0
uhd::rfnoc::rf_control::core_iface::set_tx_gain
virtual double set_tx_gain(const double gain, const std::string &name, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::get_tx_gain_names
virtual std::vector< std::string > get_tx_gain_names(const size_t chan) const =0
uhd::rfnoc::rf_control::core_iface::get_rx_gain_range
virtual uhd::gain_range_t get_rx_gain_range(const size_t chan) const =0
uhd::rfnoc::rf_control::core_iface::set_tx_frequency
virtual double set_tx_frequency(const double freq, size_t chan)=0
uhd::rfnoc::rf_control::core_iface::get_tx_antennas
virtual std::vector< std::string > get_tx_antennas(const size_t chan) const =0
uhd::rfnoc::rf_control::core_iface::get_rx_frequency
virtual double get_rx_frequency(const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::sptr
std::shared_ptr< core_iface > sptr
Definition core_iface.hpp:28
uhd::rfnoc::rf_control::core_iface::get_rx_lo_sources
virtual std::vector< std::string > get_rx_lo_sources(const std::string &name, const size_t chan) const =0
uhd::rfnoc::rf_control::core_iface::get_tx_lo_freq
virtual double get_tx_lo_freq(const std::string &name, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::get_tx_frequency_range
virtual uhd::freq_range_t get_tx_frequency_range(const size_t chan) const =0
uhd::rfnoc::rf_control::core_iface::get_rx_lo_freq_range
virtual freq_range_t get_rx_lo_freq_range(const std::string &name, const size_t chan) const =0
uhd::rfnoc::rf_control::core_iface::get_tx_lo_sources
virtual std::vector< std::string > get_tx_lo_sources(const std::string &name, const size_t chan) const =0
uhd::rfnoc::rf_control::core_iface::~core_iface
virtual ~core_iface()=default
uhd::rfnoc::rf_control::core_iface::set_tx_tune_args
virtual void set_tx_tune_args(const uhd::device_addr_t &args, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::get_tx_gain_range
virtual uhd::gain_range_t get_tx_gain_range(const size_t chan) const =0
uhd::rfnoc::rf_control::core_iface::set_tx_lo_export_enabled
virtual void set_tx_lo_export_enabled(const bool enabled, const std::string &name, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::get_tx_lo_names
virtual std::vector< std::string > get_tx_lo_names(const size_t chan) const =0
uhd::rfnoc::rf_control::core_iface::set_rx_frequency
virtual double set_rx_frequency(const double freq, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::get_rx_antennas
virtual std::vector< std::string > get_rx_antennas(const size_t chan) const =0
uhd::rfnoc::rf_control::core_iface::set_tx_antenna
virtual void set_tx_antenna(const std::string &ant, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::get_tx_lo_source
virtual std::string get_tx_lo_source(const std::string &name, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::get_tx_lo_freq_range
virtual freq_range_t get_tx_lo_freq_range(const std::string &name, const size_t chan)=0
uhd::rfnoc::rf_control::core_iface::get_rx_lo_freq
virtual double get_rx_lo_freq(const std::string &name, const size_t chan)=0
device_addr.hpp
uhd::rfnoc::rf_control
Definition antenna_iface.hpp:17
uhd::rfnoc
Definition actions.hpp:24
uhd
Definition build_info.hpp:12
uhd::freq_range_t
meta_range_t freq_range_t
Definition ranges.hpp:131
uhd::gain_range_t
meta_range_t gain_range_t
Definition ranges.hpp:130
ranges.hpp
uhd::meta_range_t
Definition ranges.hpp:66