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