Go to the documentation of this file.
22 #ifndef INCLUDED_AIRSPYHF_SOURCE_C_H
23 #define INCLUDED_AIRSPYHF_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 <libairspyhf/airspyhf.h>
37 typedef boost::shared_ptr<airspyhf_source_c> airspyhf_source_c_sptr;
53 public gr::sync_block,
70 int work(
int noutput_items,
71 gr_vector_const_void_star &input_items,
72 gr_vector_void_star &output_items );
91 double set_gain(
double gain,
size_t chan = 0 );
92 double set_gain(
double gain,
const std::string & name,
size_t chan = 0 );
94 double get_gain(
const std::string & name,
size_t chan = 0 );
96 std::vector< std::string >
get_antennas(
size_t chan = 0 );
97 std::string
set_antenna(
const std::string & antenna,
size_t chan = 0 );
102 static int _airspyhf_rx_callback(airspyhf_transfer_t* transfer);
103 int airspyhf_rx_callback(
void *samples,
int sample_count);
105 airspyhf_device *_dev;
107 boost::circular_buffer<gr_complex> *_fifo;
108 boost::mutex _fifo_lock;
109 boost::condition_variable _samp_avail;
111 std::vector< std::pair<double, uint32_t> > _sample_rates;
friend airspyhf_source_c_sptr make_airspyhf_source_c(const std::string &args)
Return a shared_ptr to a new instance of airspyhf_source_c.
static std::vector< std::string > get_devices()
std::string set_antenna(const std::string &antenna, size_t chan=0)
airspyhf_source_c_sptr make_airspyhf_source_c(const std::string &args="")
Return a shared_ptr to a new instance of airspyhf_source_c.
double set_sample_rate(double rate)
double get_center_freq(size_t chan=0)
double set_gain(double gain, size_t chan=0)
double get_freq_corr(size_t chan=0)
std::vector< std::string > get_antennas(size_t chan=0)
double set_center_freq(double freq, size_t chan=0)
Provides a stream of complex samples.
Definition: airspyhf_source_c.h:52
double get_sample_rate(void)
size_t get_num_channels(void)
osmosdr::gain_range_t get_gain_range(size_t chan=0)
std::vector< std::string > get_gain_names(size_t chan=0)
osmosdr::freq_range_t get_freq_range(size_t chan=0)
std::string get_antenna(size_t chan=0)
Definition: source_iface.h:32
double get_gain(size_t chan=0)
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
osmosdr::meta_range_t get_sample_rates(void)
double set_freq_corr(double ppm, size_t chan=0)