22 #ifndef INCLUDED_AIRSPYHF_SOURCE_C_H 23 #define INCLUDED_AIRSPYHF_SOURCE_C_H 26 #include <condition_variable> 28 #include <gnuradio/sync_block.h> 30 #include <gnuradio/logger.h> 32 #include <libairspyhf/airspyhf.h> 38 typedef std::shared_ptr<airspyhf_source_c> airspyhf_source_c_sptr;
54 public gr::sync_block,
71 int work(
int noutput_items,
72 gr_vector_const_void_star &input_items,
73 gr_vector_void_star &output_items );
96 double set_gain(
double gain,
size_t chan = 0 );
97 double set_gain(
double gain,
const std::string & name,
size_t chan = 0 );
99 double get_gain(
const std::string & name,
size_t chan = 0 );
102 void set_iq_balance(
const std::complex<double> &balance,
size_t chan = 0 );
104 std::vector< std::string >
get_antennas(
size_t chan = 0 );
105 std::string
set_antenna(
const std::string & antenna,
size_t chan = 0 );
110 static int _airspyhf_rx_callback(airspyhf_transfer_t* transfer);
111 int airspyhf_rx_callback(airspyhf_transfer_t *transfer);
113 gr::logger_ptr logger(
void)
const;
115 airspyhf_device *_dev;
117 std::vector< std::pair<double, uint32_t> > _sample_rates;
126 gr_complex* _output_items;
127 std::mutex _buffer_lock;
128 std::condition_variable _buffer_ready;;
129 std::condition_variable _callback_done;
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
double get_sample_rate(void)
Definition: source_iface.h:32
Provides a stream of complex samples.
Definition: airspyhf_source_c.h:53
double get_gain(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.
osmosdr::gain_range_t get_gain_range(size_t chan=0)
std::string get_antenna(size_t chan=0)
void set_iq_balance_mode(int mode, size_t chan=0)
osmosdr::freq_range_t get_freq_range(size_t chan=0)
bool set_gain_mode(bool automatic, size_t chan=0)
double get_center_freq(size_t chan=0)
size_t get_num_channels(void)
std::vector< std::string > get_gain_names(size_t chan=0)
double get_freq_corr(size_t chan=0)
void set_iq_balance(const std::complex< double > &balance, size_t chan=0)
double set_sample_rate(double rate)
bool get_gain_mode(size_t chan=0)
osmosdr::meta_range_t get_sample_rates(void)
double set_gain(double gain, size_t chan=0)
std::vector< std::string > get_antennas(size_t chan=0)
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()
double set_freq_corr(double ppm, size_t chan=0)
double set_center_freq(double freq, size_t chan=0)
std::string set_antenna(const std::string &antenna, size_t chan=0)