USRP Hardware Driver and USRP Manual  Version: 3.11.0.HEAD-0-gdca39145
UHD and USRP Manual
fe_connection.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2016 Ettus Research LLC
3 //
4 // SPDX-License-Identifier: GPL-3.0
5 //
6 
7 #ifndef INCLUDED_UHD_USRP_FE_CONNECTION_HPP
8 #define INCLUDED_UHD_USRP_FE_CONNECTION_HPP
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  public:
21  enum sampling_t {
24  REAL
25  };
26 
36  sampling_t sampling_mode, bool iq_swapped,
37  bool i_inverted, bool q_inverted, double if_freq = 0.0
38  );
39 
53  fe_connection_t(const std::string& conn_str, double if_freq = 0.0);
54 
58  inline sampling_t get_sampling_mode() const {
59  return _sampling_mode;
60  }
61 
65  inline bool is_iq_swapped() const {
66  return _iq_swapped;
67  }
68 
72  inline bool is_i_inverted() const {
73  return _i_inverted;
74  }
75 
79  inline bool is_q_inverted() const {
80  return _q_inverted;
81  }
82 
86  inline double get_if_freq() const {
87  return _if_freq;
88  }
89 
93  inline void set_if_freq(double freq) {
94  _if_freq = freq;
95  }
96 
97  private:
98  sampling_t _sampling_mode;
99  bool _iq_swapped;
100  bool _i_inverted;
101  bool _q_inverted;
102  double _if_freq;
103  };
104 
112  UHD_API bool operator==(const fe_connection_t &lhs, const fe_connection_t &rhs);
113 
114 }} //namespace
115 
116 #endif /* INCLUDED_UHD_USRP_FE_CONNECTION_HPP */
bool is_q_inverted() const
Definition: fe_connection.hpp:79
UHD_API bool operator==(const dboard_id_t &lhs, const dboard_id_t &rhs)
double get_if_freq() const
Definition: fe_connection.hpp:86
Definition: build_info.hpp:14
Definition: fe_connection.hpp:22
Definition: fe_connection.hpp:16
bool is_iq_swapped() const
Definition: fe_connection.hpp:65
sampling_t get_sampling_mode() const
Definition: fe_connection.hpp:58
#define UHD_API
Definition: config.h:62
sampling_t
Definition: fe_connection.hpp:21
Definition: fe_connection.hpp:23
void set_if_freq(double freq)
Definition: fe_connection.hpp:93
bool is_i_inverted() const
Definition: fe_connection.hpp:72