Go to the documentation of this file.
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 boost::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;
osmosdr::gain_range_t get_gain_range(size_t chan=0)
std::vector< std::string > get_gain_names(size_t chan=0)
std::string set_antenna(const std::string &antenna, size_t chan=0)
double get_freq_corr(size_t chan=0)
double get_bandwidth(size_t chan=0)
double set_gain(double gain, const std::string &name, size_t chan=0)
static std::vector< std::string > get_devices()
osmosdr::freq_range_t get_freq_range(size_t chan=0)
double set_bandwidth(double bandwidth, size_t chan=0)
Provides a stream of complex samples.
Definition: hackrf_source_c.h:66
bool set_gain_mode(bool automatic, size_t chan=0)
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.
Definition: hackrf_common.h:55
int nou">
140
| chan | the channel index 0 to N-1 |
- Returns
- the g radio hardware antenna setting.
- Parameters
-
ass="ttdeci">static std::vector< std::string > get_devices()aclasshackrf__source__c_html_aa85bfc5c59090200ad8b976d4c0c46b1">