1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -04:00

Reverse API: Blade RF input changes

This commit is contained in:
f4exb
2018-12-25 21:05:24 +01:00
parent 4a08ab33fe
commit b0d12fbb23
14 changed files with 467 additions and 79 deletions
@@ -17,22 +17,26 @@
#ifndef PLUGINS_SAMPLESOURCE_BLADERF2INPUT_BLADERF2INPUT_H_
#define PLUGINS_SAMPLESOURCE_BLADERF2INPUT_BLADERF2INPUT_H_
#include <stdint.h>
#include <QString>
#include <QByteArray>
#include <stdint.h>
#include <QNetworkRequest>
#include "dsp/devicesamplesource.h"
#include "bladerf2/devicebladerf2shared.h"
#include "bladerf2inputsettings.h"
class QNetworkAccessManager;
class QNetworkReply;
class DeviceSourceAPI;
class BladeRF2InputThread;
class FileRecord;
struct bladerf_gain_modes;
struct bladerf;
class BladeRF2Input : public DeviceSampleSource
{
class BladeRF2Input : public DeviceSampleSource {
Q_OBJECT
public:
class MsgConfigureBladeRF2 : public Message {
MESSAGE_CLASS_DECLARATION
@@ -186,6 +190,8 @@ private:
BladeRF2InputThread *m_thread;
FileRecord *m_fileSink; //!< File sink to record device I/Q output
std::vector<GainMode> m_gainModes;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;
bool openDevice();
void closeDevice();
@@ -195,6 +201,11 @@ private:
bool setDeviceCenterFrequency(struct bladerf *dev, int requestedChannel, quint64 freq_hz, int loPpmTenths);
void webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const BladeRF2InputSettings& settings);
void webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response);
void webapiReverseSendSettings(QList<QString>& deviceSettingsKeys, const BladeRF2InputSettings& settings, bool force);
void webapiReverseSendStartStop(bool start);
private slots:
void networkManagerFinished(QNetworkReply *reply);
};
#endif /* PLUGINS_SAMPLESOURCE_BLADERF2INPUT_BLADERF2INPUT_H_ */