22 #ifndef INCLUDED_AIRSPY_SOURCE_C_H 23 #define INCLUDED_AIRSPY_SOURCE_C_H 25 #include <boost/circular_buffer.hpp> 26 #include <boost/thread/mutex.hpp> 27 #include <boost/thread/condition_variable.hpp> 29 #include <gnuradio/sync_block.h> 31 #include <libairspy/airspy.h> 48 typedef boost::shared_ptr<airspy_source_c> airspy_source_c_sptr;
64 public gr::sync_block,
84 int work(
int noutput_items,
85 gr_vector_const_void_star &input_items,
86 gr_vector_void_star &output_items );
107 double set_gain(
double gain,
size_t chan = 0 );
108 double set_gain(
double gain,
const std::string & name,
size_t chan = 0 );
110 double get_gain(
const std::string & name,
size_t chan = 0 );
113 double set_if_gain(
double gain,
size_t chan = 0 );
115 std::vector< std::string >
get_antennas(
size_t chan = 0 );
116 std::string
set_antenna(
const std::string & antenna,
size_t chan = 0 );
124 static int _airspy_rx_callback(airspy_transfer* transfer);
125 int airspy_rx_callback(
void *samples,
int sample_count);
128 static boost::mutex _usage_mutex;
132 boost::circular_buffer<gr_complex> *_fifo;
133 boost::mutex _fifo_lock;
134 boost::condition_variable _samp_avail;
double set_if_gain(double gain, size_t chan=0)
airspy_source_c_sptr make_airspy_source_c(const std::string &args="")
Return a shared_ptr to a new instance of airspy_source_c.
osmosdr::gain_range_t get_gain_range(size_t chan=0)
double get_sample_rate(void)
double set_mix_gain(double gain, size_t chan=0)
Definition: source_iface.h:31
size_t get_num_channels(void)
bool set_gain_mode(bool automatic, size_t chan=0)
double get_center_freq(size_t chan=0)
bool get_gain_mode(size_t chan=0)
std::string set_antenna(const std::string &antenna, size_t chan=0)
std::string get_antenna(size_t chan=0)
double get_freq_corr(size_t chan=0)
double get_bandwidth(size_t chan=0)
double set_freq_corr(double ppm, size_t chan=0)
double set_sample_rate(double rate)
osmosdr::freq_range_t get_freq_range(size_t chan=0)
double get_gain(size_t chan=0)
std::vector< std::string > get_antennas(size_t chan=0)
double set_bandwidth(double bandwidth, size_t chan=0)
osmosdr::meta_range_t get_sample_rates(void)
static std::vector< std::string > get_devices()
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, size_t chan=0)
osmosdr::freq_range_t get_bandwidth_range(size_t chan=0)
std::vector< std::string > get_gain_names(size_t chan=0)
double set_center_freq(double freq, size_t chan=0)
Provides a stream of complex samples.
Definition: airspy_source_c.h:63
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)