GNU Radio's IIO Package
fmcomms5_sink_impl.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2015 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_SINK_IMPL_H
23#define INCLUDED_IIO_FMCOMMS5_SINK_IMPL_H
24
25#include <string>
26#include <vector>
27
28#include <iio/fmcomms5_sink.h>
29
30#include "device_sink_impl.h"
31
32namespace gr {
33 namespace iio {
34
36 {
37 private:
38 bool cyclic;
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, unsigned long samplerate,
44 unsigned long bandwidth, const char *rf_port_select,
45 double attenuation1, double attenuation2);
46
47 std::vector<std::string> get_channels_vector(
48 bool ch1_en, bool ch2_en, bool ch3_en, bool ch4_en,
49 bool ch5_en, bool ch6_en, bool ch7_en, bool ch8_en);
50
51 public:
52 fmcomms5_sink_impl(struct iio_context *ctx, bool destroy_ctx,
53 unsigned long long frequency1,
54 unsigned long long frequency2, unsigned long samplerate,
55 unsigned long bandwidth,
56 bool ch1_en, bool ch2_en, bool ch3_en, bool ch4_en,
57 bool ch5_en, bool ch6_en, bool ch7_en, bool ch8_en,
58 unsigned long buffer_size, bool cyclic,
59 const char *rf_port_select,
60 double attenuation1, double attenuation2,
61 double attenuation3, double attenuation4,
62 const char *filter);
63
64 int work(int noutput_items,
65 gr_vector_const_void_star &input_items,
66 gr_vector_void_star &output_items);
67
68 void set_params(unsigned long long frequency1,
69 unsigned long long frequency2, unsigned long samplerate,
70 unsigned long bandwidth, const char *rf_port_select,
71 double attenuation1, double attenuation2,
72 double attenuation3, double attenuation4);
73 };
74
75 } // namespace iio
76} // namespace gr
77
78#endif /* INCLUDED_IIO_FMCOMMS2_SINK_IMPL_H */
device_sink_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 > &params, unsigned int buffer_size=DEFAULT_BUFFER_SIZE, unsigned int interpolation=0, bool cyclic=false)
unsigned int buffer_size
Definition device_sink_impl.h:45
struct iio_context * ctx
Definition device_sink_impl.h:41
bool destroy_ctx
Definition device_sink_impl.h:47
fmcomms5_sink_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 cyclic, const char *rf_port_select, double attenuation1, double attenuation2, double attenuation3, double attenuation4, const char *filter)
void set_params(unsigned long long frequency1, unsigned long long frequency2, unsigned long samplerate, unsigned long bandwidth, const char *rf_port_select, double attenuation1, double attenuation2, double attenuation3, double attenuation4)
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
Definition fmcomms5_sink.h:36
Definition attr_sink.h:30
Definition attr_sink.h:29