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