22#ifndef INCLUDED_IIO_EIGHTBIT_SOURCE_IMPL_H
23#define INCLUDED_IIO_EIGHTBIT_SOURCE_IMPL_H
29#include <boost/thread.hpp>
39 typedef std::vector<ctxInfo>::iterator
ctx_it;
44 void channel_read(
const struct iio_channel *chn,
45 void *dst,
size_t len);
47 boost::mutex iio_mutex;
48 boost::condition_variable iio_cond, iio_cond2;
49 unsigned long items_in_buffer;
51 volatile bool please_refill_buffer, thread_stopped;
54 boost::thread refill_thd;
56 unsigned long timeout;
61 struct iio_context *
ctx;
63 struct iio_buffer *
buf;
71 const std::string &device,
72 const std::vector<std::string> &channels,
73 const std::string &device_phy,
74 const std::vector<std::string> ¶ms,
80 const std::vector<std::string> ¶ms);
87 int work(
int noutput_items,
88 gr_vector_const_void_star &input_items,
89 gr_vector_void_star &output_items);
96 static struct iio_context *
get_context(
const std::string &uri);
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
struct iio_context * ctx
Definition thirtytwobit_source_impl.h:61
unsigned int decimation
Definition thirtytwobit_source_impl.h:66
static struct iio_context * get_context(const std::string &uri)
bool destroy_ctx
Definition thirtytwobit_source_impl.h:67
std::vector< struct iio_channel * > channel_list
Definition thirtytwobit_source_impl.h:64
static void remove_ctx_history(struct iio_context *ctx, bool destroy_ctx)
thirtytwobit_source_impl(struct iio_context *ctx, bool destroy_ctx, const std::string &device, const std::vector< std::string > &channels, const std::string &device_phy, const std::vector< std::string > ¶ms, unsigned int buffer_size=DEFAULT_BUFFER_SIZE, unsigned int decimation=0)
void set_buffer_size(unsigned int buffer_size)
struct iio_buffer * buf
Definition thirtytwobit_source_impl.h:63
struct iio_device * phy
Definition thirtytwobit_source_impl.h:62
unsigned int buffer_size
Definition thirtytwobit_source_impl.h:65
void set_timeout_ms(unsigned long timeout)
static void set_params(struct iio_device *phy, const std::vector< std::string > ¶ms)
struct iio_device * dev
Definition thirtytwobit_source_impl.h:62
void set_params(const std::vector< std::string > ¶ms)
static bool load_fir_filter(std::string &filter, struct iio_device *phy)
~thirtytwobit_source_impl()
<+description of block+>
Definition thirtytwobit_source.h:44
#define DEFAULT_BUFFER_SIZE
Definition device_sink.h:29
Definition device_sink.h:36
std::vector< ctxInfo >::iterator ctx_it
Definition device_source_impl.h:39
static std::vector< ctxInfo > contexts
Definition device_source_impl.h:36
static boost::mutex ctx_mutex
Definition device_source_impl.h:37
Definition device_sink.h:35
Definition device_source_impl.h:35
int count
Definition device_source_impl.h:35
std::string uri
Definition device_source_impl.h:35
struct iio_context * ctx
Definition device_source_impl.h:35