GNU Radio's IIO Package
fmcomms5_source_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_FMCOMMS5_SOURCE_IMPL_H
23 #define INCLUDED_IIO_FMCOMMS5_SOURCE_IMPL_H
24 
25 #include <string>
26 #include <vector>
27 
28 #include <iio/fmcomms5_source.h>
29 
30 #include "device_source_impl.h"
31 
32 namespace gr {
33  namespace iio {
34 
36  , public device_source_impl
37  {
38  private:
39  unsigned long samplerate;
40  struct iio_device *phy2;
41 
42  static void set_params(struct iio_device *phy_device,
43  unsigned long long frequency,
44  unsigned long samplerate, unsigned long bandwidth,
45  bool quadrature, bool rfdc, bool bbdc,
46  const char *gain1, double gain1_value,
47  const char *gain2, double gain2_value,
48  const char *port_select);
49 
50  std::vector<std::string> get_channels_vector(
51  bool ch1_en, bool ch2_en, bool ch3_en, bool ch4_en,
52  bool ch5_en, bool ch6_en, bool ch7_en, bool ch8_en);
53 
54  public:
55  fmcomms5_source_impl(struct iio_context *ctx,
56  bool destroy_ctx, unsigned long long frequency1,
57  unsigned long long frequency2, unsigned long samplerate,
58  unsigned long bandwidth,
59  bool ch1_en, bool ch2_en, bool ch3_en, bool ch4_en,
60  bool ch5_en, bool ch6_en, bool ch7_en, bool ch8_en,
61  unsigned long buffer_size, bool quadrature, bool rfdc,
62  bool bbdc, const char *gain1, double gain1_value,
63  const char *gain2, double gain2_value,
64  const char *gain3, double gain3_value,
65  const char *gain4, double gain4_value,
66  const char *rf_port_select, const char *filter);
67 
68  void set_params(unsigned long long frequency1,
69  unsigned long long frequency2,
70  unsigned long samplerate, unsigned long bandwidth,
71  bool quadrature, bool rfdc, bool bbdc,
72  const char *gain1, double gain1_value,
73  const char *gain2, double gain2_value,
74  const char *gain3, double gain3_value,
75  const char *gain4, double gain4_value,
76  const char *rf_port_select);
77  };
78 
79  } // namespace iio
80 } // namespace gr
81 
82 #endif /* INCLUDED_IIO_FMCOMMS5_SOURCE_IMPL_H */
fmcomms5_source_impl(struct iio_context *ctx, bool destroy_ctx, unsigned long long frequency1, unsigned long long frequency2, unsigned long samplerate, unsigned long bandwidth, bool ch1_en, bool ch2_en, bool ch3_en, bool ch4_en, bool ch5_en, bool ch6_en, bool ch7_en, bool ch8_en, unsigned long buffer_size, bool quadrature, bool rfdc, bool bbdc, const char *gain1, double gain1_value, const char *gain2, double gain2_value, const char *gain3, double gain3_value, const char *gain4, double gain4_value, const char *rf_port_select, const char *filter)
struct iio_context * ctx
Definition: device_source_impl.h:61
Definition: device_source_impl.h:41
Definition: fmcomms5_source_impl.h:35
unsigned int buffer_size
Definition: device_source_impl.h:65
bool destroy_ctx
Definition: device_source_impl.h:67
Definition: attr_sink.h:29
<+description of block+>
Definition: fmcomms5_source.h:40