20 #ifndef INCLUDED_RFSPACE_SOURCE_C_H
21 #define INCLUDED_RFSPACE_SOURCE_C_H
23 #include <gnuradio/thread/thread.h>
24 #include <gnuradio/block.h>
25 #include <gnuradio/sync_block.h>
27 #include <boost/circular_buffer.hpp>
30 #include <condition_variable>
51 typedef std::shared_ptr<rfspace_source_c> rfspace_source_c_sptr;
63 public gr::sync_block,
79 int work(
int noutput_items,
80 gr_vector_const_void_star &input_items,
81 gr_vector_void_star &output_items );
83 static std::vector< std::string >
get_devices(
bool fake =
false );
103 double set_gain(
double gain,
const std::string & name,
size_t chan = 0 );
105 double get_gain(
const std::string & name,
size_t chan = 0 );
108 std::string
set_antenna(
const std::string & antenna,
size_t chan = 0 );
116 void apply_channel(
unsigned char *cmd,
size_t chan = 0 );
118 bool transaction(
const unsigned char *cmd,
size_t size );
120 bool transaction(
const unsigned char *cmd,
size_t size,
121 std::vector< unsigned char > &response );
123 void usb_read_task();
124 void tcp_keepalive_task();
149 gr::thread::thread _thread;
150 bool _run_usb_read_task;
151 bool _run_tcp_keepalive_task;
152 std::mutex _tcp_lock;
154 boost::circular_buffer<gr_complex> *_fifo;
155 std::mutex _fifo_lock;
156 std::condition_variable _samp_avail;
158 std::vector< unsigned char > _resp;
159 std::mutex _resp_lock;
160 std::condition_variable _resp_avail;
Definition: rfspace_source_c.h:65
size_t get_num_channels(void)
double set_bandwidth(double bandwidth, size_t chan=0)
std::vector< std::string > get_antennas(size_t chan=0)
static std::vector< std::string > get_devices(bool fake=false)
bool get_gain_mode(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 set_center_freq(double freq, size_t chan=0)
osmosdr::gain_range_t get_gain_range(const std::string &name, size_t chan=0)
double set_freq_corr(double ppm, size_t chan=0)
double get_gain(const std::string &name, size_t chan=0)
double get_center_freq(size_t chan=0)
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
std::vector< std::string > get_gain_names(size_t chan=0)
bool set_gain_mode(bool automatic, size_t chan=0)
osmosdr::freq_range_t get_freq_range(size_t chan=0)
double set_gain(double gain, size_t chan=0)
friend rfspace_source_c_sptr make_rfspace_source_c(const std::string &args)
Return a shared_ptr to a new instance of rfspace_source_c.
std::string get_antenna(size_t chan=0)
osmosdr::gain_range_t get_gain_range(size_t chan=0)
double get_gain(size_t chan=0)
double get_bandwidth(size_t chan=0)
double set_sample_rate(double rate)
double set_gain(double gain, const std::string &name, size_t chan=0)
osmosdr::freq_range_t get_bandwidth_range(size_t chan=0)
osmosdr::meta_range_t get_sample_rates(void)
double get_sample_rate(void)
Definition: source_iface.h:33
rfspace_source_c_sptr make_rfspace_source_c(const std::string &args="")
Return a shared_ptr to a new instance of rfspace_source_c.
#define SOCKET
Definition: rfspace_source_c.h:37