GNU Radio Manual and C++ API Reference 3.10.3.0
The Free & Open Software Radio Ecosystem
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 * SPDX-License-Identifier: GPL-3.0-or-later
7 *
8 */
9
10#ifndef INCLUDED_IIO_FMCOMMS5_SINK_IMPL_H
11#define INCLUDED_IIO_FMCOMMS5_SINK_IMPL_H
12
13#include "device_sink_impl.h"
15
16#include <string>
17#include <vector>
18
19namespace gr {
20namespace iio {
21
23{
24private:
25 bool cyclic;
26 unsigned long samplerate;
27 iio_device* phy2;
28
29 static void set_params(iio_device* phy_device,
30 unsigned long long frequency,
31 unsigned long samplerate,
32 unsigned long bandwidth,
33 const char* rf_port_select,
34 double attenuation1,
35 double attenuation2,
36 const char* filter_source,
37 const char* filter_filename,
38 float Fpass,
39 float Fstop);
40
41 std::vector<std::string> get_channels_vector(bool ch1_en,
42 bool ch2_en,
43 bool ch3_en,
44 bool ch4_en,
45 bool ch5_en,
46 bool ch6_en,
47 bool ch7_en,
48 bool ch8_en);
49
50public:
51 fmcomms5_sink_impl(iio_context* ctx,
52 bool destroy_ctx,
53 unsigned long long frequency1,
54 unsigned long long frequency2,
55 unsigned long samplerate,
56 unsigned long bandwidth,
57 bool ch1_en,
58 bool ch2_en,
59 bool ch3_en,
60 bool ch4_en,
61 bool ch5_en,
62 bool ch6_en,
63 bool ch7_en,
64 bool ch8_en,
65 unsigned long buffer_size,
66 bool cyclic,
67 const char* rf_port_select,
68 double attenuation1,
69 double attenuation2,
70 double attenuation3,
71 double attenuation4,
72 const char* filter_source,
73 const char* filter_filename,
74 float Fpass,
75 float Fstop);
76
77 int work(int noutput_items,
78 gr_vector_const_void_star& input_items,
79 gr_vector_void_star& output_items);
80
81 void set_params(unsigned long long frequency1,
82 unsigned long long frequency2,
83 unsigned long samplerate,
84 unsigned long bandwidth,
85 const char* rf_port_select,
86 double attenuation1,
87 double attenuation2,
88 double attenuation3,
89 double attenuation4,
90 const char* filter_source,
91 const char* filter_filename,
92 float Fpass,
93 float Fstop);
94};
95
96} // namespace iio
97} // namespace gr
98
99#endif /* INCLUDED_IIO_FMCOMMS2_SINK_IMPL_H */
Definition: device_sink_impl.h:23
unsigned int buffer_size
Definition: device_sink_impl.h:34
bool destroy_ctx
Definition: device_sink_impl.h:35
iio_context * ctx
Definition: device_sink_impl.h:29
Definition: fmcomms5_sink_impl.h:23
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, const char *filter_source, const char *filter_filename, float Fpass, float Fstop)
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
just like gr::block::general_work, only this arranges to call consume_each for you
fmcomms5_sink_impl(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_source, const char *filter_filename, float Fpass, float Fstop)
Device specific sink for FMComms5 evaluation card.
Definition: fmcomms5_sink.h:33
GNU Radio logging wrapper.
Definition: basic_block.h:29
std::vector< const void * > gr_vector_const_void_star
Definition: types.h:28
std::vector< void * > gr_vector_void_star
Definition: types.h:27