GNU Radio Manual and C++ API Reference  3.9.2.0
The Free & Open Software Radio Ecosystem
gr-soapy/include/gnuradio/soapy/block.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2021 Jeff Long
4  * Copyright 2018-2021 Libre Space Foundation <http://libre.space/>
5  *
6  * SPDX-License-Identifier: GPL-3.0-or-later
7  */
8 
9 #ifndef INCLUDED_GR_SOAPY_BLOCK_H
10 #define INCLUDED_GR_SOAPY_BLOCK_H
11 
12 #include <gnuradio/block.h>
13 #include <gnuradio/soapy/api.h>
15 #include <cstdint>
16 #include <string>
17 #include <vector>
18 
19 namespace gr {
20 namespace soapy {
21 
22 class SOAPY_API block : virtual public gr::block
23 {
24 public:
25  /*!
26  * A key that uniquely identifies the device driver.
27  * This key identifies the underlying implementation.
28  * Several variants of a product may share a driver.
29  */
30  virtual std::string get_driver_key() const = 0;
31 
32  /*!
33  * A key that uniquely identifies the hardware.
34  * This key should be meaningful to the user
35  * to optimize for the underlying hardware.
36  */
37  virtual std::string get_hardware_key() const = 0;
38 
39  /*!
40  * Query a dictionary of available device information.
41  * This dictionary can any number of values like
42  * vendor name, product name, revisions, serials...
43  * This information can be displayed to the user
44  * to help identify the instantiated device.
45  */
46  virtual kwargs_t get_hardware_info() const = 0;
47 
48  /*!
49  * Set the frontend mapping of available DSP units to RF frontends.
50  * This mapping controls channel mapping and channel availability.
51  * \param frontend_mapping a vendor-specific mapping string
52  */
53  virtual void set_frontend_mapping(const std::string& frontend_mapping) = 0;
54 
55  /*!
56  * Get the frontend mapping of available DSP units to RF frontends.
57  * This mapping describes channel mapping and channel availability.
58  * \return a vendor-specific mapping string
59  */
60  virtual std::string get_frontend_mapping() const = 0;
61 
62  /*!
63  * Query a dictionary of available channel information.
64  * This dictionary can any number of values like
65  * decoder type, version, available functions...
66  * This information can be displayed to the user
67  * to help identify the instantiated channel.
68  * \param channel an available channel on the device
69  * \return channel information
70  */
71  virtual kwargs_t get_channel_info(size_t channel) const = 0;
72 
73  /*!
74  * Set sample rate
75  * \param channel an available channel
76  * \param sample_rate samples per second
77  */
78  virtual void set_sample_rate(size_t channel, double sample_rate) = 0;
79 
80  /*!
81  * Get the baseband sample rate of the RX chain.
82  * \param channel an available channel on the device
83  * \return the sample rate in samples per second
84  */
85  virtual double get_sample_rate(size_t channel) const = 0;
86 
87  /*!
88  * Get the range of possible baseband sample rates.
89  * \param channel an available channel on the device
90  * \return a list of sample rate ranges in samples per second
91  */
92  virtual range_list_t get_sample_rate_range(size_t channel) const = 0;
93 
94  /*!
95  * Set device center frequency
96  * \param channel an available channel
97  * \param freq frequency in Hz
98  */
99  virtual void set_frequency(size_t channel, double freq) = 0;
100 
101  /*!
102  * Set center frequency of a tunable element
103  * \param channel an available channel
104  * \param name an available element name
105  * \param freq frequency in Hz
106  */
107  virtual void set_frequency(size_t channel, const std::string& name, double freq) = 0;
108 
109  /*!
110  * Get the down conversion frequency of the chain.
111  * \param channel an available channel on the device
112  * \return the center frequency in Hz
113  */
114  virtual double get_frequency(size_t channel) const = 0;
115 
116  /*!
117  * Get the frequency of a tunable element in the chain.
118  * \param channel an available channel on the device
119  * \param name the name of a tunable element
120  * \return the tunable element's frequency in Hz
121  */
122  virtual double get_frequency(size_t channel, const std::string& name) const = 0;
123 
124  /*!
125  * List available tunable elements in the chain.
126  * Elements should be in order RF to baseband.
127  * \param channel an available channel
128  * \return a list of tunable elements by name
129  */
130  virtual std::vector<std::string> list_frequencies(size_t channel) const = 0;
131 
132  /*!
133  * Get the range of overall frequency values.
134  * \param channel an available channel on the device
135  * \return a list of frequency ranges in Hz
136  */
137  virtual range_list_t get_frequency_range(size_t channel) const = 0;
138 
139  /*!
140  * Get the range of tunable values for the specified element.
141  * \param channel an available channel on the device
142  * \param name the name of a tunable element
143  * \return a list of frequency ranges in Hz
144  */
145  virtual range_list_t get_frequency_range(size_t channel,
146  const std::string& name) const = 0;
147 
148  /*!
149  * Query the argument info description for stream args.
150  * \param channel an available channel on the device
151  * \return a list of argument info structures
152  */
153  virtual arginfo_list_t get_frequency_args_info(size_t channel) const = 0;
154 
155  /*!
156  * Set filter bandwidth
157  * \param channel an available channel
158  * \param bandwidth filter width in Hz
159  */
160  virtual void set_bandwidth(size_t channel, double bandwidth) = 0;
161 
162  /*!
163  * Get baseband filter width of the RX chain.
164  * \param channel an available channel on the device
165  * \return the baseband filter width in Hz
166  */
167  virtual double get_bandwidth(size_t channel) const = 0;
168 
169  /*!
170  * Get the range of possible baseband filter widths.
171  * \param channel an available channel on the device
172  * \return a list of bandwidth ranges in Hz
173  */
174  virtual range_list_t get_bandwidth_range(size_t channel) const = 0;
175 
176  /*!
177  * List available antennas for a channel
178  * @param channel channel index
179  * @return available antenna names
180  */
181  virtual std::vector<std::string> list_antennas(int channel) const = 0;
182 
183  /*!
184  * Set antenna for channel
185  * \param channel an available channel
186  * \param name an available antenna string name
187  */
188  virtual void set_antenna(size_t channel, const std::string& name) = 0;
189 
190  /*!
191  * Get the selected antenna on RX chain.
192  * \param channel an available channel on the device
193  * \return the name of the selected antenna
194  */
195  virtual std::string get_antenna(size_t channel) const = 0;
196 
197  /*!
198  * Return whether automatic gain control (AGC) is supported
199  * \param channel an available channel
200  */
201  virtual bool has_gain_mode(size_t channel) const = 0;
202 
203  /*!
204  * Set automatic gain control (AGC)
205  * \param channel an available channel
206  * \param enable true to enable AGC
207  */
208  virtual void set_gain_mode(size_t channel, bool enable) = 0;
209 
210  /*!
211  * Get the automatic gain mode on the RX chain.
212  * \param channel an available channel on the device
213  * \return true for automatic gain setting
214  */
215  virtual bool get_gain_mode(size_t channel) const = 0;
216 
217  /*!
218  * List available amplification elements.
219  * Elements should be in order RF to baseband.
220  * \param channel an available channel
221  * \return a list of gain string names
222  */
223  virtual std::vector<std::string> list_gains(size_t channel) const = 0;
224 
225  /*!
226  * Set overall gain
227  * The gain will be distributed automatically across available
228  * elements according to Soapy API.
229  * \param channel an available channel
230  * \param gain overall gain value
231  */
232  virtual void set_gain(size_t channel, double gain) = 0;
233 
234  /*!
235  * Set specific gain value
236  * \param channel an available channel
237  * \param name gain name to set
238  * \param gain gain value
239  */
240  virtual void set_gain(size_t channel, const std::string& name, double gain) = 0;
241 
242  /*!
243  * Get the overall value of the gain elements in a chain
244  * \param channel an available channel on the device
245  * \return the value of the gain in dB
246  */
247  virtual double get_gain(size_t channel) const = 0;
248 
249  /*!
250  * Get the value of an individual amplification element in a chain.
251  * \param channel an available channel on the device
252  * \param name the name of an amplification element
253  * \return the value of the gain in dB
254  */
255  virtual double get_gain(size_t channel, const std::string& name) const = 0;
256 
257  /*!
258  * Get the overall range of possible gain values.
259  * \param channel an available channel on the device
260  * \return a list of gain ranges in dB
261  */
262  virtual range_t get_gain_range(size_t channel) const = 0;
263 
264  /*!
265  * Get the range of possible gain values for a specific element.
266  * \param channel an available channel on the device
267  * \param name the name of an amplification element
268  * \return a list of gain ranges in dB
269  */
270  virtual range_t get_gain_range(size_t channel, const std::string& name) const = 0;
271 
272  /*!
273  * Return whether frequency correction is supported
274  * \param channel an available channel
275  */
276  virtual bool has_frequency_correction(size_t channel) const = 0;
277 
278  /*!
279  * Set frequency correction
280  * \param channel an available channel
281  * \param freq_correction in PPM
282  */
283  virtual void set_frequency_correction(size_t channel, double freq_correction) = 0;
284 
285  /*!
286  * Get the frequency correction value.
287  * \param channel an available channel on the device
288  * \return the correction value in PPM
289  */
290  virtual double get_frequency_correction(size_t channel) const = 0;
291 
292  /*!
293  * Return whether DC offset mode can be set
294  * \param channel an available channel
295  */
296  virtual bool has_dc_offset_mode(size_t channel) const = 0;
297 
298  /*!
299  * Set DC offset mode
300  * \param channel an available channel
301  * \param automatic true to set automatic DC removal
302  */
303  virtual void set_dc_offset_mode(size_t channel, bool automatic) = 0;
304 
305  /*!
306  * Get the automatic DC offset correction mode.
307  * \param channel an available channel on the device
308  * \return true for automatic offset correction
309  */
310  virtual bool get_dc_offset_mode(size_t channel) const = 0;
311 
312  /*!
313  * Return whether manual dc offset correction is supported
314  * \param channel an available channel
315  */
316  virtual bool has_dc_offset(size_t channel) const = 0;
317 
318  /*!
319  * Set dc offset correction
320  * \param channel an available channel
321  * \param dc_offset complex dc offset correction
322  */
323  virtual void set_dc_offset(size_t channel, const gr_complexd& dc_offset) = 0;
324 
325  /*!
326  * Get the DC offset correction.
327  * \param channel an available channel on the device
328  * \return the relative correction (1.0 max)
329  */
330  virtual gr_complexd get_dc_offset(size_t channel) const = 0;
331 
332  /*!
333  * Return whether manual IQ balance correction is supported
334  * \param channel an available channel
335  */
336  virtual bool has_iq_balance(size_t channel) const = 0;
337 
338  /*!
339  * Set IQ balance correction
340  * \param channel an available channel
341  * \param iq_balance complex iq balance correction
342  */
343  virtual void set_iq_balance(size_t channel, const gr_complexd& iq_balance) = 0;
344 
345  /*!
346  * Get the IQ balance correction.
347  * \param channel an available channel on the device
348  * \return the relative correction (1.0 max)
349  */
350  virtual gr_complexd get_iq_balance(size_t channel) const = 0;
351 
352  /*!
353  * Does the device support automatic frontend IQ balance correction?
354  * \param direction the channel direction RX or TX
355  * \param channel an available channel on the device
356  * \return true if IQ balance corrections are supported
357  */
358  virtual bool has_iq_balance_mode(size_t channel) const = 0;
359 
360  /*!
361  * Set the automatic frontend IQ balance correction.
362  * \param channel an available channel on the device
363  * \param automatic true for automatic correction
364  */
365  virtual void set_iq_balance_mode(size_t channel, bool automatic) = 0;
366 
367  /*!
368  * Get the automatic IQ balance corrections mode.
369  * \param channel an available channel on the device
370  * \return true for automatic correction
371  */
372  virtual bool get_iq_balance_mode(size_t channel) const = 0;
373 
374  /*!
375  * Set master clock rate
376  * \param clock_rate clock rate in Hz
377  */
378  virtual void set_master_clock_rate(double clock_rate) = 0;
379 
380  /*!
381  * Get the master clock rate of the device.
382  * \return the clock rate in Hz
383  */
384  virtual double get_master_clock_rate() const = 0;
385 
386  /*!
387  * Get the range of available master clock rates.
388  * \return a list of clock rate ranges in Hz
389  */
391 
392  /*!
393  * Set the reference clock rate of the device.
394  * \param rate the clock rate in Hz
395  */
396  virtual void set_reference_clock_rate(double rate) = 0;
397 
398  /*!
399  * Get the reference clock rate of the device.
400  * \return the clock rate in Hz
401  */
402  virtual double get_reference_clock_rate() const = 0;
403 
404  /*!
405  * Get the range of available reference clock rates.
406  * \return a list of clock rate ranges in Hz
407  */
409 
410  /*!
411  * Get the list of available clock sources.
412  * \return a list of clock source names
413  */
414  virtual std::vector<std::string> list_clock_sources() const = 0;
415 
416  /*!
417  * Set the clock source
418  * \param clock_source an available clock source
419  */
420  virtual void set_clock_source(const std::string& clock_source) = 0;
421 
422  /*!
423  * Get the clock source of the device
424  * \return the name of the clock source
425  */
426  virtual std::string get_clock_source() const = 0;
427 
428  /*!
429  * Get the list of available time sources.
430  * \return a list of time source names
431  */
432  virtual std::vector<std::string> list_time_sources() const = 0;
433 
434  /*!
435  * Set the time source on the device
436  * \param source the name of a time source
437  */
438  virtual void set_time_source(const std::string& source) = 0;
439 
440  /*!
441  * Get the time source of the device
442  * \return the name of a time source
443  */
444  virtual std::string get_time_source() const = 0;
445 
446  /*!
447  * Does this device have a hardware clock?
448  * \param what optional argument
449  * \return true if the hardware clock exists
450  */
451  virtual bool has_hardware_time(const std::string& what = "") const = 0;
452 
453  /*!
454  * Read the time from the hardware clock on the device.
455  * The what argument can refer to a specific time counter.
456  * \param what optional argument
457  * \return the time in nanoseconds
458  */
459  virtual long long get_hardware_time(const std::string& what = "") const = 0;
460 
461  /*!
462  * Write the time to the hardware clock on the device.
463  * The what argument can refer to a specific time counter.
464  * \param timeNs time in nanoseconds
465  * \param what optional argument
466  */
467  virtual void set_hardware_time(long long timeNs, const std::string& what = "") = 0;
468 
469  /*!
470  * List the available global readback sensors.
471  * A sensor can represent a reference lock, RSSI, temperature.
472  * \return a list of available sensor string names
473  */
474  virtual std::vector<std::string> list_sensors() const = 0;
475 
476  /*!
477  * Get meta-information about a sensor.
478  * Example: displayable name, type, range.
479  * \param key the ID name of an available sensor
480  * \return meta-information about a sensor
481  */
482  virtual arginfo_t get_sensor_info(const std::string& key) const = 0;
483 
484  /*!
485  * Readback a global sensor given the name.
486  * The value returned is a string which can represent
487  * a boolean ("true"/"false"), an integer, or float.
488  * \param key the ID name of an available sensor
489  * \return the current value of the sensor
490  */
491  virtual std::string read_sensor(const std::string& key) const = 0;
492 
493  /*!
494  * List the available channel readback sensors.
495  * A sensor can represent a reference lock, RSSI, temperature.
496  * \param channel an available channel on the device
497  * \return a list of available sensor string names
498  */
499  virtual std::vector<std::string> list_sensors(size_t channel) const = 0;
500 
501  /*!
502  * Get meta-information about a channel sensor.
503  * Example: displayable name, type, range.
504  * \param channel an available channel on the device
505  * \param key the ID name of an available sensor
506  * \return meta-information about a sensor
507  */
508  virtual arginfo_t get_sensor_info(size_t channel, const std::string& key) const = 0;
509 
510  /*!
511  * Readback a channel sensor given the name.
512  * The value returned is a string which can represent
513  * a boolean ("true"/"false"), an integer, or float.
514  * \param channel an available channel on the device
515  * \param key the ID name of an available sensor
516  * \return the current value of the sensor
517  */
518  virtual std::string read_sensor(size_t channel, const std::string& key) const = 0;
519 
520  /*!
521  * Get a list of available register interfaces by name.
522  * \return a list of available register interfaces
523  */
524  virtual std::vector<std::string> list_register_interfaces() const = 0;
525 
526  /*!
527  * Write a register on the device given the interface name.
528  * This can represent a register on a soft CPU, FPGA, IC;
529  * the interpretation is up the implementation to decide.
530  * \param name the name of a available register interface
531  * \param addr the register address
532  * \param value the register value
533  */
534  virtual void
535  write_register(const std::string& name, unsigned addr, unsigned value) = 0;
536 
537  /*!
538  * Read a register on the device given the interface name.
539  * \param name the name of a available register interface
540  * \param addr the register address
541  * \return the register value
542  */
543  virtual unsigned read_register(const std::string& name, unsigned addr) const = 0;
544 
545  /*!
546  * Write a memory block on the device given the interface name.
547  * This can represent a memory block on a soft CPU, FPGA, IC;
548  * the interpretation is up the implementation to decide.
549  * \param name the name of a available memory block interface
550  * \param addr the memory block start address
551  * \param value the memory block content
552  */
553  virtual void write_registers(const std::string& name,
554  unsigned addr,
555  const std::vector<unsigned>& value) = 0;
556 
557  /*!
558  * Read a memory block on the device given the interface name.
559  * \param name the name of a available memory block interface
560  * \param addr the memory block start address
561  * \param length number of words to be read from memory block
562  * \return the memory block content
563  */
564  virtual std::vector<unsigned>
565  read_registers(const std::string& name, unsigned addr, size_t length) const = 0;
566 
567  /*!
568  * Describe the allowed keys and values used for settings.
569  * \return a list of argument info structures
570  */
571  virtual arginfo_list_t get_setting_info() const = 0;
572 
573  /*!
574  * Write an arbitrary setting on the device.
575  * The interpretation is up the implementation.
576  * \param key the setting identifier
577  * \param value the setting value
578  */
579  virtual void write_setting(const std::string& key, const std::string& value) = 0;
580 
581  /*!
582  * Read an arbitrary setting on the device.
583  * \param key the setting identifier
584  * \return the setting value
585  */
586  virtual std::string read_setting(const std::string& key) const = 0;
587 
588  /*!
589  * Describe the allowed keys and values used for channel settings.
590  * \param channel an available channel on the device
591  * \return a list of argument info structures
592  */
593  virtual arginfo_list_t get_setting_info(size_t channel) const = 0;
594 
595  /*!
596  * Write an arbitrary channel setting on the device.
597  * The interpretation is up the implementation.
598  * \param channel an available channel on the device
599  * \param key the setting identifier
600  * \param value the setting value
601  */
602  virtual void
603  write_setting(size_t channel, const std::string& key, const std::string& value) = 0;
604 
605  /*!
606  * Read an arbitrary channel setting on the device.
607  * \param channel an available channel on the device
608  * \param key the setting identifier
609  * \return the setting value
610  */
611  virtual std::string read_setting(size_t channel, const std::string& key) const = 0;
612 
613  /*!
614  * Get a list of available GPIO banks by name.
615  */
616  virtual std::vector<std::string> list_gpio_banks() const = 0;
617 
618  /*!
619  * Write the value of a GPIO bank.
620  * \param bank the name of an available bank
621  * \param value an integer representing GPIO bits
622  */
623  virtual void write_gpio(const std::string& bank, unsigned value) = 0;
624 
625  /*!
626  * Write the value of a GPIO bank with modification mask.
627  * \param bank the name of an available bank
628  * \param value an integer representing GPIO bits
629  * \param mask a modification mask where 1 = modify
630  */
631  virtual void write_gpio(const std::string& bank, unsigned value, unsigned mask) = 0;
632 
633  /*!
634  * Readback the value of a GPIO bank.
635  * \param bank the name of an available bank
636  * \return an integer representing GPIO bits
637  */
638  virtual unsigned read_gpio(const std::string& bank) const = 0;
639 
640  /*!
641  * Write the data direction of a GPIO bank.
642  * 1 bits represent outputs, 0 bits represent inputs.
643  * \param bank the name of an available bank
644  * \param dir an integer representing data direction bits
645  */
646  virtual void write_gpio_dir(const std::string& bank, unsigned dir) = 0;
647 
648  /*!
649  * Write the data direction of a GPIO bank with modification mask.
650  * 1 bits represent outputs, 0 bits represent inputs.
651  * \param bank the name of an available bank
652  * \param dir an integer representing data direction bits
653  * \param mask a modification mask where 1 = modify
654  */
655  virtual void write_gpio_dir(const std::string& bank, unsigned dir, unsigned mask) = 0;
656 
657  /*!
658  * Read the data direction of a GPIO bank.
659  * 1 bits represent outputs, 0 bits represent inputs.
660  * \param bank the name of an available bank
661  * \return an integer representing data direction bits
662  */
663  virtual unsigned read_gpio_dir(const std::string& bank) const = 0;
664 
665  /*!
666  * Write to an available I2C slave.
667  * If the device contains multiple I2C masters,
668  * the address bits can encode which master.
669  * \param addr the address of the slave
670  * \param data an array of bytes write out
671  */
672  virtual void write_i2c(int addr, const std::string& data) = 0;
673 
674  /*!
675  * Read from an available I2C slave.
676  * If the device contains multiple I2C masters,
677  * the address bits can encode which master.
678  * \param addr the address of the slave
679  * \param num_bytes the number of bytes to read
680  * \return an array of bytes read from the slave
681  */
682  virtual std::string read_i2c(int addr, size_t num_bytes) = 0;
683 
684  /*!
685  * Perform a SPI transaction and return the result.
686  * Its up to the implementation to set the clock rate,
687  * and read edge, and the write edge of the SPI core.
688  * SPI slaves without a readback pin will return 0.
689  *
690  * If the device contains multiple SPI masters,
691  * the address bits can encode which master.
692  *
693  * \param addr an address of an available SPI slave
694  * \param data the SPI data, num_bits-1 is first out
695  * \param num_bits the number of bits to clock out
696  * \return the readback data, num_bits-1 is first in
697  */
698  virtual unsigned transact_spi(int addr, unsigned data, size_t num_bits) = 0;
699 
700  /*!
701  * Enumerate the available UART devices.
702  * \return a list of names of available UARTs
703  */
704  virtual std::vector<std::string> list_uarts() const = 0;
705 
706  /*!
707  * Write data to a UART device.
708  * Its up to the implementation to set the baud rate,
709  * carriage return settings, flushing on newline.
710  * \param which the name of an available UART
711  * \param data an array of bytes to write out
712  */
713  virtual void write_uart(const std::string& which, const std::string& data) = 0;
714 
715  /*!
716  * Read bytes from a UART until timeout or newline.
717  * Its up to the implementation to set the baud rate,
718  * carriage return settings, flushing on newline.
719  * \param which the name of an available UART
720  * \param timeout_us a timeout in microseconds
721  * \return an array of bytes read from the UART
722  */
723  virtual std::string read_uart(const std::string& which,
724  long timeout_us = 100000) const = 0;
725 };
726 
727 } // namespace soapy
728 } // namespace gr
729 
730 #endif /* INCLUDED_GR_SOAPY_BLOCK_H */
The abstract base class for all 'terminal' processing blocks.
Definition: gnuradio-runtime/include/gnuradio/block.h:60
Definition: gr-soapy/include/gnuradio/soapy/block.h:23
virtual range_t get_gain_range(size_t channel, const std::string &name) const =0
virtual void set_dc_offset_mode(size_t channel, bool automatic)=0
virtual void set_reference_clock_rate(double rate)=0
virtual std::string read_uart(const std::string &which, long timeout_us=100000) const =0
virtual std::string get_time_source() const =0
virtual void set_time_source(const std::string &source)=0
virtual void set_master_clock_rate(double clock_rate)=0
virtual double get_reference_clock_rate() const =0
virtual kwargs_t get_channel_info(size_t channel) const =0
virtual std::string read_i2c(int addr, size_t num_bytes)=0
virtual void write_i2c(int addr, const std::string &data)=0
virtual void set_clock_source(const std::string &clock_source)=0
virtual double get_gain(size_t channel) const =0
virtual void set_frequency(size_t channel, double freq)=0
virtual void write_register(const std::string &name, unsigned addr, unsigned value)=0
virtual std::vector< std::string > list_gpio_banks() const =0
virtual double get_frequency(size_t channel, const std::string &name) const =0
virtual std::string get_antenna(size_t channel) const =0
virtual std::vector< std::string > list_antennas(int channel) const =0
virtual bool has_iq_balance_mode(size_t channel) const =0
virtual bool has_hardware_time(const std::string &what="") const =0
virtual void set_antenna(size_t channel, const std::string &name)=0
virtual double get_frequency_correction(size_t channel) const =0
virtual void set_bandwidth(size_t channel, double bandwidth)=0
virtual std::string read_sensor(size_t channel, const std::string &key) const =0
virtual range_list_t get_sample_rate_range(size_t channel) const =0
virtual std::vector< std::string > list_time_sources() const =0
virtual bool has_frequency_correction(size_t channel) const =0
virtual arginfo_list_t get_frequency_args_info(size_t channel) const =0
virtual double get_master_clock_rate() const =0
virtual bool has_iq_balance(size_t channel) const =0
virtual bool has_dc_offset(size_t channel) const =0
virtual bool get_dc_offset_mode(size_t channel) const =0
virtual std::string read_setting(const std::string &key) const =0
virtual arginfo_t get_sensor_info(size_t channel, const std::string &key) const =0
virtual void write_gpio(const std::string &bank, unsigned value)=0
virtual range_list_t get_master_clock_rates() const =0
virtual double get_bandwidth(size_t channel) const =0
virtual void set_frequency(size_t channel, const std::string &name, double freq)=0
virtual std::vector< std::string > list_frequencies(size_t channel) const =0
virtual void write_setting(const std::string &key, const std::string &value)=0
virtual double get_sample_rate(size_t channel) const =0
virtual void set_gain(size_t channel, double gain)=0
virtual std::vector< std::string > list_sensors() const =0
virtual std::string read_sensor(const std::string &key) const =0
virtual void set_frequency_correction(size_t channel, double freq_correction)=0
virtual std::string read_setting(size_t channel, const std::string &key) const =0
virtual arginfo_t get_sensor_info(const std::string &key) const =0
virtual void set_sample_rate(size_t channel, double sample_rate)=0
virtual bool has_gain_mode(size_t channel) const =0
virtual std::vector< std::string > list_clock_sources() const =0
virtual std::string get_hardware_key() const =0
virtual void set_dc_offset(size_t channel, const gr_complexd &dc_offset)=0
virtual range_list_t get_frequency_range(size_t channel, const std::string &name) const =0
virtual void set_frontend_mapping(const std::string &frontend_mapping)=0
virtual std::vector< unsigned > read_registers(const std::string &name, unsigned addr, size_t length) const =0
virtual arginfo_list_t get_setting_info() const =0
virtual void set_hardware_time(long long timeNs, const std::string &what="")=0
virtual void write_registers(const std::string &name, unsigned addr, const std::vector< unsigned > &value)=0
virtual range_list_t get_bandwidth_range(size_t channel) const =0
virtual void write_gpio_dir(const std::string &bank, unsigned dir)=0
virtual double get_gain(size_t channel, const std::string &name) const =0
virtual unsigned read_gpio(const std::string &bank) const =0
virtual long long get_hardware_time(const std::string &what="") const =0
virtual range_t get_gain_range(size_t channel) const =0
virtual double get_frequency(size_t channel) const =0
virtual bool has_dc_offset_mode(size_t channel) const =0
virtual std::vector< std::string > list_register_interfaces() const =0
virtual void set_gain_mode(size_t channel, bool enable)=0
virtual void set_iq_balance_mode(size_t channel, bool automatic)=0
virtual std::vector< std::string > list_gains(size_t channel) const =0
virtual bool get_iq_balance_mode(size_t channel) const =0
virtual std::string get_driver_key() const =0
virtual void write_gpio_dir(const std::string &bank, unsigned dir, unsigned mask)=0
virtual void write_gpio(const std::string &bank, unsigned value, unsigned mask)=0
virtual std::vector< std::string > list_uarts() const =0
virtual unsigned read_gpio_dir(const std::string &bank) const =0
virtual unsigned read_register(const std::string &name, unsigned addr) const =0
virtual kwargs_t get_hardware_info() const =0
virtual range_list_t get_reference_clock_rates() const =0
virtual unsigned transact_spi(int addr, unsigned data, size_t num_bits)=0
virtual range_list_t get_frequency_range(size_t channel) const =0
virtual gr_complexd get_iq_balance(size_t channel) const =0
virtual void set_iq_balance(size_t channel, const gr_complexd &iq_balance)=0
virtual std::string get_frontend_mapping() const =0
virtual bool get_gain_mode(size_t channel) const =0
virtual gr_complexd get_dc_offset(size_t channel) const =0
virtual void set_gain(size_t channel, const std::string &name, double gain)=0
virtual void write_setting(size_t channel, const std::string &key, const std::string &value)=0
virtual std::string get_clock_source() const =0
virtual std::vector< std::string > list_sensors(size_t channel) const =0
virtual arginfo_list_t get_setting_info(size_t channel) const =0
virtual void write_uart(const std::string &which, const std::string &data)=0
Definition: gr-soapy/include/gnuradio/soapy/source.h:42
#define SOAPY_API
Definition: gr-soapy/include/gnuradio/soapy/api.h:19
std::complex< double > gr_complexd
Definition: gr_complex.h:16
SoapySDR::RangeList range_list_t
Definition: soapy_types.h:29
SoapySDR::ArgInfoList arginfo_list_t
Definition: soapy_types.h:21
SoapySDR::Kwargs kwargs_t
Definition: soapy_types.h:25
SoapySDR::ArgInfo arginfo_t
Definition: soapy_types.h:20
SoapySDR::Range range_t
Definition: soapy_types.h:28
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition: basic_block.h:29
PMT_API size_t length(const pmt_t &v)
Return the number of elements in v.