GNU Radio's IIO Package
fmcomms2_sink_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2014 Analog Devices Inc.
4  * Author: Paul Cercueil <paul.cercueil@analog.com>
5  *
6  * This is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3, or (at your option)
9  * any later version.
10  *
11  * This software is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this software; see the file COPYING. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street,
19  * Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef INCLUDED_IIO_FMCOMMS2_SINK_IMPL_H
23 #define INCLUDED_IIO_FMCOMMS2_SINK_IMPL_H
24 
25 #include <string>
26 #include <vector>
27 
28 #include <iio/fmcomms2_sink.h>
29 
30 #include "device_sink_impl.h"
31 
32 namespace gr {
33  namespace iio {
34 
36  {
37  private:
38  bool cyclic;
39 
40  std::vector<std::string> get_channels_vector(
41  bool ch1_en, bool ch2_en, bool ch3_en, bool ch4_en);
42 
43  public:
44  fmcomms2_sink_impl(struct iio_context *ctx, bool destroy_ctx,
45  unsigned long long frequency, unsigned long samplerate,
46  unsigned long bandwidth,
47  bool ch1_en, bool ch2_en, bool ch3_en, bool ch4_en,
48  unsigned long buffer_size, bool cyclic,
49  const char *rf_port_select, double attenuation1,
50  double attenuation2, const char *filter,
51  bool auto_filter);
52 
53  int work(int noutput_items,
54  gr_vector_const_void_star &input_items,
55  gr_vector_void_star &output_items);
56 
57  void set_params(unsigned long long frequency,
58  unsigned long samplerate, unsigned long bandwidth,
59  const char *rf_port_select, double attenuation1,
60  double attenuation2, const char *filter,
61  bool auto_filter);
62  };
63 
64  } // namespace iio
65 } // namespace gr
66 
67 #endif /* INCLUDED_IIO_FMCOMMS2_SINK_IMPL_H */
bool destroy_ctx
Definition: device_sink_impl.h:47
Definition: fmcomms2_sink.h:35
void set_params(unsigned long long frequency, unsigned long samplerate, unsigned long bandwidth, const char *rf_port_select, double attenuation1, double attenuation2, const char *filter, bool auto_filter)
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
unsigned int buffer_size
Definition: device_sink_impl.h:45
Definition: device_sink_impl.h:34
fmcomms2_sink_impl(struct iio_context *ctx, bool destroy_ctx, unsigned long long frequency, unsigned long samplerate, unsigned long bandwidth, bool ch1_en, bool ch2_en, bool ch3_en, bool ch4_en, unsigned long buffer_size, bool cyclic, const char *rf_port_select, double attenuation1, double attenuation2, const char *filter, bool auto_filter)
Definition: attr_sink.h:29
Definition: fmcomms2_sink_impl.h:35
struct iio_context * ctx
Definition: device_sink_impl.h:41