USRP Hardware Driver and USRP Manual  Version: 4.6.0.0
UHD and USRP Manual
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 
10 #include <uhd/types/ranges.hpp>
11 #include <stdint.h>
12 #include <memory>
13 #include <string>
14 #include <vector>
15 
16 namespace uhd { namespace rfnoc { namespace rf_control {
17 
26 {
27 public:
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 
87  virtual double set_tx_frequency(const double freq, size_t chan) = 0;
88 
91  virtual void set_tx_tune_args(const uhd::device_addr_t& args, const size_t chan) = 0;
92 
97  virtual uhd::freq_range_t get_tx_frequency_range(const size_t chan) const = 0;
98 
103  virtual double get_rx_frequency(const size_t chan) = 0;
104 
117  virtual double set_rx_frequency(const double freq, const size_t chan) = 0;
118 
121  virtual void set_rx_tune_args(const uhd::device_addr_t& args, const size_t chan) = 0;
122 
127  virtual uhd::freq_range_t get_rx_frequency_range(const size_t chan) const = 0;
128 
131  virtual std::vector<std::string> get_tx_gain_names(const size_t chan) const = 0;
132 
135  virtual uhd::gain_range_t get_tx_gain_range(const size_t chan) const = 0;
136 
140  const std::string& name, const size_t chan) const = 0;
141 
146  virtual double get_tx_gain(const size_t chan) = 0;
147 
152  virtual double get_tx_gain(const std::string& name, const size_t chan) = 0;
153 
164  virtual double set_tx_gain(const double gain, const size_t chan) = 0;
165 
173  virtual double set_tx_gain(
174  const double gain, const std::string& name, const size_t chan) = 0;
175 
178  virtual std::vector<std::string> get_rx_gain_names(const size_t chan) const = 0;
179 
182  virtual uhd::gain_range_t get_rx_gain_range(const size_t chan) const = 0;
183 
187  const std::string& name, const size_t chan) const = 0;
188 
193  virtual double get_rx_gain(const size_t chan) = 0;
194 
199  virtual double get_rx_gain(const std::string& name, const size_t chan) = 0;
200 
208  virtual double set_rx_gain(const double gain, const size_t chan) = 0;
209 
217  virtual double set_rx_gain(
218  const double gain, const std::string& name, const size_t chan) = 0;
219 
224  virtual void set_rx_agc(const bool enable, const size_t chan) = 0;
225 
228  virtual meta_range_t get_tx_bandwidth_range(size_t chan) const = 0;
229 
234  virtual double get_tx_bandwidth(const size_t chan) = 0;
235 
242  virtual double set_tx_bandwidth(const double bandwidth, const size_t chan) = 0;
243 
246  virtual meta_range_t get_rx_bandwidth_range(size_t chan) const = 0;
247 
252  virtual double get_rx_bandwidth(const size_t chan) = 0;
253 
260  virtual double set_rx_bandwidth(const double bandwidth, const size_t chan) = 0;
261 
262  /**************************************************************************
263  * LO Controls
264  *************************************************************************/
270  virtual std::vector<std::string> get_rx_lo_names(const size_t chan) const = 0;
271 
280  virtual std::vector<std::string> get_rx_lo_sources(
281  const std::string& name, const size_t chan) const = 0;
282 
292  const std::string& name, const size_t chan) const = 0;
293 
303  virtual void set_rx_lo_source(
304  const std::string& src, const std::string& name, const size_t chan) = 0;
305 
314  virtual const std::string get_rx_lo_source(
315  const std::string& name, const size_t chan) = 0;
316 
325  virtual void set_rx_lo_export_enabled(
326  bool enabled, const std::string& name, const size_t chan) = 0;
327 
333  virtual bool get_rx_lo_export_enabled(const std::string& name, const size_t chan) = 0;
334 
342  virtual double set_rx_lo_freq(
343  double freq, const std::string& name, const size_t chan) = 0;
344 
353  virtual double get_rx_lo_freq(const std::string& name, const size_t chan) = 0;
354 
360  virtual std::vector<std::string> get_tx_lo_names(const size_t chan) const = 0;
361 
370  virtual std::vector<std::string> get_tx_lo_sources(
371  const std::string& name, const size_t chan) const = 0;
372 
382  const std::string& name, const size_t chan) = 0;
383 
393  virtual void set_tx_lo_source(
394  const std::string& src, const std::string& name, const size_t chan) = 0;
395 
404  virtual const std::string get_tx_lo_source(
405  const std::string& name, const size_t chan) = 0;
406 
415  virtual void set_tx_lo_export_enabled(
416  const bool enabled, const std::string& name, const size_t chan) = 0;
417 
423  virtual bool get_tx_lo_export_enabled(const std::string& name, const size_t chan) = 0;
424 
434  virtual double set_tx_lo_freq(
435  const double freq, const std::string& name, const size_t chan) = 0;
436 
448  virtual double get_tx_lo_freq(const std::string& name, const size_t chan) = 0;
449 };
450 
451 }}} // namespace uhd::rfnoc::rf_control
virtual std::vector< std::string > get_tx_gain_names(const size_t chan) const =0
virtual double get_tx_gain(const size_t chan)=0
virtual void set_tx_lo_export_enabled(const bool enabled, const std::string &name, const size_t chan)=0
virtual double set_rx_bandwidth(const double bandwidth, const size_t chan)=0
virtual std::vector< std::string > get_tx_lo_names(const size_t chan) const =0
virtual const std::string get_rx_lo_source(const std::string &name, const size_t chan)=0
virtual std::vector< std::string > get_rx_lo_sources(const std::string &name, const size_t chan) const =0
virtual double get_rx_lo_freq(const std::string &name, const size_t chan)=0
virtual void set_tx_lo_source(const std::string &src, const std::string &name, const size_t chan)=0
virtual freq_range_t get_rx_lo_freq_range(const std::string &name, const size_t chan) const =0
virtual double set_tx_lo_freq(const double freq, const std::string &name, const size_t chan)=0
virtual void set_rx_antenna(const std::string &ant, const size_t chan)=0
virtual const std::string get_tx_lo_source(const std::string &name, const size_t chan)=0
virtual std::string get_tx_antenna(const size_t chan) const =0
virtual std::string get_rx_antenna(const size_t chan) const =0
virtual uhd::freq_range_t get_rx_frequency_range(const size_t chan) const =0
virtual meta_range_t get_rx_bandwidth_range(size_t chan) const =0
virtual uhd::gain_range_t get_tx_gain_range(const size_t chan) const =0
virtual double get_tx_frequency(const size_t chan)=0
virtual void set_tx_tune_args(const uhd::device_addr_t &args, const size_t chan)=0
virtual double set_rx_frequency(const double freq, const size_t chan)=0
Definition: build_info.hpp:12
virtual double get_rx_gain(const size_t chan)=0
virtual std::vector< std::string > get_rx_gain_names(const size_t chan) const =0
virtual void set_rx_lo_export_enabled(bool enabled, const std::string &name, const size_t chan)=0
virtual double set_rx_lo_freq(double freq, const std::string &name, const size_t chan)=0
Definition: core_iface.hpp:25
std::shared_ptr< core_iface > sptr
Definition: core_iface.hpp:28
virtual double set_tx_frequency(const double freq, size_t chan)=0
virtual uhd::gain_range_t get_rx_gain_range(const size_t chan) const =0
virtual void set_tx_antenna(const std::string &ant, const size_t chan)=0
virtual freq_range_t get_tx_lo_freq_range(const std::string &name, const size_t chan)=0
virtual bool get_tx_lo_export_enabled(const std::string &name, const size_t chan)=0
virtual bool get_rx_lo_export_enabled(const std::string &name, const size_t chan)=0
virtual uhd::freq_range_t get_tx_frequency_range(const size_t chan) const =0
virtual std::vector< std::string > get_tx_antennas(const size_t chan) const =0
virtual std::vector< std::string > get_rx_antennas(const size_t chan) const =0
virtual std::vector< std::string > get_tx_lo_sources(const std::string &name, const size_t chan) const =0
virtual double get_tx_lo_freq(const std::string &name, const size_t chan)=0
virtual double set_rx_gain(const double gain, const size_t chan)=0
virtual void set_rx_tune_args(const uhd::device_addr_t &args, const size_t chan)=0
virtual double get_tx_bandwidth(const size_t chan)=0
virtual double get_rx_frequency(const size_t chan)=0
virtual meta_range_t get_tx_bandwidth_range(size_t chan) const =0
Definition: ranges.hpp:65
virtual void set_rx_agc(const bool enable, const size_t chan)=0
virtual std::vector< std::string > get_rx_lo_names(const size_t chan) const =0
virtual void set_rx_lo_source(const std::string &src, const std::string &name, const size_t chan)=0
virtual double set_tx_bandwidth(const double bandwidth, const size_t chan)=0
virtual double get_rx_bandwidth(const size_t chan)=0
Definition: device_addr.hpp:37
virtual double set_tx_gain(const double gain, const size_t chan)=0