21 #ifndef INCLUDED_HACKRF_SOURCE_C_H
22 #define INCLUDED_HACKRF_SOURCE_C_H
24 #include <gnuradio/sync_block.h>
26 #include <condition_variable>
29 #include <libhackrf/hackrf.h>
47 typedef std::shared_ptr<hackrf_source_c> hackrf_source_c_sptr;
63 public gr::sync_block,
83 int work(
int noutput_items,
84 gr_vector_const_void_star &input_items,
85 gr_vector_void_star &output_items );
107 double set_gain(
double gain,
const std::string & name,
size_t chan = 0 );
109 double get_gain(
const std::string & name,
size_t chan = 0 );
115 std::string
set_antenna(
const std::string & antenna,
size_t chan = 0 );
123 static int _hackrf_rx_callback(hackrf_transfer* transfer);
124 int hackrf_rx_callback(
unsigned char *buf, uint32_t len);
126 std::vector<float> _lut;
128 unsigned char **_buf;
129 unsigned int _buf_num;
130 unsigned int _buf_len;
131 unsigned int _buf_head;
132 unsigned int _buf_used;
133 std::mutex _buf_mutex;
134 std::condition_variable _buf_cond;
136 unsigned int _buf_offset;
Definition: hackrf_common.h:55
Provides a stream of complex samples.
Definition: hackrf_source_c.h:66
friend hackrf_source_c_sptr make_hackrf_source_c(const std::string &args)
Return a shared_ptr to a new instance of hackrf_source_c.
double set_gain(double gain, const std::string &name, size_t chan=0)
double set_center_freq(double freq, size_t chan=0)
size_t get_num_channels(void)
double set_if_gain(double gain, size_t chan=0)
double set_gain(double gain, size_t chan=0)
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
double set_bandwidth(double bandwidth, size_t chan=0)
osmosdr::meta_range_t get_sample_rates(void)
double set_sample_rate(double rate)
bool get_gain_mode(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)
osmosdr::gain_range_t get_gain_range(size_t chan=0)
double get_gain(size_t chan=0)
double get_sample_rate(void)
double get_gain(const std::string &name, size_t chan=0)
double get_center_freq(size_t chan=0)
std::vector< std::string > get_antennas(size_t chan=0)
osmosdr::freq_range_t get_freq_range(size_t chan=0)
double get_bandwidth(size_t chan=0)
double set_freq_corr(double ppm, size_t chan=0)
std::string set_antenna(const std::string &antenna, size_t chan=0)
double get_freq_corr(size_t chan=0)
static std::vector< std::string > get_devices()
double set_bb_gain(double gain, size_t chan=0)
osmosdr::gain_range_t get_gain_range(const std::string &name, size_t chan=0)
bool set_gain_mode(bool automatic, size_t chan=0)
std::string get_antenna(size_t chan=0)
Definition: source_iface.h:33
hackrf_source_c_sptr make_hackrf_source_c(const std::string &args="")
Return a shared_ptr to a new instance of hackrf_source_c.