19 #ifndef SDRBASE_DSP_DEVICESAMPLESINK_H_ 20 #define SDRBASE_DSP_DEVICESAMPLESINK_H_ 31 class SWGDeviceSettings;
33 class SWGDeviceReport;
47 virtual void destroy() = 0;
49 virtual void init() = 0;
50 virtual bool start() = 0;
51 virtual void stop() = 0;
53 virtual QByteArray serialize()
const = 0;
54 virtual bool deserialize(
const QByteArray& data) = 0;
56 virtual const QString& getDeviceDescription()
const = 0;
57 virtual int getSampleRate()
const = 0;
58 virtual void setSampleRate(
int sampleRate) = 0;
59 virtual quint64 getCenterFrequency()
const = 0;
60 virtual void setCenterFrequency(qint64 centerFrequency) = 0;
62 virtual bool handleMessage(
const Message& message) = 0;
66 QString& errorMessage)
69 errorMessage =
"Not implemented";
75 const QStringList& deviceSettingsKeys,
77 QString& errorMessage)
80 (void) deviceSettingsKeys;
82 errorMessage =
"Not implemented";
88 QString& errorMessage)
91 errorMessage =
"Not implemented";
97 QString& errorMessage)
101 errorMessage =
"Not implemented";
107 QString& errorMessage)
110 errorMessage =
"Not implemented";
115 virtual void setMessageQueueToGUI(
MessageQueue *queue) = 0;
119 static qint64 calculateDeviceCenterFrequency(
120 quint64 centerFrequency,
121 qint64 transverterDeltaFrequency,
124 quint32 devSampleRate,
125 bool transverterMode =
false);
127 static qint64 calculateCenterFrequency(
128 quint64 deviceCenterFrequency,
129 qint64 transverterDeltaFrequency,
132 quint32 devSampleRate,
133 bool transverterMode =
false);
135 static qint32 calculateFrequencyShift(
138 quint32 devSampleRate);
141 void handleInputMessages();
MessageQueue m_inputMessageQueue
Input queue to the sink.
MessageQueue * getInputMessageQueue()
SampleSourceFifo * getSampleFifo()
virtual int webapiSettingsPutPatch(bool force, const QStringList &deviceSettingsKeys, SWGSDRangel::SWGDeviceSettings &response, QString &errorMessage)
virtual int webapiSettingsGet(SWGSDRangel::SWGDeviceSettings &response, QString &errorMessage)
SampleSourceFifo m_sampleSourceFifo
virtual int webapiRunGet(SWGSDRangel::SWGDeviceState &response, QString &errorMessage)
virtual int webapiRun(bool run, SWGSDRangel::SWGDeviceState &response, QString &errorMessage)
MessageQueue * getMessageQueueToGUI()
MessageQueue * m_guiMessageQueue
Input message queue to the GUI.
virtual int webapiReportGet(SWGSDRangel::SWGDeviceReport &response, QString &errorMessage)