USRP Hardware Driver and USRP Manual  Version: 3.15.0.HEAD-0-g6563c537
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 #ifndef INCLUDED_UHD_USRP_FE_CONNECTION_HPP
9 #define INCLUDED_UHD_USRP_FE_CONNECTION_HPP
10 
11 #include <uhd/config.hpp>
12 #include <boost/operators.hpp>
13 #include <string>
14 
15 namespace uhd { namespace usrp {
16 
17 class UHD_API fe_connection_t : boost::equality_comparable<fe_connection_t>
18 {
19 public:
23  enum sampling_t {
25  HETERODYNE,
27  REAL
29  };
30 
39  fe_connection_t(sampling_t sampling_mode,
40  bool iq_swapped,
41  bool i_inverted,
42  bool q_inverted,
43  double if_freq = 0.0);
44 
58  fe_connection_t(const std::string& conn_str, double if_freq = 0.0);
59 
64  {
65  return _sampling_mode;
66  }
67 
71  inline bool is_iq_swapped() const
72  {
73  return _iq_swapped;
74  }
75 
79  inline bool is_i_inverted() const
80  {
81  return _i_inverted;
82  }
83 
87  inline bool is_q_inverted() const
88  {
89  return _q_inverted;
90  }
91 
95  inline double get_if_freq() const
96  {
97  return _if_freq;
98  }
99 
103  inline void set_if_freq(double freq)
104  {
105  _if_freq = freq;
106  }
107 
108 private:
109  sampling_t _sampling_mode;
110  bool _iq_swapped;
111  bool _i_inverted;
112  bool _q_inverted;
113  double _if_freq;
114 };
115 
123 UHD_API bool operator==(const fe_connection_t& lhs, const fe_connection_t& rhs);
124 
125 }} // namespace uhd::usrp
126 
127 #endif /* INCLUDED_UHD_USRP_FE_CONNECTION_HPP */
bool is_q_inverted() const
Definition: fe_connection.hpp:87
UHD_API bool operator==(const dboard_id_t &lhs, const dboard_id_t &rhs)
double get_if_freq() const
Definition: fe_connection.hpp:95
Definition: build_info.hpp:13
Definition: fe_connection.hpp:24
Definition: fe_connection.hpp:17
bool is_iq_swapped() const
Definition: fe_connection.hpp:71
sampling_t get_sampling_mode() const
Definition: fe_connection.hpp:63
#define UHD_API
Definition: config.h:68
sampling_t
Definition: fe_connection.hpp:23
void set_if_freq(double freq)
Definition: fe_connection.hpp:103
bool is_i_inverted() const
Definition: fe_connection.hpp:79