USRP Hardware Driver and USRP Manual  Version: 3.11.0.HEAD-0-g13c32cef
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  public:
22  enum sampling_t {
25  REAL
26  };
27 
37  sampling_t sampling_mode, bool iq_swapped,
38  bool i_inverted, bool q_inverted, double if_freq = 0.0
39  );
40 
54  fe_connection_t(const std::string& conn_str, double if_freq = 0.0);
55 
59  inline sampling_t get_sampling_mode() const {
60  return _sampling_mode;
61  }
62 
66  inline bool is_iq_swapped() const {
67  return _iq_swapped;
68  }
69 
73  inline bool is_i_inverted() const {
74  return _i_inverted;
75  }
76 
80  inline bool is_q_inverted() const {
81  return _q_inverted;
82  }
83 
87  inline double get_if_freq() const {
88  return _if_freq;
89  }
90 
94  inline void set_if_freq(double freq) {
95  _if_freq = freq;
96  }
97 
98  private:
99  sampling_t _sampling_mode;
100  bool _iq_swapped;
101  bool _i_inverted;
102  bool _q_inverted;
103  double _if_freq;
104  };
105 
113  UHD_API bool operator==(const fe_connection_t &lhs, const fe_connection_t &rhs);
114 
115 }} //namespace
116 
117 #endif /* INCLUDED_UHD_USRP_FE_CONNECTION_HPP */
bool is_q_inverted() const
Definition: fe_connection.hpp:80
UHD_API bool operator==(const dboard_id_t &lhs, const dboard_id_t &rhs)
double get_if_freq() const
Definition: fe_connection.hpp:87
Definition: build_info.hpp:14
Definition: fe_connection.hpp:23
Definition: fe_connection.hpp:17
bool is_iq_swapped() const
Definition: fe_connection.hpp:66
sampling_t get_sampling_mode() const
Definition: fe_connection.hpp:59
#define UHD_API
Definition: config.h:63
sampling_t
Definition: fe_connection.hpp:22
Definition: fe_connection.hpp:24
void set_if_freq(double freq)
Definition: fe_connection.hpp:94
bool is_i_inverted() const
Definition: fe_connection.hpp:73