Loading [MathJax]/extensions/tex2jax.js
USRP Hardware Driver and USRP Manual  Version: 4.8.0.0
UHD and USRP Manual
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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/none.hpp>
13 #include <boost/optional.hpp>
14 #include <cstdint>
15 #include <map>
16 #include <memory>
17 #include <string>
18 
19 namespace uhd { namespace usrp { namespace cal {
20 
48 class UHD_API pwr_cal : public container
49 {
50 public:
51  using sptr = std::shared_ptr<pwr_cal>;
52 
68  virtual void add_power_table(const std::map<double, double>& gain_power_map,
69  const double min_power,
70  const double max_power,
71  const double freq,
72  const boost::optional<int> temperature = boost::none) = 0;
73 
79  virtual void clear() = 0;
80 
89  virtual void set_temperature(const int temperature) = 0;
90 
92  virtual int get_temperature() const = 0;
93 
99  virtual void set_ref_gain(const double gain) = 0;
100 
105  virtual double get_ref_gain() const = 0;
106 
109  virtual uhd::meta_range_t get_power_limits(const double freq,
110  const boost::optional<int> temperature = boost::none) const = 0;
111 
123  virtual double get_power(const double gain,
124  const double freq,
125  const boost::optional<int> temperature = boost::none) const = 0;
126 
142  virtual double get_gain(const double power_dbm,
143  const double freq,
144  const boost::optional<int> temperature = boost::none) const = 0;
145 
147  static sptr make(
148  const std::string& name, const std::string& serial, const uint64_t timestamp);
149 
151  static sptr make();
152 };
153 
154 }}} // namespace uhd::usrp::cal
uhd::usrp::cal::pwr_cal
Definition: pwr_cal.hpp:48
uhd::usrp::cal::pwr_cal::sptr
std::shared_ptr< pwr_cal > sptr
Definition: pwr_cal.hpp:51
config.hpp
UHD_API
#define UHD_API
Definition: config.h:87
uhd
Definition: build_info.hpp:12
ranges.hpp
container.hpp
uhd::meta_range_t
Definition: ranges.hpp:65
uhd::usrp::cal::container
Definition: container.hpp:22