GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
rfnoc_tx_radio.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2019 Ettus Research, a National Instruments Brand.
4 * Copyright 2020 Free Software Foundation, Inc.
5 *
6 * SPDX-License-Identifier: GPL-3.0-or-later
7 */
8
9#ifndef INCLUDED_GR_UHD_RFNOC_TX_RADIO_H
10#define INCLUDED_GR_UHD_RFNOC_TX_RADIO_H
11
12#include <gnuradio/uhd/api.h>
15
16namespace gr {
17namespace uhd {
18
19/*! RFNoC TX Radio
20 *
21 * This wraps a radio block into GNU Radio. Note: When doing TX and RX in the
22 * same flow graph, simply create an rfnoc_rx_radio and an rfnoc_tx_radio with
23 * the same block ID.
24 *
25 * \ingroup uhd_blk
26 */
28{
29public:
30 typedef std::shared_ptr<rfnoc_tx_radio> sptr;
31
32 /*!
33 * \param graph Reference to the underlying rfnoc_graph object
34 * \param block_args Additional block arguments
35 * \param device_select Device Selection
36 * \param instance Instance Selection
37 */
39 const ::uhd::device_addr_t& block_args,
40 const int device_select,
41 const int instance);
42
43 //! Set the input sampling rate of the radio block
44 //
45 // Note: The actual rate of the radio will be coerced to whatever it is
46 // capable of.
47 //
48 // \param rate The new sampling rate
49 virtual double set_rate(const double rate) = 0;
50
51 //! Set the antenna for this radio
52 //
53 // \param antenna The antenna name (e.g., "RX2"). Valid name depend on the
54 // underlying hardware.
55 // \param chan The channel for which this antenna setting is for
56 virtual void set_antenna(const std::string& antenna, const size_t chan) = 0;
57
58 //! Set the TX frequency for this radio
59 //
60 // \param frequency The received frequency (e.g., 1e9)
61 // \param chan The channel for which this frequency setting is for
62 virtual double set_frequency(const double frequency, const size_t chan) = 0;
63
64 //! Configure the tune args for this RX radio
65 //
66 // \param args The new args (e.g., "mode_n=1")
67 // \param chan The channel for which this setting is for
68 virtual void set_tune_args(const ::uhd::device_addr_t& args, const size_t chan) = 0;
69
70 //! Configure the overall gain for this TX radio
71 //
72 // \param gain The new gain value (in dB)
73 // \param chan The channel for which this setting is for
74 virtual double set_gain(const double gain, const size_t chan) = 0;
75
76 //! Configure a specific gain for this RX radio
77 //
78 // \param gain The new gain value (in dB)
79 // \param name The gain stage name to set
80 // \param chan The channel for which this setting is for
81 virtual double
82 set_gain(const double gain, const std::string& name, const size_t chan) = 0;
83
84 //! Switch the gain profile for this RX radio
85 //
86 // \param profile The name of the gain profile (e.g., "default")
87 // \param chan The channel for which this setting is for
88 virtual void set_gain_profile(const std::string& profile, const size_t chan) = 0;
89
90 //! Set the analog bandwidth for this RX radio
91 //
92 // \param bandwidth The new bandwidth, in Hz
93 // \param chan The channel for which this setting is for
94 virtual double set_bandwidth(const double bandwidth, const size_t chan) = 0;
95
96 //! Set the LO source for this TX radio
97 //
98 // Note: Available sources depend on the underlying hardware.
99 //
100 // \param source The new LO source (e.g., "internal")
101 // \param name The LO name (e.g. "LO1")
102 // \param chan The channel for which this setting is for
103 virtual void set_lo_source(const std::string& source,
104 const std::string& name,
105 const size_t chan) = 0;
106
107 //! Enable/disable LO export for this TX radio
108 //
109 // \param enabled When true, export this LO
110 // \param name The LO name (e.g. "LO1")
111 // \param chan The channel for which this setting is for
112 virtual void set_lo_export_enabled(const bool enabled,
113 const std::string& name,
114 const size_t chan) = 0;
115
116 //! Configure the LO frequency explicitly
117 //
118 // Consult uhd::rfnoc::radio_control::set_tx_lo_freq() for more details.
119 // \param freq The new LO frequency
120 // \param name The LO name (e.g. "LO1")
121 // \param chan The channel for which this setting is for
122 virtual double
123 set_lo_freq(const double freq, const std::string& name, const size_t chan) = 0;
124
125 //! Set the DC offset value explicitly
126 //
127 // Consult uhd::rfnoc::radio_control::set_tx_dc_offset() for more details.
128 //
129 // \param offset The DC offset value that gets used for compensation
130 // \param chan The channel for which this setting is for
131 virtual void set_dc_offset(const std::complex<double>& offset, const size_t chan) = 0;
132
133 //! Set the I/Q imbalance correction value explicitly
134 //
135 // Consult uhd::rfnoc::radio_control::set_tx_iq_balance() for more details.
136 //
137 // \param offset The DC offset value that gets used for compensation
138 // \param chan The channel for which this setting is for
139 virtual void set_iq_balance(const std::complex<double>& correction,
140 const size_t chan) = 0;
141};
142
143} // namespace uhd
144} // namespace gr
145
146#endif /* INCLUDED_GR_UHD_RFNOC_TX_RADIO_H */
Definition: rfnoc_block.h:26
std::shared_ptr< rfnoc_block > sptr
Definition: rfnoc_block.h:34
std::shared_ptr< rfnoc_graph > sptr
Definition: rfnoc_graph.h:32
Definition: rfnoc_tx_radio.h:28
virtual double set_lo_freq(const double freq, const std::string &name, const size_t chan)=0
Configure the LO frequency explicitly.
virtual double set_bandwidth(const double bandwidth, const size_t chan)=0
Set the analog bandwidth for this RX radio.
static sptr make(rfnoc_graph::sptr graph, const ::uhd::device_addr_t &block_args, const int device_select, const int instance)
virtual double set_frequency(const double frequency, const size_t chan)=0
Set the TX frequency for this radio.
virtual void set_antenna(const std::string &antenna, const size_t chan)=0
Set the antenna for this radio.
virtual double set_rate(const double rate)=0
Set the input sampling rate of the radio block.
virtual void set_lo_source(const std::string &source, const std::string &name, const size_t chan)=0
Set the LO source for this TX radio.
virtual double set_gain(const double gain, const std::string &name, const size_t chan)=0
Configure a specific gain for this RX radio.
virtual void set_tune_args(const ::uhd::device_addr_t &args, const size_t chan)=0
Configure the tune args for this RX radio.
virtual void set_dc_offset(const std::complex< double > &offset, const size_t chan)=0
Set the DC offset value explicitly.
virtual void set_lo_export_enabled(const bool enabled, const std::string &name, const size_t chan)=0
Enable/disable LO export for this TX radio.
std::shared_ptr< rfnoc_tx_radio > sptr
Definition: rfnoc_tx_radio.h:30
virtual double set_gain(const double gain, const size_t chan)=0
Configure the overall gain for this TX radio.
virtual void set_iq_balance(const std::complex< double > &correction, const size_t chan)=0
Set the I/Q imbalance correction value explicitly.
virtual void set_gain_profile(const std::string &profile, const size_t chan)=0
Switch the gain profile for this RX radio.
#define GR_UHD_API
Definition: gr-uhd/include/gnuradio/uhd/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29