USRP Hardware Driver and USRP Manual  Version: 4.6.0.0
UHD and USRP Manual
pwr_cal.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/cal/container.hpp>
10 #include <uhd/config.hpp>
11 #include <uhd/types/ranges.hpp>
12 #include <boost/optional.hpp>
13 #include <map>
14 
15 namespace uhd { namespace usrp { namespace cal {
16 
44 class UHD_API pwr_cal : public container
45 {
46 public:
47  using sptr = std::shared_ptr<pwr_cal>;
48 
64  virtual void add_power_table(const std::map<double, double>& gain_power_map,
65  const double min_power,
66  const double max_power,
67  const double freq,
68  const boost::optional<int> temperature = boost::none) = 0;
69 
75  virtual void clear() = 0;
76 
85  virtual void set_temperature(const int temperature) = 0;
86 
88  virtual int get_temperature() const = 0;
89 
95  virtual void set_ref_gain(const double gain) = 0;
96 
101  virtual double get_ref_gain() const = 0;
102 
105  virtual uhd::meta_range_t get_power_limits(const double freq,
106  const boost::optional<int> temperature = boost::none) const = 0;
107 
119  virtual double get_power(const double gain,
120  const double freq,
121  const boost::optional<int> temperature = boost::none) const = 0;
122 
138  virtual double get_gain(const double power_dbm,
139  const double freq,
140  const boost::optional<int> temperature = boost::none) const = 0;
141 
143  static sptr make(
144  const std::string& name, const std::string& serial, const uint64_t timestamp);
145 
147  static sptr make();
148 };
149 
150 }}} // namespace uhd::usrp::cal
Definition: container.hpp:22
Definition: pwr_cal.hpp:44
Definition: build_info.hpp:12
std::shared_ptr< pwr_cal > sptr
Definition: pwr_cal.hpp:47
#define UHD_API
Definition: config.h:87
Definition: ranges.hpp:65