From 4169833b4dd520500f6f5c81ff74c6f3dc792d1c Mon Sep 17 00:00:00 2001 From: f4exb Date: Sun, 19 Nov 2017 19:14:33 +0100 Subject: [PATCH] Web API: report Tx channel info summary --- plugins/channeltx/modam/ammod.cpp | 2 ++ plugins/channeltx/modam/ammod.h | 9 ++++++++- plugins/channeltx/modam/ammodsettings.cpp | 5 +++++ plugins/channeltx/modam/ammodsettings.h | 1 + plugins/channeltx/modatv/atvmod.cpp | 2 ++ plugins/channeltx/modatv/atvmod.h | 9 ++++++++- plugins/channeltx/modatv/atvmodsettings.cpp | 5 +++++ plugins/channeltx/modatv/atvmodsettings.h | 1 + plugins/channeltx/modnfm/nfmmod.cpp | 2 ++ plugins/channeltx/modnfm/nfmmod.h | 9 ++++++++- plugins/channeltx/modnfm/nfmmodsettings.cpp | 4 ++++ plugins/channeltx/modnfm/nfmmodsettings.h | 1 + plugins/channeltx/modssb/ssbmod.cpp | 2 ++ plugins/channeltx/modssb/ssbmod.h | 9 ++++++++- plugins/channeltx/modssb/ssbmodsettings.cpp | 10 ++++++++++ plugins/channeltx/modssb/ssbmodsettings.h | 2 ++ plugins/channeltx/modwfm/wfmmod.cpp | 1 + plugins/channeltx/modwfm/wfmmod.h | 8 +++++++- plugins/channeltx/modwfm/wfmmodsettings.cpp | 5 +++++ plugins/channeltx/modwfm/wfmmodsettings.h | 1 + plugins/channeltx/udpsink/udpsink.cpp | 1 + plugins/channeltx/udpsink/udpsink.h | 9 ++++++++- plugins/channeltx/udpsink/udpsinksettings.cpp | 5 +++++ plugins/channeltx/udpsink/udpsinksettings.h | 2 ++ 24 files changed, 99 insertions(+), 6 deletions(-) diff --git a/plugins/channeltx/modam/ammod.cpp b/plugins/channeltx/modam/ammod.cpp index 320bb9fee..c921260bc 100644 --- a/plugins/channeltx/modam/ammod.cpp +++ b/plugins/channeltx/modam/ammod.cpp @@ -41,6 +41,7 @@ const int AMMod::m_levelNbSamples = 480; // every 10ms AMMod::AMMod(DeviceSinkAPI *deviceAPI) : m_deviceAPI(deviceAPI), + m_absoluteFrequencyOffset(0), m_movingAverage(40, 0), m_volumeAGC(40, 0), m_audioFifo(4800), @@ -296,6 +297,7 @@ bool AMMod::handleMessage(const Message& cmd) AMModSettings settings = cfg.getSettings(); // These settings are set with DownChannelizer::MsgChannelizerNotification + m_absoluteFrequencyOffset = settings.m_inputFrequencyOffset; settings.m_basebandSampleRate = m_settings.m_basebandSampleRate; settings.m_outputSampleRate = m_settings.m_outputSampleRate; settings.m_inputFrequencyOffset = m_settings.m_inputFrequencyOffset; diff --git a/plugins/channeltx/modam/ammod.h b/plugins/channeltx/modam/ammod.h index ab6f0522c..fdd3a9cb6 100644 --- a/plugins/channeltx/modam/ammod.h +++ b/plugins/channeltx/modam/ammod.h @@ -23,6 +23,7 @@ #include #include "dsp/basebandsamplesource.h" +#include "channel/channelsourceapi.h" #include "dsp/nco.h" #include "dsp/ncof.h" #include "dsp/interpolator.h" @@ -38,7 +39,7 @@ class ThreadedBasebandSampleSource; class UpChannelizer; class DeviceSinkAPI; -class AMMod : public BasebandSampleSource { +class AMMod : public BasebandSampleSource, public ChannelSourceAPI { Q_OBJECT public: @@ -234,6 +235,10 @@ public: virtual void stop(); virtual bool handleMessage(const Message& cmd); + virtual int getDeltaFrequency() const { return m_absoluteFrequencyOffset; } + virtual void getIdentifier(QString& id) { id = objectName(); } + virtual void getTitle(QString& title) { title = m_settings.m_title; } + double getMagSq() const { return m_magsq; } CWKeyer *getCWKeyer() { return &m_cwKeyer; } @@ -259,7 +264,9 @@ private: DeviceSinkAPI* m_deviceAPI; ThreadedBasebandSampleSource* m_threadedChannelizer; UpChannelizer* m_channelizer; + AMModSettings m_settings; + int m_absoluteFrequencyOffset; NCO m_carrierNco; NCOF m_toneNco; diff --git a/plugins/channeltx/modam/ammodsettings.cpp b/plugins/channeltx/modam/ammodsettings.cpp index 9cbd5707a..97b711218 100644 --- a/plugins/channeltx/modam/ammodsettings.cpp +++ b/plugins/channeltx/modam/ammodsettings.cpp @@ -41,6 +41,7 @@ void AMModSettings::resetToDefaults() m_channelMute = false; m_playLoop = false; m_rgbColor = QColor(255, 255, 0).rgb(); + m_title = "AM Modulator"; } QByteArray AMModSettings::serialize() const @@ -62,6 +63,8 @@ QByteArray AMModSettings::serialize() const s.writeBlob(8, m_channelMarker->serialize()); } + s.writeString(9, m_title); + return s.final(); } @@ -98,6 +101,8 @@ bool AMModSettings::deserialize(const QByteArray& data) m_channelMarker->deserialize(bytetmp); } + d.readString(9, &m_title, "AM Modulator"); + return true; } else diff --git a/plugins/channeltx/modam/ammodsettings.h b/plugins/channeltx/modam/ammodsettings.h index bb46d1604..fa74536d6 100644 --- a/plugins/channeltx/modam/ammodsettings.h +++ b/plugins/channeltx/modam/ammodsettings.h @@ -34,6 +34,7 @@ struct AMModSettings bool m_channelMute; bool m_playLoop; quint32 m_rgbColor; + QString m_title; Serializable *m_channelMarker; Serializable *m_cwKeyerGUI; diff --git a/plugins/channeltx/modatv/atvmod.cpp b/plugins/channeltx/modatv/atvmod.cpp index b65ac31e7..488030e3f 100644 --- a/plugins/channeltx/modatv/atvmod.cpp +++ b/plugins/channeltx/modatv/atvmod.cpp @@ -50,6 +50,7 @@ const int ATVMod::m_ssbFftLen = 1024; ATVMod::ATVMod(DeviceSinkAPI *deviceAPI) : m_deviceAPI(deviceAPI), + m_absoluteFrequencyOffset(0), m_modPhasor(0.0f), m_tvSampleRate(1000000), m_evenImage(true), @@ -527,6 +528,7 @@ bool ATVMod::handleMessage(const Message& cmd) ATVModSettings settings = cfg.getSettings(); // These settings are set with UpChannelizer::MsgChannelizerNotification + m_absoluteFrequencyOffset = settings.m_inputFrequencyOffset; settings.m_outputSampleRate = m_settings.m_outputSampleRate; settings.m_inputFrequencyOffset = m_settings.m_inputFrequencyOffset; diff --git a/plugins/channeltx/modatv/atvmod.h b/plugins/channeltx/modatv/atvmod.h index 0c4588ee2..4099554a6 100644 --- a/plugins/channeltx/modatv/atvmod.h +++ b/plugins/channeltx/modatv/atvmod.h @@ -28,6 +28,7 @@ #include #include "dsp/basebandsamplesource.h" +#include "channel/channelsourceapi.h" #include "dsp/nco.h" #include "dsp/interpolator.h" #include "dsp/movingaverage.h" @@ -40,7 +41,7 @@ class DeviceSinkAPI; class ThreadedBasebandSampleSource; class UpChannelizer; -class ATVMod : public BasebandSampleSource { +class ATVMod : public BasebandSampleSource, public ChannelSourceAPI { Q_OBJECT public: @@ -400,6 +401,10 @@ public: virtual void stop(); virtual bool handleMessage(const Message& cmd); + virtual int getDeltaFrequency() const { return m_absoluteFrequencyOffset; } + virtual void getIdentifier(QString& id) { id = objectName(); } + virtual void getTitle(QString& title) { title = m_settings.m_title; } + int getEffectiveSampleRate() const { return m_tvSampleRate; }; double getMagSq() const { return m_movingAverage.average(); } void getCameraNumbers(std::vector& numbers); @@ -456,7 +461,9 @@ private: DeviceSinkAPI* m_deviceAPI; ThreadedBasebandSampleSource* m_threadedChannelizer; UpChannelizer* m_channelizer; + ATVModSettings m_settings; + int m_absoluteFrequencyOffset; NCO m_carrierNco; Complex m_modSample; diff --git a/plugins/channeltx/modatv/atvmodsettings.cpp b/plugins/channeltx/modatv/atvmodsettings.cpp index cc07b2c38..26d39cb76 100644 --- a/plugins/channeltx/modatv/atvmodsettings.cpp +++ b/plugins/channeltx/modatv/atvmodsettings.cpp @@ -49,6 +49,7 @@ void ATVModSettings::resetToDefaults() m_forceDecimator = false; m_overlayText = "ATV"; m_rgbColor = QColor(255, 255, 255).rgb(); + m_title = "ATV Modulator"; } QByteArray ATVModSettings::serialize() const @@ -74,6 +75,8 @@ QByteArray ATVModSettings::serialize() const s.writeBlob(15, m_channelMarker->serialize()); } + s.writeString(16, m_title); + return s.final(); } @@ -120,6 +123,8 @@ bool ATVModSettings::deserialize(const QByteArray& data) m_channelMarker->deserialize(bytetmp); } + d.readString(16, &m_title, "ATV Modulator"); + return true; } else diff --git a/plugins/channeltx/modatv/atvmodsettings.h b/plugins/channeltx/modatv/atvmodsettings.h index f8ce4ad26..7951881c9 100644 --- a/plugins/channeltx/modatv/atvmodsettings.h +++ b/plugins/channeltx/modatv/atvmodsettings.h @@ -78,6 +78,7 @@ struct ATVModSettings bool m_forceDecimator; //!< Forces decimator even when channel and source sample rates are equal QString m_overlayText; quint32 m_rgbColor; + QString m_title; QString m_udpAddress; uint16_t m_udpPort; diff --git a/plugins/channeltx/modnfm/nfmmod.cpp b/plugins/channeltx/modnfm/nfmmod.cpp index b80233def..e13cabe27 100644 --- a/plugins/channeltx/modnfm/nfmmod.cpp +++ b/plugins/channeltx/modnfm/nfmmod.cpp @@ -44,6 +44,7 @@ const int NFMMod::m_levelNbSamples = 480; // every 10ms NFMMod::NFMMod(DeviceSinkAPI *deviceAPI) : m_deviceAPI(deviceAPI), + m_absoluteFrequencyOffset(0), m_modPhasor(0.0f), m_movingAverage(40, 0), m_volumeAGC(40, 0), @@ -309,6 +310,7 @@ bool NFMMod::handleMessage(const Message& cmd) NFMModSettings settings = cfg.getSettings(); + m_absoluteFrequencyOffset = settings.m_inputFrequencyOffset; settings.m_outputSampleRate = m_settings.m_outputSampleRate; settings.m_inputFrequencyOffset = m_settings.m_inputFrequencyOffset; diff --git a/plugins/channeltx/modnfm/nfmmod.h b/plugins/channeltx/modnfm/nfmmod.h index 3f639209d..471cc6d28 100644 --- a/plugins/channeltx/modnfm/nfmmod.h +++ b/plugins/channeltx/modnfm/nfmmod.h @@ -23,6 +23,7 @@ #include #include "dsp/basebandsamplesource.h" +#include "channel/channelsourceapi.h" #include "dsp/nco.h" #include "dsp/ncof.h" #include "dsp/interpolator.h" @@ -40,7 +41,7 @@ class DeviceSinkAPI; class ThreadedBasebandSampleSource; class UpChannelizer; -class NFMMod : public BasebandSampleSource { +class NFMMod : public BasebandSampleSource, public ChannelSourceAPI { Q_OBJECT public: @@ -236,6 +237,10 @@ public: virtual void stop(); virtual bool handleMessage(const Message& cmd); + virtual int getDeltaFrequency() const { return m_absoluteFrequencyOffset; } + virtual void getIdentifier(QString& id) { id = objectName(); } + virtual void getTitle(QString& title) { title = m_settings.m_title; } + double getMagSq() const { return m_magsq; } CWKeyer *getCWKeyer() { return &m_cwKeyer; } @@ -261,7 +266,9 @@ private: DeviceSinkAPI* m_deviceAPI; ThreadedBasebandSampleSource* m_threadedChannelizer; UpChannelizer* m_channelizer; + NFMModSettings m_settings; + int m_absoluteFrequencyOffset; NCO m_carrierNco; NCOF m_toneNco; diff --git a/plugins/channeltx/modnfm/nfmmodsettings.cpp b/plugins/channeltx/modnfm/nfmmodsettings.cpp index c8918c662..f87b066a2 100644 --- a/plugins/channeltx/modnfm/nfmmodsettings.cpp +++ b/plugins/channeltx/modnfm/nfmmodsettings.cpp @@ -58,6 +58,7 @@ void NFMModSettings::resetToDefaults() m_ctcssOn = false; m_ctcssIndex = 0; m_rgbColor = QColor(255, 0, 0).rgb(); + m_title = "NFM Modulator"; } QByteArray NFMModSettings::serialize() const @@ -82,6 +83,7 @@ QByteArray NFMModSettings::serialize() const s.writeBool(9, m_ctcssOn); s.writeS32(10, m_ctcssIndex); + s.writeString(12, m_title); return s.final(); } @@ -123,6 +125,8 @@ bool NFMModSettings::deserialize(const QByteArray& data) m_channelMarker->deserialize(bytetmp); } + d.readString(12, &m_title, "NFM Modulator"); + return true; } else diff --git a/plugins/channeltx/modnfm/nfmmodsettings.h b/plugins/channeltx/modnfm/nfmmodsettings.h index 8361ad616..6d1ab4f35 100644 --- a/plugins/channeltx/modnfm/nfmmodsettings.h +++ b/plugins/channeltx/modnfm/nfmmodsettings.h @@ -42,6 +42,7 @@ struct NFMModSettings bool m_ctcssOn; int m_ctcssIndex; quint32 m_rgbColor; + QString m_title; Serializable *m_channelMarker; Serializable *m_cwKeyerGUI; diff --git a/plugins/channeltx/modssb/ssbmod.cpp b/plugins/channeltx/modssb/ssbmod.cpp index 801578233..6ec3d0cdd 100644 --- a/plugins/channeltx/modssb/ssbmod.cpp +++ b/plugins/channeltx/modssb/ssbmod.cpp @@ -43,6 +43,7 @@ const int SSBMod::m_ssbFftLen = 1024; SSBMod::SSBMod(DeviceSinkAPI *deviceAPI) : m_deviceAPI(deviceAPI), + m_absoluteFrequencyOffset(0), m_SSBFilter(0), m_DSBFilter(0), m_SSBFilterBuffer(0), @@ -569,6 +570,7 @@ bool SSBMod::handleMessage(const Message& cmd) SSBModSettings settings = cfg.getSettings(); // These settings are set with UpChannelizer::MsgChannelizerNotification + m_absoluteFrequencyOffset = settings.m_inputFrequencyOffset; settings.m_basebandSampleRate = m_settings.m_basebandSampleRate; settings.m_outputSampleRate = m_settings.m_outputSampleRate; settings.m_inputFrequencyOffset = m_settings.m_inputFrequencyOffset; diff --git a/plugins/channeltx/modssb/ssbmod.h b/plugins/channeltx/modssb/ssbmod.h index f9ee89615..1b55d5b4a 100644 --- a/plugins/channeltx/modssb/ssbmod.h +++ b/plugins/channeltx/modssb/ssbmod.h @@ -23,6 +23,7 @@ #include #include "dsp/basebandsamplesource.h" +#include "channel/channelsourceapi.h" #include "dsp/basebandsamplesink.h" #include "dsp/ncof.h" #include "dsp/interpolator.h" @@ -39,7 +40,7 @@ class DeviceSinkAPI; class ThreadedBasebandSampleSource; class UpChannelizer; -class SSBMod : public BasebandSampleSource { +class SSBMod : public BasebandSampleSource, public ChannelSourceAPI { Q_OBJECT public: @@ -237,6 +238,10 @@ public: virtual void stop(); virtual bool handleMessage(const Message& cmd); + virtual int getDeltaFrequency() const { return m_absoluteFrequencyOffset; } + virtual void getIdentifier(QString& id) { id = objectName(); } + virtual void getTitle(QString& title) { title = m_settings.m_title; } + double getMagSq() const { return m_magsq; } CWKeyer *getCWKeyer() { return &m_cwKeyer; } @@ -262,7 +267,9 @@ private: DeviceSinkAPI* m_deviceAPI; ThreadedBasebandSampleSource* m_threadedChannelizer; UpChannelizer* m_channelizer; + SSBModSettings m_settings; + int m_absoluteFrequencyOffset; NCOF m_carrierNco; NCOF m_toneNco; diff --git a/plugins/channeltx/modssb/ssbmodsettings.cpp b/plugins/channeltx/modssb/ssbmodsettings.cpp index bda61c263..081f9e9a1 100644 --- a/plugins/channeltx/modssb/ssbmodsettings.cpp +++ b/plugins/channeltx/modssb/ssbmodsettings.cpp @@ -70,6 +70,7 @@ void SSBModSettings::resetToDefaults() m_rgbColor = QColor(0, 255, 0).rgb(); m_udpAddress = "127.0.0.1"; m_udpPort = 9999; + m_title = "SSB Modulator"; } QByteArray SSBModSettings::serialize() const @@ -106,6 +107,8 @@ QByteArray SSBModSettings::serialize() const s.writeBlob(18, m_channelMarker->serialize()); } + s.writeString(19, m_title); + return s.final(); } @@ -164,6 +167,13 @@ bool SSBModSettings::deserialize(const QByteArray& data) d.readS32(17, &tmp, 20); m_agcOrder = tmp / 100.0; + if (m_channelMarker) { + d.readBlob(18, &bytetmp); + m_channelMarker->deserialize(bytetmp); + } + + d.readString(19, &m_title, "SSB Modulator"); + return true; } else diff --git a/plugins/channeltx/modssb/ssbmodsettings.h b/plugins/channeltx/modssb/ssbmodsettings.h index aa4b30d51..982de2e00 100644 --- a/plugins/channeltx/modssb/ssbmodsettings.h +++ b/plugins/channeltx/modssb/ssbmodsettings.h @@ -55,6 +55,8 @@ struct SSBModSettings QString m_udpAddress; uint16_t m_udpPort; + QString m_title; + Serializable *m_channelMarker; Serializable *m_spectrumGUI; Serializable *m_cwKeyerGUI; diff --git a/plugins/channeltx/modwfm/wfmmod.cpp b/plugins/channeltx/modwfm/wfmmod.cpp index a7b9d1b20..46f628f98 100644 --- a/plugins/channeltx/modwfm/wfmmod.cpp +++ b/plugins/channeltx/modwfm/wfmmod.cpp @@ -322,6 +322,7 @@ bool WFMMod::handleMessage(const Message& cmd) WFMModSettings settings = cfg.getSettings(); + m_absoluteFrequencyOffset = settings.m_inputFrequencyOffset; settings.m_basebandSampleRate = m_settings.m_basebandSampleRate; settings.m_outputSampleRate = m_settings.m_outputSampleRate; settings.m_inputFrequencyOffset = m_settings.m_inputFrequencyOffset; diff --git a/plugins/channeltx/modwfm/wfmmod.h b/plugins/channeltx/modwfm/wfmmod.h index 2803f758f..368e5c609 100644 --- a/plugins/channeltx/modwfm/wfmmod.h +++ b/plugins/channeltx/modwfm/wfmmod.h @@ -23,6 +23,7 @@ #include #include "dsp/basebandsamplesource.h" +#include "channel/channelsourceapi.h" #include "dsp/nco.h" #include "dsp/ncof.h" #include "dsp/interpolator.h" @@ -39,7 +40,7 @@ class DeviceSinkAPI; class ThreadedBasebandSampleSource; class UpChannelizer; -class WFMMod : public BasebandSampleSource { +class WFMMod : public BasebandSampleSource, public ChannelSourceAPI { Q_OBJECT public: @@ -235,6 +236,10 @@ public: virtual void stop(); virtual bool handleMessage(const Message& cmd); + virtual int getDeltaFrequency() const { return m_absoluteFrequencyOffset; } + virtual void getIdentifier(QString& id) { id = objectName(); } + virtual void getTitle(QString& title) { title = m_settings.m_title; } + double getMagSq() const { return m_magsq; } CWKeyer *getCWKeyer() { return &m_cwKeyer; } @@ -262,6 +267,7 @@ private: UpChannelizer* m_channelizer; WFMModSettings m_settings; + int m_absoluteFrequencyOffset; NCO m_carrierNco; NCOF m_toneNco; diff --git a/plugins/channeltx/modwfm/wfmmodsettings.cpp b/plugins/channeltx/modwfm/wfmmodsettings.cpp index 15f1c8b78..084ab9255 100644 --- a/plugins/channeltx/modwfm/wfmmodsettings.cpp +++ b/plugins/channeltx/modwfm/wfmmodsettings.cpp @@ -49,6 +49,7 @@ void WFMModSettings::resetToDefaults() m_channelMute = false; m_playLoop = false; m_rgbColor = QColor(0, 0, 255).rgb(); + m_title = "WFM Modulator"; } QByteArray WFMModSettings::serialize() const @@ -71,6 +72,8 @@ QByteArray WFMModSettings::serialize() const s.writeBlob(9, m_channelMarker->serialize()); } + s.writeString(10, m_title); + return s.final(); } @@ -108,6 +111,8 @@ bool WFMModSettings::deserialize(const QByteArray& data) m_channelMarker->deserialize(bytetmp); } + d.readString(10, &m_title, "WFM Modulator"); + return true; } else diff --git a/plugins/channeltx/modwfm/wfmmodsettings.h b/plugins/channeltx/modwfm/wfmmodsettings.h index 382b2abc6..7a3dc4167 100644 --- a/plugins/channeltx/modwfm/wfmmodsettings.h +++ b/plugins/channeltx/modwfm/wfmmodsettings.h @@ -38,6 +38,7 @@ struct WFMModSettings bool m_channelMute; bool m_playLoop; quint32 m_rgbColor; + QString m_title; Serializable *m_channelMarker; Serializable *m_cwKeyerGUI; diff --git a/plugins/channeltx/udpsink/udpsink.cpp b/plugins/channeltx/udpsink/udpsink.cpp index c9916d780..a04cd307d 100644 --- a/plugins/channeltx/udpsink/udpsink.cpp +++ b/plugins/channeltx/udpsink/udpsink.cpp @@ -346,6 +346,7 @@ bool UDPSink::handleMessage(const Message& cmd) UDPSinkSettings settings = cfg.getSettings(); // These settings are set with DownChannelizer::MsgChannelizerNotification + m_absoluteFrequencyOffset = settings.m_inputFrequencyOffset; settings.m_basebandSampleRate = m_settings.m_basebandSampleRate; settings.m_outputSampleRate = m_settings.m_outputSampleRate; settings.m_inputFrequencyOffset = m_settings.m_inputFrequencyOffset; diff --git a/plugins/channeltx/udpsink/udpsink.h b/plugins/channeltx/udpsink/udpsink.h index e15568a4d..f64febca4 100644 --- a/plugins/channeltx/udpsink/udpsink.h +++ b/plugins/channeltx/udpsink/udpsink.h @@ -20,6 +20,7 @@ #include #include "dsp/basebandsamplesource.h" +#include "channel/channelsourceapi.h" #include "dsp/basebandsamplesink.h" #include "dsp/interpolator.h" #include "dsp/movingaverage.h" @@ -34,7 +35,7 @@ class DeviceSinkAPI; class ThreadedBasebandSampleSource; class UpChannelizer; -class UDPSink : public BasebandSampleSource { +class UDPSink : public BasebandSampleSource, public ChannelSourceAPI { Q_OBJECT public: @@ -95,6 +96,10 @@ public: virtual void pull(Sample& sample); virtual bool handleMessage(const Message& cmd); + virtual int getDeltaFrequency() const { return m_absoluteFrequencyOffset; } + virtual void getIdentifier(QString& id) { id = objectName(); } + virtual void getTitle(QString& title) { title = m_settings.m_title; } + double getMagSq() const { return m_magsq; } double getInMagSq() const { return m_inMagsq; } int32_t getBufferGauge() const { return m_udpHandler.getBufferGauge(); } @@ -157,6 +162,8 @@ private: UpChannelizer* m_channelizer; UDPSinkSettings m_settings; + int m_absoluteFrequencyOffset; + Real m_squelch; NCO m_carrierNco; diff --git a/plugins/channeltx/udpsink/udpsinksettings.cpp b/plugins/channeltx/udpsink/udpsinksettings.cpp index 4be3ec060..5a85c0cef 100644 --- a/plugins/channeltx/udpsink/udpsinksettings.cpp +++ b/plugins/channeltx/udpsink/udpsinksettings.cpp @@ -48,6 +48,7 @@ void UDPSinkSettings::resetToDefaults() m_udpAddress = "127.0.0.1"; m_udpPort = 9999; m_rgbColor = QColor(225, 25, 99).rgb(); + m_title = "UDP Sample Sink"; } QByteArray UDPSinkSettings::serialize() const @@ -76,6 +77,8 @@ QByteArray UDPSinkSettings::serialize() const s.writeS32(17, roundf(m_gainIn * 10.0)); s.writeString(18, m_udpAddress); s.writeU32(19, m_udpPort); + s.writeString(20, m_title); + return s.final(); } @@ -150,6 +153,8 @@ bool UDPSinkSettings::deserialize(const QByteArray& data) m_udpPort = 9999; } + d.readString(20, &m_title, "UDP Sample Sink"); + return true; } else diff --git a/plugins/channeltx/udpsink/udpsinksettings.h b/plugins/channeltx/udpsink/udpsinksettings.h index 281cc0746..ca9153d12 100644 --- a/plugins/channeltx/udpsink/udpsinksettings.h +++ b/plugins/channeltx/udpsink/udpsinksettings.h @@ -56,6 +56,8 @@ struct UDPSinkSettings QString m_udpAddress; uint16_t m_udpPort; + QString m_title; + Serializable *m_channelMarker; Serializable *m_spectrumGUI;