USRP Hardware Driver and USRP Manual  Version: 4.7.0.0
UHD and USRP Manual
fe_connection.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2016 Ettus Research LLC
3 // Copyright 2018 Ettus Research, a National Instruments Company
4 //
5 // SPDX-License-Identifier: GPL-3.0-or-later
6 //
7 
8 #pragma once
9 
10 #include <uhd/config.hpp>
11 #include <boost/operators.hpp>
12 #include <string>
13 
14 namespace uhd { namespace usrp {
15 
16 class UHD_API fe_connection_t : boost::equality_comparable<fe_connection_t>
17 {
18 public:
22  enum sampling_t {
24  HETERODYNE,
26  REAL
28  };
29 
38  fe_connection_t(sampling_t sampling_mode,
39  bool iq_swapped,
40  bool i_inverted,
41  bool q_inverted,
42  double if_freq = 0.0);
43 
57  fe_connection_t(const std::string& conn_str, double if_freq = 0.0);
58 
63  {
64  return _sampling_mode;
65  }
66 
70  inline bool is_iq_swapped() const
71  {
72  return _iq_swapped;
73  }
74 
78  inline bool is_i_inverted() const
79  {
80  return _i_inverted;
81  }
82 
86  inline bool is_q_inverted() const
87  {
88  return _q_inverted;
89  }
90 
94  inline double get_if_freq() const
95  {
96  return _if_freq;
97  }
98 
102  inline void set_if_freq(double freq)
103  {
104  _if_freq = freq;
105  }
106 
107 private:
108  sampling_t _sampling_mode;
109  bool _iq_swapped;
110  bool _i_inverted;
111  bool _q_inverted;
112  double _if_freq;
113 };
114 
122 UHD_API bool operator==(const fe_connection_t& lhs, const fe_connection_t& rhs);
123 
124 }} // namespace uhd::usrp
bool is_q_inverted() const
Definition: fe_connection.hpp:86
UHD_API bool operator==(const dboard_id_t &lhs, const dboard_id_t &rhs)
double get_if_freq() const
Definition: fe_connection.hpp:94
Definition: build_info.hpp:12
Definition: fe_connection.hpp:23
Definition: fe_connection.hpp:16
bool is_iq_swapped() const
Definition: fe_connection.hpp:70
sampling_t get_sampling_mode() const
Definition: fe_connection.hpp:62
#define UHD_API
Definition: config.h:87
sampling_t
Definition: fe_connection.hpp:22
void set_if_freq(double freq)
Definition: fe_connection.hpp:102
bool is_i_inverted() const
Definition: fe_connection.hpp:78