GNU Radio's LIMESDR Package
sink.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2018 Lime Microsystems info@limemicro.com
4  *
5  * GNU Radio is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3, or (at your option)
8  * any later version.
9  *
10  * GNU Radio is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with GNU Radio; see the file COPYING. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef INCLUDED_LIMESDR_SINK_H
22 #define INCLUDED_LIMESDR_SINK_H
23 
24 #include <limesdr/api.h>
25 #include <gnuradio/sync_block.h>
26 
27 namespace gr
28 {
29  namespace limesdr
30  {
31  class LIMESDR_API sink : virtual public gr::sync_block
32  {
33  public:
34  typedef boost::shared_ptr<sink> sptr;
35  /*!
36  * @brief Return a shared_ptr to a new instance of sink.
37  *
38  * To avoid accidental use of raw pointers, sink's
39  * constructor is private. limesdr::sink::make is the public
40  * interface for creating new instances.
41  *
42  * @param device_type LimeSDR-Mini(1), LimeSDR-USB(2).
43  *
44  * @param chip_mode SISO(1), MIMO(2).
45  *
46  * @param channel Select channel when in SISO mode: A(0),B(1).
47  *
48  * @param file_switch Load settings from file: NO(0),YES(1).
49  *
50  * @param filename Path to file if file switch is turned on.
51  *
52  * @param rf_freq TX center frequency in Hz.
53  *
54  * @param samp_rate sample rate in S/s.
55  *
56  * @param oversample oversample value. Valid values are: 0(default),1,2,4,8,16,32.
57  *
58  * @param calibration_ch0 Turn calibration channel 0: OFF(0),ON(1).
59  *
60  * @param calibr_bandw_ch0 Calibration bandwidth channel 0 [2.5e6,120e6] Hz.
61  *
62  * @param calibration_ch1 Turn calibration channel 1: OFF(0),ON(1).
63  *
64  * @param calibr_bandw_ch1 Calibration bandwidth channel 1 [2.5e6,120e6] Hz.
65  *
66  * @param pa_path_mini PA path LimeSDR-Mini: BAND1(1),BAND2(2).
67  *
68  * @param pa_path_ch0 PA path LimeSDR-USB channel 0: BAND1(1),BAND2(2).
69  *
70  * @param pa_path_ch1 PA path LimeSDR-USB channel 1: BAND1(1),BAND2(2).
71  *
72  * @param analog_filter_ch0 Turn analog filter channel 0: OFF(0),ON(1).
73  *
74  * @param analog_bandw_ch0 LPF bandwidth channel 0 [1.5e6,130e6] Hz.
75  *
76  * @param analog_filter_ch1 Turn analog filter channel 1: OFF(0),ON(1).
77  *
78  * @param analog_bandw_ch1 LPF bandwidth channel 1 [1.5e6,130e6] Hz.
79  *
80  * @param digital_filter_ch0 Turn digital filter channel 0: OFF(0),ON(1).
81  *
82  * @param digital_bandw_ch0 Digital filter bandwidth channel 0.
83  *
84  * @param digital_filter_ch1 Turn digital filter channel 1: OFF(0),ON(1).
85  *
86  * @param digital_bandw_ch1 Digital filter bandwidth channel 1.
87  *
88  * @param gain_dB_ch0 Input TX gain channel 0 [0,60] dB.
89  *
90  * @param gain_dB_ch1 Input TX gain channel 1 [0,60] dB.
91  *
92  * @return a new limesdr sink block object
93  */
94  static sptr make(int device_number,
95  int device_type,
96  int chip_mode,
97  int channel,
98  int file_switch,
99  const char *filename,
100  double rf_freq,
101  double samp_rate,
102  size_t oversample,
103  int calibration_ch0,
104  double calibr_bandw_ch0,
105  int calibration_ch1,
106  double calibr_bandw_ch1,
107  int pa_path_mini,
108  int pa_path_ch0,
109  int pa_path_ch1,
110  int analog_filter_ch0,
111  double analog_bandw_ch0,
112  int analog_filter_ch1,
113  double analog_bandw_ch1,
114  int digital_filter_ch0,
115  double digital_bandw_ch0,
116  int digital_filter_ch1,
117  double digital_bandw_ch1,
118  int gain_dB_ch0,
119  int gain_dB_ch1);
120  };
121  }
122 }
123 
124 #endif
Definition: sink.h:31
Definition: sink.h:27
#define LIMESDR_API
Definition: api.h:30
boost::shared_ptr< sink > sptr
Definition: sink.h:34