18 #ifndef PLUGINS_CHANNELTX_UDPSINK_UDPSOURCE_H_ 19 #define PLUGINS_CHANNELTX_UDPSINK_UDPSOURCE_H_ 22 #include <QNetworkRequest> 36 class QNetworkAccessManager;
88 m_sampleRate(sampleRate),
89 m_centerFrequency(centerFrequency)
117 (void) sinkElseSource;
123 QString& errorMessage);
127 const QStringList& channelSettingsKeys,
129 QString& errorMessage);
133 QString& errorMessage);
153 void levelChanged(qreal rmsLevel, qreal peakLevel,
int numSamples);
254 void applyChannelSettings(
int basebandSampleRate,
int outputSampleRate,
int inputFrequencyOffset,
bool force =
false);
268 if (m_squelchThreshold == 0)
270 m_squelchOpen =
true;
274 if (m_squelchOpenCount < m_squelchThreshold)
276 m_squelchOpenCount++;
281 m_squelchOpen =
true;
287 if (m_squelchThreshold == 0)
289 m_squelchOpen =
false;
293 if (m_squelchCloseCount > 0)
295 m_squelchCloseCount--;
299 m_squelchOpenCount = 0;
300 m_squelchOpen =
false;
310 m_squelchOpen =
true;
316 m_squelchOpen =
false;
317 m_squelchOpenCount = 0;
318 m_squelchCloseCount = 0;
float m_modPhasor
Phasor for FM modulation.
virtual bool deserialize(const QByteArray &data)
double getInMagSq() const
std::vector< Sample > SampleVector
int m_spectrumChunkCounter
QNetworkRequest m_networkRequest
virtual int webapiSettingsPutPatch(bool force, const QStringList &channelSettingsKeys, SWGSDRangel::SWGChannelSettings &response, QString &errorMessage)
Complex * m_SSBFilterBuffer
static const QString m_channelId
void applySettings(const UDPSourceSettings &settings, bool force=false)
MsgUDPSourceSpectrum(bool enabled)
void initSquelch(bool open)
int m_inputFrequencyOffset
static MsgResetReadIndex * create()
static const QString m_channelIdURI
virtual void pull(Sample &sample)
static const int m_sampleRateAverageItems
virtual int webapiReportGet(SWGSDRangel::SWGChannelReport &response, QString &errorMessage)
int32_t getBufferGauge() const
void networkManagerFinished(QNetworkReply *reply)
int m_SSBFilterBufferIndex
Real m_interpolatorDistanceRemain
BasebandSampleSink * m_spectrum
UDPSourceSettings m_settings
bool getSquelchOpen() const
static const int m_ssbFftLen
QNetworkAccessManager * m_networkManager
void webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings &response, const UDPSourceSettings &settings)
MovingAverage< double > m_inMovingAverage
MovingAverage< double > m_movingAverage
void setSpectrum(bool enabled)
virtual void getTitle(QString &title)
void readMonoSample(qint16 &t)
void webapiReverseSendSettings(QList< QString > &channelSettingsKeys, const UDPSourceSettings &settings, bool force)
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport &response)
Real m_actualInputSampleRate
sample rate with UDP buffer skew compensation
qint64 m_inputFrequencyOffset
void readSample(qint16 &t)
audio mono
UDPSourceUDPHandler m_udpHandler
int32_t getBufferGauge() const
fftfilt * m_SSBFilter
Complex filter for SSB modulation.
#define MESSAGE_CLASS_DECLARATION
virtual int webapiSettingsGet(SWGSDRangel::SWGChannelSettings &response, QString &errorMessage)
virtual int getNbSinkStreams() const
virtual int getNbSourceStreams() const
void setSpectrumSink(BasebandSampleSink *spectrum)
virtual void getIdentifier(QString &id)
virtual qint64 getCenterFrequency() const
Applies to a default stream.
bool m_interpolatorConsumed
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
virtual bool handleMessage(const Message &cmd)
Processing of a message. Returns true if message has actually been processed.
int m_sampleRateAvgCounter
UDPSource(DeviceAPI *deviceAPI)
static MsgUDPSourceSpectrum * create(bool enabled)
void applyChannelSettings(int basebandSampleRate, int outputSampleRate, int inputFrequencyOffset, bool force=false)
Real m_interpolatorDistance
Interpolator m_interpolator
void levelChanged(qreal rmsLevel, qreal peakLevel, int numSamples)
ThreadedBasebandSampleSource * m_threadedChannelizer
SampleVector m_sampleBuffer
void calculateSquelch(double value)
std::complex< Real > Complex
UpChannelizer * m_channelizer
void calculateLevel(Real sample)
virtual QByteArray serialize() const