USRP Hardware Driver and USRP Manual  Version: 004.000.000.HEAD-0-g8773fb2c
UHD and USRP Manual
fe_connection.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2016 Ettus Research LLC
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 //
17 
18 #ifndef INCLUDED_UHD_USRP_FE_CONNECTION_HPP
19 #define INCLUDED_UHD_USRP_FE_CONNECTION_HPP
20 
21 #include <uhd/config.hpp>
22 #include <boost/operators.hpp>
23 #include <string>
24 
25 namespace uhd { namespace usrp {
26 
27  class UHD_API fe_connection_t : boost::equality_comparable<fe_connection_t> {
28  public:
32  enum sampling_t {
35  REAL
36  };
37 
47  sampling_t sampling_mode, bool iq_swapped,
48  bool i_inverted, bool q_inverted, double if_freq = 0.0
49  );
50 
64  fe_connection_t(const std::string& conn_str, double if_freq = 0.0);
65 
69  inline sampling_t get_sampling_mode() const {
70  return _sampling_mode;
71  }
72 
76  inline bool is_iq_swapped() const {
77  return _iq_swapped;
78  }
79 
83  inline bool is_i_inverted() const {
84  return _i_inverted;
85  }
86 
90  inline bool is_q_inverted() const {
91  return _q_inverted;
92  }
93 
97  inline double get_if_freq() const {
98  return _if_freq;
99  }
100 
104  inline void set_if_freq(double freq) {
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
126 
127 #endif /* INCLUDED_UHD_USRP_FE_CONNECTION_HPP */
bool is_q_inverted() const
Definition: fe_connection.hpp:90
UHD_API bool operator==(const dboard_id_t &lhs, const dboard_id_t &rhs)
double get_if_freq() const
Definition: fe_connection.hpp:97
Definition: build_info.hpp:25
Definition: fe_connection.hpp:33
Definition: fe_connection.hpp:27
bool is_iq_swapped() const
Definition: fe_connection.hpp:76
sampling_t get_sampling_mode() const
Definition: fe_connection.hpp:69
#define UHD_API
Definition: config.h:73
sampling_t
Definition: fe_connection.hpp:32
Definition: fe_connection.hpp:34
void set_if_freq(double freq)
Definition: fe_connection.hpp:104
bool is_i_inverted() const
Definition: fe_connection.hpp:83