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