USRP Hardware Driver and USRP Manual Version: 4.1.0.3
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
14namespace uhd { namespace usrp {
15
16class UHD_API fe_connection_t : boost::equality_comparable<fe_connection_t>
17{
18public:
24 HETERODYNE,
26 REAL
28 };
29
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
107private:
108 sampling_t _sampling_mode;
109 bool _iq_swapped;
110 bool _i_inverted;
111 bool _q_inverted;
112 double _if_freq;
113};
114
123
124}} // namespace uhd::usrp
Definition: fe_connection.hpp:17
bool is_i_inverted() const
Definition: fe_connection.hpp:78
void set_if_freq(double freq)
Definition: fe_connection.hpp:102
fe_connection_t(const std::string &conn_str, double if_freq=0.0)
sampling_t get_sampling_mode() const
Definition: fe_connection.hpp:62
sampling_t
Definition: fe_connection.hpp:22
@ QUADRATURE
Definition: fe_connection.hpp:23
bool is_q_inverted() const
Definition: fe_connection.hpp:86
fe_connection_t(sampling_t sampling_mode, bool iq_swapped, bool i_inverted, bool q_inverted, double if_freq=0.0)
bool is_iq_swapped() const
Definition: fe_connection.hpp:70
double get_if_freq() const
Definition: fe_connection.hpp:94
#define UHD_API
Definition: config.h:70
UHD_API bool operator==(const dboard_id_t &lhs, const dboard_id_t &rhs)
Definition: build_info.hpp:12