SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
devicextrx.h
Go to the documentation of this file.
1 // Copyright (C) 2018 Edouard Griffiths, F4EXB //
3 // //
4 // This program is free software; you can redistribute it and/or modify //
5 // it under the terms of the GNU General Public License as published by //
6 // the Free Software Foundation as version 3 of the License, or //
7 // (at your option) any later version. //
8 // //
9 // This program is distributed in the hope that it will be useful, //
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
12 // GNU General Public License V3 for more details. //
13 // //
14 // You should have received a copy of the GNU General Public License //
15 // along with this program. If not, see <http://www.gnu.org/licenses/>. //
17 
18 #ifndef DEVICES_XTRX_DEVICEXTRX_H_
19 #define DEVICES_XTRX_DEVICEXTRX_H_
20 
21 #include <stdint.h>
22 
23 #include "export.h"
24 
25 struct strx_dev;
26 
28 {
29 public:
30  DeviceXTRX();
31  ~DeviceXTRX();
32 
33  bool open(const char* deviceStr);
34  void close();
35  struct xtrx_dev *getDevice() { return m_dev; }
36  double set_samplerate(double rate, double master, bool output);
37  double getMasterRate() const { return m_masterRate; }
38  double getClockGen() const { return m_clockGen; }
39  double getActualInputRate() const { return m_actualInputRate; }
40  double getActualOutputRate() const { return m_actualOutputRate; }
41  static void getAutoGains(uint32_t autoGain, uint32_t& lnaGain, uint32_t& tiaGain, uint32_t& pgaGain);
42 
43  static const uint32_t m_nbGains = 74;
44  static const unsigned int blockSize = (1<<13);
45 
46 private:
47  struct xtrx_dev *m_dev;
48  double m_inputRate;
49  double m_outputRate;
50  double m_masterRate;
51  double m_clockGen;
54 
55  static const uint32_t m_lnaTbl[m_nbGains];
56  static const uint32_t m_pgaTbl[m_nbGains];
57 };
58 
59 
60 
61 #endif /* DEVICES_XTRX_DEVICEXTRX_H_ */
double getClockGen() const
Definition: devicextrx.h:38
double getActualOutputRate() const
Definition: devicextrx.h:40
double m_clockGen
Definition: devicextrx.h:51
double getMasterRate() const
Definition: devicextrx.h:37
#define DEVICES_API
Definition: export.h:76
double m_outputRate
Definition: devicextrx.h:49
struct xtrx_dev * getDevice()
Definition: devicextrx.h:35
unsigned int uint32_t
Definition: rtptypes_win.h:46
double getActualInputRate() const
Definition: devicextrx.h:39
double m_actualInputRate
Definition: devicextrx.h:52
double m_inputRate
Definition: devicextrx.h:48
double m_masterRate
Definition: devicextrx.h:50
struct xtrx_dev * m_dev
device handle
Definition: devicextrx.h:47
double m_actualOutputRate
Definition: devicextrx.h:53