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.
devicesoapysdrshared.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_SOAPYSDR_DEVICESOAPYSDRSHARED_H_
19 #define DEVICES_SOAPYSDR_DEVICESOAPYSDRSHARED_H_
20 
21 #include <QMap>
22 #include <QVariant>
23 
24 #include <SoapySDR/Device.hpp>
25 
26 #include "util/message.h"
27 #include "export.h"
28 #include "devicesoapysdrparams.h"
29 
30 class SoapySDRInput;
31 class SoapySDROutput;
32 
37 {
38 public:
41 
42  public:
43  uint64_t getCenterFrequency() const { return m_centerFrequency; }
44  int getLOppmTenths() const { return m_LOppmTenths; }
45  int getFcPos() const { return m_fcPos; }
46  int getDevSampleRate() const { return m_devSampleRate; }
47  bool getRxElseTx() const { return m_rxElseTx; }
48 
50  uint64_t centerFrequency,
51  int LOppmTenths,
52  int fcPos,
53  int devSampleRate,
54  bool rxElseTx)
55  {
56  return new MsgReportBuddyChange(
57  centerFrequency,
58  LOppmTenths,
59  fcPos,
60  devSampleRate,
61  rxElseTx);
62  }
63 
64  private:
67  int m_fcPos;
69  bool m_rxElseTx;
70 
72  uint64_t centerFrequency,
73  int LOppmTenths,
74  int fcPos,
75  int devSampleRate,
76  bool rxElseTx) :
77  Message(),
78  m_centerFrequency(centerFrequency),
79  m_LOppmTenths(LOppmTenths),
80  m_fcPos(fcPos),
81  m_devSampleRate(devSampleRate),
82  m_rxElseTx(rxElseTx)
83  { }
84  };
85 
88 
89  public:
90  const QMap<QString, QVariant>& getDeviceArgSettings() const { return m_deviceArgSettings; }
91 
92  static MsgReportDeviceArgsChange* create(const QMap<QString, QVariant>& deviceArgSettings) {
93  return new MsgReportDeviceArgsChange(deviceArgSettings);
94  }
95 
96  private:
97  QMap<QString, QVariant> m_deviceArgSettings;
98 
99  MsgReportDeviceArgsChange(const QMap<QString, QVariant>& deviceArgSettings) :
100  m_deviceArgSettings(deviceArgSettings)
101  { }
102  };
103 
106 
107  SoapySDR::Device *m_device;
109  int m_channel;
112 
113  static const float m_sampleFifoLengthInSeconds;
114  static const int m_sampleFifoMinSize;
115  static const int m_sampleFifoMinSize32;
116 };
117 
118 
119 #endif /* DEVICES_SOAPYSDR_DEVICESOAPYSDRSHARED_H_ */
static const int m_sampleFifoMinSize32
static const int m_sampleFifoMinSize
int m_channel
allocated channel (-1 if none)
static MsgReportDeviceArgsChange * create(const QMap< QString, QVariant > &deviceArgSettings)
const QMap< QString, QVariant > & getDeviceArgSettings() const
static MsgReportBuddyChange * create(uint64_t centerFrequency, int LOppmTenths, int fcPos, int devSampleRate, bool rxElseTx)
int m_LOppmTenths
LO soft correction in tenths of ppm.
#define DEVICES_API
Definition: export.h:76
#define MESSAGE_CLASS_DECLARATION
Definition: message.h:43
DeviceSoapySDRParams * m_deviceParams
MsgReportBuddyChange(uint64_t centerFrequency, int LOppmTenths, int fcPos, int devSampleRate, bool rxElseTx)
SoapySDR::Device * m_device
static const float m_sampleFifoLengthInSeconds
bool m_rxElseTx
tells which side initiated the message
MsgReportDeviceArgsChange(const QMap< QString, QVariant > &deviceArgSettings)
unsigned __int64 uint64_t
Definition: rtptypes_win.h:48