From 5cbadf9b3bde98571dd34e4d3ccb02230f899584 Mon Sep 17 00:00:00 2001 From: f4exb Date: Mon, 25 Mar 2019 01:15:27 +0100 Subject: [PATCH] Reverse API originator information implementation with RTL-SDR, Lime-SDR Tx, AM demod, AM mod examples --- .gitignore | 2 +- app/main.cpp | 2 +- appbench/main.cpp | 2 +- appsrv/main.cpp | 2 +- debian/changelog | 6 +++ plugins/channelrx/demodam/amdemod.cpp | 2 + plugins/channelrx/demodam/amdemodplugin.cpp | 2 +- plugins/channeltx/modam/ammod.cpp | 2 + plugins/channeltx/modam/ammodplugin.cpp | 2 +- .../limesdroutput/limesdroutput.cpp | 1 + .../limesdroutput/limesdroutputplugin.cpp | 2 +- plugins/samplesource/rtlsdr/rtlsdrinput.cpp | 1 + plugins/samplesource/rtlsdr/rtlsdrplugin.cpp | 2 +- sdrbase/channel/channelsinkapi.h | 3 ++ sdrbase/channel/channelsourceapi.h | 3 ++ sdrbase/device/devicesinkapi.cpp | 4 +- sdrbase/device/devicesinkapi.h | 1 + sdrbase/device/devicesourceapi.cpp | 4 +- sdrbase/device/devicesourceapi.h | 3 +- sdrbase/resources/webapi/doc/html2/index.html | 16 ++++++- .../resources/webapi/doc/swagger/swagger.yaml | 11 ++++- swagger/sdrangel/api/swagger/swagger.yaml | 11 ++++- swagger/sdrangel/code/html2/index.html | 16 ++++++- .../code/qt5/client/SWGAMDemodReport.cpp | 2 +- .../code/qt5/client/SWGAMDemodReport.h | 2 +- .../code/qt5/client/SWGAMDemodSettings.cpp | 2 +- .../code/qt5/client/SWGAMDemodSettings.h | 2 +- .../code/qt5/client/SWGAMModReport.cpp | 2 +- .../sdrangel/code/qt5/client/SWGAMModReport.h | 2 +- .../code/qt5/client/SWGAMModSettings.cpp | 2 +- .../code/qt5/client/SWGAMModSettings.h | 2 +- .../code/qt5/client/SWGATVModReport.cpp | 2 +- .../code/qt5/client/SWGATVModReport.h | 2 +- .../code/qt5/client/SWGATVModSettings.cpp | 2 +- .../code/qt5/client/SWGATVModSettings.h | 2 +- .../code/qt5/client/SWGAirspyHFReport.cpp | 2 +- .../code/qt5/client/SWGAirspyHFReport.h | 2 +- .../code/qt5/client/SWGAirspyHFSettings.cpp | 2 +- .../code/qt5/client/SWGAirspyHFSettings.h | 2 +- .../code/qt5/client/SWGAirspyReport.cpp | 2 +- .../code/qt5/client/SWGAirspyReport.h | 2 +- .../code/qt5/client/SWGAirspySettings.cpp | 2 +- .../code/qt5/client/SWGAirspySettings.h | 2 +- .../sdrangel/code/qt5/client/SWGArgInfo.cpp | 2 +- swagger/sdrangel/code/qt5/client/SWGArgInfo.h | 2 +- .../sdrangel/code/qt5/client/SWGArgValue.cpp | 2 +- .../sdrangel/code/qt5/client/SWGArgValue.h | 2 +- .../code/qt5/client/SWGAudioDevices.cpp | 2 +- .../code/qt5/client/SWGAudioDevices.h | 2 +- .../code/qt5/client/SWGAudioInputDevice.cpp | 2 +- .../code/qt5/client/SWGAudioInputDevice.h | 2 +- .../code/qt5/client/SWGAudioOutputDevice.cpp | 2 +- .../code/qt5/client/SWGAudioOutputDevice.h | 2 +- .../code/qt5/client/SWGBFMDemodReport.cpp | 2 +- .../code/qt5/client/SWGBFMDemodReport.h | 2 +- .../code/qt5/client/SWGBFMDemodSettings.cpp | 2 +- .../code/qt5/client/SWGBFMDemodSettings.h | 2 +- .../sdrangel/code/qt5/client/SWGBandwidth.cpp | 2 +- .../sdrangel/code/qt5/client/SWGBandwidth.h | 2 +- .../qt5/client/SWGBladeRF1InputSettings.cpp | 2 +- .../qt5/client/SWGBladeRF1InputSettings.h | 2 +- .../qt5/client/SWGBladeRF1OutputSettings.cpp | 2 +- .../qt5/client/SWGBladeRF1OutputSettings.h | 2 +- .../qt5/client/SWGBladeRF2InputReport.cpp | 2 +- .../code/qt5/client/SWGBladeRF2InputReport.h | 2 +- .../qt5/client/SWGBladeRF2InputSettings.cpp | 2 +- .../qt5/client/SWGBladeRF2InputSettings.h | 2 +- .../qt5/client/SWGBladeRF2OutputReport.cpp | 2 +- .../code/qt5/client/SWGBladeRF2OutputReport.h | 2 +- .../qt5/client/SWGBladeRF2OutputSettings.cpp | 2 +- .../qt5/client/SWGBladeRF2OutputSettings.h | 2 +- .../code/qt5/client/SWGCWKeyerSettings.cpp | 2 +- .../code/qt5/client/SWGCWKeyerSettings.h | 2 +- .../sdrangel/code/qt5/client/SWGChannel.cpp | 2 +- swagger/sdrangel/code/qt5/client/SWGChannel.h | 2 +- .../code/qt5/client/SWGChannelListItem.cpp | 2 +- .../code/qt5/client/SWGChannelListItem.h | 2 +- .../code/qt5/client/SWGChannelReport.cpp | 2 +- .../code/qt5/client/SWGChannelReport.h | 2 +- .../code/qt5/client/SWGChannelSettings.cpp | 44 ++++++++++++++++++- .../code/qt5/client/SWGChannelSettings.h | 14 +++++- .../code/qt5/client/SWGChannelsDetail.cpp | 2 +- .../code/qt5/client/SWGChannelsDetail.h | 2 +- .../sdrangel/code/qt5/client/SWGComplex.cpp | 2 +- swagger/sdrangel/code/qt5/client/SWGComplex.h | 2 +- .../code/qt5/client/SWGDSDDemodReport.cpp | 2 +- .../code/qt5/client/SWGDSDDemodReport.h | 2 +- .../code/qt5/client/SWGDSDDemodSettings.cpp | 2 +- .../code/qt5/client/SWGDSDDemodSettings.h | 2 +- .../code/qt5/client/SWGDVSeralDevices.cpp | 2 +- .../code/qt5/client/SWGDVSeralDevices.h | 2 +- .../code/qt5/client/SWGDVSerialDevice.cpp | 2 +- .../code/qt5/client/SWGDVSerialDevice.h | 2 +- .../code/qt5/client/SWGDeviceListItem.cpp | 2 +- .../code/qt5/client/SWGDeviceListItem.h | 2 +- .../code/qt5/client/SWGDeviceReport.cpp | 2 +- .../code/qt5/client/SWGDeviceReport.h | 2 +- .../sdrangel/code/qt5/client/SWGDeviceSet.cpp | 2 +- .../sdrangel/code/qt5/client/SWGDeviceSet.h | 2 +- .../code/qt5/client/SWGDeviceSetApi.cpp | 2 +- .../code/qt5/client/SWGDeviceSetApi.h | 2 +- .../code/qt5/client/SWGDeviceSetList.cpp | 2 +- .../code/qt5/client/SWGDeviceSetList.h | 2 +- .../code/qt5/client/SWGDeviceSettings.cpp | 23 +++++++++- .../code/qt5/client/SWGDeviceSettings.h | 8 +++- .../code/qt5/client/SWGDeviceState.cpp | 2 +- .../sdrangel/code/qt5/client/SWGDeviceState.h | 2 +- .../code/qt5/client/SWGErrorResponse.cpp | 2 +- .../code/qt5/client/SWGErrorResponse.h | 2 +- .../code/qt5/client/SWGFCDProPlusSettings.cpp | 2 +- .../code/qt5/client/SWGFCDProPlusSettings.h | 2 +- .../code/qt5/client/SWGFCDProSettings.cpp | 2 +- .../code/qt5/client/SWGFCDProSettings.h | 2 +- .../code/qt5/client/SWGFileSourceReport.cpp | 2 +- .../code/qt5/client/SWGFileSourceReport.h | 2 +- .../code/qt5/client/SWGFileSourceSettings.cpp | 2 +- .../code/qt5/client/SWGFileSourceSettings.h | 2 +- .../code/qt5/client/SWGFreeDVDemodReport.cpp | 2 +- .../code/qt5/client/SWGFreeDVDemodReport.h | 2 +- .../qt5/client/SWGFreeDVDemodSettings.cpp | 2 +- .../code/qt5/client/SWGFreeDVDemodSettings.h | 2 +- .../code/qt5/client/SWGFreeDVModReport.cpp | 2 +- .../code/qt5/client/SWGFreeDVModReport.h | 2 +- .../code/qt5/client/SWGFreeDVModSettings.cpp | 2 +- .../code/qt5/client/SWGFreeDVModSettings.h | 2 +- .../sdrangel/code/qt5/client/SWGFrequency.cpp | 2 +- .../sdrangel/code/qt5/client/SWGFrequency.h | 2 +- .../code/qt5/client/SWGFrequencyBand.cpp | 2 +- .../code/qt5/client/SWGFrequencyBand.h | 2 +- .../code/qt5/client/SWGFrequencyRange.cpp | 2 +- .../code/qt5/client/SWGFrequencyRange.h | 2 +- swagger/sdrangel/code/qt5/client/SWGGain.cpp | 2 +- swagger/sdrangel/code/qt5/client/SWGGain.h | 2 +- .../qt5/client/SWGHackRFInputSettings.cpp | 2 +- .../code/qt5/client/SWGHackRFInputSettings.h | 2 +- .../qt5/client/SWGHackRFOutputSettings.cpp | 2 +- .../code/qt5/client/SWGHackRFOutputSettings.h | 2 +- .../sdrangel/code/qt5/client/SWGHelpers.cpp | 2 +- swagger/sdrangel/code/qt5/client/SWGHelpers.h | 2 +- .../code/qt5/client/SWGHttpRequest.cpp | 2 +- .../sdrangel/code/qt5/client/SWGHttpRequest.h | 2 +- .../code/qt5/client/SWGInstanceApi.cpp | 2 +- .../sdrangel/code/qt5/client/SWGInstanceApi.h | 2 +- .../client/SWGInstanceChannelsResponse.cpp | 2 +- .../qt5/client/SWGInstanceChannelsResponse.h | 2 +- .../qt5/client/SWGInstanceDevicesResponse.cpp | 2 +- .../qt5/client/SWGInstanceDevicesResponse.h | 2 +- .../qt5/client/SWGInstanceSummaryResponse.cpp | 2 +- .../qt5/client/SWGInstanceSummaryResponse.h | 2 +- .../code/qt5/client/SWGLimeSdrInputReport.cpp | 2 +- .../code/qt5/client/SWGLimeSdrInputReport.h | 2 +- .../qt5/client/SWGLimeSdrInputSettings.cpp | 2 +- .../code/qt5/client/SWGLimeSdrInputSettings.h | 2 +- .../qt5/client/SWGLimeSdrOutputReport.cpp | 2 +- .../code/qt5/client/SWGLimeSdrOutputReport.h | 2 +- .../qt5/client/SWGLimeSdrOutputSettings.cpp | 2 +- .../qt5/client/SWGLimeSdrOutputSettings.h | 2 +- .../qt5/client/SWGLocationInformation.cpp | 2 +- .../code/qt5/client/SWGLocationInformation.h | 2 +- .../code/qt5/client/SWGLoggingInfo.cpp | 2 +- .../sdrangel/code/qt5/client/SWGLoggingInfo.h | 2 +- .../code/qt5/client/SWGModelFactory.h | 2 +- .../code/qt5/client/SWGNFMDemodReport.cpp | 2 +- .../code/qt5/client/SWGNFMDemodReport.h | 2 +- .../code/qt5/client/SWGNFMDemodSettings.cpp | 2 +- .../code/qt5/client/SWGNFMDemodSettings.h | 2 +- .../code/qt5/client/SWGNFMModReport.cpp | 2 +- .../code/qt5/client/SWGNFMModReport.h | 2 +- .../code/qt5/client/SWGNFMModSettings.cpp | 2 +- .../code/qt5/client/SWGNFMModSettings.h | 2 +- .../sdrangel/code/qt5/client/SWGNamedEnum.cpp | 2 +- .../sdrangel/code/qt5/client/SWGNamedEnum.h | 2 +- swagger/sdrangel/code/qt5/client/SWGObject.h | 2 +- .../code/qt5/client/SWGPerseusReport.cpp | 2 +- .../code/qt5/client/SWGPerseusReport.h | 2 +- .../code/qt5/client/SWGPerseusSettings.cpp | 2 +- .../code/qt5/client/SWGPerseusSettings.h | 2 +- .../qt5/client/SWGPlutoSdrInputReport.cpp | 2 +- .../code/qt5/client/SWGPlutoSdrInputReport.h | 2 +- .../qt5/client/SWGPlutoSdrInputSettings.cpp | 2 +- .../qt5/client/SWGPlutoSdrInputSettings.h | 2 +- .../qt5/client/SWGPlutoSdrOutputReport.cpp | 2 +- .../code/qt5/client/SWGPlutoSdrOutputReport.h | 2 +- .../qt5/client/SWGPlutoSdrOutputSettings.cpp | 2 +- .../qt5/client/SWGPlutoSdrOutputSettings.h | 2 +- .../code/qt5/client/SWGPresetExport.cpp | 2 +- .../code/qt5/client/SWGPresetExport.h | 2 +- .../code/qt5/client/SWGPresetGroup.cpp | 2 +- .../sdrangel/code/qt5/client/SWGPresetGroup.h | 2 +- .../code/qt5/client/SWGPresetIdentifier.cpp | 2 +- .../code/qt5/client/SWGPresetIdentifier.h | 2 +- .../code/qt5/client/SWGPresetImport.cpp | 2 +- .../code/qt5/client/SWGPresetImport.h | 2 +- .../code/qt5/client/SWGPresetItem.cpp | 2 +- .../sdrangel/code/qt5/client/SWGPresetItem.h | 2 +- .../code/qt5/client/SWGPresetTransfer.cpp | 2 +- .../code/qt5/client/SWGPresetTransfer.h | 2 +- .../sdrangel/code/qt5/client/SWGPresets.cpp | 2 +- swagger/sdrangel/code/qt5/client/SWGPresets.h | 2 +- .../sdrangel/code/qt5/client/SWGRDSReport.cpp | 2 +- .../sdrangel/code/qt5/client/SWGRDSReport.h | 2 +- .../client/SWGRDSReport_altFrequencies.cpp | 2 +- .../qt5/client/SWGRDSReport_altFrequencies.h | 2 +- swagger/sdrangel/code/qt5/client/SWGRange.cpp | 2 +- swagger/sdrangel/code/qt5/client/SWGRange.h | 2 +- .../code/qt5/client/SWGRangeFloat.cpp | 2 +- .../sdrangel/code/qt5/client/SWGRangeFloat.h | 2 +- .../code/qt5/client/SWGRemoteInputReport.cpp | 2 +- .../code/qt5/client/SWGRemoteInputReport.h | 2 +- .../qt5/client/SWGRemoteInputSettings.cpp | 2 +- .../code/qt5/client/SWGRemoteInputSettings.h | 2 +- .../code/qt5/client/SWGRemoteOutputReport.cpp | 2 +- .../code/qt5/client/SWGRemoteOutputReport.h | 2 +- .../qt5/client/SWGRemoteOutputSettings.cpp | 2 +- .../code/qt5/client/SWGRemoteOutputSettings.h | 2 +- .../code/qt5/client/SWGRemoteSinkSettings.cpp | 2 +- .../code/qt5/client/SWGRemoteSinkSettings.h | 2 +- .../code/qt5/client/SWGRemoteSourceReport.cpp | 2 +- .../code/qt5/client/SWGRemoteSourceReport.h | 2 +- .../qt5/client/SWGRemoteSourceSettings.cpp | 2 +- .../code/qt5/client/SWGRemoteSourceSettings.h | 2 +- .../code/qt5/client/SWGRtlSdrReport.cpp | 2 +- .../code/qt5/client/SWGRtlSdrReport.h | 2 +- .../code/qt5/client/SWGRtlSdrSettings.cpp | 2 +- .../code/qt5/client/SWGRtlSdrSettings.h | 2 +- .../code/qt5/client/SWGSDRPlayReport.cpp | 2 +- .../code/qt5/client/SWGSDRPlayReport.h | 2 +- .../code/qt5/client/SWGSDRPlaySettings.cpp | 2 +- .../code/qt5/client/SWGSDRPlaySettings.h | 2 +- .../code/qt5/client/SWGSSBDemodReport.cpp | 2 +- .../code/qt5/client/SWGSSBDemodReport.h | 2 +- .../code/qt5/client/SWGSSBDemodSettings.cpp | 2 +- .../code/qt5/client/SWGSSBDemodSettings.h | 2 +- .../code/qt5/client/SWGSSBModReport.cpp | 2 +- .../code/qt5/client/SWGSSBModReport.h | 2 +- .../code/qt5/client/SWGSSBModSettings.cpp | 2 +- .../code/qt5/client/SWGSSBModSettings.h | 2 +- .../code/qt5/client/SWGSampleRate.cpp | 2 +- .../sdrangel/code/qt5/client/SWGSampleRate.h | 2 +- .../code/qt5/client/SWGSamplingDevice.cpp | 2 +- .../code/qt5/client/SWGSamplingDevice.h | 2 +- .../client/SWGSoapySDRFrequencySetting.cpp | 2 +- .../qt5/client/SWGSoapySDRFrequencySetting.h | 2 +- .../qt5/client/SWGSoapySDRGainSetting.cpp | 2 +- .../code/qt5/client/SWGSoapySDRGainSetting.h | 2 +- .../qt5/client/SWGSoapySDRInputSettings.cpp | 2 +- .../qt5/client/SWGSoapySDRInputSettings.h | 2 +- .../qt5/client/SWGSoapySDROutputSettings.cpp | 2 +- .../qt5/client/SWGSoapySDROutputSettings.h | 2 +- .../code/qt5/client/SWGSoapySDRReport.cpp | 2 +- .../code/qt5/client/SWGSoapySDRReport.h | 2 +- .../code/qt5/client/SWGSuccessResponse.cpp | 2 +- .../code/qt5/client/SWGSuccessResponse.h | 2 +- .../code/qt5/client/SWGTestSourceSettings.cpp | 2 +- .../code/qt5/client/SWGTestSourceSettings.h | 2 +- .../code/qt5/client/SWGUDPSinkReport.cpp | 2 +- .../code/qt5/client/SWGUDPSinkReport.h | 2 +- .../code/qt5/client/SWGUDPSinkSettings.cpp | 2 +- .../code/qt5/client/SWGUDPSinkSettings.h | 2 +- .../code/qt5/client/SWGUDPSourceReport.cpp | 2 +- .../code/qt5/client/SWGUDPSourceReport.h | 2 +- .../code/qt5/client/SWGUDPSourceSettings.cpp | 2 +- .../code/qt5/client/SWGUDPSourceSettings.h | 2 +- .../code/qt5/client/SWGWFMDemodReport.cpp | 2 +- .../code/qt5/client/SWGWFMDemodReport.h | 2 +- .../code/qt5/client/SWGWFMDemodSettings.cpp | 2 +- .../code/qt5/client/SWGWFMDemodSettings.h | 2 +- .../code/qt5/client/SWGWFMModReport.cpp | 2 +- .../code/qt5/client/SWGWFMModReport.h | 2 +- .../code/qt5/client/SWGWFMModSettings.cpp | 2 +- .../code/qt5/client/SWGWFMModSettings.h | 2 +- .../code/qt5/client/SWGXtrxInputReport.cpp | 2 +- .../code/qt5/client/SWGXtrxInputReport.h | 2 +- .../code/qt5/client/SWGXtrxInputSettings.cpp | 2 +- .../code/qt5/client/SWGXtrxInputSettings.h | 2 +- .../code/qt5/client/SWGXtrxOutputReport.cpp | 2 +- .../code/qt5/client/SWGXtrxOutputReport.h | 2 +- .../code/qt5/client/SWGXtrxOutputSettings.cpp | 2 +- .../code/qt5/client/SWGXtrxOutputSettings.h | 2 +- swagger/sdrangel/examples/reverseapi.py | 22 ++++++---- 280 files changed, 433 insertions(+), 282 deletions(-) diff --git a/.gitignore b/.gitignore index c00a34bf7..0d43e28ba 100644 --- a/.gitignore +++ b/.gitignore @@ -20,5 +20,5 @@ debian/files debian/sdrangel.debhelper.log debian/debhelper-build-stamp obj-x86_64-linux-gnu/* -**/venv/ +**/venv*/ *.pyc diff --git a/app/main.cpp b/app/main.cpp index 004a66ab5..7dd1b8854 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -35,7 +35,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo */ QCoreApplication::setOrganizationName("f4exb"); QCoreApplication::setApplicationName("SDRangel"); - QCoreApplication::setApplicationVersion("4.5.1"); + QCoreApplication::setApplicationVersion("4.5.2"); #if QT_VERSION >= 0x050600 QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps diff --git a/appbench/main.cpp b/appbench/main.cpp index aeafcad9b..357c43735 100644 --- a/appbench/main.cpp +++ b/appbench/main.cpp @@ -57,7 +57,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo QCoreApplication::setOrganizationName("f4exb"); QCoreApplication::setApplicationName("SDRangelBench"); - QCoreApplication::setApplicationVersion("4.5.1"); + QCoreApplication::setApplicationVersion("4.5.2"); int catchSignals[] = {SIGQUIT, SIGINT, SIGTERM, SIGHUP}; std::vector vsig(catchSignals, catchSignals + sizeof(catchSignals) / sizeof(int)); diff --git a/appsrv/main.cpp b/appsrv/main.cpp index 2d192d845..5f95a99aa 100644 --- a/appsrv/main.cpp +++ b/appsrv/main.cpp @@ -56,7 +56,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo QCoreApplication::setOrganizationName("f4exb"); QCoreApplication::setApplicationName("SDRangelSrv"); - QCoreApplication::setApplicationVersion("4.5.1"); + QCoreApplication::setApplicationVersion("4.5.2"); int catchSignals[] = {SIGQUIT, SIGINT, SIGTERM, SIGHUP}; std::vector vsig(catchSignals, catchSignals + sizeof(catchSignals) / sizeof(int)); diff --git a/debian/changelog b/debian/changelog index 5aec66590..7e8b5bb31 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +sdrangel (4.5.2-1) unstable; urgency=medium + + * Send device and channel index in reverse API. Implements issue #312. + + -- Edouard Griffiths, F4EXB Sat, 30 Mar 2019 20:14:18 +0100 + sdrangel (4.5.1-1) unstable; urgency=medium * DATV demod: implemented audio processing diff --git a/plugins/channelrx/demodam/amdemod.cpp b/plugins/channelrx/demodam/amdemod.cpp index c3c733777..17c0b33a0 100644 --- a/plugins/channelrx/demodam/amdemod.cpp +++ b/plugins/channelrx/demodam/amdemod.cpp @@ -718,6 +718,8 @@ void AMDemod::webapiReverseSendSettings(QList& channelSettingsKeys, con { SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); swgChannelSettings->setTx(0); + swgChannelSettings->setOriginatorChannelIndex(getIndexInDeviceSet()); + swgChannelSettings->setOriginatorDeviceSetIndex(getDeviceSetIndex()); swgChannelSettings->setChannelType(new QString("AMDemod")); swgChannelSettings->setAmDemodSettings(new SWGSDRangel::SWGAMDemodSettings()); SWGSDRangel::SWGAMDemodSettings *swgAMDemodSettings = swgChannelSettings->getAmDemodSettings(); diff --git a/plugins/channelrx/demodam/amdemodplugin.cpp b/plugins/channelrx/demodam/amdemodplugin.cpp index fb36f8fc9..7198ba782 100644 --- a/plugins/channelrx/demodam/amdemodplugin.cpp +++ b/plugins/channelrx/demodam/amdemodplugin.cpp @@ -9,7 +9,7 @@ const PluginDescriptor AMDemodPlugin::m_pluginDescriptor = { QString("AM Demodulator"), - QString("4.3.2"), + QString("4.5.2"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/channeltx/modam/ammod.cpp b/plugins/channeltx/modam/ammod.cpp index 39f9680ee..770228200 100644 --- a/plugins/channeltx/modam/ammod.cpp +++ b/plugins/channeltx/modam/ammod.cpp @@ -779,6 +779,8 @@ void AMMod::webapiReverseSendSettings(QList& channelSettingsKeys, const { SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); swgChannelSettings->setTx(1); + swgChannelSettings->setOriginatorChannelIndex(getIndexInDeviceSet()); + swgChannelSettings->setOriginatorDeviceSetIndex(getDeviceSetIndex()); swgChannelSettings->setChannelType(new QString("AMMod")); swgChannelSettings->setAmModSettings(new SWGSDRangel::SWGAMModSettings()); SWGSDRangel::SWGAMModSettings *swgAMModSettings = swgChannelSettings->getAmModSettings(); diff --git a/plugins/channeltx/modam/ammodplugin.cpp b/plugins/channeltx/modam/ammodplugin.cpp index e41cfab52..a762c3d5d 100644 --- a/plugins/channeltx/modam/ammodplugin.cpp +++ b/plugins/channeltx/modam/ammodplugin.cpp @@ -25,7 +25,7 @@ const PluginDescriptor AMModPlugin::m_pluginDescriptor = { QString("AM Modulator"), - QString("4.3.2"), + QString("4.5.2"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/samplesink/limesdroutput/limesdroutput.cpp b/plugins/samplesink/limesdroutput/limesdroutput.cpp index ee5b64287..7688caa98 100644 --- a/plugins/samplesink/limesdroutput/limesdroutput.cpp +++ b/plugins/samplesink/limesdroutput/limesdroutput.cpp @@ -1435,6 +1435,7 @@ void LimeSDROutput::webapiReverseSendSettings(QList& deviceSettingsKeys { SWGSDRangel::SWGDeviceSettings *swgDeviceSettings = new SWGSDRangel::SWGDeviceSettings(); swgDeviceSettings->setTx(1); + swgDeviceSettings->setOriginatorIndex(m_deviceAPI->getDeviceSetIndex()); swgDeviceSettings->setDeviceHwType(new QString("LimeSDR")); swgDeviceSettings->setLimeSdrOutputSettings(new SWGSDRangel::SWGLimeSdrOutputSettings()); SWGSDRangel::SWGLimeSdrOutputSettings *swgLimeSdrOutputSettings = swgDeviceSettings->getLimeSdrOutputSettings(); diff --git a/plugins/samplesink/limesdroutput/limesdroutputplugin.cpp b/plugins/samplesink/limesdroutput/limesdroutputplugin.cpp index 80dc81946..9efa2322c 100644 --- a/plugins/samplesink/limesdroutput/limesdroutputplugin.cpp +++ b/plugins/samplesink/limesdroutput/limesdroutputplugin.cpp @@ -34,7 +34,7 @@ const PluginDescriptor LimeSDROutputPlugin::m_pluginDescriptor = { QString("LimeSDR Output"), - QString("4.3.2"), + QString("4.5.2"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/samplesource/rtlsdr/rtlsdrinput.cpp b/plugins/samplesource/rtlsdr/rtlsdrinput.cpp index f180309b0..bc573d993 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrinput.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrinput.cpp @@ -763,6 +763,7 @@ void RTLSDRInput::webapiReverseSendSettings(QList& deviceSettingsKeys, SWGSDRangel::SWGDeviceSettings *swgDeviceSettings = new SWGSDRangel::SWGDeviceSettings(); swgDeviceSettings->setTx(0); swgDeviceSettings->setDeviceHwType(new QString("RTLSDR")); + swgDeviceSettings->setOriginatorIndex(m_deviceAPI->getDeviceSetIndex()); swgDeviceSettings->setRtlSdrSettings(new SWGSDRangel::SWGRtlSdrSettings()); SWGSDRangel::SWGRtlSdrSettings *swgRtlSdrSettings = swgDeviceSettings->getRtlSdrSettings(); diff --git a/plugins/samplesource/rtlsdr/rtlsdrplugin.cpp b/plugins/samplesource/rtlsdr/rtlsdrplugin.cpp index 71d94126b..d590d4e31 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrplugin.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrplugin.cpp @@ -14,7 +14,7 @@ const PluginDescriptor RTLSDRPlugin::m_pluginDescriptor = { QString("RTL-SDR Input"), - QString("4.3.2"), + QString("4.5.2"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, diff --git a/sdrbase/channel/channelsinkapi.h b/sdrbase/channel/channelsinkapi.h index ebebe1adf..6b904132a 100644 --- a/sdrbase/channel/channelsinkapi.h +++ b/sdrbase/channel/channelsinkapi.h @@ -76,6 +76,8 @@ public: int getIndexInDeviceSet() const { return m_indexInDeviceSet; } void setIndexInDeviceSet(int indexInDeviceSet) { m_indexInDeviceSet = indexInDeviceSet; } + int getDeviceSetIndex() const { return m_deviceSetIndex; } + void setDeviceSetIndex(int deviceSetIndex) { m_deviceSetIndex = deviceSetIndex; } uint64_t getUID() const { return m_uid; } private: @@ -85,6 +87,7 @@ private: QString m_name; int m_indexInDeviceSet; + int m_deviceSetIndex; uint64_t m_uid; }; diff --git a/sdrbase/channel/channelsourceapi.h b/sdrbase/channel/channelsourceapi.h index 48d02c108..32e0c8888 100644 --- a/sdrbase/channel/channelsourceapi.h +++ b/sdrbase/channel/channelsourceapi.h @@ -75,6 +75,8 @@ public: int getIndexInDeviceSet() const { return m_indexInDeviceSet; } void setIndexInDeviceSet(int indexInDeviceSet) { m_indexInDeviceSet = indexInDeviceSet; } + int getDeviceSetIndex() const { return m_deviceSetIndex; } + void setDeviceSetIndex(int deviceSetIndex) { m_deviceSetIndex = deviceSetIndex; } uint64_t getUID() const { return m_uid; } private: @@ -84,6 +86,7 @@ private: QString m_name; int m_indexInDeviceSet; + int m_deviceSetIndex; uint64_t m_uid; }; diff --git a/sdrbase/device/devicesinkapi.cpp b/sdrbase/device/devicesinkapi.cpp index 1e816a8ea..a3e7fdea7 100644 --- a/sdrbase/device/devicesinkapi.cpp +++ b/sdrbase/device/devicesinkapi.cpp @@ -98,8 +98,10 @@ ChannelSourceAPI *DeviceSinkAPI::getChanelAPIAt(int index) void DeviceSinkAPI::renumerateChannels() { - for (int i = 0; i < m_channelAPIs.size(); ++i) { + for (int i = 0; i < m_channelAPIs.size(); ++i) + { m_channelAPIs.at(i)->setIndexInDeviceSet(i); + m_channelAPIs.at(i)->setDeviceSetIndex(m_deviceTabIndex); } } diff --git a/sdrbase/device/devicesinkapi.h b/sdrbase/device/devicesinkapi.h index 1467dd64b..a59e7bd1d 100644 --- a/sdrbase/device/devicesinkapi.h +++ b/sdrbase/device/devicesinkapi.h @@ -81,6 +81,7 @@ public: uint32_t getSampleSinkSequence() const { return m_sampleSinkSequence; } uint32_t getNbItems() const { return m_nbItems; } uint32_t getItemIndex() const { return m_itemIndex; } + int getDeviceSetIndex() const { return m_deviceTabIndex; } PluginInterface *getPluginInterface() { return m_pluginInterface; } PluginInstanceGUI *getSampleSinkPluginInstanceGUI() { return m_sampleSinkPluginInstanceUI; } void getDeviceEngineStateStr(QString& state); diff --git a/sdrbase/device/devicesourceapi.cpp b/sdrbase/device/devicesourceapi.cpp index dc0e2584a..884210f9c 100644 --- a/sdrbase/device/devicesourceapi.cpp +++ b/sdrbase/device/devicesourceapi.cpp @@ -88,8 +88,10 @@ ChannelSinkAPI *DeviceSourceAPI::getChanelAPIAt(int index) void DeviceSourceAPI::renumerateChannels() { - for (int i = 0; i < m_channelAPIs.size(); ++i) { + for (int i = 0; i < m_channelAPIs.size(); ++i) + { m_channelAPIs.at(i)->setIndexInDeviceSet(i); + m_channelAPIs.at(i)->setDeviceSetIndex(m_deviceTabIndex); } } diff --git a/sdrbase/device/devicesourceapi.h b/sdrbase/device/devicesourceapi.h index 72286b7ec..6cf5a1f0b 100644 --- a/sdrbase/device/devicesourceapi.h +++ b/sdrbase/device/devicesourceapi.h @@ -81,6 +81,7 @@ public: uint32_t getSampleSourceSequence() const { return m_sampleSourceSequence; } uint32_t getNbItems() const { return m_nbItems; } uint32_t getItemIndex() const { return m_itemIndex; } + int getDeviceSetIndex() const { return m_deviceTabIndex; } PluginInterface *getPluginInterface() { return m_pluginInterface; } PluginInstanceGUI *getSampleSourcePluginInstanceGUI() { return m_sampleSourcePluginInstanceUI; } void getDeviceEngineStateStr(QString& state); @@ -107,7 +108,7 @@ public: const QTimer& getMasterTimer() const { return m_masterTimer; } //!< This is the DSPEngine master timer protected: - int m_deviceTabIndex; + int m_deviceTabIndex; //!< This is the tab index in the GUI and also the device set index DSPDeviceSourceEngine *m_deviceSourceEngine; QString m_hardwareId; //!< The internal id that identifies the type of hardware (i.e. HackRF, BladeRF, ...) diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index 87024274d..81c572e48 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -1806,6 +1806,14 @@ margin-bottom: 20px; "type" : "integer", "description" : "Not zero if it is a tx channel else it is a rx channel" }, + "originatorDeviceSetIndex" : { + "type" : "integer", + "description" : "Optional for reverse API. This is the device set index from where the message comes from." + }, + "originatorChannelIndex" : { + "type" : "integer", + "description" : "Optional for reverse API. This is the channel index from where the message comes from." + }, "AMDemodSettings" : { "$ref" : "#/definitions/AMDemodSettings" }, @@ -2230,6 +2238,10 @@ margin-bottom: 20px; "type" : "integer", "description" : "Not zero if it is a tx device else it is a rx device" }, + "originatorIndex" : { + "type" : "integer", + "description" : "Optional for reverse API. This is the device set index from where the message comes from." + }, "airspySettings" : { "$ref" : "#/definitions/AirspySettings" }, @@ -5666,7 +5678,7 @@ margin-bottom: 20px;