20#ifndef INCLUDED_MIRI_SOURCE_C_H
21#define INCLUDED_MIRI_SOURCE_C_H
23#include <gnuradio/sync_block.h>
25#include <gnuradio/thread/thread.h>
28#include <condition_variable>
35typedef std::shared_ptr<miri_source_c> miri_source_c_sptr;
51 public gr::sync_block,
63 miri_source_c (
const std::string & args);
68 int work(
int noutput_items,
69 gr_vector_const_void_star &input_items,
70 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 );
97 std::string
set_antenna(
const std::string & antenna,
size_t chan = 0 );
101 static void _mirisdr_callback(
unsigned char *buf, uint32_t len,
void *ctx);
102 void mirisdr_callback(
unsigned char *buf, uint32_t len);
103 static void _mirisdr_wait(miri_source_c *obj);
107 gr::thread::thread _thread;
108 unsigned short **_buf;
109 unsigned int *_buf_lens;
110 unsigned int _buf_num;
111 unsigned int _buf_head;
112 unsigned int _buf_used;
113 std::mutex _buf_mutex;
114 std::condition_variable _buf_cond;
117 unsigned int _buf_offset;
121 unsigned int _skipped;
Provides a stream of complex samples.
Definition miri_source_c.h:53
bool get_gain_mode(size_t chan=0)
friend miri_source_c_sptr make_miri_source_c(const std::string &args)
Return a shared_ptr to a new instance of miri_source_c.
double set_freq_corr(double ppm, size_t chan=0)
std::string get_antenna(size_t chan=0)
double set_gain(double gain, size_t chan=0)
size_t get_num_channels(void)
double set_gain(double gain, const std::string &name, size_t chan=0)
double get_center_freq(size_t chan=0)
double get_gain(const std::string &name, size_t chan=0)
std::vector< std::string > get_antennas(size_t chan=0)
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
double set_sample_rate(double rate)
double get_freq_corr(size_t chan=0)
std::string set_antenna(const std::string &antenna, size_t chan=0)
osmosdr::gain_range_t get_gain_range(size_t chan=0)
osmosdr::freq_range_t get_freq_range(size_t chan=0)
double get_gain(size_t chan=0)
osmosdr::gain_range_t get_gain_range(const std::string &name, size_t chan=0)
std::vector< std::string > get_gain_names(size_t chan=0)
double get_sample_rate(void)
bool set_gain_mode(bool automatic, size_t chan=0)
osmosdr::meta_range_t get_sample_rates(void)
static std::vector< std::string > get_devices()
double set_center_freq(double freq, size_t chan=0)
Definition source_iface.h:33
miri_source_c_sptr make_miri_source_c(const std::string &args="")
Return a shared_ptr to a new instance of miri_source_c.
struct mirisdr_dev mirisdr_dev_t
Definition miri_source_c.h:33
meta_range_t freq_range_t
Definition ranges.h:125
meta_range_t gain_range_t
Definition ranges.h:124