GNU Radio Manual and C++ API Reference 3.10.5.1
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
19namespace gr {
20namespace soapy {
21
22class SOAPY_API block : virtual public gr::block
23{
24public:
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 channel an available channel on the device
355 * \return true if IQ balance corrections are supported
356 */
357 virtual bool has_iq_balance_mode(size_t channel) const = 0;
358
359 /*!
360 * Set the automatic frontend IQ balance correction.
361 * \param channel an available channel on the device
362 * \param automatic true for automatic correction
363 */
364 virtual void set_iq_balance_mode(size_t channel, bool automatic) = 0;
365
366 /*!
367 * Get the automatic IQ balance corrections mode.
368 * \param channel an available channel on the device
369 * \return true for automatic correction
370 */
371 virtual bool get_iq_balance_mode(size_t channel) const = 0;
372
373 /*!
374 * Set master clock rate
375 * \param clock_rate clock rate in Hz
376 */
377 virtual void set_master_clock_rate(double clock_rate) = 0;
378
379 /*!
380 * Get the master clock rate of the device.
381 * \return the clock rate in Hz
382 */
383 virtual double get_master_clock_rate() const = 0;
384
385 /*!
386 * Get the range of available master clock rates.
387 * \return a list of clock rate ranges in Hz
388 */
390
391 /*!
392 * Set the reference clock rate of the device.
393 * \param rate the clock rate in Hz
394 */
395 virtual void set_reference_clock_rate(double rate) = 0;
396
397 /*!
398 * Get the reference clock rate of the device.
399 * \return the clock rate in Hz
400 */
401 virtual double get_reference_clock_rate() const = 0;
402
403 /*!
404 * Get the range of available reference clock rates.
405 * \return a list of clock rate ranges in Hz
406 */
408
409 /*!
410 * Get the list of available clock sources.
411 * \return a list of clock source names
412 */
413 virtual std::vector<std::string> list_clock_sources() const = 0;
414
415 /*!
416 * Set the clock source
417 * \param clock_source an available clock source
418 */
419 virtual void set_clock_source(const std::string& clock_source) = 0;
420
421 /*!
422 * Get the clock source of the device
423 * \return the name of the clock source
424 */
425 virtual std::string get_clock_source() const = 0;
426
427 /*!
428 * Get the list of available time sources.
429 * \return a list of time source names
430 */
431 virtual std::vector<std::string> list_time_sources() const = 0;
432
433 /*!
434 * Set the time source on the device
435 * \param source the name of a time source
436 */
437 virtual void set_time_source(const std::string& source) = 0;
438
439 /*!
440 * Get the time source of the device
441 * \return the name of a time source
442 */
443 virtual std::string get_time_source() const = 0;
444
445 /*!
446 * Does this device have a hardware clock?
447 * \param what optional argument
448 * \return true if the hardware clock exists
449 */
450 virtual bool has_hardware_time(const std::string& what = "") const = 0;
451
452 /*!
453 * Read the time from the hardware clock on the device.
454 * The what argument can refer to a specific time counter.
455 * \param what optional argument
456 * \return the time in nanoseconds
457 */
458 virtual long long get_hardware_time(const std::string& what = "") const = 0;
459
460 /*!
461 * Write the time to the hardware clock on the device.
462 * The what argument can refer to a specific time counter.
463 * \param timeNs time in nanoseconds
464 * \param what optional argument
465 */
466 virtual void set_hardware_time(long long timeNs, const std::string& what = "") = 0;
467
468 /*!
469 * List the available global readback sensors.
470 * A sensor can represent a reference lock, RSSI, temperature.
471 * \return a list of available sensor string names
472 */
473 virtual std::vector<std::string> list_sensors() const = 0;
474
475 /*!
476 * Get meta-information about a sensor.
477 * Example: displayable name, type, range.
478 * \param key the ID name of an available sensor
479 * \return meta-information about a sensor
480 */
481 virtual arginfo_t get_sensor_info(const std::string& key) const = 0;
482
483 /*!
484 * Readback a global sensor given the name.
485 * The value returned is a string which can represent
486 * a boolean ("true"/"false"), an integer, or float.
487 * \param key the ID name of an available sensor
488 * \return the current value of the sensor
489 */
490 virtual std::string read_sensor(const std::string& key) const = 0;
491
492 /*!
493 * List the available channel readback sensors.
494 * A sensor can represent a reference lock, RSSI, temperature.
495 * \param channel an available channel on the device
496 * \return a list of available sensor string names
497 */
498 virtual std::vector<std::string> list_sensors(size_t channel) const = 0;
499
500 /*!
501 * Get meta-information about a channel sensor.
502 * Example: displayable name, type, range.
503 * \param channel an available channel on the device
504 * \param key the ID name of an available sensor
505 * \return meta-information about a sensor
506 */
507 virtual arginfo_t get_sensor_info(size_t channel, const std::string& key) const = 0;
508
509 /*!
510 * Readback a channel sensor given the name.
511 * The value returned is a string which can represent
512 * a boolean ("true"/"false"), an integer, or float.
513 * \param channel an available channel on the device
514 * \param key the ID name of an available sensor
515 * \return the current value of the sensor
516 */
517 virtual std::string read_sensor(size_t channel, const std::string& key) const = 0;
518
519 /*!
520 * Get a list of available register interfaces by name.
521 * \return a list of available register interfaces
522 */
523 virtual std::vector<std::string> list_register_interfaces() const = 0;
524
525 /*!
526 * Write a register on the device given the interface name.
527 * This can represent a register on a soft CPU, FPGA, IC;
528 * the interpretation is up the implementation to decide.
529 * \param name the name of a available register interface
530 * \param addr the register address
531 * \param value the register value
532 */
533 virtual void
534 write_register(const std::string& name, unsigned addr, unsigned value) = 0;
535
536 /*!
537 * Read a register on the device given the interface name.
538 * \param name the name of a available register interface
539 * \param addr the register address
540 * \return the register value
541 */
542 virtual unsigned read_register(const std::string& name, unsigned addr) const = 0;
543
544 /*!
545 * Write a memory block on the device given the interface name.
546 * This can represent a memory block on a soft CPU, FPGA, IC;
547 * the interpretation is up the implementation to decide.
548 * \param name the name of a available memory block interface
549 * \param addr the memory block start address
550 * \param value the memory block content
551 */
552 virtual void write_registers(const std::string& name,
553 unsigned addr,
554 const std::vector<unsigned>& value) = 0;
555
556 /*!
557 * Read a memory block on the device given the interface name.
558 * \param name the name of a available memory block interface
559 * \param addr the memory block start address
560 * \param length number of words to be read from memory block
561 * \return the memory block content
562 */
563 virtual std::vector<unsigned>
564 read_registers(const std::string& name, unsigned addr, size_t length) const = 0;
565
566 /*!
567 * Describe the allowed keys and values used for settings.
568 * \return a list of argument info structures
569 */
570 virtual arginfo_list_t get_setting_info() const = 0;
571
572 /*!
573 * Write an arbitrary setting on the device.
574 * The interpretation is up the implementation.
575 * \param key the setting identifier
576 * \param value the setting value
577 */
578 virtual void write_setting(const std::string& key, const std::string& value) = 0;
579
580 /*!
581 * Read an arbitrary setting on the device.
582 * \param key the setting identifier
583 * \return the setting value
584 */
585 virtual std::string read_setting(const std::string& key) const = 0;
586
587 /*!
588 * Describe the allowed keys and values used for channel settings.
589 * \param channel an available channel on the device
590 * \return a list of argument info structures
591 */
592 virtual arginfo_list_t get_setting_info(size_t channel) const = 0;
593
594 /*!
595 * Write an arbitrary channel setting on the device.
596 * The interpretation is up the implementation.
597 * \param channel an available channel on the device
598 * \param key the setting identifier
599 * \param value the setting value
600 */
601 virtual void
602 write_setting(size_t channel, const std::string& key, const std::string& value) = 0;
603
604 /*!
605 * Read an arbitrary channel setting on the device.
606 * \param channel an available channel on the device
607 * \param key the setting identifier
608 * \return the setting value
609 */
610 virtual std::string read_setting(size_t channel, const std::string& key) const = 0;
611
612 /*!
613 * Get a list of available GPIO banks by name.
614 */
615 virtual std::vector<std::string> list_gpio_banks() const = 0;
616
617 /*!
618 * Write the value of a GPIO bank.
619 * \param bank the name of an available bank
620 * \param value an integer representing GPIO bits
621 */
622 virtual void write_gpio(const std::string& bank, unsigned value) = 0;
623
624 /*!
625 * Write the value of a GPIO bank with modification mask.
626 * \param bank the name of an available bank
627 * \param value an integer representing GPIO bits
628 * \param mask a modification mask where 1 = modify
629 */
630 virtual void write_gpio(const std::string& bank, unsigned value, unsigned mask) = 0;
631
632 /*!
633 * Readback the value of a GPIO bank.
634 * \param bank the name of an available bank
635 * \return an integer representing GPIO bits
636 */
637 virtual unsigned read_gpio(const std::string& bank) const = 0;
638
639 /*!
640 * Write the data direction of a GPIO bank.
641 * 1 bits represent outputs, 0 bits represent inputs.
642 * \param bank the name of an available bank
643 * \param dir an integer representing data direction bits
644 */
645 virtual void write_gpio_dir(const std::string& bank, unsigned dir) = 0;
646
647 /*!
648 * Write the data direction of a GPIO bank with modification mask.
649 * 1 bits represent outputs, 0 bits represent inputs.
650 * \param bank the name of an available bank
651 * \param dir an integer representing data direction bits
652 * \param mask a modification mask where 1 = modify
653 */
654 virtual void write_gpio_dir(const std::string& bank, unsigned dir, unsigned mask) = 0;
655
656 /*!
657 * Read the data direction of a GPIO bank.
658 * 1 bits represent outputs, 0 bits represent inputs.
659 * \param bank the name of an available bank
660 * \return an integer representing data direction bits
661 */
662 virtual unsigned read_gpio_dir(const std::string& bank) const = 0;
663
664 /*!
665 * Write to an available I2C slave.
666 * If the device contains multiple I2C masters,
667 * the address bits can encode which master.
668 * \param addr the address of the slave
669 * \param data an array of bytes write out
670 */
671 virtual void write_i2c(int addr, const std::string& data) = 0;
672
673 /*!
674 * Read from an available I2C slave.
675 * If the device contains multiple I2C masters,
676 * the address bits can encode which master.
677 * \param addr the address of the slave
678 * \param num_bytes the number of bytes to read
679 * \return an array of bytes read from the slave
680 */
681 virtual std::string read_i2c(int addr, size_t num_bytes) = 0;
682
683 /*!
684 * Perform a SPI transaction and return the result.
685 * Its up to the implementation to set the clock rate,
686 * and read edge, and the write edge of the SPI core.
687 * SPI slaves without a readback pin will return 0.
688 *
689 * If the device contains multiple SPI masters,
690 * the address bits can encode which master.
691 *
692 * \param addr an address of an available SPI slave
693 * \param data the SPI data, num_bits-1 is first out
694 * \param num_bits the number of bits to clock out
695 * \return the readback data, num_bits-1 is first in
696 */
697 virtual unsigned transact_spi(int addr, unsigned data, size_t num_bits) = 0;
698
699 /*!
700 * Enumerate the available UART devices.
701 * \return a list of names of available UARTs
702 */
703 virtual std::vector<std::string> list_uarts() const = 0;
704
705 /*!
706 * Write data to a UART device.
707 * Its up to the implementation to set the baud rate,
708 * carriage return settings, flushing on newline.
709 * \param which the name of an available UART
710 * \param data an array of bytes to write out
711 */
712 virtual void write_uart(const std::string& which, const std::string& data) = 0;
713
714 /*!
715 * Read bytes from a UART until timeout or newline.
716 * Its up to the implementation to set the baud rate,
717 * carriage return settings, flushing on newline.
718 * \param which the name of an available UART
719 * \param timeout_us a timeout in microseconds
720 * \return an array of bytes read from the UART
721 */
722 virtual std::string read_uart(const std::string& which,
723 long timeout_us = 100000) const = 0;
724};
725
726} // namespace soapy
727} // namespace gr
728
729#endif /* INCLUDED_GR_SOAPY_BLOCK_H */
The abstract base class for all 'terminal' processing blocks.
Definition: gnuradio-runtime/include/gnuradio/block.h:63
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 std::vector< std::string > list_antennas(int channel) const =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 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_clock_sources() 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 bool has_frequency_correction(size_t channel) const =0
virtual arginfo_list_t get_frequency_args_info(size_t channel) const =0
virtual std::vector< std::string > list_frequencies(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 std::vector< std::string > list_sensors(size_t channel) 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_gpio_banks() 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::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 std::vector< std::string > list_time_sources() const =0
virtual bool has_gain_mode(size_t channel) 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 std::vector< std::string > list_register_interfaces() const =0
virtual void set_frontend_mapping(const std::string &frontend_mapping)=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 void set_gain_mode(size_t channel, bool enable)=0
virtual void set_iq_balance_mode(size_t channel, bool automatic)=0
virtual bool get_iq_balance_mode(size_t channel) const =0
virtual std::string get_driver_key() const =0
virtual std::vector< std::string > list_sensors() 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 unsigned read_gpio_dir(const std::string &bank) const =0
virtual std::vector< unsigned > read_registers(const std::string &name, unsigned addr, size_t length) 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 std::vector< std::string > list_uarts() 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_gains(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:41
#define SOAPY_API
Definition: gr-soapy/include/gnuradio/soapy/api.h:19
std::complex< double > gr_complexd
Definition: gr_complex.h:16
GR_RUNTIME_API const pmt::pmt_t sample_rate()
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.
Definition: basic_block.h:29
PMT_API size_t length(const pmt_t &v)
Return the number of elements in v.