22 #ifndef INCLUDED_AIRSPY_SOURCE_C_H
23 #define INCLUDED_AIRSPY_SOURCE_C_H
25 #include <boost/circular_buffer.hpp>
28 #include <condition_variable>
30 #include <gnuradio/sync_block.h>
32 #include <libairspy/airspy.h>
49 typedef std::shared_ptr<airspy_source_c> airspy_source_c_sptr;
65 public gr::sync_block,
85 int work(
int noutput_items,
86 gr_vector_const_void_star &input_items,
87 gr_vector_void_star &output_items );
109 double set_gain(
double gain,
const std::string & name,
size_t chan = 0 );
111 double get_gain(
const std::string & name,
size_t chan = 0 );
118 std::string
set_antenna(
const std::string & antenna,
size_t chan = 0 );
126 static int _airspy_rx_callback(airspy_transfer* transfer);
127 int airspy_rx_callback(
void *samples,
int sample_count);
131 boost::circular_buffer<gr_complex> *_fifo;
132 std::mutex _fifo_lock;
133 std::condition_variable _samp_avail;
135 std::vector< std::pair<double, uint32_t> > _sample_rates;
146 enum gain_policy _gain_policy;
airspy_source_c_sptr make_airspy_source_c(const std::string &args="")
Return a shared_ptr to a new instance of airspy_source_c.
Provides a stream of complex samples.
Definition: airspy_source_c.h:67
bool get_gain_mode(size_t chan=0)
double set_gain(double gain, size_t chan=0)
osmosdr::freq_range_t get_freq_range(size_t chan=0)
double set_bandwidth(double bandwidth, size_t chan=0)
std::string set_antenna(const std::string &antenna, size_t chan=0)
double set_mix_gain(double gain, size_t chan=0)
osmosdr::meta_range_t get_sample_rates(void)
double get_gain(const std::string &name, size_t chan=0)
double set_sample_rate(double rate)
double set_if_gain(double gain, size_t chan=0)
std::vector< std::string > get_gain_names(size_t chan=0)
double get_gain(size_t chan=0)
double get_freq_corr(size_t chan=0)
double get_center_freq(size_t chan=0)
double get_bandwidth(size_t chan=0)
osmosdr::gain_range_t get_gain_range(const std::string &name, size_t chan=0)
double set_lna_gain(double gain, size_t chan=0)
std::vector< std::string > get_antennas(size_t chan=0)
static std::vector< std::string > get_devices()
double set_freq_corr(double ppm, size_t chan=0)
double set_center_freq(double freq, size_t chan=0)
friend airspy_source_c_sptr make_airspy_source_c(const std::string &args)
Return a shared_ptr to a new instance of airspy_source_c.
double set_gain(double gain, const std::string &name, size_t chan=0)
osmosdr::freq_range_t get_bandwidth_range(size_t chan=0)
bool set_gain_mode(bool automatic, size_t chan=0)
size_t get_num_channels(void)
double get_sample_rate(void)
std::string get_antenna(size_t chan=0)
osmosdr::gain_range_t get_gain_range(size_t chan=0)
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
Definition: source_iface.h:33