19 #ifndef INCLUDE_SAMPLESOURCE_H 20 #define INCLUDE_SAMPLESOURCE_H 32 class SWGDeviceSettings;
34 class SWGDeviceReport;
53 virtual void destroy() = 0;
55 virtual void init() = 0;
56 virtual bool start() = 0;
57 virtual void stop() = 0;
59 virtual QByteArray serialize()
const = 0;
60 virtual bool deserialize(
const QByteArray& data) = 0;
62 virtual const QString& getDeviceDescription()
const = 0;
63 virtual int getSampleRate()
const = 0;
64 virtual void setSampleRate(
int sampleRate) = 0;
65 virtual quint64 getCenterFrequency()
const = 0;
66 virtual void setCenterFrequency(qint64 centerFrequency) = 0;
68 virtual bool handleMessage(
const Message& message) = 0;
72 QString& errorMessage)
75 errorMessage =
"Not implemented";
81 const QStringList& deviceSettingsKeys,
83 QString& errorMessage)
86 (void) deviceSettingsKeys;
88 errorMessage =
"Not implemented";
94 QString& errorMessage)
97 errorMessage =
"Not implemented";
103 QString& errorMessage)
107 errorMessage =
"Not implemented";
113 QString& errorMessage)
116 errorMessage =
"Not implemented";
121 virtual void setMessageQueueToGUI(
MessageQueue *queue) = 0;
125 static qint64 calculateDeviceCenterFrequency(
126 quint64 centerFrequency,
127 qint64 transverterDeltaFrequency,
130 quint32 devSampleRate,
131 FrequencyShiftScheme frequencyShiftScheme,
132 bool transverterMode =
false 135 static qint64 calculateCenterFrequency(
136 quint64 deviceCenterFrequency,
137 qint64 transverterDeltaFrequency,
140 quint32 devSampleRate,
141 FrequencyShiftScheme frequencyShiftScheme,
142 bool transverterMode =
false 145 static qint32 calculateFrequencyShift(
148 quint32 devSampleRate,
149 FrequencyShiftScheme frequencyShiftScheme
153 void handleInputMessages();
161 #endif // INCLUDE_SAMPLESOURCE_H
SampleSinkFifo * getSampleFifo()
MessageQueue m_inputMessageQueue
Input queue to the source.
MessageQueue * getInputMessageQueue()
SampleSinkFifo m_sampleFifo
MessageQueue * getMessageQueueToGUI()
virtual int webapiReportGet(SWGSDRangel::SWGDeviceReport &response, QString &errorMessage)
virtual int webapiSettingsPutPatch(bool force, const QStringList &deviceSettingsKeys, SWGSDRangel::SWGDeviceSettings &response, QString &errorMessage)
virtual int webapiRun(bool run, SWGSDRangel::SWGDeviceState &response, QString &errorMessage)
MessageQueue * m_guiMessageQueue
Input message queue to the GUI.
virtual int webapiRunGet(SWGSDRangel::SWGDeviceState &response, QString &errorMessage)
virtual int webapiSettingsGet(SWGSDRangel::SWGDeviceSettings &response, QString &errorMessage)