GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
usrp_block.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2015,2019 Free Software Foundation, Inc.
4 *
5 * This file is part of GNU Radio
6 *
7 * SPDX-License-Identifier: GPL-3.0-or-later
8 *
9 */
10
11#ifndef INCLUDED_GR_UHD_USRP_BLOCK_H
12#define INCLUDED_GR_UHD_USRP_BLOCK_H
13
14#include <gnuradio/sync_block.h>
15#include <gnuradio/uhd/api.h>
16#include <uhd/usrp/multi_usrp.hpp>
17#include <cstdint>
18
19namespace gr {
20namespace uhd {
21
40
43
44/*! Base class for USRP blocks.
45 * \ingroup uhd_blk
46 *
47 * Note that many of the functions defined here differ between
48 * Rx and Tx configurations. As an example, set_center_freq()
49 * will set the Rx frequency for a usrp_source object, and the
50 * Tx frequency on a usrp_sink object.
51 */
53{
54protected:
55 usrp_block(){}; // For virtual sub-classing
56 usrp_block(const std::string& name,
57 gr::io_signature::sptr input_signature,
58 gr::io_signature::sptr output_signature);
59
60public:
61 /*!
62 * Set the frontend specification.
63 *
64 * \param spec the subdev spec markup string
65 * \param mboard the motherboard index 0 to M-1
66 */
67 virtual void set_subdev_spec(const std::string& spec, size_t mboard = 0) = 0;
68
69 /*!
70 * Get the frontend specification.
71 *
72 * \param mboard the motherboard index 0 to M-1
73 * \return the frontend specification in use
74 */
75 virtual std::string get_subdev_spec(size_t mboard = 0) = 0;
76
77 /*!
78 * Return the number of motherboards in this configuration.
79 */
80 virtual size_t get_num_mboards() = 0;
81
82 /*!
83 * Set the sample rate for this connection to the USRP.
84 *
85 * \param rate a new rate in Sps
86 */
87 virtual void set_samp_rate(double rate) = 0;
88
89 /*!
90 * Get the sample rate for this connection to the USRP.
91 * This is the actual sample rate and may differ from the rate set.
92 *
93 * \return the actual rate in Sps
94 */
95 virtual double get_samp_rate(void) = 0;
96
97 /*!
98 * Get the possible sample rates for this connection.
99 *
100 * \return a range of rates in Sps
101 */
102 virtual ::uhd::meta_range_t get_samp_rates(void) = 0;
103
104 /*!
105 * Tune the selected channel to the desired center frequency.
106 *
107 * \param tune_request the tune request instructions
108 * \param chan the channel index 0 to N-1
109 * \return a tune result with the actual frequencies
110 */
111 virtual ::uhd::tune_result_t set_center_freq(const ::uhd::tune_request_t tune_request,
112 size_t chan = 0) = 0;
113
114 /*!
115 * Tune the selected channel to the desired center frequency.
116 *
117 * This is a wrapper around set_center_freq() so that in this case,
118 * the user can pass a single frequency in the call instead of
119 * having to generate a tune_request_t object.
120 *
121 * \param freq the desired frequency in Hz
122 * \param chan the channel index 0 to N-1
123 * \return a tune result with the actual frequencies
124 */
125 ::uhd::tune_result_t set_center_freq(double freq, size_t chan = 0)
126 {
127 return set_center_freq(::uhd::tune_request_t(freq), chan);
128 }
129
130 /*!
131 * Get the center frequency.
132 *
133 * \param chan the channel index 0 to N-1
134 * \return the frequency in Hz
135 */
136 virtual double get_center_freq(size_t chan = 0) = 0;
137
138 /*!
139 * Get the tunable frequency range.
140 *
141 * \param chan the channel index 0 to N-1
142 * \return the frequency range in Hz
143 */
144 virtual ::uhd::freq_range_t get_freq_range(size_t chan = 0) = 0;
145
146 /*!
147 * Set the gain for the selected channel.
148 *
149 * \param gain the gain in dB
150 * \param chan the channel index 0 to N-1
151 * \param direction TX or RX. This is mostly used by the internal message
152 * handling.
153 */
154 virtual void
155 set_gain(double gain, size_t chan = 0, pmt::pmt_t direction = pmt::PMT_NIL) = 0;
156
157 /*!
158 * Set the named gain on the dboard.
159 *
160 * \param gain the gain in dB
161 * \param name the name of the gain stage
162 * \param chan the channel index 0 to N-1
163 */
164 virtual void set_gain(double gain, const std::string& name, size_t chan = 0) = 0;
165
166 /*!
167 * Set the normalized gain.
168 *
169 * The normalized gain is always in [0, 1], regardless of the device.
170 * 0 corresponds to minimum gain (usually 0 dB, but make sure to read the device
171 * notes in the UHD manual) and 1 corresponds to maximum gain.
172 * This will work for any UHD device. Use get_gain() to see which dB value
173 * the normalized gain value corresponds to.
174 *
175 * Note that it is not possible to specify a gain name for this function.
176 *
177 * \throws A runtime_error if \p norm_gain is not within the valid range.
178 *
179 * \param norm_gain the gain in fractions of the gain range (must be 0 <= norm_gain <=
180 * 1) \param chan the channel index 0 to N-1
181 */
182 virtual void set_normalized_gain(double norm_gain, size_t chan = 0) = 0;
183
184 /*!
185 * Get the actual dboard gain setting.
186 *
187 * \param chan the channel index 0 to N-1
188 * \return the actual gain in dB
189 */
190 virtual double get_gain(size_t chan = 0) = 0;
191
192 /*!
193 * Get the actual dboard gain setting of named stage.
194 *
195 * \param name the name of the gain stage
196 * \param chan the channel index 0 to N-1
197 * \return the actual gain in dB
198 */
199 virtual double get_gain(const std::string& name, size_t chan = 0) = 0;
200
201 /*!
202 * Returns the normalized gain.
203 *
204 * The normalized gain is always in [0, 1], regardless of the device.
205 * See also set_normalized_gain().
206 *
207 * Note that it is not possible to specify a gain name for
208 * this function, the result is over the entire gain chain.
209 *
210 * \param chan the channel index 0 to N-1
211 */
212 virtual double get_normalized_gain(size_t chan = 0) = 0;
213
214 /*!
215 * Get the actual dboard gain setting of named stage.
216 *
217 * \param chan the channel index 0 to N-1
218 * \return the actual gain in dB
219 */
220 virtual std::vector<std::string> get_gain_names(size_t chan = 0) = 0;
221
222 /*!
223 * Get the settable gain range.
224 *
225 * \param chan the channel index 0 to N-1
226 * \return the gain range in dB
227 */
228 virtual ::uhd::gain_range_t get_gain_range(size_t chan = 0) = 0;
229
230 /*!
231 * Get the settable gain range.
232 *
233 * \param name the name of the gain stage
234 * \param chan the channel index 0 to N-1
235 * \return the gain range in dB
236 */
237 virtual ::uhd::gain_range_t get_gain_range(const std::string& name,
238 size_t chan = 0) = 0;
239
240 /*! Query if this device is capable of absolute power levels
241 *
242 * If true, the set_power_reference() and get_power_reference() APIs can be
243 * used as well.
244 * Note that if the underlying UHD version doesn't support power APIs, a
245 * warning will be printed, and the return value is always false.
246 *
247 * \param chan the channel index 0 to N-1
248 * \returns true if there is a power reference API available for this channel
249 */
250 virtual bool has_power_reference(size_t chan = 0) = 0;
251
252 /*! Set the absolute power reference level for this channel
253 *
254 * Note that this API is available for certain devices only, and only if
255 * calibration data is available. Refer to the UHD manual for greater
256 * detail: https://files.ettus.com/manual/page_power.html
257 *
258 * In a nutshell, using the power reference will configure the device such
259 * that a full-scale signal (0 dBFS) corresponds to a signal at the
260 * antenna connector of \p power_dbm.
261 * After calling this function, the device will attempt to keep the power
262 * level constant after retuning, which means the gain level may be changed
263 * after a re-tune.
264 *
265 * The device may coerce the available power level (for example, if the
266 * requested power level is not achievable by the device). The coerced
267 * value may be read by calling get_power_reference().
268 *
269 * \param power_dbm The power reference level in dBm
270 * \param chan the channel index 0 to N-1
271 * \throws std::runtime_error if the underlying UHD version does not support
272 * the power API.
273 */
274 virtual void set_power_reference(double power_dbm, size_t chan = 0) = 0;
275
276 /*! Return the absolute power reference level for this channel
277 *
278 * Note that this API is only available for certain devices, and assuming
279 * the existence of calibration data. Refer to the UHD manual for greater
280 * detail: https://files.ettus.com/manual/page_compat.html
281 *
282 * See also set_power_reference().
283 *
284 * \param chan the channel index 0 to N-1
285 * \throws std::runtime_error if the underlying UHD version does not support
286 * the power API.
287 */
288 virtual double get_power_reference(size_t chan = 0) = 0;
289
290 /*! Return the available power range
291 *
292 * \param chan the channel index 0 to N-1
293 * \return the power range in dBm
294 * \throws std::runtime_error if the underlying UHD version does not support
295 * the power API.
296 */
297 virtual ::uhd::meta_range_t get_power_range(size_t chan = 0) = 0;
298
299 /*!
300 * Set the antenna to use for a given channel.
301 *
302 * \param ant the antenna string
303 * \param chan the channel index 0 to N-1
304 */
305 virtual void set_antenna(const std::string& ant, size_t chan = 0) = 0;
306
307 /*!
308 * Get the antenna in use.
309 *
310 * \param chan the channel index 0 to N-1
311 * \return the antenna string
312 */
313 virtual std::string get_antenna(size_t chan = 0) = 0;
314
315 /*!
316 * Get a list of possible antennas on a given channel.
317 *
318 * \param chan the channel index 0 to N-1
319 * \return a vector of antenna strings
320 */
321 virtual std::vector<std::string> get_antennas(size_t chan = 0) = 0;
322
323 /*!
324 * Set the bandpass filter on the RF frontend.
325 *
326 * \param bandwidth the filter bandwidth in Hz
327 * \param chan the channel index 0 to N-1
328 */
329 virtual void set_bandwidth(double bandwidth, size_t chan = 0) = 0;
330
331 /*!
332 * Get the bandpass filter setting on the RF frontend.
333 *
334 * \param chan the channel index 0 to N-1
335 * \return bandwidth of the filter in Hz
336 */
337 virtual double get_bandwidth(size_t chan = 0) = 0;
338
339 /*!
340 * Get the bandpass filter range of the RF frontend.
341 *
342 * \param chan the channel index 0 to N-1
343 * \return the range of the filter bandwidth in Hz
344 */
345 virtual ::uhd::freq_range_t get_bandwidth_range(size_t chan = 0) = 0;
346
347 /*!
348 * Get an RF frontend sensor value.
349 * \param name the name of the sensor
350 * \param chan the channel index 0 to N-1
351 * \return a sensor value object
352 */
353 virtual ::uhd::sensor_value_t get_sensor(const std::string& name,
354 size_t chan = 0) = 0;
355
356 /*!
357 * Get a list of possible RF frontend sensor names.
358 * \param chan the channel index 0 to N-1
359 * \return a vector of sensor names
360 */
361 virtual std::vector<std::string> get_sensor_names(size_t chan = 0) = 0;
362
363 //! DEPRECATED use get_sensor
364 ::uhd::sensor_value_t get_dboard_sensor(const std::string& name, size_t chan = 0)
365 {
366 return this->get_sensor(name, chan);
367 }
368
369 //! DEPRECATED use get_sensor_names
370 std::vector<std::string> get_dboard_sensor_names(size_t chan = 0)
371 {
372 return this->get_sensor_names(chan);
373 }
374
375 /*!
376 * Get a motherboard sensor value.
377 *
378 * \param name the name of the sensor
379 * \param mboard the motherboard index 0 to M-1
380 * \return a sensor value object
381 */
382 virtual ::uhd::sensor_value_t get_mboard_sensor(const std::string& name,
383 size_t mboard = 0) = 0;
384
385 /*!
386 * Get a list of possible motherboard sensor names.
387 *
388 * \param mboard the motherboard index 0 to M-1
389 * \return a vector of sensor names
390 */
391 virtual std::vector<std::string> get_mboard_sensor_names(size_t mboard = 0) = 0;
392
393 /*!
394 * Get the currently set time source.
395 *
396 * \param mboard which motherboard to get the config
397 * \return the string representing the time source
398 */
399 virtual std::string get_time_source(const size_t mboard) = 0;
400
401 /*!
402 * Get a list of possible time sources.
403 *
404 * \param mboard which motherboard to get the list
405 * \return a vector of strings for possible settings
406 */
407 virtual std::vector<std::string> get_time_sources(const size_t mboard) = 0;
408
409 /*!
410 * Set the clock source for the usrp device.
411 *
412 * This sets the source for a 10 MHz reference clock.
413 * Typical options for source: internal, external, MIMO.
414 *
415 * \param source a string representing the clock source
416 * \param mboard which motherboard to set the config
417 */
418 virtual void set_clock_source(const std::string& source, const size_t mboard = 0) = 0;
419
420 /*!
421 * Get the currently set clock source.
422 *
423 * \param mboard which motherboard to get the config
424 * \return the string representing the clock source
425 */
426 virtual std::string get_clock_source(const size_t mboard) = 0;
427
428 /*!
429 * Get a list of possible clock sources.
430 *
431 * \param mboard which motherboard to get the list
432 * \return a vector of strings for possible settings
433 */
434 virtual std::vector<std::string> get_clock_sources(const size_t mboard) = 0;
435
436 /*!
437 * Get the master clock rate.
438 *
439 * \param mboard the motherboard index 0 to M-1
440 * \return the clock rate in Hz
441 */
442 virtual double get_clock_rate(size_t mboard = 0) = 0;
443
444 /*!
445 * Set the master clock rate.
446 *
447 * \param rate the new rate in Hz
448 * \param mboard the motherboard index 0 to M-1
449 */
450 virtual void set_clock_rate(double rate, size_t mboard = 0) = 0;
451
452 /*!
453 * Get the current time registers.
454 *
455 * \param mboard the motherboard index 0 to M-1
456 * \return the current usrp time
457 */
458 virtual ::uhd::time_spec_t get_time_now(size_t mboard = 0) = 0;
459
460 /*!
461 * Get the time when the last pps pulse occurred.
462 * \param mboard the motherboard index 0 to M-1
463 * \return the current usrp time
464 */
465 virtual ::uhd::time_spec_t get_time_last_pps(size_t mboard = 0) = 0;
466
467 /*!
468 * Sets the time registers immediately.
469 * \param time_spec the new time
470 * \param mboard the motherboard index 0 to M-1
471 */
472 virtual void set_time_now(const ::uhd::time_spec_t& time_spec, size_t mboard = 0) = 0;
473
474 /*!
475 * Set the time registers at the next pps.
476 * \param time_spec the new time
477 */
478 virtual void set_time_next_pps(const ::uhd::time_spec_t& time_spec) = 0;
479
480 /*!
481 * Sync the time registers with an unknown pps edge.
482 * \param time_spec the new time
483 */
484 virtual void set_time_unknown_pps(const ::uhd::time_spec_t& time_spec) = 0;
485
486 /*!
487 * Set the time at which the control commands will take effect.
488 *
489 * A timed command will back-pressure all subsequent timed commands,
490 * assuming that the subsequent commands occur within the time-window.
491 * If the time spec is late, the command will be activated upon arrival.
492 *
493 * \param time_spec the time at which the next command will activate
494 * \param mboard which motherboard to set the config
495 */
496 virtual void set_command_time(const ::uhd::time_spec_t& time_spec,
497 size_t mboard = 0) = 0;
498
499 /*!
500 * Clear the command time so future commands are sent ASAP.
501 *
502 * \param mboard which motherboard to set the config
503 */
504 virtual void clear_command_time(size_t mboard = 0) = 0;
505
506 /*!
507 * Get access to the underlying uhd dboard iface object.
508 *
509 * \return the dboard_iface object
510 */
511 virtual ::uhd::usrp::dboard_iface::sptr get_dboard_iface(size_t chan = 0) = 0;
512
513 /*!
514 * Get access to the underlying uhd device object.
515 *
516 * NOTE: This function is only available in C++.
517 * \return the multi usrp device object
518 */
519 virtual ::uhd::usrp::multi_usrp::sptr get_device(void) = 0;
520
521 /*!
522 * Perform write on the user configuration register bus. These
523 * only exist if the user has implemented custom setting
524 * registers in the device FPGA.
525 *
526 * \param addr 8-bit register address
527 * \param data 32-bit register value
528 * \param mboard which motherboard to set the user register
529 */
530 virtual void
531 set_user_register(const uint8_t addr, const uint32_t data, size_t mboard = 0) = 0;
532
533 /*!
534 * Set the time source for the USRP device.
535 *
536 * This sets the method of time synchronization,
537 * typically a pulse per second or an encoded time.
538 * Typical options for source: external, MIMO.
539 * \param source a string representing the time source
540 * \param mboard which motherboard to set the config
541 */
542 virtual void set_time_source(const std::string& source, const size_t mboard = 0) = 0;
543
544 /*!
545 * Update the stream args for this device.
546 *
547 * This update will only take effect after a restart of the
548 * streaming, or before streaming and after construction.
549 * This will also delete the current streamer.
550 * Note you cannot change the I/O signature of this block using
551 * this function, or it will throw.
552 *
553 * It is possible to leave the 'channels' fields of \p stream_args
554 * unset. In this case, the previous channels field is used.
555 *
556 * \param stream_args New stream args.
557 * \throws std::runtime_error if new settings are invalid.
558 */
559 virtual void set_stream_args(const ::uhd::stream_args_t& stream_args) = 0;
560
561 /*******************************************************************
562 * GPIO methods
563 ******************************************************************/
564 /*!
565 * Enumerate GPIO banks on the current device.
566 * \param mboard the motherboard index 0 to M-1
567 * \return a list of string for each bank name
568 */
569 virtual std::vector<std::string> get_gpio_banks(const size_t mboard) = 0;
570
571 /*!
572 * Set a GPIO attribute on a particular GPIO bank.
573 * Possible attribute names:
574 * - CTRL - 1 for ATR mode 0 for GPIO mode
575 * - DDR - 1 for output 0 for input
576 * - OUT - GPIO output level (not ATR mode)
577 * - ATR_0X - ATR idle state
578 * - ATR_RX - ATR receive only state
579 * - ATR_TX - ATR transmit only state
580 * - ATR_XX - ATR full duplex state
581 * \param bank the name of a GPIO bank
582 * \param attr the name of a GPIO attribute
583 * \param value the new value for this GPIO bank
584 * \param mask the bit mask to effect which pins are changed
585 * \param mboard the motherboard index 0 to M-1
586 */
587 virtual void set_gpio_attr(const std::string& bank,
588 const std::string& attr,
589 const uint32_t value,
590 const uint32_t mask = 0xffffffff,
591 const size_t mboard = 0) = 0;
592
593 /*!
594 * Get a GPIO attribute on a particular GPIO bank.
595 * Possible attribute names:
596 * - CTRL - 1 for ATR mode 0 for GPIO mode
597 * - DDR - 1 for output 0 for input
598 * - OUT - GPIO output level (not ATR mode)
599 * - ATR_0X - ATR idle state
600 * - ATR_RX - ATR receive only state
601 * - ATR_TX - ATR transmit only state
602 * - ATR_XX - ATR full duplex state
603 * - READBACK - readback input GPIOs
604 * \param bank the name of a GPIO bank
605 * \param attr the name of a GPIO attribute
606 * \param mboard the motherboard index 0 to M-1
607 * \return the value set for this attribute
608 */
609 virtual uint32_t get_gpio_attr(const std::string& bank,
610 const std::string& attr,
611 const size_t mboard = 0) = 0;
612
613 /*! Enumerate the available filters in the signal path.
614 *
615 * \param chan Channel index
616 *
617 * \return a vector of strings representing the selected filter names.
618 */
619 virtual std::vector<std::string> get_filter_names(const size_t chan = 0) = 0;
620
621 /*! Write back a filter obtained by get_filter() to the signal path.
622 *
623 * This filter can be a modified version of the originally returned one.
624 * The information about Rx or Tx is contained in the path parameter.
625 * \param path the name of the filter as returned from get_filter_names().
626 * \param filter the filter_info_base::sptr of the filter object to be written
627 * \param chan Channel index
628 */
629 virtual void set_filter(const std::string& path,
630 ::uhd::filter_info_base::sptr filter,
631 const size_t chan = 0) = 0;
632
633 /*! Return the filter object for the given name.
634 *
635 * \param path the name of the filter as returned from get_filter_names()
636 * \param chan Channel index
637 * \return the filter object
638 */
639 virtual ::uhd::filter_info_base::sptr get_filter(const std::string& path,
640 const size_t chan = 0) = 0;
641
642 /*!
643 * Returns identifying information about this USRP's configuration.
644 * Returns motherboard ID, name, and serial.
645 * Returns daughterboard TX ID, subdev name and spec, serial, and antenna.
646 * \param chan channel index 0 to N-1
647 * \return TX info
648 */
649 virtual ::uhd::dict<std::string, std::string> get_usrp_info(size_t chan = 0) = 0;
650};
651
652} /* namespace uhd */
653} /* namespace gr */
654
655#endif /* INCLUDED_GR_UHD_USRP_BLOCK_H */
std::shared_ptr< io_signature > sptr
Definition: io_signature.h:47
synchronous 1:1 input to output with history
Definition: sync_block.h:26
Definition: usrp_block.h:53
virtual double get_gain(size_t chan=0)=0
virtual void set_clock_rate(double rate, size_t mboard=0)=0
virtual size_t get_num_mboards()=0
virtual void set_time_unknown_pps(const ::uhd::time_spec_t &time_spec)=0
virtual ::uhd::time_spec_t get_time_last_pps(size_t mboard=0)=0
virtual void set_gain(double gain, size_t chan=0, pmt::pmt_t direction=pmt::PMT_NIL)=0
virtual ::uhd::meta_range_t get_samp_rates(void)=0
::uhd::sensor_value_t get_dboard_sensor(const std::string &name, size_t chan=0)
DEPRECATED use get_sensor.
Definition: usrp_block.h:364
virtual void set_gain(double gain, const std::string &name, size_t chan=0)=0
virtual ::uhd::sensor_value_t get_sensor(const std::string &name, size_t chan=0)=0
virtual std::string get_subdev_spec(size_t mboard=0)=0
virtual void set_time_next_pps(const ::uhd::time_spec_t &time_spec)=0
virtual std::string get_clock_source(const size_t mboard)=0
virtual void set_clock_source(const std::string &source, const size_t mboard=0)=0
virtual std::vector< std::string > get_time_sources(const size_t mboard)=0
virtual void set_antenna(const std::string &ant, size_t chan=0)=0
virtual ::uhd::filter_info_base::sptr get_filter(const std::string &path, const size_t chan=0)=0
std::vector< std::string > get_dboard_sensor_names(size_t chan=0)
DEPRECATED use get_sensor_names.
Definition: usrp_block.h:370
virtual ::uhd::sensor_value_t get_mboard_sensor(const std::string &name, size_t mboard=0)=0
virtual void set_filter(const std::string &path, ::uhd::filter_info_base::sptr filter, const size_t chan=0)=0
virtual ::uhd::usrp::multi_usrp::sptr get_device(void)=0
virtual std::string get_time_source(const size_t mboard)=0
virtual void set_power_reference(double power_dbm, size_t chan=0)=0
virtual std::string get_antenna(size_t chan=0)=0
virtual bool has_power_reference(size_t chan=0)=0
virtual uint32_t get_gpio_attr(const std::string &bank, const std::string &attr, const size_t mboard=0)=0
virtual double get_normalized_gain(size_t chan=0)=0
usrp_block(const std::string &name, gr::io_signature::sptr input_signature, gr::io_signature::sptr output_signature)
virtual void set_time_now(const ::uhd::time_spec_t &time_spec, size_t mboard=0)=0
virtual double get_power_reference(size_t chan=0)=0
virtual ::uhd::gain_range_t get_gain_range(size_t chan=0)=0
virtual ::uhd::usrp::dboard_iface::sptr get_dboard_iface(size_t chan=0)=0
virtual std::vector< std::string > get_gain_names(size_t chan=0)=0
virtual double get_clock_rate(size_t mboard=0)=0
virtual double get_center_freq(size_t chan=0)=0
virtual std::vector< std::string > get_filter_names(const size_t chan=0)=0
virtual void set_time_source(const std::string &source, const size_t mboard=0)=0
virtual std::vector< std::string > get_clock_sources(const size_t mboard)=0
virtual ::uhd::gain_range_t get_gain_range(const std::string &name, size_t chan=0)=0
virtual std::vector< std::string > get_gpio_banks(const size_t mboard)=0
virtual double get_bandwidth(size_t chan=0)=0
virtual ::uhd::time_spec_t get_time_now(size_t mboard=0)=0
virtual void set_gpio_attr(const std::string &bank, const std::string &attr, const uint32_t value, const uint32_t mask=0xffffffff, const size_t mboard=0)=0
virtual ::uhd::meta_range_t get_power_range(size_t chan=0)=0
::uhd::tune_result_t set_center_freq(double freq, size_t chan=0)
Definition: usrp_block.h:125
virtual void set_stream_args(const ::uhd::stream_args_t &stream_args)=0
virtual std::vector< std::string > get_antennas(size_t chan=0)=0
usrp_block()
Definition: usrp_block.h:55
virtual ::uhd::freq_range_t get_bandwidth_range(size_t chan=0)=0
virtual void set_normalized_gain(double norm_gain, size_t chan=0)=0
virtual ::uhd::dict< std::string, std::string > get_usrp_info(size_t chan=0)=0
virtual void set_bandwidth(double bandwidth, size_t chan=0)=0
virtual void set_user_register(const uint8_t addr, const uint32_t data, size_t mboard=0)=0
virtual void set_command_time(const ::uhd::time_spec_t &time_spec, size_t mboard=0)=0
virtual ::uhd::tune_result_t set_center_freq(const ::uhd::tune_request_t tune_request, size_t chan=0)=0
virtual void set_samp_rate(double rate)=0
virtual std::vector< std::string > get_sensor_names(size_t chan=0)=0
virtual double get_samp_rate(void)=0
virtual ::uhd::freq_range_t get_freq_range(size_t chan=0)=0
virtual void set_subdev_spec(const std::string &spec, size_t mboard=0)=0
virtual std::vector< std::string > get_mboard_sensor_names(size_t mboard=0)=0
virtual double get_gain(const std::string &name, size_t chan=0)=0
virtual void clear_command_time(size_t mboard=0)=0
#define GR_UHD_API
Definition: gr-uhd/include/gnuradio/uhd/api.h:18
GR_UHD_API const pmt::pmt_t cmd_lo_freq_key()
GR_UHD_API const pmt::pmt_t cmd_pc_clock_resync_key()
GR_UHD_API const pmt::pmt_t direction_rx()
GR_UHD_API const pmt::pmt_t cmd_time_key()
GR_UHD_API const pmt::pmt_t cmd_freq_key()
GR_UHD_API const pmt::pmt_t cmd_dsp_freq_key()
GR_UHD_API const pmt::pmt_t cmd_mboard_key()
GR_UHD_API const pmt::pmt_t cmd_rate_key()
GR_UHD_API const pmt::pmt_t cmd_direction_key()
GR_UHD_API const pmt::pmt_t cmd_gpio_key()
GR_UHD_API const pmt::pmt_t cmd_chan_key()
GR_UHD_API const pmt::pmt_t cmd_lo_offset_key()
GR_UHD_API const pmt::pmt_t cmd_power_key()
GR_UHD_API const pmt::pmt_t cmd_tag_key()
GR_UHD_API const pmt::pmt_t cmd_bandwidth_key()
GR_UHD_API const pmt::pmt_t cmd_antenna_key()
GR_UHD_API const pmt::pmt_t cmd_tune_key()
GR_UHD_API const pmt::pmt_t cmd_gain_key()
GR_UHD_API const pmt::pmt_t cmd_mtune_key()
GR_UHD_API const pmt::pmt_t direction_tx()
GNU Radio logging wrapper.
Definition: basic_block.h:29
std::shared_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting).
Definition: pmt.h:83
#define PMT_NIL
Definition: pmt.h:121