Loading...
Searching...
No Matches
fe_connection.hpp
Go to the documentation of this file.
//
// Copyright 2016 Ettus Research LLC
// Copyright 2018 Ettus Research, a National Instruments Company
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
#pragma once
#include <uhd/config.hpp>
#include <boost/operators.hpp>
#include <string>
namespace uhd { namespace usrp {
class UHD_API fe_connection_t : boost::equality_comparable<fe_connection_t>
{
public:
enum sampling_t {
QUADRATURE,
HETERODYNE,
REAL
};
fe_connection_t(sampling_t sampling_mode,
bool iq_swapped,
bool i_inverted,
bool q_inverted,
double if_freq = 0.0);
fe_connection_t(const std::string& conn_str, double if_freq = 0.0);
inline sampling_t get_sampling_mode() const
{
return _sampling_mode;
}
inline bool is_iq_swapped() const
{
return _iq_swapped;
}
inline bool is_i_inverted() const
{
return _i_inverted;
}
inline bool is_q_inverted() const
{
return _q_inverted;
}
inline double get_if_freq() const
{
return _if_freq;
}
inline void set_if_freq(double freq)
{
_if_freq = freq;
}
private:
sampling_t _sampling_mode;
bool _iq_swapped;
bool _i_inverted;
bool _q_inverted;
double _if_freq;
};
UHD_API bool operator==(const fe_connection_t& lhs, const fe_connection_t& rhs);
}} // namespace uhd::usrp
uhd::usrp::fe_connection_t
Definition fe_connection.hpp:17
uhd::usrp::fe_connection_t::is_i_inverted
bool is_i_inverted() const
Definition fe_connection.hpp:78
uhd::usrp::fe_connection_t::set_if_freq
void set_if_freq(double freq)
Definition fe_connection.hpp:102
uhd::usrp::fe_connection_t::fe_connection_t
fe_connection_t(const std::string &conn_str, double if_freq=0.0)
uhd::usrp::fe_connection_t::get_sampling_mode
sampling_t get_sampling_mode() const
Definition fe_connection.hpp:62
uhd::usrp::fe_connection_t::sampling_t
sampling_t
Definition fe_connection.hpp:22
uhd::usrp::fe_connection_t::QUADRATURE
@ QUADRATURE
Definition fe_connection.hpp:23
uhd::usrp::fe_connection_t::REAL
@ REAL
Definition fe_connection.hpp:26
uhd::usrp::fe_connection_t::HETERODYNE
@ HETERODYNE
Definition fe_connection.hpp:24
uhd::usrp::fe_connection_t::is_q_inverted
bool is_q_inverted() const
Definition fe_connection.hpp:86
uhd::usrp::fe_connection_t::fe_connection_t
fe_connection_t(sampling_t sampling_mode, bool iq_swapped, bool i_inverted, bool q_inverted, double if_freq=0.0)
uhd::usrp::fe_connection_t::is_iq_swapped
bool is_iq_swapped() const
Definition fe_connection.hpp:70
uhd::usrp::fe_connection_t::get_if_freq
double get_if_freq() const
Definition fe_connection.hpp:94
UHD_API
#define UHD_API
Definition config.h:87
config.hpp
uhd::usrp
Definition container.hpp:15
uhd::usrp::operator==
UHD_API bool operator==(const dboard_id_t &lhs, const dboard_id_t &rhs)
uhd
Definition build_info.hpp:12