From ffb766b42d30c2d9f2ad965b6f98e602673396a5 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 2 Feb 2019 23:27:34 +0100 Subject: [PATCH] Rename SDRDaemonSink device plugin to RemoteOutput (2): REST API --- .../samplesink/remoteoutput/remoteoutput.cpp | 102 ++++++------- .../remoteoutput/remoteoutputgui.cpp | 4 +- sdrbase/resources/res.qrc | 2 +- sdrbase/resources/webapi/doc/html2/index.html | 142 +++++++++--------- .../{SDRDaemonSink.yaml => RemoteOutput.yaml} | 8 +- .../resources/webapi/doc/swagger/swagger.yaml | 10 +- sdrbase/webapi/webapirequestmapper.cpp | 29 ++-- .../{SDRDaemonSink.yaml => RemoteOutput.yaml} | 8 +- swagger/sdrangel/api/swagger/swagger.yaml | 10 +- swagger/sdrangel/code/html2/index.html | 142 +++++++++--------- .../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 | 2 +- .../code/qt5/client/SWGChannelSettings.h | 2 +- .../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 | 34 ++--- .../code/qt5/client/SWGDeviceReport.h | 12 +- .../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 | 34 ++--- .../code/qt5/client/SWGDeviceSettings.h | 12 +- .../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 +- .../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 | 18 +-- .../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 +- ...nkReport.cpp => SWGRemoteOutputReport.cpp} | 34 ++--- ...onSinkReport.h => SWGRemoteOutputReport.h} | 22 +-- ...ttings.cpp => SWGRemoteOutputSettings.cpp} | 82 +++++----- ...nkSettings.h => SWGRemoteOutputSettings.h} | 22 +-- .../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 +- .../qt5/client/SWGSDRdaemonSourceReport.cpp | 2 +- .../qt5/client/SWGSDRdaemonSourceReport.h | 2 +- .../qt5/client/SWGSDRdaemonSourceSettings.cpp | 2 +- .../qt5/client/SWGSDRdaemonSourceSettings.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 +- 258 files changed, 605 insertions(+), 600 deletions(-) rename sdrbase/resources/webapi/doc/swagger/include/{SDRDaemonSink.yaml => RemoteOutput.yaml} (91%) rename swagger/sdrangel/api/swagger/include/{SDRDaemonSink.yaml => RemoteOutput.yaml} (91%) rename swagger/sdrangel/code/qt5/client/{SWGSDRdaemonSinkReport.cpp => SWGRemoteOutputReport.cpp} (81%) rename swagger/sdrangel/code/qt5/client/{SWGSDRdaemonSinkReport.h => SWGRemoteOutputReport.h} (83%) rename swagger/sdrangel/code/qt5/client/{SWGSDRdaemonSinkSettings.cpp => SWGRemoteOutputSettings.cpp} (82%) rename swagger/sdrangel/code/qt5/client/{SWGSDRdaemonSinkSettings.h => SWGRemoteOutputSettings.h} (89%) diff --git a/plugins/samplesink/remoteoutput/remoteoutput.cpp b/plugins/samplesink/remoteoutput/remoteoutput.cpp index 3d2adffd1..45187629e 100644 --- a/plugins/samplesink/remoteoutput/remoteoutput.cpp +++ b/plugins/samplesink/remoteoutput/remoteoutput.cpp @@ -25,7 +25,7 @@ #include "SWGDeviceSettings.h" #include "SWGDeviceState.h" #include "SWGDeviceReport.h" -#include "SWGSDRdaemonSinkReport.h" +#include "SWGRemoteOutputReport.h" #include "util/simpleserializer.h" #include "dsp/dspcommands.h" @@ -369,8 +369,8 @@ int RemoteOutput::webapiSettingsGet( QString& errorMessage) { (void) errorMessage; - response.setSdrDaemonSinkSettings(new SWGSDRangel::SWGSDRdaemonSinkSettings()); - response.getSdrDaemonSinkSettings()->init(); + response.setRemoteOutputSettings(new SWGSDRangel::SWGRemoteOutputSettings()); + response.getRemoteOutputSettings()->init(); webapiFormatDeviceSettings(response, m_settings); return 200; } @@ -385,43 +385,43 @@ int RemoteOutput::webapiSettingsPutPatch( RemoteOutputSettings settings = m_settings; if (deviceSettingsKeys.contains("sampleRate")) { - settings.m_sampleRate = response.getSdrDaemonSinkSettings()->getSampleRate(); + settings.m_sampleRate = response.getRemoteOutputSettings()->getSampleRate(); } if (deviceSettingsKeys.contains("txDelay")) { - settings.m_txDelay = response.getSdrDaemonSinkSettings()->getTxDelay(); + settings.m_txDelay = response.getRemoteOutputSettings()->getTxDelay(); } if (deviceSettingsKeys.contains("nbFECBlocks")) { - settings.m_nbFECBlocks = response.getSdrDaemonSinkSettings()->getNbFecBlocks(); + settings.m_nbFECBlocks = response.getRemoteOutputSettings()->getNbFecBlocks(); } if (deviceSettingsKeys.contains("apiAddress")) { - settings.m_apiAddress = *response.getSdrDaemonSinkSettings()->getApiAddress(); + settings.m_apiAddress = *response.getRemoteOutputSettings()->getApiAddress(); } if (deviceSettingsKeys.contains("apiPort")) { - settings.m_apiPort = response.getSdrDaemonSinkSettings()->getApiPort(); + settings.m_apiPort = response.getRemoteOutputSettings()->getApiPort(); } if (deviceSettingsKeys.contains("dataAddress")) { - settings.m_dataAddress = *response.getSdrDaemonSinkSettings()->getDataAddress(); + settings.m_dataAddress = *response.getRemoteOutputSettings()->getDataAddress(); } if (deviceSettingsKeys.contains("dataPort")) { - settings.m_dataPort = response.getSdrDaemonSinkSettings()->getDataPort(); + settings.m_dataPort = response.getRemoteOutputSettings()->getDataPort(); } if (deviceSettingsKeys.contains("deviceIndex")) { - settings.m_deviceIndex = response.getSdrDaemonSinkSettings()->getDeviceIndex(); + settings.m_deviceIndex = response.getRemoteOutputSettings()->getDeviceIndex(); } if (deviceSettingsKeys.contains("channelIndex")) { - settings.m_channelIndex = response.getSdrDaemonSinkSettings()->getChannelIndex(); + settings.m_channelIndex = response.getRemoteOutputSettings()->getChannelIndex(); } if (deviceSettingsKeys.contains("useReverseAPI")) { - settings.m_useReverseAPI = response.getSdrDaemonSinkSettings()->getUseReverseApi() != 0; + settings.m_useReverseAPI = response.getRemoteOutputSettings()->getUseReverseApi() != 0; } if (deviceSettingsKeys.contains("reverseAPIAddress")) { - settings.m_reverseAPIAddress = *response.getSdrDaemonSinkSettings()->getReverseApiAddress(); + settings.m_reverseAPIAddress = *response.getRemoteOutputSettings()->getReverseApiAddress(); } if (deviceSettingsKeys.contains("reverseAPIPort")) { - settings.m_reverseAPIPort = response.getSdrDaemonSinkSettings()->getReverseApiPort(); + settings.m_reverseAPIPort = response.getRemoteOutputSettings()->getReverseApiPort(); } if (deviceSettingsKeys.contains("reverseAPIDeviceIndex")) { - settings.m_reverseAPIDeviceIndex = response.getSdrDaemonSinkSettings()->getReverseApiDeviceIndex(); + settings.m_reverseAPIDeviceIndex = response.getRemoteOutputSettings()->getReverseApiDeviceIndex(); } MsgConfigureRemoteOutput *msg = MsgConfigureRemoteOutput::create(settings, force); @@ -442,41 +442,41 @@ int RemoteOutput::webapiReportGet( QString& errorMessage) { (void) errorMessage; - response.setSdrDaemonSinkReport(new SWGSDRangel::SWGSDRdaemonSinkReport()); - response.getSdrDaemonSinkReport()->init(); + response.setRemoteOutputReport(new SWGSDRangel::SWGRemoteOutputReport()); + response.getRemoteOutputReport()->init(); webapiFormatDeviceReport(response); return 200; } void RemoteOutput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const RemoteOutputSettings& settings) { - response.getSdrDaemonSinkSettings()->setCenterFrequency(m_centerFrequency); - response.getSdrDaemonSinkSettings()->setSampleRate(settings.m_sampleRate); - response.getSdrDaemonSinkSettings()->setTxDelay(settings.m_txDelay); - response.getSdrDaemonSinkSettings()->setNbFecBlocks(settings.m_nbFECBlocks); - response.getSdrDaemonSinkSettings()->setApiAddress(new QString(settings.m_apiAddress)); - response.getSdrDaemonSinkSettings()->setApiPort(settings.m_apiPort); - response.getSdrDaemonSinkSettings()->setDataAddress(new QString(settings.m_dataAddress)); - response.getSdrDaemonSinkSettings()->setDataPort(settings.m_dataPort); - response.getSdrDaemonSinkSettings()->setDeviceIndex(settings.m_deviceIndex); - response.getSdrDaemonSinkSettings()->setChannelIndex(settings.m_channelIndex); - response.getSdrDaemonSinkSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0); + response.getRemoteOutputSettings()->setCenterFrequency(m_centerFrequency); + response.getRemoteOutputSettings()->setSampleRate(settings.m_sampleRate); + response.getRemoteOutputSettings()->setTxDelay(settings.m_txDelay); + response.getRemoteOutputSettings()->setNbFecBlocks(settings.m_nbFECBlocks); + response.getRemoteOutputSettings()->setApiAddress(new QString(settings.m_apiAddress)); + response.getRemoteOutputSettings()->setApiPort(settings.m_apiPort); + response.getRemoteOutputSettings()->setDataAddress(new QString(settings.m_dataAddress)); + response.getRemoteOutputSettings()->setDataPort(settings.m_dataPort); + response.getRemoteOutputSettings()->setDeviceIndex(settings.m_deviceIndex); + response.getRemoteOutputSettings()->setChannelIndex(settings.m_channelIndex); + response.getRemoteOutputSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0); - if (response.getSdrDaemonSinkSettings()->getReverseApiAddress()) { - *response.getSdrDaemonSinkSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress; + if (response.getRemoteOutputSettings()->getReverseApiAddress()) { + *response.getRemoteOutputSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress; } else { - response.getSdrDaemonSinkSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress)); + response.getRemoteOutputSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress)); } - response.getSdrDaemonSinkSettings()->setReverseApiPort(settings.m_reverseAPIPort); - response.getSdrDaemonSinkSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex); + response.getRemoteOutputSettings()->setReverseApiPort(settings.m_reverseAPIPort); + response.getRemoteOutputSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex); } void RemoteOutput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response) { uint64_t ts_usecs; - response.getSdrDaemonSinkReport()->setBufferRwBalance(m_sampleSourceFifo.getRWBalance()); - response.getSdrDaemonSinkReport()->setSampleCount(m_remoteOutputThread ? (int) m_remoteOutputThread->getSamplesCount(ts_usecs) : 0); + response.getRemoteOutputReport()->setBufferRwBalance(m_sampleSourceFifo.getRWBalance()); + response.getRemoteOutputReport()->setSampleCount(m_remoteOutputThread ? (int) m_remoteOutputThread->getSamplesCount(ts_usecs) : 0); } void RemoteOutput::tick() @@ -533,9 +533,9 @@ void RemoteOutput::networkManagerFinished(QNetworkReply *reply) void RemoteOutput::analyzeApiReply(const QJsonObject& jsonObject, const QString& answer) { - if (jsonObject.contains("DaemonSourceReport")) + if (jsonObject.contains("RemoteSourceReport")) { - QJsonObject report = jsonObject["DaemonSourceReport"].toObject(); + QJsonObject report = jsonObject["RemoteSourceReport"].toObject(); m_centerFrequency = report["deviceCenterFreq"].toInt() * 1000; if (!m_remoteOutputThread) { @@ -601,7 +601,7 @@ void RemoteOutput::analyzeApiReply(const QJsonObject& jsonObject, const QString& m_lastSampleCount = sampleCount; m_lastQueueLength = queueLength; } - else if (jsonObject.contains("sdrDaemonSinkSettings")) + else if (jsonObject.contains("remoteOutputSettings")) { qDebug("RemoteOutput::analyzeApiReply: reply:\n%s", answer.toStdString().c_str()); } @@ -623,38 +623,38 @@ void RemoteOutput::webapiReverseSendSettings(QList& deviceSettingsKeys, { SWGSDRangel::SWGDeviceSettings *swgDeviceSettings = new SWGSDRangel::SWGDeviceSettings(); swgDeviceSettings->setTx(1); - swgDeviceSettings->setDeviceHwType(new QString("SDRdaemonSink")); - swgDeviceSettings->setSdrDaemonSinkSettings(new SWGSDRangel::SWGSDRdaemonSinkSettings()); - SWGSDRangel::SWGSDRdaemonSinkSettings *swgSdrDaemonSinkSettings = swgDeviceSettings->getSdrDaemonSinkSettings(); + swgDeviceSettings->setDeviceHwType(new QString("RemoteOutput")); + swgDeviceSettings->setRemoteOutputSettings(new SWGSDRangel::SWGRemoteOutputSettings()); + SWGSDRangel::SWGRemoteOutputSettings *swgRemoteOutputSettings = swgDeviceSettings->getRemoteOutputSettings(); // transfer data that has been modified. When force is on transfer all data except reverse API data if (deviceSettingsKeys.contains("sampleRate") || force) { - swgSdrDaemonSinkSettings->setSampleRate(settings.m_sampleRate); + swgRemoteOutputSettings->setSampleRate(settings.m_sampleRate); } if (deviceSettingsKeys.contains("txDelay") || force) { - swgSdrDaemonSinkSettings->setTxDelay(settings.m_txDelay); + swgRemoteOutputSettings->setTxDelay(settings.m_txDelay); } if (deviceSettingsKeys.contains("nbFECBlocks") || force) { - swgSdrDaemonSinkSettings->setNbFecBlocks(settings.m_nbFECBlocks); + swgRemoteOutputSettings->setNbFecBlocks(settings.m_nbFECBlocks); } if (deviceSettingsKeys.contains("apiAddress") || force) { - swgSdrDaemonSinkSettings->setApiAddress(new QString(settings.m_apiAddress)); + swgRemoteOutputSettings->setApiAddress(new QString(settings.m_apiAddress)); } if (deviceSettingsKeys.contains("apiPort") || force) { - swgSdrDaemonSinkSettings->setApiPort(settings.m_apiPort); + swgRemoteOutputSettings->setApiPort(settings.m_apiPort); } if (deviceSettingsKeys.contains("dataAddress") || force) { - swgSdrDaemonSinkSettings->setDataAddress(new QString(settings.m_dataAddress)); + swgRemoteOutputSettings->setDataAddress(new QString(settings.m_dataAddress)); } if (deviceSettingsKeys.contains("dataPort") || force) { - swgSdrDaemonSinkSettings->setDataPort(settings.m_dataPort); + swgRemoteOutputSettings->setDataPort(settings.m_dataPort); } if (deviceSettingsKeys.contains("deviceIndex") || force) { - swgSdrDaemonSinkSettings->setDeviceIndex(settings.m_deviceIndex); + swgRemoteOutputSettings->setDeviceIndex(settings.m_deviceIndex); } if (deviceSettingsKeys.contains("channelIndex") || force) { - swgSdrDaemonSinkSettings->setChannelIndex(settings.m_channelIndex); + swgRemoteOutputSettings->setChannelIndex(settings.m_channelIndex); } QString deviceSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/device/settings") diff --git a/plugins/samplesink/remoteoutput/remoteoutputgui.cpp b/plugins/samplesink/remoteoutput/remoteoutputgui.cpp index e2965e310..631099e98 100644 --- a/plugins/samplesink/remoteoutput/remoteoutputgui.cpp +++ b/plugins/samplesink/remoteoutput/remoteoutputgui.cpp @@ -550,9 +550,9 @@ void RemoteOutputSinkGui::analyzeApiReply(const QJsonObject& jsonObject) { QString infoLine; - if (jsonObject.contains("DaemonSourceReport")) + if (jsonObject.contains("RemoteSourceReport")) { - QJsonObject report = jsonObject["DaemonSourceReport"].toObject(); + QJsonObject report = jsonObject["RemoteSourceReport"].toObject(); m_deviceCenterFrequency = report["deviceCenterFreq"].toInt() * 1000; m_deviceUISet->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency); ui->centerFrequency->setValue(m_deviceCenterFrequency/1000); diff --git a/sdrbase/resources/res.qrc b/sdrbase/resources/res.qrc index 80d3c1b8f..e00ae4d9b 100644 --- a/sdrbase/resources/res.qrc +++ b/sdrbase/resources/res.qrc @@ -25,7 +25,7 @@ webapi/doc/swagger/include/RemoteSink.yaml webapi/doc/swagger/include/RemoteSource.yaml webapi/doc/swagger/include/SDRDaemonSource.yaml - webapi/doc/swagger/include/SDRDaemonSink.yaml + webapi/doc/swagger/include/RemoteOutput.yaml webapi/doc/swagger/include/SDRPlay.yaml webapi/doc/swagger/include/SoapySDR.yaml webapi/doc/swagger/include/SSBDemod.yaml diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index d94dd8bc9..dedca2a08 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -2134,8 +2134,8 @@ margin-bottom: 20px; "rtlSdrReport" : { "$ref" : "#/definitions/RtlSdrReport" }, - "sdrDaemonSinkReport" : { - "$ref" : "#/definitions/SDRdaemonSinkReport" + "remoteOutputReport" : { + "$ref" : "#/definitions/RemoteOutputReport" }, "sdrDaemonSourceReport" : { "$ref" : "#/definitions/SDRdaemonSourceReport" @@ -2261,8 +2261,8 @@ margin-bottom: 20px; "rtlSdrSettings" : { "$ref" : "#/definitions/RtlSdrSettings" }, - "sdrDaemonSinkSettings" : { - "$ref" : "#/definitions/SDRdaemonSinkSettings" + "remoteOutputSettings" : { + "$ref" : "#/definitions/RemoteOutputSettings" }, "sdrDaemonSourceSettings" : { "$ref" : "#/definitions/SDRdaemonSourceSettings" @@ -3709,6 +3709,71 @@ margin-bottom: 20px; } }, "description" : "An arbitrary range of floating point values" +}; + defs.RemoteOutputReport = { + "properties" : { + "bufferRWBalance" : { + "type" : "number", + "format" : "float", + "description" : "ratio off the mid buffer (positive read leads)" + }, + "sampleCount" : { + "type" : "integer", + "description" : "count of samples that have been sent" + } + }, + "description" : "RemoteOutput" +}; + defs.RemoteOutputSettings = { + "properties" : { + "centerFrequency" : { + "type" : "integer", + "format" : "uint64" + }, + "sampleRate" : { + "type" : "integer" + }, + "txDelay" : { + "type" : "number", + "format" : "float", + "description" : "minimum delay in ms between two consecutive packets sending" + }, + "nbFECBlocks" : { + "type" : "integer" + }, + "apiAddress" : { + "type" : "string" + }, + "apiPort" : { + "type" : "integer" + }, + "dataAddress" : { + "type" : "string" + }, + "dataPort" : { + "type" : "integer" + }, + "deviceIndex" : { + "type" : "integer" + }, + "channelIndex" : { + "type" : "integer" + }, + "useReverseAPI" : { + "type" : "integer", + "description" : "Synchronize with reverse API (1 for yes, 0 for no)" + }, + "reverseAPIAddress" : { + "type" : "string" + }, + "reverseAPIPort" : { + "type" : "integer" + }, + "reverseAPIDeviceIndex" : { + "type" : "integer" + } + }, + "description" : "RemoteOutput" }; defs.RemoteSinkSettings = { "properties" : { @@ -4020,71 +4085,6 @@ margin-bottom: 20px; } }, "description" : "SDRplay1" -}; - defs.SDRdaemonSinkReport = { - "properties" : { - "bufferRWBalance" : { - "type" : "number", - "format" : "float", - "description" : "ratio off the mid buffer (positive read leads)" - }, - "sampleCount" : { - "type" : "integer", - "description" : "count of samples that have been sent" - } - }, - "description" : "SDRdaemonSource" -}; - defs.SDRdaemonSinkSettings = { - "properties" : { - "centerFrequency" : { - "type" : "integer", - "format" : "uint64" - }, - "sampleRate" : { - "type" : "integer" - }, - "txDelay" : { - "type" : "number", - "format" : "float", - "description" : "minimum delay in ms between two consecutive packets sending" - }, - "nbFECBlocks" : { - "type" : "integer" - }, - "apiAddress" : { - "type" : "string" - }, - "apiPort" : { - "type" : "integer" - }, - "dataAddress" : { - "type" : "string" - }, - "dataPort" : { - "type" : "integer" - }, - "deviceIndex" : { - "type" : "integer" - }, - "channelIndex" : { - "type" : "integer" - }, - "useReverseAPI" : { - "type" : "integer", - "description" : "Synchronize with reverse API (1 for yes, 0 for no)" - }, - "reverseAPIAddress" : { - "type" : "string" - }, - "reverseAPIPort" : { - "type" : "integer" - }, - "reverseAPIDeviceIndex" : { - "type" : "integer" - } - }, - "description" : "SDRdaemonSink" }; defs.SDRdaemonSourceReport = { "properties" : { @@ -5505,7 +5505,7 @@ margin-bottom: 20px;