GNU Radio's LIMESDR Package
source.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_SOURCE_H
22 #define INCLUDED_LIMESDR_SOURCE_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 source : virtual public gr::sync_block
32  {
33  public:
34  typedef boost::shared_ptr<source> sptr;
35 
36  /*!
37  * @brief Return a shared_ptr to a new instance of source.
38  *
39  * To avoid accidental use of raw pointers, source's
40  * constructor is private. limesdr::source::make is the public
41  * interface for creating new instances.
42  *
43  * @param device_type LimeSDR-Mini(1),LimeSDR-USB(2).
44  *
45  * @param chip_mode SISO(1),MIMO(2).
46  *
47  * @param channel Select channel when in SISO mode: A(0),B(1).
48  *
49  * @param file_switch Load settings from file: NO(0),YES(1).
50  *
51  * @param filename Path to file if file switch is turned on.
52  *
53  * @param rf_freq TX center frequency in Hz.
54  *
55  * @param samp_rate sample rate in S/s.
56  *
57  * @param oversample oversample value. Valid values are: 0(default),1,2,4,8,16,32.
58  *
59  * @param calibration_ch0 Turn calibration channel 0: OFF(0),ON(1).
60  *
61  * @param calibr_bandw_ch0 Calibration bandwidth channel 0 [2.5e6,120e6] Hz.
62  *
63  * @param calibration_ch1 Turn calibration channel 1: OFF(0),ON(1).
64  *
65  * @param calibr_bandw_ch1 Calibration bandwidth channel 1 [2.5e6,120e6] Hz.
66  *
67  * @param lna_path_mini LNA path LimeSDR-Mini: LNAH(1),LNAW(3).
68  *
69  * @param lna_path_ch0 LNA path LimeSDR-USB channel 0: no path(0),LNAH(1),LNAL(2),LNAW(3).
70  *
71  * @param lna_path_ch1 LNA path LimeSDR-USB channel 1: no path(0),LNAH(1),LNAL(2),LNAW(3).
72  *
73  * @param analog_filter_ch0 Turn analog filter channel 0: OFF(0),ON(1).
74  *
75  * @param analog_bandw_ch0 LPF bandwidth channel 0 [1.5e6,130e6] Hz.
76  *
77  * @param analog_filter_ch1 Turn analog filter channel 1: OFF(0),ON(1).
78  *
79  * @param analog_bandw_ch1 LPF bandwidth channel 1 [1.5e6,130e6] Hz.
80  *
81  * @param digital_filter_ch0 Turn digital filter channel 0: OFF(0),ON(1).
82  *
83  * @param digital_bandw_ch0 Digital filter bandwidth channel 0.
84  *
85  * @param digital_filter_ch1 Turn digital filter channel 1: OFF(0),ON(1).
86  *
87  * @param digital_bandw_ch1 Digital filter bandwidth channel 1.
88  *
89  * @param gain_dB_ch0 Input RX gain channel 0 [0,70] dB.
90  *
91  * @param gain_dB_ch1 Input RX gain channel 1 [0,70] dB.
92  *
93  * @return a new limesdr source block object
94  */
95  static sptr make(int device_number,
96  int device_type,
97  int chip_mode,
98  int channel,
99  int file_switch,
100  const char *filename,
101  double rf_freq,
102  double samp_rate,
103  size_t oversample,
104  int calibration_ch0,
105  double calibr_bandw_ch0,
106  int calibration_ch1,
107  double calibr_bandw_ch1,
108  int lna_path_mini,
109  int lna_path_ch0,
110  int lna_path_ch1,
111  int analog_filter_ch0,
112  double analog_bandw_ch0,
113  int analog_filter_ch1,
114  double analog_bandw_ch1,
115  int digital_filter_ch0,
116  double digital_bandw_ch0,
117  int digital_filter_ch1,
118  double digital_bandw_ch1,
119  int gain_dB_ch0,
120  int gain_dB_ch1);
121  };
122  }
123 }
124 
125 #endif
126 
Definition: sink.h:27
Definition: source.h:31
#define LIMESDR_API
Definition: api.h:30
boost::shared_ptr< source > sptr
Definition: source.h:34