blob: ad25eccdc18eee08d02cbe8463002f2e31eaeb85 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
//
// Copyright 2010 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
#ifndef INCLUDED_UHD_SIMPLE_DEVICE_HPP
#define INCLUDED_UHD_SIMPLE_DEVICE_HPP
#include <uhd/config.hpp>
#include <uhd/device.hpp>
#include <uhd/types.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/utility.hpp>
#include <vector>
namespace uhd{
/*!
* The simple UHD device class:
* A simple device facilitates ease-of-use for most use-case scenarios.
* The wrapper provides convenience functions to tune the devices
* as well as to set the dboard gains, antennas, and other properties.
*/
class UHD_API simple_device : boost::noncopyable{
public:
typedef boost::shared_ptr<simple_device> sptr;
static sptr make(const std::string &args);
virtual device::sptr get_device(void) = 0;
virtual std::string get_name(void) = 0;
/*******************************************************************
* Streaming
******************************************************************/
virtual void set_streaming(bool enb) = 0;
virtual bool get_streaming(void) = 0;
/*******************************************************************
* RX methods
******************************************************************/
virtual void set_rx_rate(double rate) = 0;
virtual double get_rx_rate(void) = 0;
virtual std::vector<double> get_rx_rates(void) = 0;
virtual tune_result_t set_rx_freq(double freq) = 0;
virtual freq_range_t get_rx_freq_range(void) = 0;
virtual void set_rx_gain(float gain) = 0;
virtual float get_rx_gain(void) = 0;
virtual gain_range_t get_rx_gain_range(void) = 0;
virtual void set_rx_antenna(const std::string &ant) = 0;
virtual std::string get_rx_antenna(void) = 0;
virtual std::vector<std::string> get_rx_antennas(void) = 0;
/*******************************************************************
* TX methods
******************************************************************/
virtual void set_tx_rate(double rate) = 0;
virtual double get_tx_rate(void) = 0;
virtual std::vector<double> get_tx_rates(void) = 0;
virtual tune_result_t set_tx_freq(double freq) = 0;
virtual freq_range_t get_tx_freq_range(void) = 0;
virtual void set_tx_gain(float gain) = 0;
virtual float get_tx_gain(void) = 0;
virtual gain_range_t get_tx_gain_range(void) = 0;
virtual void set_tx_antenna(const std::string &ant) = 0;
virtual std::string get_tx_antenna(void) = 0;
virtual std::vector<std::string> get_tx_antennas(void) = 0;
};
} //namespace uhd
#endif /* INCLUDED_UHD_SIMPLE_DEVICE_HPP */
|