USRP Hardware Driver and USRP Manual  Version: 4.6.0.0
UHD and USRP Manual
duc_block_control.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2019 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/config.hpp>
11 #include <uhd/types/ranges.hpp>
12 #include <uhd/types/time_spec.hpp>
13 #include <boost/optional.hpp>
14 
15 namespace uhd { namespace rfnoc {
16 
33 {
34 public:
36 
37  static const uint16_t MAJOR_COMPAT;
38  static const uint16_t MINOR_COMPAT;
39  // Readback addresses
40  static const uint32_t RB_COMPAT_NUM;
41  static const uint32_t RB_NUM_HB;
42  static const uint32_t RB_CIC_MAX_INTERP;
43  // Write addresses
44  static const uint32_t SR_N_ADDR;
45  static const uint32_t SR_M_ADDR;
46  static const uint32_t SR_CONFIG_ADDR;
47  static const uint32_t SR_FREQ_ADDR;
48  static const uint32_t SR_SCALE_IQ_ADDR;
49  static const uint32_t SR_INTERP_ADDR;
50  static const uint32_t SR_TIME_INCR_ADDR;
51 
71  virtual double set_freq(const double freq,
72  const size_t chan,
73  const boost::optional<uhd::time_spec_t> time = boost::none) = 0;
74 
79  virtual double get_freq(const size_t chan) const = 0;
80 
92  virtual uhd::freq_range_t get_frequency_range(const size_t chan) const = 0;
93 
99  virtual double get_input_rate(const size_t chan) const = 0;
100 
108  virtual double get_output_rate(const size_t chan) const = 0;
109 
115  virtual void set_output_rate(const double rate, const size_t chan) = 0;
116 
122  virtual uhd::meta_range_t get_input_rates(const size_t chan) const = 0;
123 
134  virtual double set_input_rate(const double rate, const size_t chan) = 0;
135 };
136 
137 }} // namespace uhd::rfnoc
Definition: time_spec.hpp:28
Definition: duc_block_control.hpp:32
#define RFNOC_DECLARE_BLOCK(CLASS_NAME)
Definition: noc_block_base.hpp:22
Definition: build_info.hpp:12
Definition: noc_block_base.hpp:42
#define UHD_API
Definition: config.h:87
Definition: ranges.hpp:65