diff --git a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.cpp b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.cpp index 97b7e8074..2915538d2 100644 --- a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.cpp +++ b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.cpp @@ -22,6 +22,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "device/deviceapi.h" #include "dsp/hbfilterchainconverter.h" @@ -283,6 +284,15 @@ int BeamSteeringCWMod::webapiSettingsGet( return 200; } +int BeamSteeringCWMod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int BeamSteeringCWMod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.h b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.h index 0d50058a3..90979c5c0 100644 --- a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.h +++ b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmod.h @@ -134,6 +134,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& query, + QString& errorMessage); + static void webapiFormatChannelSettings( SWGSDRangel::SWGChannelSettings& response, const BeamSteeringCWModSettings& settings); diff --git a/plugins/channelmimo/interferometer/interferometer.cpp b/plugins/channelmimo/interferometer/interferometer.cpp index 47afd801d..82b1ca41a 100644 --- a/plugins/channelmimo/interferometer/interferometer.cpp +++ b/plugins/channelmimo/interferometer/interferometer.cpp @@ -22,6 +22,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "device/deviceapi.h" #include "dsp/hbfilterchainconverter.h" @@ -305,6 +306,15 @@ int Interferometer::webapiSettingsGet( return 200; } +int Interferometer::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int Interferometer::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelmimo/interferometer/interferometer.h b/plugins/channelmimo/interferometer/interferometer.h index 403569e76..a6444f397 100644 --- a/plugins/channelmimo/interferometer/interferometer.h +++ b/plugins/channelmimo/interferometer/interferometer.h @@ -138,6 +138,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& query, + QString& errorMessage); + static void webapiFormatChannelSettings( SWGSDRangel::SWGChannelSettings& response, const InterferometerSettings& settings); diff --git a/plugins/channelrx/chanalyzer/chanalyzer.cpp b/plugins/channelrx/chanalyzer/chanalyzer.cpp index b197902f3..59fe9de15 100644 --- a/plugins/channelrx/chanalyzer/chanalyzer.cpp +++ b/plugins/channelrx/chanalyzer/chanalyzer.cpp @@ -25,6 +25,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelAnalyzerSettings.h" #include "device/deviceapi.h" @@ -333,6 +334,15 @@ int ChannelAnalyzer::webapiSettingsGet( return 200; } +int ChannelAnalyzer::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int ChannelAnalyzer::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/chanalyzer/chanalyzer.h b/plugins/channelrx/chanalyzer/chanalyzer.h index 806594ca3..1074301f8 100644 --- a/plugins/channelrx/chanalyzer/chanalyzer.h +++ b/plugins/channelrx/chanalyzer/chanalyzer.h @@ -109,6 +109,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodadsb/adsbdemod.cpp b/plugins/channelrx/demodadsb/adsbdemod.cpp index 2764ff2e3..f8126e9bd 100644 --- a/plugins/channelrx/demodadsb/adsbdemod.cpp +++ b/plugins/channelrx/demodadsb/adsbdemod.cpp @@ -31,6 +31,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGADSBDemodSettings.h" #include "SWGChannelReport.h" #include "SWGADSBDemodReport.h" @@ -374,6 +375,15 @@ int ADSBDemod::webapiSettingsGet( return 200; } +int ADSBDemod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int ADSBDemod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodadsb/adsbdemod.h b/plugins/channelrx/demodadsb/adsbdemod.h index 69214119f..c7e7b5c8a 100644 --- a/plugins/channelrx/demodadsb/adsbdemod.h +++ b/plugins/channelrx/demodadsb/adsbdemod.h @@ -98,6 +98,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodais/aisdemod.cpp b/plugins/channelrx/demodais/aisdemod.cpp index 67904a891..d2fb61529 100644 --- a/plugins/channelrx/demodais/aisdemod.cpp +++ b/plugins/channelrx/demodais/aisdemod.cpp @@ -29,6 +29,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" #include "dsp/dspengine.h" @@ -418,6 +419,15 @@ int AISDemod::webapiSettingsGet( return 200; } +int AISDemod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int AISDemod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodais/aisdemod.h b/plugins/channelrx/demodais/aisdemod.h index 7e8d3017b..3fbc1d0fa 100644 --- a/plugins/channelrx/demodais/aisdemod.h +++ b/plugins/channelrx/demodais/aisdemod.h @@ -127,6 +127,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodam/amdemod.cpp b/plugins/channelrx/demodam/amdemod.cpp index 325aad209..dbbdda00c 100644 --- a/plugins/channelrx/demodam/amdemod.cpp +++ b/plugins/channelrx/demodam/amdemod.cpp @@ -28,6 +28,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGAMDemodSettings.h" #include "SWGChannelReport.h" #include "SWGAMDemodReport.h" @@ -358,6 +359,15 @@ int AMDemod::webapiSettingsGet( return 200; } +int AMDemod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int AMDemod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodam/amdemod.h b/plugins/channelrx/demodam/amdemod.h index 156684802..ed1d49561 100644 --- a/plugins/channelrx/demodam/amdemod.h +++ b/plugins/channelrx/demodam/amdemod.h @@ -97,6 +97,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodapt/aptdemod.cpp b/plugins/channelrx/demodapt/aptdemod.cpp index 54b1a8f8f..419fa26bd 100644 --- a/plugins/channelrx/demodapt/aptdemod.cpp +++ b/plugins/channelrx/demodapt/aptdemod.cpp @@ -29,6 +29,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGAPTDemodSettings.h" #include "SWGChannelReport.h" #include "SWGChannelActions.h" @@ -420,6 +421,15 @@ int APTDemod::webapiSettingsGet( return 200; } +int APTDemod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int APTDemod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodapt/aptdemod.h b/plugins/channelrx/demodapt/aptdemod.h index 65ef1ac13..aa580dcc5 100644 --- a/plugins/channelrx/demodapt/aptdemod.h +++ b/plugins/channelrx/demodapt/aptdemod.h @@ -232,6 +232,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodbfm/bfmdemod.cpp b/plugins/channelrx/demodbfm/bfmdemod.cpp index 97617df1d..ee65f9a1f 100644 --- a/plugins/channelrx/demodbfm/bfmdemod.cpp +++ b/plugins/channelrx/demodbfm/bfmdemod.cpp @@ -26,6 +26,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGBFMDemodSettings.h" #include "SWGChannelReport.h" #include "SWGBFMDemodReport.h" @@ -307,6 +308,15 @@ int BFMDemod::webapiSettingsGet( return 200; } +int BFMDemod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int BFMDemod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodbfm/bfmdemod.h b/plugins/channelrx/demodbfm/bfmdemod.h index 49bbe0ac9..ccead9535 100644 --- a/plugins/channelrx/demodbfm/bfmdemod.h +++ b/plugins/channelrx/demodbfm/bfmdemod.h @@ -121,6 +121,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp b/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp index a0f2b0ef8..36467f9b4 100644 --- a/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp +++ b/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp @@ -28,6 +28,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" #include "SWGChirpChatDemodReport.h" @@ -510,6 +511,15 @@ int ChirpChatDemod::webapiSettingsGet( return 200; } +int ChirpChatDemod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int ChirpChatDemod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodchirpchat/chirpchatdemod.h b/plugins/channelrx/demodchirpchat/chirpchatdemod.h index d9dec0a35..9bb87e575 100644 --- a/plugins/channelrx/demodchirpchat/chirpchatdemod.h +++ b/plugins/channelrx/demodchirpchat/chirpchatdemod.h @@ -236,6 +236,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demoddab/dabdemod.cpp b/plugins/channelrx/demoddab/dabdemod.cpp index 7319bc582..035eb3f35 100644 --- a/plugins/channelrx/demoddab/dabdemod.cpp +++ b/plugins/channelrx/demoddab/dabdemod.cpp @@ -28,6 +28,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGDABDemodSettings.h" #include "SWGChannelReport.h" #include "SWGMapItem.h" @@ -422,6 +423,15 @@ int DABDemod::webapiSettingsGet( return 200; } +int DABDemod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int DABDemod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demoddab/dabdemod.h b/plugins/channelrx/demoddab/dabdemod.h index a177a3872..bae6c38ee 100644 --- a/plugins/channelrx/demoddab/dabdemod.h +++ b/plugins/channelrx/demoddab/dabdemod.h @@ -347,6 +347,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demoddatv/datvdemod.cpp b/plugins/channelrx/demoddatv/datvdemod.cpp index e50a04956..b2f7c68fb 100644 --- a/plugins/channelrx/demoddatv/datvdemod.cpp +++ b/plugins/channelrx/demoddatv/datvdemod.cpp @@ -23,6 +23,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGDATVDemodSettings.h" #include "SWGChannelReport.h" @@ -307,6 +308,15 @@ int DATVDemod::webapiSettingsGet( return 200; } +int DATVDemod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int DATVDemod::webapiReportGet( SWGSDRangel::SWGChannelReport& response, QString& errorMessage) diff --git a/plugins/channelrx/demoddatv/datvdemod.h b/plugins/channelrx/demoddatv/datvdemod.h index bd90cf38b..8c3629767 100644 --- a/plugins/channelrx/demoddatv/datvdemod.h +++ b/plugins/channelrx/demoddatv/datvdemod.h @@ -78,6 +78,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demoddsd/dsddemod.cpp b/plugins/channelrx/demoddsd/dsddemod.cpp index 6ea650bdd..00307028b 100644 --- a/plugins/channelrx/demoddsd/dsddemod.cpp +++ b/plugins/channelrx/demoddsd/dsddemod.cpp @@ -29,6 +29,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGDSDDemodSettings.h" #include "SWGChannelReport.h" #include "SWGDSDDemodReport.h" @@ -368,6 +369,15 @@ int DSDDemod::webapiSettingsGet( return 200; } +int DSDDemod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int DSDDemod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demoddsd/dsddemod.h b/plugins/channelrx/demoddsd/dsddemod.h index 620138826..dd5584d1d 100644 --- a/plugins/channelrx/demoddsd/dsddemod.h +++ b/plugins/channelrx/demoddsd/dsddemod.h @@ -98,6 +98,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodfreedv/freedvdemod.cpp b/plugins/channelrx/demodfreedv/freedvdemod.cpp index dfa55ed6d..72e1fab64 100644 --- a/plugins/channelrx/demodfreedv/freedvdemod.cpp +++ b/plugins/channelrx/demodfreedv/freedvdemod.cpp @@ -22,6 +22,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGFreeDVDemodSettings.h" #include "SWGChannelReport.h" #include "SWGFreeDVDemodReport.h" @@ -309,6 +310,15 @@ int FreeDVDemod::webapiSettingsGet( return 200; } +int FreeDVDemod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int FreeDVDemod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodfreedv/freedvdemod.h b/plugins/channelrx/demodfreedv/freedvdemod.h index 078a840c8..226b6173c 100644 --- a/plugins/channelrx/demodfreedv/freedvdemod.h +++ b/plugins/channelrx/demodfreedv/freedvdemod.h @@ -125,6 +125,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodnfm/nfmdemod.cpp b/plugins/channelrx/demodnfm/nfmdemod.cpp index b532c7fe7..39c323b6d 100644 --- a/plugins/channelrx/demodnfm/nfmdemod.cpp +++ b/plugins/channelrx/demodnfm/nfmdemod.cpp @@ -27,6 +27,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGNFMDemodSettings.h" #include "SWGChannelReport.h" #include "SWGNFMDemodReport.h" @@ -358,6 +359,15 @@ int NFMDemod::webapiSettingsGet( return 200; } +int NFMDemod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int NFMDemod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodnfm/nfmdemod.h b/plugins/channelrx/demodnfm/nfmdemod.h index 546df2274..4e311d12c 100644 --- a/plugins/channelrx/demodnfm/nfmdemod.h +++ b/plugins/channelrx/demodnfm/nfmdemod.h @@ -97,6 +97,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodpacket/packetdemod.cpp b/plugins/channelrx/demodpacket/packetdemod.cpp index c7dfd2038..eff76d98d 100644 --- a/plugins/channelrx/demodpacket/packetdemod.cpp +++ b/plugins/channelrx/demodpacket/packetdemod.cpp @@ -29,6 +29,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGPacketDemodSettings.h" #include "SWGChannelReport.h" #include "SWGMapItem.h" @@ -407,6 +408,15 @@ int PacketDemod::webapiSettingsGet( return 200; } +int PacketDemod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int PacketDemod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodpacket/packetdemod.h b/plugins/channelrx/demodpacket/packetdemod.h index 296f1503a..f4c8ca4d5 100644 --- a/plugins/channelrx/demodpacket/packetdemod.h +++ b/plugins/channelrx/demodpacket/packetdemod.h @@ -101,6 +101,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodpager/pagerdemod.cpp b/plugins/channelrx/demodpager/pagerdemod.cpp index eaa12a793..3e0f5a3de 100644 --- a/plugins/channelrx/demodpager/pagerdemod.cpp +++ b/plugins/channelrx/demodpager/pagerdemod.cpp @@ -25,6 +25,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" #include "dsp/dspengine.h" @@ -392,6 +393,15 @@ int PagerDemod::webapiSettingsGet( return 200; } +int PagerDemod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int PagerDemod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodpager/pagerdemod.h b/plugins/channelrx/demodpager/pagerdemod.h index a283cc5d0..cc8e1e368 100644 --- a/plugins/channelrx/demodpager/pagerdemod.h +++ b/plugins/channelrx/demodpager/pagerdemod.h @@ -156,6 +156,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodradiosonde/radiosondedemod.cpp b/plugins/channelrx/demodradiosonde/radiosondedemod.cpp index 86944c1ea..b9e1f9e8f 100644 --- a/plugins/channelrx/demodradiosonde/radiosondedemod.cpp +++ b/plugins/channelrx/demodradiosonde/radiosondedemod.cpp @@ -29,6 +29,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" #include "dsp/dspengine.h" @@ -439,6 +440,15 @@ int RadiosondeDemod::webapiSettingsGet( return 200; } +int RadiosondeDemod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int RadiosondeDemod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodradiosonde/radiosondedemod.h b/plugins/channelrx/demodradiosonde/radiosondedemod.h index c103794aa..bf4e91ae6 100644 --- a/plugins/channelrx/demodradiosonde/radiosondedemod.h +++ b/plugins/channelrx/demodradiosonde/radiosondedemod.h @@ -136,6 +136,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodssb/ssbdemod.cpp b/plugins/channelrx/demodssb/ssbdemod.cpp index 3cd877eb0..67ccc1741 100644 --- a/plugins/channelrx/demodssb/ssbdemod.cpp +++ b/plugins/channelrx/demodssb/ssbdemod.cpp @@ -28,6 +28,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGSSBDemodSettings.h" #include "SWGChannelReport.h" #include "SWGSSBDemodReport.h" @@ -367,6 +368,15 @@ int SSBDemod::webapiSettingsGet( return 200; } +int SSBDemod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int SSBDemod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodssb/ssbdemod.h b/plugins/channelrx/demodssb/ssbdemod.h index 119dc700d..5d8489a3c 100644 --- a/plugins/channelrx/demodssb/ssbdemod.h +++ b/plugins/channelrx/demodssb/ssbdemod.h @@ -111,6 +111,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodvor/vordemod.cpp b/plugins/channelrx/demodvor/vordemod.cpp index 2397ac790..1ac469377 100644 --- a/plugins/channelrx/demodvor/vordemod.cpp +++ b/plugins/channelrx/demodvor/vordemod.cpp @@ -27,6 +27,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGVORDemodSettings.h" #include "SWGChannelReport.h" #include "SWGVORDemodReport.h" @@ -352,6 +353,15 @@ int VORDemod::webapiSettingsGet( return 200; } +int VORDemod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int VORDemod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodvor/vordemod.h b/plugins/channelrx/demodvor/vordemod.h index c1bf8dcaf..ec4e51a61 100644 --- a/plugins/channelrx/demodvor/vordemod.h +++ b/plugins/channelrx/demodvor/vordemod.h @@ -99,6 +99,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodwfm/wfmdemod.cpp b/plugins/channelrx/demodwfm/wfmdemod.cpp index aab213164..719353708 100644 --- a/plugins/channelrx/demodwfm/wfmdemod.cpp +++ b/plugins/channelrx/demodwfm/wfmdemod.cpp @@ -28,6 +28,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGWFMDemodSettings.h" #include "SWGChannelReport.h" #include "SWGWFMDemodReport.h" @@ -330,6 +331,15 @@ int WFMDemod::webapiSettingsGet( return 200; } +int WFMDemod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int WFMDemod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/demodwfm/wfmdemod.h b/plugins/channelrx/demodwfm/wfmdemod.h index 9002f6932..73f407a5b 100644 --- a/plugins/channelrx/demodwfm/wfmdemod.h +++ b/plugins/channelrx/demodwfm/wfmdemod.h @@ -102,6 +102,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/filesink/filesink.cpp b/plugins/channelrx/filesink/filesink.cpp index 96b492628..ed91febae 100644 --- a/plugins/channelrx/filesink/filesink.cpp +++ b/plugins/channelrx/filesink/filesink.cpp @@ -24,6 +24,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" #include "SWGChannelActions.h" @@ -394,6 +395,15 @@ int FileSink::webapiSettingsGet( return 200; } +int FileSink::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int FileSink::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/filesink/filesink.h b/plugins/channelrx/filesink/filesink.h index a2b97d9a7..95ec66ffb 100644 --- a/plugins/channelrx/filesink/filesink.h +++ b/plugins/channelrx/filesink/filesink.h @@ -117,6 +117,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/freqtracker/freqtracker.cpp b/plugins/channelrx/freqtracker/freqtracker.cpp index dfc6b753f..8f0f0e07e 100644 --- a/plugins/channelrx/freqtracker/freqtracker.cpp +++ b/plugins/channelrx/freqtracker/freqtracker.cpp @@ -29,6 +29,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGFreqTrackerSettings.h" #include "SWGChannelReport.h" #include "SWGFreqTrackerReport.h" @@ -344,6 +345,15 @@ int FreqTracker::webapiSettingsGet( return 200; } +int FreqTracker::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int FreqTracker::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/freqtracker/freqtracker.h b/plugins/channelrx/freqtracker/freqtracker.h index 628cd76cb..5a0a2e7eb 100644 --- a/plugins/channelrx/freqtracker/freqtracker.h +++ b/plugins/channelrx/freqtracker/freqtracker.h @@ -96,6 +96,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/localsink/localsink.cpp b/plugins/channelrx/localsink/localsink.cpp index 758f9e1fa..3eb87911b 100644 --- a/plugins/channelrx/localsink/localsink.cpp +++ b/plugins/channelrx/localsink/localsink.cpp @@ -24,6 +24,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "util/simpleserializer.h" #include "dsp/dspcommands.h" @@ -368,6 +369,15 @@ int LocalSink::webapiSettingsGet( return 200; } +int LocalSink::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int LocalSink::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/localsink/localsink.h b/plugins/channelrx/localsink/localsink.h index d25a2972a..d5ac97f47 100644 --- a/plugins/channelrx/localsink/localsink.h +++ b/plugins/channelrx/localsink/localsink.h @@ -97,6 +97,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/noisefigure/noisefigure.cpp b/plugins/channelrx/noisefigure/noisefigure.cpp index ff5f3160d..c5aa2a23f 100644 --- a/plugins/channelrx/noisefigure/noisefigure.cpp +++ b/plugins/channelrx/noisefigure/noisefigure.cpp @@ -31,6 +31,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" #include "dsp/dspengine.h" @@ -608,6 +609,15 @@ int NoiseFigure::webapiSettingsGet( return 200; } +int NoiseFigure::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int NoiseFigure::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/noisefigure/noisefigure.h b/plugins/channelrx/noisefigure/noisefigure.h index f64437436..57f042ba8 100644 --- a/plugins/channelrx/noisefigure/noisefigure.h +++ b/plugins/channelrx/noisefigure/noisefigure.h @@ -206,6 +206,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/radioastronomy/radioastronomy.cpp b/plugins/channelrx/radioastronomy/radioastronomy.cpp index 98c8bf794..9b0ad59c2 100644 --- a/plugins/channelrx/radioastronomy/radioastronomy.cpp +++ b/plugins/channelrx/radioastronomy/radioastronomy.cpp @@ -31,6 +31,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" #include "SWGChannelActions.h" #include "SWGRadioAstronomyActions.h" @@ -840,6 +841,15 @@ int RadioAstronomy::webapiSettingsGet( return 200; } +int RadioAstronomy::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int RadioAstronomy::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/radioastronomy/radioastronomy.h b/plugins/channelrx/radioastronomy/radioastronomy.h index aac4fc559..7a2e5ac93 100644 --- a/plugins/channelrx/radioastronomy/radioastronomy.h +++ b/plugins/channelrx/radioastronomy/radioastronomy.h @@ -380,6 +380,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage) override; + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/radioclock/radioclock.cpp b/plugins/channelrx/radioclock/radioclock.cpp index bf0859890..ad93c8dac 100644 --- a/plugins/channelrx/radioclock/radioclock.cpp +++ b/plugins/channelrx/radioclock/radioclock.cpp @@ -29,6 +29,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" #include "dsp/dspengine.h" @@ -309,6 +310,15 @@ int RadioClock::webapiSettingsGet( return 200; } +int RadioClock::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int RadioClock::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/radioclock/radioclock.h b/plugins/channelrx/radioclock/radioclock.h index af0558895..9ed1b3b50 100644 --- a/plugins/channelrx/radioclock/radioclock.h +++ b/plugins/channelrx/radioclock/radioclock.h @@ -146,6 +146,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/remotesink/remotesink.cpp b/plugins/channelrx/remotesink/remotesink.cpp index bbba6c7f4..d5eaf261c 100644 --- a/plugins/channelrx/remotesink/remotesink.cpp +++ b/plugins/channelrx/remotesink/remotesink.cpp @@ -29,6 +29,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "util/simpleserializer.h" #include "dsp/dspcommands.h" @@ -338,6 +339,15 @@ int RemoteSink::webapiSettingsGet( return 200; } +int RemoteSink::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int RemoteSink::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/remotesink/remotesink.h b/plugins/channelrx/remotesink/remotesink.h index 476ed6677..13debfd79 100644 --- a/plugins/channelrx/remotesink/remotesink.h +++ b/plugins/channelrx/remotesink/remotesink.h @@ -98,6 +98,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/sigmffilesink/sigmffilesink.cpp b/plugins/channelrx/sigmffilesink/sigmffilesink.cpp index a2879bead..6057e16f2 100644 --- a/plugins/channelrx/sigmffilesink/sigmffilesink.cpp +++ b/plugins/channelrx/sigmffilesink/sigmffilesink.cpp @@ -24,6 +24,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" #include "SWGChannelActions.h" @@ -394,6 +395,15 @@ int SigMFFileSink::webapiSettingsGet( return 200; } +int SigMFFileSink::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int SigMFFileSink::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/sigmffilesink/sigmffilesink.h b/plugins/channelrx/sigmffilesink/sigmffilesink.h index 4923c9fc4..75b1785ee 100644 --- a/plugins/channelrx/sigmffilesink/sigmffilesink.h +++ b/plugins/channelrx/sigmffilesink/sigmffilesink.h @@ -117,6 +117,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/udpsink/udpsink.cpp b/plugins/channelrx/udpsink/udpsink.cpp index 81a90f9c3..86b7df320 100644 --- a/plugins/channelrx/udpsink/udpsink.cpp +++ b/plugins/channelrx/udpsink/udpsink.cpp @@ -24,6 +24,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGUDPSinkSettings.h" #include "SWGChannelReport.h" #include "SWGUDPSinkReport.h" @@ -326,6 +327,15 @@ int UDPSink::webapiSettingsGet( return 200; } +int UDPSink::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int UDPSink::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channelrx/udpsink/udpsink.h b/plugins/channelrx/udpsink/udpsink.h index 6a5dac3db..14b09b877 100644 --- a/plugins/channelrx/udpsink/udpsink.h +++ b/plugins/channelrx/udpsink/udpsink.h @@ -103,6 +103,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/filesource/filesource.cpp b/plugins/channeltx/filesource/filesource.cpp index fcce597f2..9830cb0f9 100644 --- a/plugins/channeltx/filesource/filesource.cpp +++ b/plugins/channeltx/filesource/filesource.cpp @@ -24,6 +24,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" #include "SWGChannelActions.h" #include "SWGFileSourceReport.h" @@ -322,6 +323,15 @@ int FileSource::webapiSettingsGet( return 200; } +int FileSource::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int FileSource::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/filesource/filesource.h b/plugins/channeltx/filesource/filesource.h index 6a7de9be0..b3e101122 100644 --- a/plugins/channeltx/filesource/filesource.h +++ b/plugins/channeltx/filesource/filesource.h @@ -179,6 +179,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/localsource/localsource.cpp b/plugins/channeltx/localsource/localsource.cpp index 05c3d795f..84b5bcaec 100644 --- a/plugins/channeltx/localsource/localsource.cpp +++ b/plugins/channeltx/localsource/localsource.cpp @@ -23,6 +23,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "util/simpleserializer.h" #include "dsp/dspcommands.h" @@ -365,6 +366,15 @@ int LocalSource::webapiSettingsGet( return 200; } +int LocalSource::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int LocalSource::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/localsource/localsource.h b/plugins/channeltx/localsource/localsource.h index 37963a533..9ee878cc6 100644 --- a/plugins/channeltx/localsource/localsource.h +++ b/plugins/channeltx/localsource/localsource.h @@ -95,6 +95,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.cpp b/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.cpp index eb18df7ef..5bd158a84 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.cpp +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.cpp @@ -27,6 +27,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" #include "SWGChannelActions.h" #include "SWGIEEE_802_15_4_ModReport.h" @@ -437,6 +438,15 @@ int IEEE_802_15_4_Mod::webapiSettingsGet( return 200; } +int IEEE_802_15_4_Mod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int IEEE_802_15_4_Mod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.h b/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.h index 6dd3bd28a..0c168aadd 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.h +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_mod.h @@ -123,6 +123,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/modais/aismod.cpp b/plugins/channeltx/modais/aismod.cpp index 2de16546e..46dafffc2 100644 --- a/plugins/channeltx/modais/aismod.cpp +++ b/plugins/channeltx/modais/aismod.cpp @@ -27,6 +27,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" #include "SWGChannelActions.h" @@ -543,6 +544,15 @@ int AISMod::webapiSettingsGet( return 200; } +int AISMod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int AISMod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/modais/aismod.h b/plugins/channeltx/modais/aismod.h index 3492ec4dc..7275fffb8 100644 --- a/plugins/channeltx/modais/aismod.h +++ b/plugins/channeltx/modais/aismod.h @@ -184,6 +184,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/modam/ammod.cpp b/plugins/channeltx/modam/ammod.cpp index c1742d396..287176ebb 100644 --- a/plugins/channeltx/modam/ammod.cpp +++ b/plugins/channeltx/modam/ammod.cpp @@ -27,6 +27,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" #include "SWGAMModReport.h" @@ -416,6 +417,15 @@ int AMMod::webapiSettingsGet( return 200; } +int AMMod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int AMMod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/modam/ammod.h b/plugins/channeltx/modam/ammod.h index 66658c438..1d2839eae 100644 --- a/plugins/channeltx/modam/ammod.h +++ b/plugins/channeltx/modam/ammod.h @@ -206,6 +206,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/modatv/atvmod.cpp b/plugins/channeltx/modatv/atvmod.cpp index 0eb8dad6d..705b55120 100644 --- a/plugins/channeltx/modatv/atvmod.cpp +++ b/plugins/channeltx/modatv/atvmod.cpp @@ -27,6 +27,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" #include "SWGATVModReport.h" @@ -406,6 +407,15 @@ int ATVMod::webapiSettingsGet( return 200; } +int ATVMod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int ATVMod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/modatv/atvmod.h b/plugins/channeltx/modatv/atvmod.h index 185e11fd0..4577c0586 100644 --- a/plugins/channeltx/modatv/atvmod.h +++ b/plugins/channeltx/modatv/atvmod.h @@ -278,6 +278,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/modchirpchat/chirpchatmod.cpp b/plugins/channeltx/modchirpchat/chirpchatmod.cpp index c2d3412fa..37f7fd8ec 100644 --- a/plugins/channeltx/modchirpchat/chirpchatmod.cpp +++ b/plugins/channeltx/modchirpchat/chirpchatmod.cpp @@ -26,6 +26,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" #include "SWGChirpChatModReport.h" @@ -458,6 +459,15 @@ int ChirpChatMod::webapiSettingsGet( return 200; } +int ChirpChatMod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int ChirpChatMod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/modchirpchat/chirpchatmod.h b/plugins/channeltx/modchirpchat/chirpchatmod.h index cfbc82d89..18214d66e 100644 --- a/plugins/channeltx/modchirpchat/chirpchatmod.h +++ b/plugins/channeltx/modchirpchat/chirpchatmod.h @@ -121,6 +121,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/moddatv/datvmod.cpp b/plugins/channeltx/moddatv/datvmod.cpp index 83b429850..196ecd85c 100644 --- a/plugins/channeltx/moddatv/datvmod.cpp +++ b/plugins/channeltx/moddatv/datvmod.cpp @@ -31,6 +31,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" //#include "SWGDATVModReport.h" @@ -372,6 +373,15 @@ int DATVMod::webapiSettingsGet( return 200; } +int DATVMod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int DATVMod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/moddatv/datvmod.h b/plugins/channeltx/moddatv/datvmod.h index c4d1a3764..98781f861 100644 --- a/plugins/channeltx/moddatv/datvmod.h +++ b/plugins/channeltx/moddatv/datvmod.h @@ -234,6 +234,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/modfreedv/freedvmod.cpp b/plugins/channeltx/modfreedv/freedvmod.cpp index 9667d4e8b..8ffa17f3b 100644 --- a/plugins/channeltx/modfreedv/freedvmod.cpp +++ b/plugins/channeltx/modfreedv/freedvmod.cpp @@ -28,6 +28,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" #include "SWGFreeDVModReport.h" @@ -391,6 +392,15 @@ int FreeDVMod::webapiSettingsGet( return 200; } +int FreeDVMod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int FreeDVMod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/modfreedv/freedvmod.h b/plugins/channeltx/modfreedv/freedvmod.h index 41660950f..0ed5c8feb 100644 --- a/plugins/channeltx/modfreedv/freedvmod.h +++ b/plugins/channeltx/modfreedv/freedvmod.h @@ -210,6 +210,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/modnfm/nfmmod.cpp b/plugins/channeltx/modnfm/nfmmod.cpp index faaf386da..62c7b5d18 100644 --- a/plugins/channeltx/modnfm/nfmmod.cpp +++ b/plugins/channeltx/modnfm/nfmmod.cpp @@ -24,6 +24,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGCWKeyerSettings.h" #include "SWGChannelReport.h" #include "SWGNFMModReport.h" @@ -463,6 +464,15 @@ int NFMMod::webapiSettingsGet( return 200; } +int NFMMod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int NFMMod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/modnfm/nfmmod.h b/plugins/channeltx/modnfm/nfmmod.h index 90a4ce786..43f610168 100644 --- a/plugins/channeltx/modnfm/nfmmod.h +++ b/plugins/channeltx/modnfm/nfmmod.h @@ -206,6 +206,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/modpacket/packetmod.cpp b/plugins/channeltx/modpacket/packetmod.cpp index c11add032..b9f3ca8b5 100644 --- a/plugins/channeltx/modpacket/packetmod.cpp +++ b/plugins/channeltx/modpacket/packetmod.cpp @@ -27,6 +27,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" #include "SWGChannelActions.h" #include "SWGPacketModReport.h" @@ -492,6 +493,15 @@ int PacketMod::webapiSettingsGet( return 200; } +int PacketMod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int PacketMod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/modpacket/packetmod.h b/plugins/channeltx/modpacket/packetmod.h index ebb7ebf78..afd992f2b 100644 --- a/plugins/channeltx/modpacket/packetmod.h +++ b/plugins/channeltx/modpacket/packetmod.h @@ -174,6 +174,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/modssb/ssbmod.cpp b/plugins/channeltx/modssb/ssbmod.cpp index 51860e1fe..f9e997c92 100644 --- a/plugins/channeltx/modssb/ssbmod.cpp +++ b/plugins/channeltx/modssb/ssbmod.cpp @@ -28,6 +28,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" #include "SWGSSBModReport.h" @@ -440,6 +441,15 @@ int SSBMod::webapiSettingsGet( return 200; } +int SSBMod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int SSBMod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/modssb/ssbmod.h b/plugins/channeltx/modssb/ssbmod.h index 6603f9ac0..d09f97ed2 100644 --- a/plugins/channeltx/modssb/ssbmod.h +++ b/plugins/channeltx/modssb/ssbmod.h @@ -208,6 +208,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/modwfm/wfmmod.cpp b/plugins/channeltx/modwfm/wfmmod.cpp index c0859f4f5..e95a01a3e 100644 --- a/plugins/channeltx/modwfm/wfmmod.cpp +++ b/plugins/channeltx/modwfm/wfmmod.cpp @@ -28,6 +28,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" #include "SWGAMModReport.h" @@ -402,6 +403,15 @@ int WFMMod::webapiSettingsGet( return 200; } +int WFMMod::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int WFMMod::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/modwfm/wfmmod.h b/plugins/channeltx/modwfm/wfmmod.h index 625164ef9..d209ef708 100644 --- a/plugins/channeltx/modwfm/wfmmod.h +++ b/plugins/channeltx/modwfm/wfmmod.h @@ -206,6 +206,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/remotesource/remotesource.cpp b/plugins/channeltx/remotesource/remotesource.cpp index 5458f7294..35ef6f583 100644 --- a/plugins/channeltx/remotesource/remotesource.cpp +++ b/plugins/channeltx/remotesource/remotesource.cpp @@ -24,6 +24,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" #include "SWGRemoteSourceReport.h" @@ -300,6 +301,15 @@ int RemoteSource::webapiSettingsGet( return 200; } +int RemoteSource::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int RemoteSource::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/remotesource/remotesource.h b/plugins/channeltx/remotesource/remotesource.h index 6b3f831f5..0ada09b3c 100644 --- a/plugins/channeltx/remotesource/remotesource.h +++ b/plugins/channeltx/remotesource/remotesource.h @@ -188,6 +188,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/udpsource/udpsource.cpp b/plugins/channeltx/udpsource/udpsource.cpp index f9a96d86f..9068c6526 100644 --- a/plugins/channeltx/udpsource/udpsource.cpp +++ b/plugins/channeltx/udpsource/udpsource.cpp @@ -22,6 +22,7 @@ #include #include "SWGChannelSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelReport.h" #include "SWGUDPSourceReport.h" @@ -340,6 +341,15 @@ int UDPSource::webapiSettingsGet( return 200; } +int UDPSource::webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage) +{ + (void) errorMessage; + response.setIndex(m_settings.m_workspaceIndex); + return 200; +} + int UDPSource::webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/channeltx/udpsource/udpsource.h b/plugins/channeltx/udpsource/udpsource.h index 4a4fe6caf..6bab5cd1e 100644 --- a/plugins/channeltx/udpsource/udpsource.h +++ b/plugins/channeltx/udpsource/udpsource.h @@ -127,6 +127,10 @@ public: SWGSDRangel::SWGChannelSettings& response, QString& errorMessage); + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& response, + QString& errorMessage); + virtual int webapiSettingsPutPatch( bool force, const QStringList& channelSettingsKeys, diff --git a/plugins/feature/afc/afcgui.cpp b/plugins/feature/afc/afcgui.cpp index 413ebc6c4..6d8a1b0de 100644 --- a/plugins/feature/afc/afcgui.cpp +++ b/plugins/feature/afc/afcgui.cpp @@ -55,6 +55,7 @@ bool AFCGUI::deserialize(const QByteArray& data) { if (m_settings.deserialize(data)) { + m_feature->setWorkspaceIndex(m_settings.m_workspaceIndex); displaySettings(); applySettings(true); return true; @@ -139,6 +140,7 @@ AFCGUI::AFCGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, Feature *featur m_doApplySettings(true), m_lastFeatureState(0) { + m_feature = feature; setAttribute(Qt::WA_DeleteOnClose, true); m_helpURL = "plugins/feature/afc/readme.md"; RollupContents *rollupContents = getRollupContents(); @@ -179,6 +181,12 @@ AFCGUI::~AFCGUI() delete ui; } +void AFCGUI::setWorkspaceIndex(int index) +{ + m_settings.m_workspaceIndex = index; + m_feature->setWorkspaceIndex(index); +} + void AFCGUI::blockApplySettings(bool block) { m_doApplySettings = !block; diff --git a/plugins/feature/afc/afcgui.h b/plugins/feature/afc/afcgui.h index 74e1f8bff..fa210aa41 100644 --- a/plugins/feature/afc/afcgui.h +++ b/plugins/feature/afc/afcgui.h @@ -43,7 +43,7 @@ public: QByteArray serialize() const; bool deserialize(const QByteArray& data); virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } - virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; } + virtual void setWorkspaceIndex(int index); virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; } virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; } virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; } diff --git a/plugins/feature/ais/aisgui.cpp b/plugins/feature/ais/aisgui.cpp index b021ccacb..eaa6749c6 100644 --- a/plugins/feature/ais/aisgui.cpp +++ b/plugins/feature/ais/aisgui.cpp @@ -112,6 +112,7 @@ bool AISGUI::deserialize(const QByteArray& data) { if (m_settings.deserialize(data)) { + m_feature->setWorkspaceIndex(m_settings.m_workspaceIndex); displaySettings(); applySettings(true); return true; @@ -189,6 +190,7 @@ AISGUI::AISGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, Feature *featur m_doApplySettings(true), m_lastFeatureState(0) { + m_feature = feature; setAttribute(Qt::WA_DeleteOnClose, true); m_helpURL = "plugins/feature/ais/readme.md"; RollupContents *rollupContents = getRollupContents(); @@ -241,6 +243,12 @@ AISGUI::~AISGUI() delete ui; } +void AISGUI::setWorkspaceIndex(int index) +{ + m_settings.m_workspaceIndex = index; + m_feature->setWorkspaceIndex(index); +} + void AISGUI::blockApplySettings(bool block) { m_doApplySettings = !block; diff --git a/plugins/feature/ais/aisgui.h b/plugins/feature/ais/aisgui.h index 107276ffb..4e30f7d15 100644 --- a/plugins/feature/ais/aisgui.h +++ b/plugins/feature/ais/aisgui.h @@ -57,7 +57,7 @@ public: QByteArray serialize() const; bool deserialize(const QByteArray& data); virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } - virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; } + virtual void setWorkspaceIndex(int index); virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; } virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; } virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; } diff --git a/plugins/feature/antennatools/antennatoolsgui.cpp b/plugins/feature/antennatools/antennatoolsgui.cpp index ff316198c..1b2141062 100644 --- a/plugins/feature/antennatools/antennatoolsgui.cpp +++ b/plugins/feature/antennatools/antennatoolsgui.cpp @@ -59,6 +59,7 @@ bool AntennaToolsGUI::deserialize(const QByteArray& data) { if (m_settings.deserialize(data)) { + m_feature->setWorkspaceIndex(m_settings.m_workspaceIndex); displaySettings(); applySettings(true); return true; @@ -133,6 +134,7 @@ AntennaToolsGUI::AntennaToolsGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISe m_doApplySettings(true), m_deviceSets(0) { + m_feature = feature; setAttribute(Qt::WA_DeleteOnClose, true); m_helpURL = "plugins/feature/antennatools/readme.md"; RollupContents *rollupContents = getRollupContents(); @@ -163,6 +165,12 @@ AntennaToolsGUI::~AntennaToolsGUI() delete ui; } +void AntennaToolsGUI::setWorkspaceIndex(int index) +{ + m_settings.m_workspaceIndex = index; + m_feature->setWorkspaceIndex(index); +} + void AntennaToolsGUI::blockApplySettings(bool block) { m_doApplySettings = !block; diff --git a/plugins/feature/antennatools/antennatoolsgui.h b/plugins/feature/antennatools/antennatoolsgui.h index 72c22905c..431d95785 100644 --- a/plugins/feature/antennatools/antennatoolsgui.h +++ b/plugins/feature/antennatools/antennatoolsgui.h @@ -46,7 +46,7 @@ public: QByteArray serialize() const; bool deserialize(const QByteArray& data); virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } - virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; } + virtual void setWorkspaceIndex(int index); virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; } virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; } virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; } diff --git a/plugins/feature/aprs/aprsgui.cpp b/plugins/feature/aprs/aprsgui.cpp index 906cf23b4..bd2dd5013 100644 --- a/plugins/feature/aprs/aprsgui.cpp +++ b/plugins/feature/aprs/aprsgui.cpp @@ -132,6 +132,7 @@ bool APRSGUI::deserialize(const QByteArray& data) { if (m_settings.deserialize(data)) { + m_feature->setWorkspaceIndex(m_settings.m_workspaceIndex); displaySettings(); applySettings(true); return true; @@ -430,6 +431,7 @@ APRSGUI::APRSGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, Feature *feat m_doApplySettings(true), m_lastFeatureState(0) { + m_feature = feature; setAttribute(Qt::WA_DeleteOnClose, true); m_helpURL = "plugins/feature/aprs/readme.md"; RollupContents *rollupContents = getRollupContents(); @@ -572,6 +574,12 @@ APRSGUI::~APRSGUI() delete ui; } +void APRSGUI::setWorkspaceIndex(int index) +{ + m_settings.m_workspaceIndex = index; + m_feature->setWorkspaceIndex(index); +} + void APRSGUI::blockApplySettings(bool block) { m_doApplySettings = !block; diff --git a/plugins/feature/aprs/aprsgui.h b/plugins/feature/aprs/aprsgui.h index 4b9c67442..fdb730a91 100644 --- a/plugins/feature/aprs/aprsgui.h +++ b/plugins/feature/aprs/aprsgui.h @@ -105,7 +105,7 @@ public: QByteArray serialize() const; bool deserialize(const QByteArray& data); virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } - virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; } + virtual void setWorkspaceIndex(int index); virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; } virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; } virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; } diff --git a/plugins/feature/demodanalyzer/demodanalyzergui.cpp b/plugins/feature/demodanalyzer/demodanalyzergui.cpp index 006176c59..fd6d39bcf 100644 --- a/plugins/feature/demodanalyzer/demodanalyzergui.cpp +++ b/plugins/feature/demodanalyzer/demodanalyzergui.cpp @@ -57,6 +57,7 @@ bool DemodAnalyzerGUI::deserialize(const QByteArray& data) { if (m_settings.deserialize(data)) { + m_feature->setWorkspaceIndex(m_settings.m_workspaceIndex); displaySettings(); applySettings(true); return true; @@ -150,6 +151,7 @@ DemodAnalyzerGUI::DemodAnalyzerGUI(PluginAPI* pluginAPI, FeatureUISet *featureUI m_lastFeatureState(0), m_selectedChannel(nullptr) { + m_feature = feature; setAttribute(Qt::WA_DeleteOnClose, true); m_helpURL = "plugins/feature/demodanalyzer/readme.md"; RollupContents *rollupContents = getRollupContents(); @@ -201,6 +203,12 @@ void DemodAnalyzerGUI::blockApplySettings(bool block) m_doApplySettings = !block; } +void DemodAnalyzerGUI::setWorkspaceIndex(int index) +{ + m_settings.m_workspaceIndex = index; + m_feature->setWorkspaceIndex(index); +} + void DemodAnalyzerGUI::displaySettings() { setTitleColor(m_settings.m_rgbColor); diff --git a/plugins/feature/demodanalyzer/demodanalyzergui.h b/plugins/feature/demodanalyzer/demodanalyzergui.h index d21c0b1c3..84483f668 100644 --- a/plugins/feature/demodanalyzer/demodanalyzergui.h +++ b/plugins/feature/demodanalyzer/demodanalyzergui.h @@ -49,7 +49,7 @@ public: QByteArray serialize() const; bool deserialize(const QByteArray& data); virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } - virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; } + virtual void setWorkspaceIndex(int index); virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; } virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; } virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; } diff --git a/plugins/feature/gs232controller/gs232controllergui.cpp b/plugins/feature/gs232controller/gs232controllergui.cpp index 695083ee2..d9adff147 100644 --- a/plugins/feature/gs232controller/gs232controllergui.cpp +++ b/plugins/feature/gs232controller/gs232controllergui.cpp @@ -60,6 +60,7 @@ bool GS232ControllerGUI::deserialize(const QByteArray& data) { if (m_settings.deserialize(data)) { + m_feature->setWorkspaceIndex(m_settings.m_workspaceIndex); displaySettings(); applySettings(true); return true; @@ -149,6 +150,7 @@ GS232ControllerGUI::GS232ControllerGUI(PluginAPI* pluginAPI, FeatureUISet *featu m_lastFeatureState(0), m_lastOnTarget(false) { + m_feature = feature; setAttribute(Qt::WA_DeleteOnClose, true); m_helpURL = "plugins/feature/gs232controller/readme.md"; RollupContents *rollupContents = getRollupContents(); @@ -183,6 +185,12 @@ GS232ControllerGUI::~GS232ControllerGUI() delete ui; } +void GS232ControllerGUI::setWorkspaceIndex(int index) +{ + m_settings.m_workspaceIndex = index; + m_feature->setWorkspaceIndex(index); +} + void GS232ControllerGUI::blockApplySettings(bool block) { m_doApplySettings = !block; diff --git a/plugins/feature/gs232controller/gs232controllergui.h b/plugins/feature/gs232controller/gs232controllergui.h index f3e2f5b1f..ce3dd8466 100644 --- a/plugins/feature/gs232controller/gs232controllergui.h +++ b/plugins/feature/gs232controller/gs232controllergui.h @@ -45,7 +45,7 @@ public: QByteArray serialize() const; bool deserialize(const QByteArray& data); virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } - virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; } + virtual void setWorkspaceIndex(int index); virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; } virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; } virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; } diff --git a/plugins/feature/jogdialcontroller/jogdialcontrollergui.cpp b/plugins/feature/jogdialcontroller/jogdialcontrollergui.cpp index 1ff5381c6..ece4480c9 100644 --- a/plugins/feature/jogdialcontroller/jogdialcontrollergui.cpp +++ b/plugins/feature/jogdialcontroller/jogdialcontrollergui.cpp @@ -56,6 +56,7 @@ bool JogdialControllerGUI::deserialize(const QByteArray& data) { if (m_settings.deserialize(data)) { + m_feature->setWorkspaceIndex(m_settings.m_workspaceIndex); displaySettings(); applySettings(true); return true; @@ -154,6 +155,7 @@ JogdialControllerGUI::JogdialControllerGUI(PluginAPI* pluginAPI, FeatureUISet *f m_lastFeatureState(0), m_selectedChannel(nullptr) { + m_feature = feature; setAttribute(Qt::WA_DeleteOnClose, true); m_helpURL = "plugins/feature/jogdialcontroller/readme.md"; RollupContents *rollupContents = getRollupContents(); @@ -186,6 +188,12 @@ JogdialControllerGUI::~JogdialControllerGUI() delete ui; } +void JogdialControllerGUI::setWorkspaceIndex(int index) +{ + m_settings.m_workspaceIndex = index; + m_feature->setWorkspaceIndex(index); +} + void JogdialControllerGUI::blockApplySettings(bool block) { m_doApplySettings = !block; diff --git a/plugins/feature/jogdialcontroller/jogdialcontrollergui.h b/plugins/feature/jogdialcontroller/jogdialcontrollergui.h index a93fcf72e..8569190f0 100644 --- a/plugins/feature/jogdialcontroller/jogdialcontrollergui.h +++ b/plugins/feature/jogdialcontroller/jogdialcontrollergui.h @@ -47,7 +47,7 @@ public: QByteArray serialize() const; bool deserialize(const QByteArray& data); virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } - virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; } + virtual void setWorkspaceIndex(int index); virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; } virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; } virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; } diff --git a/plugins/feature/map/mapgui.cpp b/plugins/feature/map/mapgui.cpp index 33aa3073b..56ad80f9e 100644 --- a/plugins/feature/map/mapgui.cpp +++ b/plugins/feature/map/mapgui.cpp @@ -72,6 +72,7 @@ bool MapGUI::deserialize(const QByteArray& data) { if (m_settings.deserialize(data)) { + m_feature->setWorkspaceIndex(m_settings.m_workspaceIndex); displaySettings(); applySettings(true); return true; @@ -190,6 +191,7 @@ MapGUI::MapGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, Feature *featur m_radioTimeDialog(this), m_cesium(nullptr) { + m_feature = feature; setAttribute(Qt::WA_DeleteOnClose, true); m_helpURL = "plugins/feature/map/readme.md"; RollupContents *rollupContents = getRollupContents(); @@ -303,6 +305,12 @@ MapGUI::~MapGUI() delete ui; } +void MapGUI::setWorkspaceIndex(int index) +{ + m_settings.m_workspaceIndex = index; + m_feature->setWorkspaceIndex(index); +} + // Update a map item or image void MapGUI::update(const QObject *source, SWGSDRangel::SWGMapItem *swgMapItem, const QString &group) { diff --git a/plugins/feature/map/mapgui.h b/plugins/feature/map/mapgui.h index 2c5d7f625..4a2d29a2c 100644 --- a/plugins/feature/map/mapgui.h +++ b/plugins/feature/map/mapgui.h @@ -72,7 +72,7 @@ public: QByteArray serialize() const; bool deserialize(const QByteArray& data); virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } - virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; } + virtual void setWorkspaceIndex(int index); virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; } virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; } virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; } diff --git a/plugins/feature/pertester/pertestergui.cpp b/plugins/feature/pertester/pertestergui.cpp index 5458e46bd..3f24c5ca0 100644 --- a/plugins/feature/pertester/pertestergui.cpp +++ b/plugins/feature/pertester/pertestergui.cpp @@ -58,6 +58,7 @@ bool PERTesterGUI::deserialize(const QByteArray& data) { if (m_settings.deserialize(data)) { + m_feature->setWorkspaceIndex(m_settings.m_workspaceIndex); displaySettings(); applySettings(true); return true; @@ -135,6 +136,7 @@ PERTesterGUI::PERTesterGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, Fea m_doApplySettings(true), m_lastFeatureState(0) { + m_feature = feature; setAttribute(Qt::WA_DeleteOnClose, true); m_helpURL = "plugins/feature/pertester/readme.md"; RollupContents *rollupContents = getRollupContents(); @@ -164,6 +166,12 @@ PERTesterGUI::~PERTesterGUI() delete ui; } +void PERTesterGUI::setWorkspaceIndex(int index) +{ + m_settings.m_workspaceIndex = index; + m_feature->setWorkspaceIndex(index); +} + void PERTesterGUI::blockApplySettings(bool block) { m_doApplySettings = !block; diff --git a/plugins/feature/pertester/pertestergui.h b/plugins/feature/pertester/pertestergui.h index 8fc751d79..af3a67bb0 100644 --- a/plugins/feature/pertester/pertestergui.h +++ b/plugins/feature/pertester/pertestergui.h @@ -45,7 +45,7 @@ public: QByteArray serialize() const; bool deserialize(const QByteArray& data); virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } - virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; } + virtual void setWorkspaceIndex(int index); virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; } virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; } virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; } diff --git a/plugins/feature/radiosonde/radiosondegui.cpp b/plugins/feature/radiosonde/radiosondegui.cpp index 8a60dedd2..c4b1af7a6 100644 --- a/plugins/feature/radiosonde/radiosondegui.cpp +++ b/plugins/feature/radiosonde/radiosondegui.cpp @@ -63,6 +63,7 @@ bool RadiosondeGUI::deserialize(const QByteArray& data) { if (m_settings.deserialize(data)) { + m_feature->setWorkspaceIndex(m_settings.m_workspaceIndex); displaySettings(); applySettings(true); return true; @@ -140,6 +141,7 @@ RadiosondeGUI::RadiosondeGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, F m_doApplySettings(true), m_lastFeatureState(0) { + m_feature = feature; setAttribute(Qt::WA_DeleteOnClose, true); m_helpURL = "plugins/feature/radiosonde/readme.md"; RollupContents *rollupContents = getRollupContents(); @@ -203,6 +205,12 @@ RadiosondeGUI::~RadiosondeGUI() delete ui; } +void RadiosondeGUI::setWorkspaceIndex(int index) +{ + m_settings.m_workspaceIndex = index; + m_feature->setWorkspaceIndex(index); +} + void RadiosondeGUI::blockApplySettings(bool block) { m_doApplySettings = !block; diff --git a/plugins/feature/radiosonde/radiosondegui.h b/plugins/feature/radiosonde/radiosondegui.h index c42bd655c..355a9b76d 100644 --- a/plugins/feature/radiosonde/radiosondegui.h +++ b/plugins/feature/radiosonde/radiosondegui.h @@ -74,7 +74,7 @@ public: QByteArray serialize() const; bool deserialize(const QByteArray& data); virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } - virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; } + virtual void setWorkspaceIndex(int index); virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; } virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; } virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; } diff --git a/plugins/feature/rigctlserver/rigctlservergui.cpp b/plugins/feature/rigctlserver/rigctlservergui.cpp index a9f5eef5e..017093c89 100644 --- a/plugins/feature/rigctlserver/rigctlservergui.cpp +++ b/plugins/feature/rigctlserver/rigctlservergui.cpp @@ -48,7 +48,6 @@ void RigCtlServerGUI::resetToDefaults() QByteArray RigCtlServerGUI::serialize() const { - qDebug("RigCtlServerGUI::serialize: %d", m_settings.m_channelIndex); return m_settings.serialize(); } @@ -56,7 +55,7 @@ bool RigCtlServerGUI::deserialize(const QByteArray& data) { if (m_settings.deserialize(data)) { - qDebug("RigCtlServerGUI::deserialize: %d", m_settings.m_channelIndex); + m_feature->setWorkspaceIndex(m_settings.m_workspaceIndex); updateDeviceSetList(); displaySettings(); applySettings(true); @@ -135,6 +134,7 @@ RigCtlServerGUI::RigCtlServerGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISe m_doApplySettings(true), m_lastFeatureState(0) { + m_feature = feature; setAttribute(Qt::WA_DeleteOnClose, true); m_helpURL = "plugins/feature/rigctlserver/readme.md"; RollupContents *rollupContents = getRollupContents(); @@ -165,6 +165,12 @@ RigCtlServerGUI::~RigCtlServerGUI() delete ui; } +void RigCtlServerGUI::setWorkspaceIndex(int index) +{ + m_settings.m_workspaceIndex = index; + m_feature->setWorkspaceIndex(index); +} + void RigCtlServerGUI::blockApplySettings(bool block) { m_doApplySettings = !block; diff --git a/plugins/feature/rigctlserver/rigctlservergui.h b/plugins/feature/rigctlserver/rigctlservergui.h index 922425093..e56c0e941 100644 --- a/plugins/feature/rigctlserver/rigctlservergui.h +++ b/plugins/feature/rigctlserver/rigctlservergui.h @@ -45,7 +45,7 @@ public: QByteArray serialize() const; bool deserialize(const QByteArray& data); virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } - virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; } + virtual void setWorkspaceIndex(int index); virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; } virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; } virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; } diff --git a/plugins/feature/satellitetracker/satellitetrackergui.cpp b/plugins/feature/satellitetracker/satellitetrackergui.cpp index 7be65d894..701490b4f 100644 --- a/plugins/feature/satellitetracker/satellitetrackergui.cpp +++ b/plugins/feature/satellitetracker/satellitetrackergui.cpp @@ -73,6 +73,7 @@ bool SatelliteTrackerGUI::deserialize(const QByteArray& data) { if (m_settings.deserialize(data)) { + m_feature->setWorkspaceIndex(m_settings.m_workspaceIndex); updateSelectedSats(); displaySettings(); qDebug() << " deserialize " << m_settings.m_satellites; @@ -259,6 +260,7 @@ SatelliteTrackerGUI::SatelliteTrackerGUI(PluginAPI* pluginAPI, FeatureUISet *fea m_polarChart(nullptr), m_geostationarySatVisible(false) { + m_feature = feature; setAttribute(Qt::WA_DeleteOnClose, true); m_helpURL = "plugins/feature/satellitetracker/readme.md"; RollupContents *rollupContents = getRollupContents(); @@ -327,6 +329,12 @@ SatelliteTrackerGUI::~SatelliteTrackerGUI() delete ui; } +void SatelliteTrackerGUI::setWorkspaceIndex(int index) +{ + m_settings.m_workspaceIndex = index; + m_feature->setWorkspaceIndex(index); +} + void SatelliteTrackerGUI::blockApplySettings(bool block) { m_doApplySettings = !block; diff --git a/plugins/feature/satellitetracker/satellitetrackergui.h b/plugins/feature/satellitetracker/satellitetrackergui.h index 301333216..f5a058789 100644 --- a/plugins/feature/satellitetracker/satellitetrackergui.h +++ b/plugins/feature/satellitetracker/satellitetrackergui.h @@ -52,7 +52,7 @@ public: QByteArray serialize() const; bool deserialize(const QByteArray& data); virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } - virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; } + virtual void setWorkspaceIndex(int index); virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; } virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; } virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; } diff --git a/plugins/feature/simpleptt/simplepttgui.cpp b/plugins/feature/simpleptt/simplepttgui.cpp index 981662ece..c7bc256b0 100644 --- a/plugins/feature/simpleptt/simplepttgui.cpp +++ b/plugins/feature/simpleptt/simplepttgui.cpp @@ -59,6 +59,7 @@ bool SimplePTTGUI::deserialize(const QByteArray& data) { if (m_settings.deserialize(data)) { + m_feature->setWorkspaceIndex(m_settings.m_workspaceIndex); displaySettings(); applySettings(true); return true; @@ -159,6 +160,7 @@ SimplePTTGUI::SimplePTTGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, Fea m_doApplySettings(true), m_lastFeatureState(0) { + m_feature = feature; setAttribute(Qt::WA_DeleteOnClose, true); m_helpURL = "plugins/feature/simpleptt/readme.md"; RollupContents *rollupContents = getRollupContents(); @@ -199,6 +201,12 @@ SimplePTTGUI::~SimplePTTGUI() delete ui; } +void SimplePTTGUI::setWorkspaceIndex(int index) +{ + m_settings.m_workspaceIndex = index; + m_feature->setWorkspaceIndex(index); +} + void SimplePTTGUI::blockApplySettings(bool block) { m_doApplySettings = !block; diff --git a/plugins/feature/simpleptt/simplepttgui.h b/plugins/feature/simpleptt/simplepttgui.h index bfd10af3f..55a744bf1 100644 --- a/plugins/feature/simpleptt/simplepttgui.h +++ b/plugins/feature/simpleptt/simplepttgui.h @@ -44,7 +44,7 @@ public: QByteArray serialize() const; bool deserialize(const QByteArray& data); virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } - virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; } + virtual void setWorkspaceIndex(int index); virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; } virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; } virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; } diff --git a/plugins/feature/startracker/startrackergui.cpp b/plugins/feature/startracker/startrackergui.cpp index 2807b1c83..b7ee738b4 100644 --- a/plugins/feature/startracker/startrackergui.cpp +++ b/plugins/feature/startracker/startrackergui.cpp @@ -79,6 +79,7 @@ bool StarTrackerGUI::deserialize(const QByteArray& data) { if (m_settings.deserialize(data)) { + m_feature->setWorkspaceIndex(m_settings.m_workspaceIndex); displaySettings(); applySettings(true); return true; @@ -265,6 +266,7 @@ StarTrackerGUI::StarTrackerGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, m_moonRA(0.0), m_moonDec(0.0) { + m_feature = feature; setAttribute(Qt::WA_DeleteOnClose, true); m_helpURL = "plugins/feature/startracker/readme.md"; RollupContents *rollupContents = getRollupContents(); @@ -397,6 +399,12 @@ StarTrackerGUI::~StarTrackerGUI() delete ui; } +void StarTrackerGUI::setWorkspaceIndex(int index) +{ + m_settings.m_workspaceIndex = index; + m_feature->setWorkspaceIndex(index); +} + void StarTrackerGUI::blockApplySettings(bool block) { m_doApplySettings = !block; diff --git a/plugins/feature/startracker/startrackergui.h b/plugins/feature/startracker/startrackergui.h index 689b00b39..c0acf6015 100644 --- a/plugins/feature/startracker/startrackergui.h +++ b/plugins/feature/startracker/startrackergui.h @@ -66,7 +66,7 @@ public: QByteArray serialize() const; bool deserialize(const QByteArray& data); virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } - virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; } + virtual void setWorkspaceIndex(int index); virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; } virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; } virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; } diff --git a/plugins/feature/vorlocalizer/vorlocalizergui.cpp b/plugins/feature/vorlocalizer/vorlocalizergui.cpp index 79a2895e0..7f8811f4a 100644 --- a/plugins/feature/vorlocalizer/vorlocalizergui.cpp +++ b/plugins/feature/vorlocalizer/vorlocalizergui.cpp @@ -515,6 +515,7 @@ bool VORLocalizerGUI::deserialize(const QByteArray& data) { if (m_settings.deserialize(data)) { + m_feature->setWorkspaceIndex(m_settings.m_workspaceIndex); displaySettings(); applySettings(true); return true; @@ -856,6 +857,7 @@ VORLocalizerGUI::VORLocalizerGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISe m_lastFeatureState(0), m_rrSecondsCount(0) { + m_feature = feature; setAttribute(Qt::WA_DeleteOnClose, true); m_helpURL = "plugins/feature/vorlocalizer/readme.md"; RollupContents *rollupContents = getRollupContents(); @@ -975,6 +977,12 @@ VORLocalizerGUI::~VORLocalizerGUI() qDeleteAll(m_vors); } +void VORLocalizerGUI::setWorkspaceIndex(int index) +{ + m_settings.m_workspaceIndex = index; + m_feature->setWorkspaceIndex(index); +} + void VORLocalizerGUI::blockApplySettings(bool block) { m_doApplySettings = !block; diff --git a/plugins/feature/vorlocalizer/vorlocalizergui.h b/plugins/feature/vorlocalizer/vorlocalizergui.h index 20c953f31..d0785a077 100644 --- a/plugins/feature/vorlocalizer/vorlocalizergui.h +++ b/plugins/feature/vorlocalizer/vorlocalizergui.h @@ -213,7 +213,7 @@ public: bool deserialize(const QByteArray& data); virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } void selectVOR(VORGUI *vorGUI, bool selected); - virtual void setWorkspaceIndex(int index) { m_settings.m_workspaceIndex = index; } + virtual void setWorkspaceIndex(int index); virtual int getWorkspaceIndex() const { return m_settings.m_workspaceIndex; } virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; } virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; } diff --git a/plugins/samplemimo/bladerf2mimo/bladerf2mimogui.cpp b/plugins/samplemimo/bladerf2mimo/bladerf2mimogui.cpp index 4513b2bda..4b174c8ce 100644 --- a/plugins/samplemimo/bladerf2mimo/bladerf2mimogui.cpp +++ b/plugins/samplemimo/bladerf2mimo/bladerf2mimogui.cpp @@ -46,7 +46,6 @@ BladeRF2MIMOGui::BladeRF2MIMOGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::BladeRF2MIMOGui), - m_deviceUISet(deviceUISet), m_settings(), m_rxElseTx(true), m_streamIndex(0), @@ -66,6 +65,7 @@ BladeRF2MIMOGui::BladeRF2MIMOGui(DeviceUISet *deviceUISet, QWidget* parent) : m_sampleRateMode(true) { qDebug("BladeRF2MIMOGui::BladeRF2MIMOGui"); + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); ui->setupUi(getContents()); setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); diff --git a/plugins/samplemimo/bladerf2mimo/bladerf2mimogui.h b/plugins/samplemimo/bladerf2mimo/bladerf2mimogui.h index 66627d824..ad0b150be 100644 --- a/plugins/samplemimo/bladerf2mimo/bladerf2mimogui.h +++ b/plugins/samplemimo/bladerf2mimo/bladerf2mimogui.h @@ -51,7 +51,6 @@ protected: private: Ui::BladeRF2MIMOGui* ui; - DeviceUISet* m_deviceUISet; BladeRF2MIMOSettings m_settings; bool m_rxElseTx; //!< Which side is being dealt with int m_streamIndex; //!< Current stream index being dealt with diff --git a/plugins/samplemimo/limesdrmimo/limesdrmimogui.cpp b/plugins/samplemimo/limesdrmimo/limesdrmimogui.cpp index f8c9d1d79..a41cd7d5f 100644 --- a/plugins/samplemimo/limesdrmimo/limesdrmimogui.cpp +++ b/plugins/samplemimo/limesdrmimo/limesdrmimogui.cpp @@ -46,7 +46,6 @@ LimeSDRMIMOGUI::LimeSDRMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::LimeSDRMIMOGUI), - m_deviceUISet(deviceUISet), m_settings(), m_rxElseTx(true), m_streamIndex(0), @@ -68,6 +67,7 @@ LimeSDRMIMOGUI::LimeSDRMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent) : m_sampleRateMode(true) { qDebug("LimeSDRMIMOGUI::LimeSDRMIMOGUI"); + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); ui->setupUi(getContents()); setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); diff --git a/plugins/samplemimo/limesdrmimo/limesdrmimogui.h b/plugins/samplemimo/limesdrmimo/limesdrmimogui.h index 42f0a7845..3b50812d0 100644 --- a/plugins/samplemimo/limesdrmimo/limesdrmimogui.h +++ b/plugins/samplemimo/limesdrmimo/limesdrmimogui.h @@ -51,7 +51,6 @@ protected: private: Ui::LimeSDRMIMOGUI* ui; - DeviceUISet* m_deviceUISet; LimeSDRMIMOSettings m_settings; bool m_rxElseTx; //!< Which side is being dealt with int m_streamIndex; //!< Current stream index being dealt with diff --git a/plugins/samplemimo/metismiso/metismisogui.cpp b/plugins/samplemimo/metismiso/metismisogui.cpp index 1dc7aaf60..b3836f1d7 100644 --- a/plugins/samplemimo/metismiso/metismisogui.cpp +++ b/plugins/samplemimo/metismiso/metismisogui.cpp @@ -43,7 +43,6 @@ MetisMISOGui::MetisMISOGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::MetisMISOGui), - m_deviceUISet(deviceUISet), m_settings(), m_doApplySettings(true), m_forceSettings(true), @@ -52,6 +51,7 @@ MetisMISOGui::MetisMISOGui(DeviceUISet *deviceUISet, QWidget* parent) : m_lastEngineState(DeviceAPI::StNotStarted) { qDebug("MetisMISOGui::MetisMISOGui"); + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_sampleMIMO = m_deviceUISet->m_deviceAPI->getSampleMIMO(); m_rxSampleRate = 48000; diff --git a/plugins/samplemimo/metismiso/metismisogui.h b/plugins/samplemimo/metismiso/metismisogui.h index 5a79f96f2..f22c53ebf 100644 --- a/plugins/samplemimo/metismiso/metismisogui.h +++ b/plugins/samplemimo/metismiso/metismisogui.h @@ -52,7 +52,6 @@ protected: private: Ui::MetisMISOGui* ui; - DeviceUISet* m_deviceUISet; MetisMISOSettings m_settings; int m_rxSampleRate; int m_txSampleRate; diff --git a/plugins/samplemimo/plutosdrmimo/plutosdrmimogui.cpp b/plugins/samplemimo/plutosdrmimo/plutosdrmimogui.cpp index e95a61e65..c47ee554c 100644 --- a/plugins/samplemimo/plutosdrmimo/plutosdrmimogui.cpp +++ b/plugins/samplemimo/plutosdrmimo/plutosdrmimogui.cpp @@ -47,7 +47,6 @@ PlutoSDRMIMOGUI::PlutoSDRMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::PlutoSDRMIMOGUI), - m_deviceUISet(deviceUISet), m_settings(), m_rxElseTx(true), m_streamIndex(0), @@ -68,6 +67,7 @@ PlutoSDRMIMOGUI::PlutoSDRMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent) : m_sampleRateMode(true) { qDebug("PlutoSDRMIMOGui::PlutoSDRMIMOGui"); + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); ui->setupUi(getContents()); setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); diff --git a/plugins/samplemimo/plutosdrmimo/plutosdrmimogui.h b/plugins/samplemimo/plutosdrmimo/plutosdrmimogui.h index 0c32f2c07..e7993c1bb 100644 --- a/plugins/samplemimo/plutosdrmimo/plutosdrmimogui.h +++ b/plugins/samplemimo/plutosdrmimo/plutosdrmimogui.h @@ -51,7 +51,6 @@ protected: private: Ui::PlutoSDRMIMOGUI* ui; - DeviceUISet* m_deviceUISet; PlutoSDRMIMOSettings m_settings; bool m_rxElseTx; //!< Which side is being dealt with int m_streamIndex; //!< Current stream index being dealt with diff --git a/plugins/samplemimo/testmi/testmigui.cpp b/plugins/samplemimo/testmi/testmigui.cpp index 99752212a..cc0d6a4cf 100644 --- a/plugins/samplemimo/testmi/testmigui.cpp +++ b/plugins/samplemimo/testmi/testmigui.cpp @@ -43,7 +43,6 @@ TestMIGui::TestMIGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::TestMIGui), - m_deviceUISet(deviceUISet), m_settings(), m_streamIndex(0), m_spectrumStreamIndex(0), @@ -54,6 +53,7 @@ TestMIGui::TestMIGui(DeviceUISet *deviceUISet, QWidget* parent) : m_lastEngineState(DeviceAPI::StNotStarted) { qDebug("TestMIGui::TestMIGui"); + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_helpURL = "plugins/samplemimo/testmi/readme.md"; ui->setupUi(getContents()); diff --git a/plugins/samplemimo/testmi/testmigui.h b/plugins/samplemimo/testmi/testmigui.h index 0fff5a4f9..41a949014 100644 --- a/plugins/samplemimo/testmi/testmigui.h +++ b/plugins/samplemimo/testmi/testmigui.h @@ -52,7 +52,6 @@ protected: private: Ui::TestMIGui* ui; - DeviceUISet* m_deviceUISet; TestMISettings m_settings; int m_streamIndex; //!< Current stream index being dealt with int m_spectrumStreamIndex; //!< Index of the stream displayed on main spectrum diff --git a/plugins/samplemimo/testmosync/testmosyncgui.cpp b/plugins/samplemimo/testmosync/testmosyncgui.cpp index 764414e2d..1b53e70fe 100644 --- a/plugins/samplemimo/testmosync/testmosyncgui.cpp +++ b/plugins/samplemimo/testmosync/testmosyncgui.cpp @@ -39,7 +39,6 @@ TestMOSyncGui::TestMOSyncGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::TestMOSyncGui), - m_deviceUISet(deviceUISet), m_doApplySettings(true), m_forceSettings(true), m_settings(), @@ -50,6 +49,7 @@ TestMOSyncGui::TestMOSyncGui(DeviceUISet *deviceUISet, QWidget* parent) : m_tickCount(0), m_lastEngineState(DeviceAPI::StNotStarted) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_helpURL = "plugins/samplemimo/testmosync/readme.md"; QWidget *contents = getContents(); diff --git a/plugins/samplemimo/testmosync/testmosyncgui.h b/plugins/samplemimo/testmosync/testmosyncgui.h index 7c712e1af..7815d10ba 100644 --- a/plugins/samplemimo/testmosync/testmosyncgui.h +++ b/plugins/samplemimo/testmosync/testmosyncgui.h @@ -51,7 +51,6 @@ public: private: Ui::TestMOSyncGui* ui; - DeviceUISet* m_deviceUISet; bool m_doApplySettings; bool m_forceSettings; TestMOSyncSettings m_settings; diff --git a/plugins/samplemimo/xtrxmimo/xtrxmimogui.cpp b/plugins/samplemimo/xtrxmimo/xtrxmimogui.cpp index d31c970ea..1f66fa5d0 100644 --- a/plugins/samplemimo/xtrxmimo/xtrxmimogui.cpp +++ b/plugins/samplemimo/xtrxmimo/xtrxmimogui.cpp @@ -44,7 +44,6 @@ XTRXMIMOGUI::XTRXMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::XTRXMIMOGUI), - m_deviceUISet(deviceUISet), m_settings(), m_rxElseTx(true), m_streamIndex(0), @@ -65,6 +64,7 @@ XTRXMIMOGUI::XTRXMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent) : m_sampleRateMode(true) { qDebug("XTRXMIMOGUI::XTRXMIMOGUI"); + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); ui->setupUi(getContents()); setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); diff --git a/plugins/samplemimo/xtrxmimo/xtrxmimogui.h b/plugins/samplemimo/xtrxmimo/xtrxmimogui.h index 9b72ab2a9..913195065 100644 --- a/plugins/samplemimo/xtrxmimo/xtrxmimogui.h +++ b/plugins/samplemimo/xtrxmimo/xtrxmimogui.h @@ -51,7 +51,6 @@ protected: private: Ui::XTRXMIMOGUI* ui; - DeviceUISet* m_deviceUISet; XTRXMIMOSettings m_settings; bool m_rxElseTx; //!< Which side is being dealt with int m_streamIndex; //!< Current stream index being dealt with diff --git a/plugins/samplesink/audiooutput/audiooutputgui.cpp b/plugins/samplesink/audiooutput/audiooutputgui.cpp index cd8c5caf8..f20cfaf19 100644 --- a/plugins/samplesink/audiooutput/audiooutputgui.cpp +++ b/plugins/samplesink/audiooutput/audiooutputgui.cpp @@ -34,12 +34,12 @@ AudioOutputGui::AudioOutputGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::AudioOutputGui), - m_deviceUISet(deviceUISet), m_doApplySettings(true), m_forceSettings(true), m_settings(), m_centerFrequency(0) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_audioOutput = (AudioOutput*) m_deviceUISet->m_deviceAPI->getSampleSink(); diff --git a/plugins/samplesink/audiooutput/audiooutputgui.h b/plugins/samplesink/audiooutput/audiooutputgui.h index 91d74861f..ae38f6dbb 100644 --- a/plugins/samplesink/audiooutput/audiooutputgui.h +++ b/plugins/samplesink/audiooutput/audiooutputgui.h @@ -52,7 +52,6 @@ protected: private: Ui::AudioOutputGui* ui; - DeviceUISet* m_deviceUISet; AudioOutput* m_audioOutput; bool m_doApplySettings; bool m_forceSettings; diff --git a/plugins/samplesink/bladerf1output/bladerf1outputgui.cpp b/plugins/samplesink/bladerf1output/bladerf1outputgui.cpp index bc88fa575..efd1bcfb7 100644 --- a/plugins/samplesink/bladerf1output/bladerf1outputgui.cpp +++ b/plugins/samplesink/bladerf1output/bladerf1outputgui.cpp @@ -34,7 +34,6 @@ Bladerf1OutputGui::Bladerf1OutputGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::Bladerf1OutputGui), - m_deviceUISet(deviceUISet), m_doApplySettings(true), m_forceSettings(true), m_settings(), @@ -43,6 +42,7 @@ Bladerf1OutputGui::Bladerf1OutputGui(DeviceUISet *deviceUISet, QWidget* parent) m_sampleRate(0), m_lastEngineState(DeviceAPI::StNotStarted) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_deviceSampleSink = (Bladerf1Output*) m_deviceUISet->m_deviceAPI->getSampleSink(); diff --git a/plugins/samplesink/bladerf1output/bladerf1outputgui.h b/plugins/samplesink/bladerf1output/bladerf1outputgui.h index 4e0bbecc7..b7689f3f3 100644 --- a/plugins/samplesink/bladerf1output/bladerf1outputgui.h +++ b/plugins/samplesink/bladerf1output/bladerf1outputgui.h @@ -52,7 +52,6 @@ protected: private: Ui::Bladerf1OutputGui* ui; - DeviceUISet* m_deviceUISet; bool m_doApplySettings; bool m_forceSettings; BladeRF1OutputSettings m_settings; diff --git a/plugins/samplesink/bladerf2output/bladerf2outputgui.cpp b/plugins/samplesink/bladerf2output/bladerf2outputgui.cpp index 19377ef2b..8b2fc5bfd 100644 --- a/plugins/samplesink/bladerf2output/bladerf2outputgui.cpp +++ b/plugins/samplesink/bladerf2output/bladerf2outputgui.cpp @@ -35,7 +35,6 @@ BladeRF2OutputGui::BladeRF2OutputGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::BladeRF2OutputGui), - m_deviceUISet(deviceUISet), m_doApplySettings(true), m_forceSettings(true), m_settings(), @@ -43,6 +42,7 @@ BladeRF2OutputGui::BladeRF2OutputGui(DeviceUISet *deviceUISet, QWidget* parent) m_sampleRate(0), m_lastEngineState(DeviceAPI::StNotStarted) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_sampleSink = (BladeRF2Output*) m_deviceUISet->m_deviceAPI->getSampleSink(); int max, min, step; diff --git a/plugins/samplesink/bladerf2output/bladerf2outputgui.h b/plugins/samplesink/bladerf2output/bladerf2outputgui.h index 4f6e6ce21..345754dc3 100644 --- a/plugins/samplesink/bladerf2output/bladerf2outputgui.h +++ b/plugins/samplesink/bladerf2output/bladerf2outputgui.h @@ -53,7 +53,6 @@ protected: private: Ui::BladeRF2OutputGui* ui; - DeviceUISet* m_deviceUISet; bool m_doApplySettings; bool m_forceSettings; BladeRF2OutputSettings m_settings; diff --git a/plugins/samplesink/fileoutput/fileoutputgui.cpp b/plugins/samplesink/fileoutput/fileoutputgui.cpp index 37c443db6..48a93316f 100644 --- a/plugins/samplesink/fileoutput/fileoutputgui.cpp +++ b/plugins/samplesink/fileoutput/fileoutputgui.cpp @@ -41,7 +41,6 @@ FileOutputGui::FileOutputGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::FileOutputGui), - m_deviceUISet(deviceUISet), m_doApplySettings(true), m_forceSettings(true), m_settings(), @@ -53,6 +52,7 @@ FileOutputGui::FileOutputGui(DeviceUISet *deviceUISet, QWidget* parent) : m_tickCount(0), m_lastEngineState(DeviceAPI::StNotStarted) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); ui->setupUi(getContents()); setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); diff --git a/plugins/samplesink/fileoutput/fileoutputgui.h b/plugins/samplesink/fileoutput/fileoutputgui.h index 1ec881108..f7ca4da87 100644 --- a/plugins/samplesink/fileoutput/fileoutputgui.h +++ b/plugins/samplesink/fileoutput/fileoutputgui.h @@ -54,7 +54,6 @@ protected: private: Ui::FileOutputGui* ui; - DeviceUISet* m_deviceUISet; bool m_doApplySettings; bool m_forceSettings; FileOutputSettings m_settings; diff --git a/plugins/samplesink/hackrfoutput/hackrfoutputgui.cpp b/plugins/samplesink/hackrfoutput/hackrfoutputgui.cpp index 1bd613033..b4be2bdb8 100644 --- a/plugins/samplesink/hackrfoutput/hackrfoutputgui.cpp +++ b/plugins/samplesink/hackrfoutput/hackrfoutputgui.cpp @@ -37,7 +37,6 @@ HackRFOutputGui::HackRFOutputGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::HackRFOutputGui), - m_deviceUISet(deviceUISet), m_forceSettings(true), m_settings(), m_sampleRateMode(true), @@ -45,6 +44,7 @@ HackRFOutputGui::HackRFOutputGui(DeviceUISet *deviceUISet, QWidget* parent) : m_lastEngineState(DeviceAPI::StNotStarted), m_doApplySettings(true) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_deviceSampleSink = (HackRFOutput*) m_deviceUISet->m_deviceAPI->getSampleSink(); diff --git a/plugins/samplesink/hackrfoutput/hackrfoutputgui.h b/plugins/samplesink/hackrfoutput/hackrfoutputgui.h index b41fd3f24..0541ff791 100644 --- a/plugins/samplesink/hackrfoutput/hackrfoutputgui.h +++ b/plugins/samplesink/hackrfoutput/hackrfoutputgui.h @@ -62,7 +62,6 @@ protected: private: Ui::HackRFOutputGui* ui; - DeviceUISet* m_deviceUISet; bool m_forceSettings; HackRFOutputSettings m_settings; bool m_sampleRateMode; //!< true: device, false: base band sample rate update mode diff --git a/plugins/samplesink/limesdroutput/limesdroutputgui.cpp b/plugins/samplesink/limesdroutput/limesdroutputgui.cpp index 77c709329..77135e5ae 100644 --- a/plugins/samplesink/limesdroutput/limesdroutputgui.cpp +++ b/plugins/samplesink/limesdroutput/limesdroutputgui.cpp @@ -32,7 +32,6 @@ LimeSDROutputGUI::LimeSDROutputGUI(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::LimeSDROutputGUI), - m_deviceUISet(deviceUISet), m_settings(), m_sampleRateMode(true), m_sampleRate(0), @@ -42,6 +41,7 @@ LimeSDROutputGUI::LimeSDROutputGUI(DeviceUISet *deviceUISet, QWidget* parent) : m_statusCounter(0), m_deviceStatusCounter(0) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_limeSDROutput = (LimeSDROutput*) m_deviceUISet->m_deviceAPI->getSampleSink(); diff --git a/plugins/samplesink/limesdroutput/limesdroutputgui.h b/plugins/samplesink/limesdroutput/limesdroutputgui.h index c67e8e110..71831b414 100644 --- a/plugins/samplesink/limesdroutput/limesdroutputgui.h +++ b/plugins/samplesink/limesdroutput/limesdroutputgui.h @@ -52,7 +52,6 @@ protected: private: Ui::LimeSDROutputGUI* ui; - DeviceUISet* m_deviceUISet; LimeSDROutput* m_limeSDROutput; //!< Same object as above but gives easy access to LimeSDROutput methods and attributes that are used intensively LimeSDROutputSettings m_settings; bool m_sampleRateMode; //!< true: device, false: base band sample rate update mode diff --git a/plugins/samplesink/localoutput/localoutputgui.cpp b/plugins/samplesink/localoutput/localoutputgui.cpp index 7eb1035d8..054c2a1fc 100644 --- a/plugins/samplesink/localoutput/localoutputgui.cpp +++ b/plugins/samplesink/localoutput/localoutputgui.cpp @@ -46,7 +46,6 @@ LocalOutputGui::LocalOutputGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::LocalOutputGui), - m_deviceUISet(deviceUISet), m_settings(), m_sampleSink(0), m_acquisition(false), @@ -58,6 +57,7 @@ LocalOutputGui::LocalOutputGui(DeviceUISet *deviceUISet, QWidget* parent) : m_doApplySettings(true), m_forceSettings(true) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_paletteGreenText.setColor(QPalette::WindowText, Qt::green); m_paletteWhiteText.setColor(QPalette::WindowText, Qt::white); diff --git a/plugins/samplesink/localoutput/localoutputgui.h b/plugins/samplesink/localoutput/localoutputgui.h index d6ec64ede..9c2e46252 100644 --- a/plugins/samplesink/localoutput/localoutputgui.h +++ b/plugins/samplesink/localoutput/localoutputgui.h @@ -53,7 +53,6 @@ protected: private: Ui::LocalOutputGui* ui; - DeviceUISet* m_deviceUISet; LocalOutputSettings m_settings; //!< current settings LocalOutput* m_sampleSink; bool m_acquisition; diff --git a/plugins/samplesink/plutosdroutput/plutosdroutputgui.cpp b/plugins/samplesink/plutosdroutput/plutosdroutputgui.cpp index fff366918..29a4d85b9 100644 --- a/plugins/samplesink/plutosdroutput/plutosdroutputgui.cpp +++ b/plugins/samplesink/plutosdroutput/plutosdroutputgui.cpp @@ -34,7 +34,6 @@ PlutoSDROutputGUI::PlutoSDROutputGUI(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::PlutoSDROutputGUI), - m_deviceUISet(deviceUISet), m_settings(), m_sampleRateMode(true), m_forceSettings(true), @@ -45,6 +44,7 @@ PlutoSDROutputGUI::PlutoSDROutputGUI(DeviceUISet *deviceUISet, QWidget* parent) m_doApplySettings(true), m_statusCounter(0) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_sampleSink = (PlutoSDROutput*) m_deviceUISet->m_deviceAPI->getSampleSink(); diff --git a/plugins/samplesink/plutosdroutput/plutosdroutputgui.h b/plugins/samplesink/plutosdroutput/plutosdroutputgui.h index 50c74d13c..0032780a9 100644 --- a/plugins/samplesink/plutosdroutput/plutosdroutputgui.h +++ b/plugins/samplesink/plutosdroutput/plutosdroutputgui.h @@ -53,7 +53,6 @@ protected: private: Ui::PlutoSDROutputGUI* ui; - DeviceUISet* m_deviceUISet; PlutoSDROutputSettings m_settings; bool m_sampleRateMode; //!< true: device, false: base band sample rate update mode bool m_forceSettings; diff --git a/plugins/samplesink/remoteoutput/remoteoutputgui.cpp b/plugins/samplesink/remoteoutput/remoteoutputgui.cpp index 13c3b809d..8d494378e 100644 --- a/plugins/samplesink/remoteoutput/remoteoutputgui.cpp +++ b/plugins/samplesink/remoteoutput/remoteoutputgui.cpp @@ -44,7 +44,6 @@ RemoteOutputSinkGui::RemoteOutputSinkGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::RemoteOutputGui), - m_deviceUISet(deviceUISet), m_settings(), m_remoteOutput(0), m_deviceCenterFrequency(0), @@ -56,6 +55,7 @@ RemoteOutputSinkGui::RemoteOutputSinkGui(DeviceUISet *deviceUISet, QWidget* pare m_forceSettings(true), m_remoteAPIConnected(false) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_countUnrecoverable = 0; m_countRecovered = 0; diff --git a/plugins/samplesink/remoteoutput/remoteoutputgui.h b/plugins/samplesink/remoteoutput/remoteoutputgui.h index cbf0d522f..77aab4905 100644 --- a/plugins/samplesink/remoteoutput/remoteoutputgui.h +++ b/plugins/samplesink/remoteoutput/remoteoutputgui.h @@ -84,7 +84,6 @@ protected: private: Ui::RemoteOutputGui* ui; - DeviceUISet* m_deviceUISet; RemoteOutputSettings m_settings; //!< current settings RemoteOutputSettings m_controlSettings; //!< settings last sent to device via control port QTimer m_updateTimer; diff --git a/plugins/samplesink/soapysdroutput/soapysdroutputgui.cpp b/plugins/samplesink/soapysdroutput/soapysdroutputgui.cpp index c664ac5bc..ae98737d9 100644 --- a/plugins/samplesink/soapysdroutput/soapysdroutputgui.cpp +++ b/plugins/samplesink/soapysdroutput/soapysdroutputgui.cpp @@ -41,7 +41,6 @@ SoapySDROutputGui::SoapySDROutputGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::SoapySDROutputGui), - m_deviceUISet(deviceUISet), m_forceSettings(true), m_doApplySettings(true), m_sampleSink(0), @@ -57,6 +56,7 @@ SoapySDROutputGui::SoapySDROutputGui(DeviceUISet *deviceUISet, QWidget* parent) m_autoDCCorrection(0), m_autoIQCorrection(0) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_sampleSink = (SoapySDROutput*) m_deviceUISet->m_deviceAPI->getSampleSink(); ui->setupUi(getContents()); diff --git a/plugins/samplesink/soapysdroutput/soapysdroutputgui.h b/plugins/samplesink/soapysdroutput/soapysdroutputgui.h index 1021006cd..258df8362 100644 --- a/plugins/samplesink/soapysdroutput/soapysdroutputgui.h +++ b/plugins/samplesink/soapysdroutput/soapysdroutputgui.h @@ -73,7 +73,6 @@ private: Ui::SoapySDROutputGui* ui; - DeviceUISet* m_deviceUISet; bool m_forceSettings; bool m_doApplySettings; SoapySDROutputSettings m_settings; diff --git a/plugins/samplesink/testsink/testsinkgui.cpp b/plugins/samplesink/testsink/testsinkgui.cpp index ecccbf97c..04b5ffa6f 100644 --- a/plugins/samplesink/testsink/testsinkgui.cpp +++ b/plugins/samplesink/testsink/testsinkgui.cpp @@ -39,7 +39,6 @@ TestSinkGui::TestSinkGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::TestSinkGui), - m_deviceUISet(deviceUISet), m_doApplySettings(true), m_forceSettings(true), m_settings(), @@ -49,6 +48,7 @@ TestSinkGui::TestSinkGui(DeviceUISet *deviceUISet, QWidget* parent) : m_tickCount(0), m_lastEngineState(DeviceAPI::StNotStarted) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_helpURL = "plugins/samplesink/testsink/readme.md"; QWidget *contents = getContents(); diff --git a/plugins/samplesink/testsink/testsinkgui.h b/plugins/samplesink/testsink/testsinkgui.h index 76d7e0a95..8d8b5f1da 100644 --- a/plugins/samplesink/testsink/testsinkgui.h +++ b/plugins/samplesink/testsink/testsinkgui.h @@ -52,7 +52,6 @@ public: private: Ui::TestSinkGui* ui; - DeviceUISet* m_deviceUISet; bool m_doApplySettings; bool m_forceSettings; TestSinkSettings m_settings; diff --git a/plugins/samplesink/usrpoutput/usrpoutputgui.cpp b/plugins/samplesink/usrpoutput/usrpoutputgui.cpp index a67c3eaaa..64bb7fb97 100644 --- a/plugins/samplesink/usrpoutput/usrpoutputgui.cpp +++ b/plugins/samplesink/usrpoutput/usrpoutputgui.cpp @@ -33,7 +33,6 @@ USRPOutputGUI::USRPOutputGUI(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::USRPOutputGUI), - m_deviceUISet(deviceUISet), m_settings(), m_sampleRateMode(true), m_sampleRate(0), @@ -43,6 +42,7 @@ USRPOutputGUI::USRPOutputGUI(DeviceUISet *deviceUISet, QWidget* parent) : m_statusCounter(0), m_deviceStatusCounter(0) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_usrpOutput = (USRPOutput*) m_deviceUISet->m_deviceAPI->getSampleSink(); diff --git a/plugins/samplesink/usrpoutput/usrpoutputgui.h b/plugins/samplesink/usrpoutput/usrpoutputgui.h index 481fd841f..1a7ce6ba6 100644 --- a/plugins/samplesink/usrpoutput/usrpoutputgui.h +++ b/plugins/samplesink/usrpoutput/usrpoutputgui.h @@ -59,7 +59,6 @@ protected: private: Ui::USRPOutputGUI* ui; - DeviceUISet* m_deviceUISet; USRPOutput* m_usrpOutput; //!< Same object as above but gives easy access to USRPOutput methods and attributes that are used intensively USRPOutputSettings m_settings; bool m_sampleRateMode; //!< true: device, false: base band sample rate update mode diff --git a/plugins/samplesink/xtrxoutput/xtrxoutputgui.cpp b/plugins/samplesink/xtrxoutput/xtrxoutputgui.cpp index f5b8a79c2..01ba67f2b 100644 --- a/plugins/samplesink/xtrxoutput/xtrxoutputgui.cpp +++ b/plugins/samplesink/xtrxoutput/xtrxoutputgui.cpp @@ -34,7 +34,6 @@ XTRXOutputGUI::XTRXOutputGUI(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::XTRXOutputGUI), - m_deviceUISet(deviceUISet), m_settings(), m_sampleRateMode(true), m_sampleRate(0), @@ -44,6 +43,7 @@ XTRXOutputGUI::XTRXOutputGUI(DeviceUISet *deviceUISet, QWidget* parent) : m_statusCounter(0), m_deviceStatusCounter(0) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_XTRXOutput = (XTRXOutput*) m_deviceUISet->m_deviceAPI->getSampleSink(); diff --git a/plugins/samplesink/xtrxoutput/xtrxoutputgui.h b/plugins/samplesink/xtrxoutput/xtrxoutputgui.h index 73ff03d7b..cfec0e87e 100644 --- a/plugins/samplesink/xtrxoutput/xtrxoutputgui.h +++ b/plugins/samplesink/xtrxoutput/xtrxoutputgui.h @@ -51,7 +51,6 @@ protected: private: Ui::XTRXOutputGUI* ui; - DeviceUISet* m_deviceUISet; XTRXOutput* m_XTRXOutput; //!< Same object as above but gives easy access to XTRXInput methods and attributes that are used intensively XTRXOutputSettings m_settings; bool m_sampleRateMode; //!< true: device, false: base band sample rate update mode diff --git a/plugins/samplesource/airspy/airspygui.cpp b/plugins/samplesource/airspy/airspygui.cpp index 291563abd..b5a8b7e8b 100644 --- a/plugins/samplesource/airspy/airspygui.cpp +++ b/plugins/samplesource/airspy/airspygui.cpp @@ -37,13 +37,13 @@ AirspyGui::AirspyGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::AirspyGui), - m_deviceUISet(deviceUISet), m_doApplySettings(true), m_forceSettings(true), m_settings(), m_sampleSource(0), m_lastEngineState(DeviceAPI::StNotStarted) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_sampleSource = (AirspyInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); diff --git a/plugins/samplesource/airspy/airspygui.h b/plugins/samplesource/airspy/airspygui.h index cc8151b50..2f7de1f48 100644 --- a/plugins/samplesource/airspy/airspygui.h +++ b/plugins/samplesource/airspy/airspygui.h @@ -54,7 +54,6 @@ protected: private: Ui::AirspyGui* ui; - DeviceUISet* m_deviceUISet; bool m_doApplySettings; bool m_forceSettings; AirspySettings m_settings; diff --git a/plugins/samplesource/airspyhf/airspyhfgui.cpp b/plugins/samplesource/airspyhf/airspyhfgui.cpp index 6a0803b75..a056e7ae0 100644 --- a/plugins/samplesource/airspyhf/airspyhfgui.cpp +++ b/plugins/samplesource/airspyhf/airspyhfgui.cpp @@ -36,13 +36,13 @@ AirspyHFGui::AirspyHFGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::AirspyHFGui), - m_deviceUISet(deviceUISet), m_doApplySettings(true), m_forceSettings(true), m_settings(), m_sampleSource(0), m_lastEngineState(DeviceAPI::StNotStarted) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_sampleSource = (AirspyHFInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); diff --git a/plugins/samplesource/airspyhf/airspyhfgui.h b/plugins/samplesource/airspyhf/airspyhfgui.h index 238003e29..d02356f5a 100644 --- a/plugins/samplesource/airspyhf/airspyhfgui.h +++ b/plugins/samplesource/airspyhf/airspyhfgui.h @@ -55,7 +55,6 @@ protected: private: Ui::AirspyHFGui* ui; - DeviceUISet* m_deviceUISet; bool m_doApplySettings; bool m_forceSettings; AirspyHFSettings m_settings; diff --git a/plugins/samplesource/audioinput/audioinputgui.cpp b/plugins/samplesource/audioinput/audioinputgui.cpp index 273a5050e..71544fe44 100644 --- a/plugins/samplesource/audioinput/audioinputgui.cpp +++ b/plugins/samplesource/audioinput/audioinputgui.cpp @@ -34,12 +34,12 @@ AudioInputGui::AudioInputGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::AudioInputGui), - m_deviceUISet(deviceUISet), m_forceSettings(true), m_settings(), m_sampleSource(nullptr), m_centerFrequency(0) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_sampleSource = (AudioInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); diff --git a/plugins/samplesource/audioinput/audioinputgui.h b/plugins/samplesource/audioinput/audioinputgui.h index a11d90cae..fd50166f4 100644 --- a/plugins/samplesource/audioinput/audioinputgui.h +++ b/plugins/samplesource/audioinput/audioinputgui.h @@ -53,7 +53,6 @@ protected: private: Ui::AudioInputGui* ui; - DeviceUISet* m_deviceUISet; bool m_doApplySettings; bool m_forceSettings; AudioInputSettings m_settings; diff --git a/plugins/samplesource/bladerf1input/bladerf1inputgui.cpp b/plugins/samplesource/bladerf1input/bladerf1inputgui.cpp index 17c948c0d..e5fadcdbd 100644 --- a/plugins/samplesource/bladerf1input/bladerf1inputgui.cpp +++ b/plugins/samplesource/bladerf1input/bladerf1inputgui.cpp @@ -36,7 +36,6 @@ Bladerf1InputGui::Bladerf1InputGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::Bladerf1InputGui), - m_deviceUISet(deviceUISet), m_forceSettings(true), m_doApplySettings(true), m_settings(), @@ -45,6 +44,7 @@ Bladerf1InputGui::Bladerf1InputGui(DeviceUISet *deviceUISet, QWidget* parent) : m_sampleRate(0), m_lastEngineState(DeviceAPI::StNotStarted) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_sampleSource = (Bladerf1Input*) m_deviceUISet->m_deviceAPI->getSampleSource(); diff --git a/plugins/samplesource/bladerf1input/bladerf1inputgui.h b/plugins/samplesource/bladerf1input/bladerf1inputgui.h index 9202e42f2..106afe231 100644 --- a/plugins/samplesource/bladerf1input/bladerf1inputgui.h +++ b/plugins/samplesource/bladerf1input/bladerf1inputgui.h @@ -48,7 +48,6 @@ public: private: Ui::Bladerf1InputGui* ui; - DeviceUISet* m_deviceUISet; bool m_forceSettings; bool m_doApplySettings; BladeRF1InputSettings m_settings; diff --git a/plugins/samplesource/bladerf2input/bladerf2inputgui.cpp b/plugins/samplesource/bladerf2input/bladerf2inputgui.cpp index fea4b1505..6511b955f 100644 --- a/plugins/samplesource/bladerf2input/bladerf2inputgui.cpp +++ b/plugins/samplesource/bladerf2input/bladerf2inputgui.cpp @@ -36,7 +36,6 @@ BladeRF2InputGui::BladeRF2InputGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::Bladerf2InputGui), - m_deviceUISet(deviceUISet), m_forceSettings(true), m_doApplySettings(true), m_settings(), @@ -45,6 +44,7 @@ BladeRF2InputGui::BladeRF2InputGui(DeviceUISet *deviceUISet, QWidget* parent) : m_sampleRate(0), m_lastEngineState(DeviceAPI::StNotStarted) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_sampleSource = (BladeRF2Input*) m_deviceUISet->m_deviceAPI->getSampleSource(); int max, min, step; diff --git a/plugins/samplesource/bladerf2input/bladerf2inputgui.h b/plugins/samplesource/bladerf2input/bladerf2inputgui.h index 45c842676..517e21f3e 100644 --- a/plugins/samplesource/bladerf2input/bladerf2inputgui.h +++ b/plugins/samplesource/bladerf2input/bladerf2inputgui.h @@ -48,7 +48,6 @@ public: private: Ui::Bladerf2InputGui* ui; - DeviceUISet* m_deviceUISet; bool m_forceSettings; bool m_doApplySettings; BladeRF2InputSettings m_settings; diff --git a/plugins/samplesource/fcdpro/fcdprogui.cpp b/plugins/samplesource/fcdpro/fcdprogui.cpp index 692165e14..5aa11fd48 100644 --- a/plugins/samplesource/fcdpro/fcdprogui.cpp +++ b/plugins/samplesource/fcdpro/fcdprogui.cpp @@ -35,12 +35,12 @@ FCDProGui::FCDProGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::FCDProGui), - m_deviceUISet(deviceUISet), m_forceSettings(true), m_settings(), m_sampleSource(NULL), m_lastEngineState(DeviceAPI::StNotStarted) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_sampleSource = (FCDProInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); diff --git a/plugins/samplesource/fcdpro/fcdprogui.h b/plugins/samplesource/fcdpro/fcdprogui.h index 717d0a588..83ebe7b7f 100644 --- a/plugins/samplesource/fcdpro/fcdprogui.h +++ b/plugins/samplesource/fcdpro/fcdprogui.h @@ -49,7 +49,6 @@ public: private: Ui::FCDProGui* ui; - DeviceUISet* m_deviceUISet; bool m_doApplySettings; bool m_forceSettings; FCDProSettings m_settings; diff --git a/plugins/samplesource/fcdproplus/fcdproplusgui.cpp b/plugins/samplesource/fcdproplus/fcdproplusgui.cpp index 76d3f6737..8040b546e 100644 --- a/plugins/samplesource/fcdproplus/fcdproplusgui.cpp +++ b/plugins/samplesource/fcdproplus/fcdproplusgui.cpp @@ -36,12 +36,12 @@ FCDProPlusGui::FCDProPlusGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::FCDProPlusGui), - m_deviceUISet(deviceUISet), m_forceSettings(true), m_settings(), m_sampleSource(NULL), m_lastEngineState(DeviceAPI::StNotStarted) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_sampleSource = (FCDProPlusInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); diff --git a/plugins/samplesource/fcdproplus/fcdproplusgui.h b/plugins/samplesource/fcdproplus/fcdproplusgui.h index 317c0ab0b..9cbae0f75 100644 --- a/plugins/samplesource/fcdproplus/fcdproplusgui.h +++ b/plugins/samplesource/fcdproplus/fcdproplusgui.h @@ -48,7 +48,6 @@ public: private: Ui::FCDProPlusGui* ui; - DeviceUISet* m_deviceUISet; bool m_doApplySettings; bool m_forceSettings; FCDProPlusSettings m_settings; diff --git a/plugins/samplesource/fileinput/fileinputgui.cpp b/plugins/samplesource/fileinput/fileinputgui.cpp index e59153aeb..4e0d95d7e 100644 --- a/plugins/samplesource/fileinput/fileinputgui.cpp +++ b/plugins/samplesource/fileinput/fileinputgui.cpp @@ -41,7 +41,6 @@ FileInputGUI::FileInputGUI(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::FileInputGUI), - m_deviceUISet(deviceUISet), m_settings(), m_doApplySettings(true), m_sampleSource(0), @@ -55,6 +54,7 @@ FileInputGUI::FileInputGUI(DeviceUISet *deviceUISet, QWidget* parent) : m_enableNavTime(false), m_lastEngineState(DeviceAPI::StNotStarted) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); ui->setupUi(getContents()); setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); diff --git a/plugins/samplesource/fileinput/fileinputgui.h b/plugins/samplesource/fileinput/fileinputgui.h index 43a7d49ac..78dc0b338 100644 --- a/plugins/samplesource/fileinput/fileinputgui.h +++ b/plugins/samplesource/fileinput/fileinputgui.h @@ -53,7 +53,6 @@ protected: private: Ui::FileInputGUI* ui; - DeviceUISet* m_deviceUISet; FileInputSettings m_settings; bool m_doApplySettings; QTimer m_statusTimer; diff --git a/plugins/samplesource/hackrfinput/hackrfinputgui.cpp b/plugins/samplesource/hackrfinput/hackrfinputgui.cpp index a692cbce5..9f0c04c44 100644 --- a/plugins/samplesource/hackrfinput/hackrfinputgui.cpp +++ b/plugins/samplesource/hackrfinput/hackrfinputgui.cpp @@ -38,7 +38,6 @@ HackRFInputGui::HackRFInputGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::HackRFInputGui), - m_deviceUISet(deviceUISet), m_settings(), m_sampleRateMode(true), m_forceSettings(true), @@ -46,6 +45,7 @@ HackRFInputGui::HackRFInputGui(DeviceUISet *deviceUISet, QWidget* parent) : m_sampleSource(NULL), m_lastEngineState(DeviceAPI::StNotStarted) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_sampleSource = (HackRFInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); diff --git a/plugins/samplesource/hackrfinput/hackrfinputgui.h b/plugins/samplesource/hackrfinput/hackrfinputgui.h index c9840a3b5..74e293a0f 100644 --- a/plugins/samplesource/hackrfinput/hackrfinputgui.h +++ b/plugins/samplesource/hackrfinput/hackrfinputgui.h @@ -61,7 +61,6 @@ protected: private: Ui::HackRFInputGui* ui; - DeviceUISet* m_deviceUISet; HackRFInputSettings m_settings; bool m_sampleRateMode; //!< true: device, false: base band sample rate update mode bool m_forceSettings; diff --git a/plugins/samplesource/kiwisdr/kiwisdrgui.cpp b/plugins/samplesource/kiwisdr/kiwisdrgui.cpp index 2ca20b58f..231e11c1b 100644 --- a/plugins/samplesource/kiwisdr/kiwisdrgui.cpp +++ b/plugins/samplesource/kiwisdr/kiwisdrgui.cpp @@ -43,7 +43,6 @@ KiwiSDRGui::KiwiSDRGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::KiwiSDRGui), - m_deviceUISet(deviceUISet), m_settings(), m_doApplySettings(true), m_forceSettings(true), @@ -52,6 +51,7 @@ KiwiSDRGui::KiwiSDRGui(DeviceUISet *deviceUISet, QWidget* parent) : m_lastEngineState(DeviceAPI::StNotStarted) { qDebug("KiwiSDRGui::KiwiSDRGui"); + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_sampleSource = m_deviceUISet->m_deviceAPI->getSampleSource(); diff --git a/plugins/samplesource/kiwisdr/kiwisdrgui.h b/plugins/samplesource/kiwisdr/kiwisdrgui.h index 90ebe736a..385426c7c 100644 --- a/plugins/samplesource/kiwisdr/kiwisdrgui.h +++ b/plugins/samplesource/kiwisdr/kiwisdrgui.h @@ -53,7 +53,6 @@ protected: private: Ui::KiwiSDRGui* ui; - DeviceUISet* m_deviceUISet; KiwiSDRSettings m_settings; QTimer m_updateTimer; QTimer m_statusTimer; diff --git a/plugins/samplesource/limesdrinput/limesdrinputgui.cpp b/plugins/samplesource/limesdrinput/limesdrinputgui.cpp index 0a8c5ea4e..7d71754ef 100644 --- a/plugins/samplesource/limesdrinput/limesdrinputgui.cpp +++ b/plugins/samplesource/limesdrinput/limesdrinputgui.cpp @@ -36,7 +36,6 @@ LimeSDRInputGUI::LimeSDRInputGUI(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::LimeSDRInputGUI), - m_deviceUISet(deviceUISet), m_settings(), m_sampleRateMode(true), m_sampleRate(0), @@ -46,6 +45,7 @@ LimeSDRInputGUI::LimeSDRInputGUI(DeviceUISet *deviceUISet, QWidget* parent) : m_statusCounter(0), m_deviceStatusCounter(0) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_limeSDRInput = (LimeSDRInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); diff --git a/plugins/samplesource/limesdrinput/limesdrinputgui.h b/plugins/samplesource/limesdrinput/limesdrinputgui.h index eac7ce41e..401f334cb 100644 --- a/plugins/samplesource/limesdrinput/limesdrinputgui.h +++ b/plugins/samplesource/limesdrinput/limesdrinputgui.h @@ -51,7 +51,6 @@ protected: private: Ui::LimeSDRInputGUI* ui; - DeviceUISet* m_deviceUISet; LimeSDRInput* m_limeSDRInput; //!< Same object as above but gives easy access to LimeSDRInput methods and attributes that are used intensively LimeSDRInputSettings m_settings; bool m_sampleRateMode; //!< true: device, false: base band sample rate update mode diff --git a/plugins/samplesource/localinput/localinputgui.cpp b/plugins/samplesource/localinput/localinputgui.cpp index c7d087c6d..9eb721982 100644 --- a/plugins/samplesource/localinput/localinputgui.cpp +++ b/plugins/samplesource/localinput/localinputgui.cpp @@ -47,7 +47,6 @@ LocalInputGui::LocalInputGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::LocalInputGui), - m_deviceUISet(deviceUISet), m_settings(), m_sampleSource(0), m_acquisition(false), @@ -70,6 +69,7 @@ LocalInputGui::LocalInputGui(DeviceUISet *deviceUISet, QWidget* parent) : m_doApplySettings(true), m_forceSettings(true) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_paletteGreenText.setColor(QPalette::WindowText, Qt::green); m_paletteWhiteText.setColor(QPalette::WindowText, Qt::white); diff --git a/plugins/samplesource/localinput/localinputgui.h b/plugins/samplesource/localinput/localinputgui.h index dfa8a25bd..11ef79cc8 100644 --- a/plugins/samplesource/localinput/localinputgui.h +++ b/plugins/samplesource/localinput/localinputgui.h @@ -53,7 +53,6 @@ protected: private: Ui::LocalInputGui* ui; - DeviceUISet* m_deviceUISet; LocalInputSettings m_settings; //!< current settings LocalInput* m_sampleSource; bool m_acquisition; diff --git a/plugins/samplesource/perseus/perseusgui.cpp b/plugins/samplesource/perseus/perseusgui.cpp index 917d12a76..d4d951ee8 100644 --- a/plugins/samplesource/perseus/perseusgui.cpp +++ b/plugins/samplesource/perseus/perseusgui.cpp @@ -34,13 +34,13 @@ PerseusGui::PerseusGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::PerseusGui), - m_deviceUISet(deviceUISet), m_doApplySettings(true), m_forceSettings(true), m_settings(), m_sampleSource(0), m_lastEngineState(DeviceAPI::StNotStarted) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_sampleSource = (PerseusInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); diff --git a/plugins/samplesource/perseus/perseusgui.h b/plugins/samplesource/perseus/perseusgui.h index dc3273258..4298b6992 100644 --- a/plugins/samplesource/perseus/perseusgui.h +++ b/plugins/samplesource/perseus/perseusgui.h @@ -54,7 +54,6 @@ protected: private: Ui::PerseusGui* ui; - DeviceUISet* m_deviceUISet; bool m_doApplySettings; bool m_forceSettings; PerseusSettings m_settings; diff --git a/plugins/samplesource/plutosdrinput/plutosdrinputgui.cpp b/plugins/samplesource/plutosdrinput/plutosdrinputgui.cpp index 01cc68dda..8ea5458c8 100644 --- a/plugins/samplesource/plutosdrinput/plutosdrinputgui.cpp +++ b/plugins/samplesource/plutosdrinput/plutosdrinputgui.cpp @@ -35,7 +35,6 @@ PlutoSDRInputGui::PlutoSDRInputGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::PlutoSDRInputGUI), - m_deviceUISet(deviceUISet), m_settings(), m_sampleRateMode(true), m_forceSettings(true), @@ -46,6 +45,7 @@ PlutoSDRInputGui::PlutoSDRInputGui(DeviceUISet *deviceUISet, QWidget* parent) : m_doApplySettings(true), m_statusCounter(0) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_sampleSource = (PlutoSDRInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); diff --git a/plugins/samplesource/plutosdrinput/plutosdrinputgui.h b/plugins/samplesource/plutosdrinput/plutosdrinputgui.h index 878b30db4..6a0841295 100644 --- a/plugins/samplesource/plutosdrinput/plutosdrinputgui.h +++ b/plugins/samplesource/plutosdrinput/plutosdrinputgui.h @@ -53,7 +53,6 @@ protected: private: Ui::PlutoSDRInputGUI* ui; - DeviceUISet* m_deviceUISet; PlutoSDRInputSettings m_settings; bool m_sampleRateMode; //!< true: device, false: base band sample rate update mode bool m_forceSettings; diff --git a/plugins/samplesource/remoteinput/remoteinputgui.cpp b/plugins/samplesource/remoteinput/remoteinputgui.cpp index 99022c146..289427346 100644 --- a/plugins/samplesource/remoteinput/remoteinputgui.cpp +++ b/plugins/samplesource/remoteinput/remoteinputgui.cpp @@ -44,7 +44,6 @@ RemoteInputGui::RemoteInputGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::RemoteInputGui), - m_deviceUISet(deviceUISet), m_settings(), m_sampleSource(0), m_acquisition(false), @@ -67,6 +66,7 @@ RemoteInputGui::RemoteInputGui(DeviceUISet *deviceUISet, QWidget* parent) : m_doApplySettings(true), m_forceSettings(true) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_paletteGreenText.setColor(QPalette::WindowText, Qt::green); m_paletteWhiteText.setColor(QPalette::WindowText, Qt::white); diff --git a/plugins/samplesource/remoteinput/remoteinputgui.h b/plugins/samplesource/remoteinput/remoteinputgui.h index e9f8013c5..d6266ceda 100644 --- a/plugins/samplesource/remoteinput/remoteinputgui.h +++ b/plugins/samplesource/remoteinput/remoteinputgui.h @@ -55,7 +55,6 @@ protected: private: Ui::RemoteInputGui* ui; - DeviceUISet* m_deviceUISet; RemoteInputSettings m_settings; //!< current settings RemoteInput::RemoteChannelSettings m_remoteChannelSettings; double m_remoteShiftFrequencyFactor; //!< Remote channel frequency shift factor diff --git a/plugins/samplesource/rtlsdr/rtlsdrgui.cpp b/plugins/samplesource/rtlsdr/rtlsdrgui.cpp index 37b273e2b..5118993f9 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrgui.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrgui.cpp @@ -35,7 +35,6 @@ RTLSDRGui::RTLSDRGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::RTLSDRGui), - m_deviceUISet(deviceUISet), m_doApplySettings(true), m_forceSettings(true), m_settings(), @@ -43,6 +42,7 @@ RTLSDRGui::RTLSDRGui(DeviceUISet *deviceUISet, QWidget* parent) : m_sampleSource(0), m_lastEngineState(DeviceAPI::StNotStarted) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_sampleSource = (RTLSDRInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); diff --git a/plugins/samplesource/rtlsdr/rtlsdrgui.h b/plugins/samplesource/rtlsdr/rtlsdrgui.h index 29cf1470c..09a26f3cd 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrgui.h +++ b/plugins/samplesource/rtlsdr/rtlsdrgui.h @@ -53,7 +53,6 @@ protected: private: Ui::RTLSDRGui* ui; - DeviceUISet* m_deviceUISet; bool m_doApplySettings; bool m_forceSettings; RTLSDRSettings m_settings; diff --git a/plugins/samplesource/sdrplay/sdrplaygui.cpp b/plugins/samplesource/sdrplay/sdrplaygui.cpp index dd8ce5172..df6ec645a 100644 --- a/plugins/samplesource/sdrplay/sdrplaygui.cpp +++ b/plugins/samplesource/sdrplay/sdrplaygui.cpp @@ -36,10 +36,10 @@ SDRPlayGui::SDRPlayGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::SDRPlayGui), - m_deviceUISet(deviceUISet), m_doApplySettings(true), m_forceSettings(true) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_sampleSource = (SDRPlayInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); diff --git a/plugins/samplesource/sdrplay/sdrplaygui.h b/plugins/samplesource/sdrplay/sdrplaygui.h index 6e9196c22..0ffa73f46 100644 --- a/plugins/samplesource/sdrplay/sdrplaygui.h +++ b/plugins/samplesource/sdrplay/sdrplaygui.h @@ -53,7 +53,6 @@ protected: private: Ui::SDRPlayGui* ui; - DeviceUISet* m_deviceUISet; bool m_doApplySettings; bool m_forceSettings; SDRPlaySettings m_settings; diff --git a/plugins/samplesource/sdrplayv3/sdrplayv3gui.cpp b/plugins/samplesource/sdrplayv3/sdrplayv3gui.cpp index a66991a7b..c057ab815 100644 --- a/plugins/samplesource/sdrplayv3/sdrplayv3gui.cpp +++ b/plugins/samplesource/sdrplayv3/sdrplayv3gui.cpp @@ -36,10 +36,10 @@ SDRPlayV3Gui::SDRPlayV3Gui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::SDRPlayV3Gui), - m_deviceUISet(deviceUISet), m_doApplySettings(true), m_forceSettings(true) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_sdrPlayV3Input = (SDRPlayV3Input*) m_deviceUISet->m_deviceAPI->getSampleSource(); diff --git a/plugins/samplesource/sdrplayv3/sdrplayv3gui.h b/plugins/samplesource/sdrplayv3/sdrplayv3gui.h index 59fe97011..fc16fd029 100644 --- a/plugins/samplesource/sdrplayv3/sdrplayv3gui.h +++ b/plugins/samplesource/sdrplayv3/sdrplayv3gui.h @@ -53,7 +53,6 @@ protected: private: Ui::SDRPlayV3Gui* ui; - DeviceUISet* m_deviceUISet; bool m_doApplySettings; bool m_forceSettings; SDRPlayV3Settings m_settings; diff --git a/plugins/samplesource/sigmffileinput/sigmffileinputgui.cpp b/plugins/samplesource/sigmffileinput/sigmffileinputgui.cpp index 343585106..2970f6227 100644 --- a/plugins/samplesource/sigmffileinput/sigmffileinputgui.cpp +++ b/plugins/samplesource/sigmffileinput/sigmffileinputgui.cpp @@ -43,7 +43,6 @@ SigMFFileInputGUI::SigMFFileInputGUI(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::SigMFFileInputGUI), - m_deviceUISet(deviceUISet), m_settings(), m_currentTrackIndex(0), m_doApplySettings(true), @@ -61,6 +60,7 @@ SigMFFileInputGUI::SigMFFileInputGUI(DeviceUISet *deviceUISet, QWidget* parent) m_enableFullNavTime(false), m_lastEngineState(DeviceAPI::StNotStarted) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_helpURL = "plugins/samplesource/sigmffileinput/readme.md"; QWidget *contents = getContents(); diff --git a/plugins/samplesource/sigmffileinput/sigmffileinputgui.h b/plugins/samplesource/sigmffileinput/sigmffileinputgui.h index 381ad5ea9..b2a72848e 100644 --- a/plugins/samplesource/sigmffileinput/sigmffileinputgui.h +++ b/plugins/samplesource/sigmffileinput/sigmffileinputgui.h @@ -50,7 +50,6 @@ public: private: Ui::SigMFFileInputGUI* ui; - DeviceUISet* m_deviceUISet; SigMFFileInputSettings m_settings; int m_currentTrackIndex; bool m_doApplySettings; diff --git a/plugins/samplesource/soapysdrinput/soapysdrinputgui.cpp b/plugins/samplesource/soapysdrinput/soapysdrinputgui.cpp index ecade848c..d8f074d48 100644 --- a/plugins/samplesource/soapysdrinput/soapysdrinputgui.cpp +++ b/plugins/samplesource/soapysdrinput/soapysdrinputgui.cpp @@ -42,7 +42,6 @@ SoapySDRInputGui::SoapySDRInputGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::SoapySDRInputGui), - m_deviceUISet(deviceUISet), m_forceSettings(true), m_doApplySettings(true), m_sampleSource(0), @@ -59,6 +58,7 @@ SoapySDRInputGui::SoapySDRInputGui(DeviceUISet *deviceUISet, QWidget* parent) : m_autoDCCorrection(0), m_autoIQCorrection(0) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_sampleSource = (SoapySDRInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); ui->setupUi(getContents()); diff --git a/plugins/samplesource/soapysdrinput/soapysdrinputgui.h b/plugins/samplesource/soapysdrinput/soapysdrinputgui.h index 0f896a921..b21db63b7 100644 --- a/plugins/samplesource/soapysdrinput/soapysdrinputgui.h +++ b/plugins/samplesource/soapysdrinput/soapysdrinputgui.h @@ -71,7 +71,6 @@ private: Ui::SoapySDRInputGui* ui; - DeviceUISet* m_deviceUISet; bool m_forceSettings; bool m_doApplySettings; SoapySDRInputSettings m_settings; diff --git a/plugins/samplesource/testsource/testsourcegui.cpp b/plugins/samplesource/testsource/testsourcegui.cpp index dda83fc7d..404546566 100644 --- a/plugins/samplesource/testsource/testsourcegui.cpp +++ b/plugins/samplesource/testsource/testsourcegui.cpp @@ -42,7 +42,6 @@ TestSourceGui::TestSourceGui(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::TestSourceGui), - m_deviceUISet(deviceUISet), m_settings(), m_doApplySettings(true), m_forceSettings(true), @@ -51,6 +50,7 @@ TestSourceGui::TestSourceGui(DeviceUISet *deviceUISet, QWidget* parent) : m_lastEngineState(DeviceAPI::StNotStarted) { qDebug("TestSourceGui::TestSourceGui"); + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_sampleSource = m_deviceUISet->m_deviceAPI->getSampleSource(); diff --git a/plugins/samplesource/testsource/testsourcegui.h b/plugins/samplesource/testsource/testsourcegui.h index 01473a90b..ead209b5d 100644 --- a/plugins/samplesource/testsource/testsourcegui.h +++ b/plugins/samplesource/testsource/testsourcegui.h @@ -52,7 +52,6 @@ protected: private: Ui::TestSourceGui* ui; - DeviceUISet* m_deviceUISet; TestSourceSettings m_settings; QTimer m_updateTimer; QTimer m_statusTimer; diff --git a/plugins/samplesource/usrpinput/usrpinputgui.cpp b/plugins/samplesource/usrpinput/usrpinputgui.cpp index 5b7830843..39a085e8d 100644 --- a/plugins/samplesource/usrpinput/usrpinputgui.cpp +++ b/plugins/samplesource/usrpinput/usrpinputgui.cpp @@ -37,7 +37,6 @@ USRPInputGUI::USRPInputGUI(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::USRPInputGUI), - m_deviceUISet(deviceUISet), m_settings(), m_sampleRateMode(true), m_sampleRate(0), @@ -47,6 +46,7 @@ USRPInputGUI::USRPInputGUI(DeviceUISet *deviceUISet, QWidget* parent) : m_statusCounter(0), m_deviceStatusCounter(0) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_usrpInput = (USRPInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); diff --git a/plugins/samplesource/usrpinput/usrpinputgui.h b/plugins/samplesource/usrpinput/usrpinputgui.h index 9749ccd9c..84aa4e271 100644 --- a/plugins/samplesource/usrpinput/usrpinputgui.h +++ b/plugins/samplesource/usrpinput/usrpinputgui.h @@ -57,7 +57,6 @@ protected: private: Ui::USRPInputGUI* ui; - DeviceUISet* m_deviceUISet; USRPInput* m_usrpInput; //!< Same object as above but gives easy access to USRPInput methods and attributes that are used intensively USRPInputSettings m_settings; bool m_sampleRateMode; //!< true: device, false: base band sample rate update mode diff --git a/plugins/samplesource/xtrxinput/xtrxinputgui.cpp b/plugins/samplesource/xtrxinput/xtrxinputgui.cpp index 2a137e6db..35ad4668d 100644 --- a/plugins/samplesource/xtrxinput/xtrxinputgui.cpp +++ b/plugins/samplesource/xtrxinput/xtrxinputgui.cpp @@ -37,7 +37,6 @@ XTRXInputGUI::XTRXInputGUI(DeviceUISet *deviceUISet, QWidget* parent) : DeviceGUI(parent), ui(new Ui::XTRXInputGUI), - m_deviceUISet(deviceUISet), m_settings(), m_sampleRateMode(true), m_sampleRate(0), @@ -47,6 +46,7 @@ XTRXInputGUI::XTRXInputGUI(DeviceUISet *deviceUISet, QWidget* parent) : m_statusCounter(0), m_deviceStatusCounter(0) { + m_deviceUISet = deviceUISet; setAttribute(Qt::WA_DeleteOnClose, true); m_XTRXInput = (XTRXInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); diff --git a/plugins/samplesource/xtrxinput/xtrxinputgui.h b/plugins/samplesource/xtrxinput/xtrxinputgui.h index 72862c5c6..5973d816c 100644 --- a/plugins/samplesource/xtrxinput/xtrxinputgui.h +++ b/plugins/samplesource/xtrxinput/xtrxinputgui.h @@ -52,7 +52,6 @@ protected: private: Ui::XTRXInputGUI* ui; - DeviceUISet* m_deviceUISet; XTRXInput* m_XTRXInput; //!< Same object as above but gives easy access to XTRXInput methods and attributes that are used intensively XTRXInputSettings m_settings; bool m_sampleRateMode; //!< true: device, false: base band sample rate update mode diff --git a/sdrbase/channel/channelapi.h b/sdrbase/channel/channelapi.h index b7168d1b8..8bdb4a9d0 100644 --- a/sdrbase/channel/channelapi.h +++ b/sdrbase/channel/channelapi.h @@ -37,6 +37,7 @@ namespace SWGSDRangel class SWGChannelSettings; class SWGChannelReport; class SWGChannelActions; + class SWGWorkspaceInfo; } class SDRBASE_API ChannelAPI : public QObject { @@ -121,6 +122,17 @@ public: errorMessage = "Not implemented"; return 501; } + /** + * API adapter for the channel UI workspace GET requests + */ + virtual int webapiWorkspaceGet( + SWGSDRangel::SWGWorkspaceInfo& query, + QString& errorMessage) + { + (void) query; + errorMessage = "Not implemented"; return 501; + } + int getIndexInDeviceSet() const { return m_indexInDeviceSet; } void setIndexInDeviceSet(int indexInDeviceSet) diff --git a/sdrbase/device/deviceapi.cpp b/sdrbase/device/deviceapi.cpp index 813d243d3..e6da31bae 100644 --- a/sdrbase/device/deviceapi.cpp +++ b/sdrbase/device/deviceapi.cpp @@ -44,6 +44,7 @@ DeviceAPI::DeviceAPI( m_pluginInterface(nullptr), m_masterTimer(DSPEngine::instance()->getMasterTimer()), m_samplingDeviceSequence(0), + m_workspaceIndex(0), m_buddySharedPtr(nullptr), m_isBuddyLeader(false), m_deviceSourceEngine(deviceSourceEngine), diff --git a/sdrbase/device/deviceapi.h b/sdrbase/device/deviceapi.h index 630ee0ee0..f2477b10b 100644 --- a/sdrbase/device/deviceapi.h +++ b/sdrbase/device/deviceapi.h @@ -117,6 +117,9 @@ public: uint32_t getSamplingDeviceSequence() const { return m_samplingDeviceSequence; } const QString& getHardwareUserArguments() const { return m_hardwareUserArguments; } + void setWorkspaceIndex(int index) { m_workspaceIndex = index; } + int getWorkspaceIndex() const { return m_workspaceIndex; } + void setDeviceNbItems(uint32_t nbItems); void setDeviceItemIndex(uint32_t index); uint32_t getDeviceNbItems() const { return m_deviceNbItems; } @@ -183,6 +186,7 @@ protected: QString m_samplingDeviceDisplayName; //!< The human readable name identifying this instance uint32_t m_samplingDeviceSequence; //!< The device sequence. >0 when more than one device of the same type is connected QString m_hardwareUserArguments; //!< User given arguments to be used at hardware level i.e. for the hardware device and device sequence + int m_workspaceIndex; //!< Used only by the GUI but accessible via web API // Buddies (single Rx or single Tx) diff --git a/sdrbase/dsp/spectrumvis.h b/sdrbase/dsp/spectrumvis.h index 9fab52eab..e214062a3 100644 --- a/sdrbase/dsp/spectrumvis.h +++ b/sdrbase/dsp/spectrumvis.h @@ -139,6 +139,8 @@ public: virtual ~SpectrumVis(); void setGLSpectrum(GLSpectrumInterface* glSpectrum) { m_glSpectrum = glSpectrum; } + void setWorkspaceIndex(int index) { m_workspaceIndex = index; } + int getWorkspaceIndex() const { return m_workspaceIndex; } void setScalef(Real scalef); void configureWSSpectrum(const QString& address, uint16_t port); @@ -211,6 +213,7 @@ private: FFTEngine* m_fft; FFTWindow m_window; unsigned int m_fftEngineSequence; + int m_workspaceIndex; std::vector m_fftBuffer; std::vector m_powerSpectrum; //!< displayable power spectrum diff --git a/sdrbase/feature/feature.h b/sdrbase/feature/feature.h index 7f04633cc..0529b3846 100644 --- a/sdrbase/feature/feature.h +++ b/sdrbase/feature/feature.h @@ -150,6 +150,8 @@ public: MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; } //!< Get the queue for asynchronous inbound communication void setMessageQueueToGUI(MessageQueue *queue) { m_guiMessageQueue = queue; } MessageQueue *getMessageQueueToGUI() { return m_guiMessageQueue; } + void setWorkspaceIndex(int index) { m_workspaceIndex = index; } + int getWorkspaceIndex() const { return m_workspaceIndex; } protected: MessageQueue m_inputMessageQueue; @@ -169,6 +171,7 @@ private: QString m_uri; //!< Unique non modifiable identifier attached to channel type uint64_t m_uid; int m_indexInFeatureSet; + int m_workspaceIndex; signals: void indexInFeatureSetChanged(int index); diff --git a/sdrbase/maincore.cpp b/sdrbase/maincore.cpp index 47db34a50..242faa779 100644 --- a/sdrbase/maincore.cpp +++ b/sdrbase/maincore.cpp @@ -57,6 +57,10 @@ MESSAGE_CLASS_DEFINITION(MainCore::MsgChannelReport, Message) MESSAGE_CLASS_DEFINITION(MainCore::MsgChannelSettings, Message) MESSAGE_CLASS_DEFINITION(MainCore::MsgChannelDemodReport, Message) MESSAGE_CLASS_DEFINITION(MainCore::MsgChannelDemodQuery, Message) +MESSAGE_CLASS_DEFINITION(MainCore::MsgMoveDeviceUIToWorkspace, Message) +MESSAGE_CLASS_DEFINITION(MainCore::MsgMoveMainSpectrumUIToWorkspace, Message) +MESSAGE_CLASS_DEFINITION(MainCore::MsgMoveFeatureUIToWorkspace, Message) +MESSAGE_CLASS_DEFINITION(MainCore::MsgMoveChannelUIToWorkspace, Message) MESSAGE_CLASS_DEFINITION(MainCore::MsgMapItem, Message) MESSAGE_CLASS_DEFINITION(MainCore::MsgPacket, Message) MESSAGE_CLASS_DEFINITION(MainCore::MsgTargetAzimuthElevation, Message) diff --git a/sdrbase/maincore.h b/sdrbase/maincore.h index 0bf3324cc..18b29e7a0 100644 --- a/sdrbase/maincore.h +++ b/sdrbase/maincore.h @@ -640,6 +640,97 @@ public: { } }; + class SDRBASE_API MsgMoveDeviceUIToWorkspace : public Message { + MESSAGE_CLASS_DECLARATION + + public: + int getDeviceSetIndex() const { return m_deviceSetIndex; } + int getWorkspaceIndex() const { return m_workspaceIndex; } + + static MsgMoveDeviceUIToWorkspace* create(int deviceSetIndex, int workspceIndex) { + return new MsgMoveDeviceUIToWorkspace(deviceSetIndex, workspceIndex); + } + + private: + int m_deviceSetIndex; + int m_workspaceIndex; + + MsgMoveDeviceUIToWorkspace(int deviceSetIndex, int workspceIndex) : + Message(), + m_deviceSetIndex(deviceSetIndex), + m_workspaceIndex(workspceIndex) + { } + }; + + class SDRBASE_API MsgMoveMainSpectrumUIToWorkspace : public Message { + MESSAGE_CLASS_DECLARATION + + public: + int getDeviceSetIndex() const { return m_deviceSetIndex; } + int getWorkspaceIndex() const { return m_workspaceIndex; } + + static MsgMoveMainSpectrumUIToWorkspace* create(int deviceSetIndex, int workspceIndex) { + return new MsgMoveMainSpectrumUIToWorkspace(deviceSetIndex, workspceIndex); + } + + private: + int m_deviceSetIndex; + int m_workspaceIndex; + + MsgMoveMainSpectrumUIToWorkspace(int deviceSetIndex, int workspceIndex) : + Message(), + m_deviceSetIndex(deviceSetIndex), + m_workspaceIndex(workspceIndex) + { } + }; + + class SDRBASE_API MsgMoveFeatureUIToWorkspace : public Message { + MESSAGE_CLASS_DECLARATION + + public: + int getFeatureIndex() const { return m_featureIndex; } + int getWorkspaceIndex() const { return m_workspaceIndex; } + + static MsgMoveFeatureUIToWorkspace* create(int featureIndex, int workspceIndex) { + return new MsgMoveFeatureUIToWorkspace(featureIndex, workspceIndex); + } + + private: + int m_featureIndex; + int m_workspaceIndex; + + MsgMoveFeatureUIToWorkspace(int featureIndex, int workspceIndex) : + Message(), + m_featureIndex(featureIndex), + m_workspaceIndex(workspceIndex) + { } + }; + + class SDRBASE_API MsgMoveChannelUIToWorkspace : public Message { + MESSAGE_CLASS_DECLARATION + + public: + int getDeviceSetIndex() const { return m_deviceSetIndex; } + int getChannelIndex() const { return m_channelIndex; } + int getWorkspaceIndex() const { return m_workspaceIndex; } + + static MsgMoveChannelUIToWorkspace* create(int deviceSetIndex, int channelIndex, int workspceIndex) { + return new MsgMoveChannelUIToWorkspace(deviceSetIndex, channelIndex, workspceIndex); + } + + private: + int m_deviceSetIndex; + int m_channelIndex; + int m_workspaceIndex; + + MsgMoveChannelUIToWorkspace(int deviceSetIndex, int channelIndex, int workspceIndex) : + Message(), + m_deviceSetIndex(deviceSetIndex), + m_channelIndex(channelIndex), + m_workspaceIndex(workspceIndex) + { } + }; + // Message to Map feature to display an item on the map class SDRBASE_API MsgMapItem : public Message { MESSAGE_CLASS_DECLARATION diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index b685023c3..ef261f77e 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -14039,6 +14039,16 @@ margin-bottom: 20px; } }, "description" : "WFMMod" +}; + defs.WorkspaceInfo = { + "required" : [ "index" ], + "properties" : { + "index" : { + "type" : "integer", + "description" : "index of workspace in the list of workspaces" + } + }, + "description" : "Workspace information" }; defs.XtrxInputReport = { "properties" : { @@ -14491,6 +14501,12 @@ margin-bottom: 20px;
  • devicesetChannelSettingsPut
  • +
  • + devicesetChannelWorkspaceGet +
  • +
  • + devicesetChannelWorkspacePut +
  • devicesetChannelsReportGet
  • @@ -14530,6 +14546,12 @@ margin-bottom: 20px;
  • devicesetDeviceSubsystemRunPost
  • +
  • + devicesetDeviceWorkspaceGet +
  • +
  • + devicesetDeviceWorkspacePut +
  • devicesetFocusPatch
  • @@ -14554,6 +14576,12 @@ margin-bottom: 20px;
  • devicesetSpectrumSettingsPut
  • +
  • + devicesetSpectrumWorkspaceGet +
  • +
  • + devicesetSpectrumWorkspacePut +
  • instanceDeviceSetDelete
  • @@ -14591,6 +14619,12 @@ margin-bottom: 20px;
  • featuresetFeatureSettingsPatch
  • +
  • + featuresetFeatureWorkspaceGet +
  • +
  • + featuresetFeatureWorkspacePut +
  • featuresetGet
  • @@ -18427,6 +18461,960 @@ $(document).ready(function() {
    +
    +
    +
    +

    devicesetChannelWorkspaceGet

    +

    +
    +
    +
    +

    +

    get channel UI workspace information (GUI)

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/workspace
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X GET "http://localhost/sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/workspace"
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.DeviceSetApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        Integer channelIndex = 56; // Integer | Index of the channel in the channels list for this device set
    +        try {
    +            WorkspaceInfo result = apiInstance.devicesetChannelWorkspaceGet(deviceSetIndex, channelIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetChannelWorkspaceGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.DeviceSetApi;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        Integer channelIndex = 56; // Integer | Index of the channel in the channels list for this device set
    +        try {
    +            WorkspaceInfo result = apiInstance.devicesetChannelWorkspaceGet(deviceSetIndex, channelIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetChannelWorkspaceGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +Integer *channelIndex = 56; // Index of the channel in the channels list for this device set
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetChannelWorkspaceGetWith:deviceSetIndex
    +    channelIndex:channelIndex
    +              completionHandler: ^(WorkspaceInfo output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.DeviceSetApi()
    +
    +var deviceSetIndex = 56; // {Integer} Index of device set in the device set list
    +
    +var channelIndex = 56; // {Integer} Index of the channel in the channels list for this device set
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.devicesetChannelWorkspaceGet(deviceSetIndex, channelIndex, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetChannelWorkspaceGetExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +            var channelIndex = 56;  // Integer | Index of the channel in the channels list for this device set
    +
    +            try
    +            {
    +                WorkspaceInfo result = apiInstance.devicesetChannelWorkspaceGet(deviceSetIndex, channelIndex);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetChannelWorkspaceGet: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\DeviceSetApi();
    +$deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +$channelIndex = 56; // Integer | Index of the channel in the channels list for this device set
    +
    +try {
    +    $result = $api_instance->devicesetChannelWorkspaceGet($deviceSetIndex, $channelIndex);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetChannelWorkspaceGet: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::DeviceSetApi;
    +
    +my $api_instance = SWGSDRangel::DeviceSetApi->new();
    +my $deviceSetIndex = 56; # Integer | Index of device set in the device set list
    +my $channelIndex = 56; # Integer | Index of the channel in the channels list for this device set
    +
    +eval { 
    +    my $result = $api_instance->devicesetChannelWorkspaceGet(deviceSetIndex => $deviceSetIndex, channelIndex => $channelIndex);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetChannelWorkspaceGet: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_sdrangel
    +from swagger_sdrangel.rest import ApiException
    +from pprint import pprint
    +
    +# create an instance of the API class
    +api_instance = swagger_sdrangel.DeviceSetApi()
    +deviceSetIndex = 56 # Integer | Index of device set in the device set list
    +channelIndex = 56 # Integer | Index of the channel in the channels list for this device set
    +
    +try: 
    +    api_response = api_instance.deviceset_channel_workspace_get(deviceSetIndex, channelIndex)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetChannelWorkspaceGet: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + + + + + +
    NameDescription
    deviceSetIndex* + + +
    +
    +
    + + Integer + + +
    + Index of device set in the device set list +
    +
    +
    + Required +
    +
    +
    +
    channelIndex* + + +
    +
    +
    + + Integer + + +
    + Index of the channel in the channels list for this device set +
    +
    +
    + Required +
    +
    +
    +
    + + + + + +

    Responses

    +

    Status: 200 - On success return workspace information

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 400 - Invalid device set index

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 500 - Error

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +

    devicesetChannelWorkspacePut

    +

    +
    +
    +
    +

    +

    move channel UI to workspace (GUI)

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/workspace
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PUT "http://localhost/sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/workspace"
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.DeviceSetApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        Integer channelIndex = 56; // Integer | Index of the channel in the channels list for this device set
    +        WorkspaceInfo body = ; // WorkspaceInfo | Destination workspace information
    +        try {
    +            SuccessResponse result = apiInstance.devicesetChannelWorkspacePut(deviceSetIndex, channelIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetChannelWorkspacePut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.DeviceSetApi;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        Integer channelIndex = 56; // Integer | Index of the channel in the channels list for this device set
    +        WorkspaceInfo body = ; // WorkspaceInfo | Destination workspace information
    +        try {
    +            SuccessResponse result = apiInstance.devicesetChannelWorkspacePut(deviceSetIndex, channelIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetChannelWorkspacePut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +Integer *channelIndex = 56; // Index of the channel in the channels list for this device set
    +WorkspaceInfo *body = ; // Destination workspace information
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetChannelWorkspacePutWith:deviceSetIndex
    +    channelIndex:channelIndex
    +    body:body
    +              completionHandler: ^(SuccessResponse output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.DeviceSetApi()
    +
    +var deviceSetIndex = 56; // {Integer} Index of device set in the device set list
    +
    +var channelIndex = 56; // {Integer} Index of the channel in the channels list for this device set
    +
    +var body = ; // {WorkspaceInfo} Destination workspace information
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.devicesetChannelWorkspacePut(deviceSetIndex, channelIndex, body, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetChannelWorkspacePutExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +            var channelIndex = 56;  // Integer | Index of the channel in the channels list for this device set
    +            var body = new WorkspaceInfo(); // WorkspaceInfo | Destination workspace information
    +
    +            try
    +            {
    +                SuccessResponse result = apiInstance.devicesetChannelWorkspacePut(deviceSetIndex, channelIndex, body);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetChannelWorkspacePut: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\DeviceSetApi();
    +$deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +$channelIndex = 56; // Integer | Index of the channel in the channels list for this device set
    +$body = ; // WorkspaceInfo | Destination workspace information
    +
    +try {
    +    $result = $api_instance->devicesetChannelWorkspacePut($deviceSetIndex, $channelIndex, $body);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetChannelWorkspacePut: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::DeviceSetApi;
    +
    +my $api_instance = SWGSDRangel::DeviceSetApi->new();
    +my $deviceSetIndex = 56; # Integer | Index of device set in the device set list
    +my $channelIndex = 56; # Integer | Index of the channel in the channels list for this device set
    +my $body = SWGSDRangel::Object::WorkspaceInfo->new(); # WorkspaceInfo | Destination workspace information
    +
    +eval { 
    +    my $result = $api_instance->devicesetChannelWorkspacePut(deviceSetIndex => $deviceSetIndex, channelIndex => $channelIndex, body => $body);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetChannelWorkspacePut: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_sdrangel
    +from swagger_sdrangel.rest import ApiException
    +from pprint import pprint
    +
    +# create an instance of the API class
    +api_instance = swagger_sdrangel.DeviceSetApi()
    +deviceSetIndex = 56 # Integer | Index of device set in the device set list
    +channelIndex = 56 # Integer | Index of the channel in the channels list for this device set
    +body =  # WorkspaceInfo | Destination workspace information
    +
    +try: 
    +    api_response = api_instance.deviceset_channel_workspace_put(deviceSetIndex, channelIndex, body)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetChannelWorkspacePut: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + + + + + +
    NameDescription
    deviceSetIndex* + + +
    +
    +
    + + Integer + + +
    + Index of device set in the device set list +
    +
    +
    + Required +
    +
    +
    +
    channelIndex* + + +
    +
    +
    + + Integer + + +
    + Index of the channel in the channels list for this device set +
    +
    +
    + Required +
    +
    +
    +
    + + +
    Body parameters
    + + + + + + + + + +
    NameDescription
    body * + + + +
    +
    + + + +

    Responses

    +

    Status: 202 - Message to perform action was sent successfully

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 400 - Invalid device set or workspace index

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 500 - Error

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    @@ -19696,7 +20684,7 @@ $(document).ready(function() {

    Responses

    -

    Status: 202 - On successful semdomg of the message it returns the details of the device being set

    +

    Status: 202 - On successful semding of the message it returns the details of the device being set

    + +
    + + +

    Status: 400 - Invalid device set index

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 500 - Error

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +

    devicesetDeviceWorkspacePut

    +

    +
    +
    +
    +

    +

    move device UI to workspace (GUI)

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/device/workspace
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PUT "http://localhost/sdrangel/deviceset/{deviceSetIndex}/device/workspace"
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.DeviceSetApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        WorkspaceInfo body = ; // WorkspaceInfo | Destination workspace information
    +        try {
    +            SuccessResponse result = apiInstance.devicesetDeviceWorkspacePut(deviceSetIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetDeviceWorkspacePut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.DeviceSetApi;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        WorkspaceInfo body = ; // WorkspaceInfo | Destination workspace information
    +        try {
    +            SuccessResponse result = apiInstance.devicesetDeviceWorkspacePut(deviceSetIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetDeviceWorkspacePut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +WorkspaceInfo *body = ; // Destination workspace information
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetDeviceWorkspacePutWith:deviceSetIndex
    +    body:body
    +              completionHandler: ^(SuccessResponse output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.DeviceSetApi()
    +
    +var deviceSetIndex = 56; // {Integer} Index of device set in the device set list
    +
    +var body = ; // {WorkspaceInfo} Destination workspace information
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.devicesetDeviceWorkspacePut(deviceSetIndex, body, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetDeviceWorkspacePutExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +            var body = new WorkspaceInfo(); // WorkspaceInfo | Destination workspace information
    +
    +            try
    +            {
    +                SuccessResponse result = apiInstance.devicesetDeviceWorkspacePut(deviceSetIndex, body);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetDeviceWorkspacePut: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\DeviceSetApi();
    +$deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +$body = ; // WorkspaceInfo | Destination workspace information
    +
    +try {
    +    $result = $api_instance->devicesetDeviceWorkspacePut($deviceSetIndex, $body);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetDeviceWorkspacePut: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::DeviceSetApi;
    +
    +my $api_instance = SWGSDRangel::DeviceSetApi->new();
    +my $deviceSetIndex = 56; # Integer | Index of device set in the device set list
    +my $body = SWGSDRangel::Object::WorkspaceInfo->new(); # WorkspaceInfo | Destination workspace information
    +
    +eval { 
    +    my $result = $api_instance->devicesetDeviceWorkspacePut(deviceSetIndex => $deviceSetIndex, body => $body);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetDeviceWorkspacePut: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_sdrangel
    +from swagger_sdrangel.rest import ApiException
    +from pprint import pprint
    +
    +# create an instance of the API class
    +api_instance = swagger_sdrangel.DeviceSetApi()
    +deviceSetIndex = 56 # Integer | Index of device set in the device set list
    +body =  # WorkspaceInfo | Destination workspace information
    +
    +try: 
    +    api_response = api_instance.deviceset_device_workspace_put(deviceSetIndex, body)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetDeviceWorkspacePut: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    deviceSetIndex* + + +
    +
    +
    + + Integer + + +
    + Index of device set in the device set list +
    +
    +
    + Required +
    +
    +
    +
    + + +
    Body parameters
    + + + + + + + + + +
    NameDescription
    body * + + + +
    +
    + + + +

    Responses

    +

    Status: 202 - Message to perform action was sent successfully

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 400 - Invalid device set or workspace index

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 500 - Error

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    @@ -28387,6 +30263,894 @@ $(document).ready(function() {

    +
    +
    +
    +

    devicesetSpectrumWorkspaceGet

    +

    +
    +
    +
    +

    +

    Get main spectrum UI workspace information (GUI)

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/spectrum/workspace
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X GET "http://localhost/sdrangel/deviceset/{deviceSetIndex}/spectrum/workspace"
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.DeviceSetApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        try {
    +            WorkspaceInfo result = apiInstance.devicesetSpectrumWorkspaceGet(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumWorkspaceGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.DeviceSetApi;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        try {
    +            WorkspaceInfo result = apiInstance.devicesetSpectrumWorkspaceGet(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumWorkspaceGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetSpectrumWorkspaceGetWith:deviceSetIndex
    +              completionHandler: ^(WorkspaceInfo output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.DeviceSetApi()
    +
    +var deviceSetIndex = 56; // {Integer} Index of device set in the device set list
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.devicesetSpectrumWorkspaceGet(deviceSetIndex, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetSpectrumWorkspaceGetExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +
    +            try
    +            {
    +                WorkspaceInfo result = apiInstance.devicesetSpectrumWorkspaceGet(deviceSetIndex);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetSpectrumWorkspaceGet: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\DeviceSetApi();
    +$deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +
    +try {
    +    $result = $api_instance->devicesetSpectrumWorkspaceGet($deviceSetIndex);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetSpectrumWorkspaceGet: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::DeviceSetApi;
    +
    +my $api_instance = SWGSDRangel::DeviceSetApi->new();
    +my $deviceSetIndex = 56; # Integer | Index of device set in the device set list
    +
    +eval { 
    +    my $result = $api_instance->devicesetSpectrumWorkspaceGet(deviceSetIndex => $deviceSetIndex);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetSpectrumWorkspaceGet: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_sdrangel
    +from swagger_sdrangel.rest import ApiException
    +from pprint import pprint
    +
    +# create an instance of the API class
    +api_instance = swagger_sdrangel.DeviceSetApi()
    +deviceSetIndex = 56 # Integer | Index of device set in the device set list
    +
    +try: 
    +    api_response = api_instance.deviceset_spectrum_workspace_get(deviceSetIndex)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetSpectrumWorkspaceGet: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    deviceSetIndex* + + +
    +
    +
    + + Integer + + +
    + Index of device set in the device set list +
    +
    +
    + Required +
    +
    +
    +
    + + + + + +

    Responses

    +

    Status: 200 - On success return main spectrum UI workspace index

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 404 - Invalid index

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 500 - Error

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +

    devicesetSpectrumWorkspacePut

    +

    +
    +
    +
    +

    +

    move main spectrum UI to workspace (GUI)

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/spectrum/workspace
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PUT "http://localhost/sdrangel/deviceset/{deviceSetIndex}/spectrum/workspace"
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.DeviceSetApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        WorkspaceInfo body = ; // WorkspaceInfo | Destination workspace information
    +        try {
    +            SuccessResponse result = apiInstance.devicesetSpectrumWorkspacePut(deviceSetIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumWorkspacePut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.DeviceSetApi;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        WorkspaceInfo body = ; // WorkspaceInfo | Destination workspace information
    +        try {
    +            SuccessResponse result = apiInstance.devicesetSpectrumWorkspacePut(deviceSetIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumWorkspacePut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +WorkspaceInfo *body = ; // Destination workspace information
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetSpectrumWorkspacePutWith:deviceSetIndex
    +    body:body
    +              completionHandler: ^(SuccessResponse output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.DeviceSetApi()
    +
    +var deviceSetIndex = 56; // {Integer} Index of device set in the device set list
    +
    +var body = ; // {WorkspaceInfo} Destination workspace information
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.devicesetSpectrumWorkspacePut(deviceSetIndex, body, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetSpectrumWorkspacePutExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +            var body = new WorkspaceInfo(); // WorkspaceInfo | Destination workspace information
    +
    +            try
    +            {
    +                SuccessResponse result = apiInstance.devicesetSpectrumWorkspacePut(deviceSetIndex, body);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetSpectrumWorkspacePut: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\DeviceSetApi();
    +$deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +$body = ; // WorkspaceInfo | Destination workspace information
    +
    +try {
    +    $result = $api_instance->devicesetSpectrumWorkspacePut($deviceSetIndex, $body);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetSpectrumWorkspacePut: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::DeviceSetApi;
    +
    +my $api_instance = SWGSDRangel::DeviceSetApi->new();
    +my $deviceSetIndex = 56; # Integer | Index of device set in the device set list
    +my $body = SWGSDRangel::Object::WorkspaceInfo->new(); # WorkspaceInfo | Destination workspace information
    +
    +eval { 
    +    my $result = $api_instance->devicesetSpectrumWorkspacePut(deviceSetIndex => $deviceSetIndex, body => $body);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetSpectrumWorkspacePut: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_sdrangel
    +from swagger_sdrangel.rest import ApiException
    +from pprint import pprint
    +
    +# create an instance of the API class
    +api_instance = swagger_sdrangel.DeviceSetApi()
    +deviceSetIndex = 56 # Integer | Index of device set in the device set list
    +body =  # WorkspaceInfo | Destination workspace information
    +
    +try: 
    +    api_response = api_instance.deviceset_spectrum_workspace_put(deviceSetIndex, body)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetSpectrumWorkspacePut: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    deviceSetIndex* + + +
    +
    +
    + + Integer + + +
    + Index of device set in the device set list +
    +
    +
    + Required +
    +
    +
    +
    + + +
    Body parameters
    + + + + + + + + + +
    NameDescription
    body * + + + +
    +
    + + + +

    Responses

    +

    Status: 202 - Message to perform action was sent successfully

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 400 - Invalid device set or workspace index

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 500 - Error

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    @@ -33790,6 +36554,894 @@ $(document).ready(function() {

    +
    +
    +
    +

    featuresetFeatureWorkspaceGet

    +

    +
    +
    +
    +

    +

    get feature UI workspace information (GUI)

    +

    +
    +
    /sdrangel/featureset/feature/{featureIndex}/workspace
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X GET "http://localhost/sdrangel/featureset/feature/{featureIndex}/workspace"
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.FeatureSetApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class FeatureSetApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        FeatureSetApi apiInstance = new FeatureSetApi();
    +        Integer featureIndex = 56; // Integer | Index of feature in the feature set
    +        try {
    +            WorkspaceInfo result = apiInstance.featuresetFeatureWorkspaceGet(featureIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling FeatureSetApi#featuresetFeatureWorkspaceGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.FeatureSetApi;
    +
    +public class FeatureSetApiExample {
    +
    +    public static void main(String[] args) {
    +        FeatureSetApi apiInstance = new FeatureSetApi();
    +        Integer featureIndex = 56; // Integer | Index of feature in the feature set
    +        try {
    +            WorkspaceInfo result = apiInstance.featuresetFeatureWorkspaceGet(featureIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling FeatureSetApi#featuresetFeatureWorkspaceGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *featureIndex = 56; // Index of feature in the feature set
    +
    +FeatureSetApi *apiInstance = [[FeatureSetApi alloc] init];
    +
    +[apiInstance featuresetFeatureWorkspaceGetWith:featureIndex
    +              completionHandler: ^(WorkspaceInfo output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.FeatureSetApi()
    +
    +var featureIndex = 56; // {Integer} Index of feature in the feature set
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.featuresetFeatureWorkspaceGet(featureIndex, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class featuresetFeatureWorkspaceGetExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new FeatureSetApi();
    +            var featureIndex = 56;  // Integer | Index of feature in the feature set
    +
    +            try
    +            {
    +                WorkspaceInfo result = apiInstance.featuresetFeatureWorkspaceGet(featureIndex);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling FeatureSetApi.featuresetFeatureWorkspaceGet: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\FeatureSetApi();
    +$featureIndex = 56; // Integer | Index of feature in the feature set
    +
    +try {
    +    $result = $api_instance->featuresetFeatureWorkspaceGet($featureIndex);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling FeatureSetApi->featuresetFeatureWorkspaceGet: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::FeatureSetApi;
    +
    +my $api_instance = SWGSDRangel::FeatureSetApi->new();
    +my $featureIndex = 56; # Integer | Index of feature in the feature set
    +
    +eval { 
    +    my $result = $api_instance->featuresetFeatureWorkspaceGet(featureIndex => $featureIndex);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling FeatureSetApi->featuresetFeatureWorkspaceGet: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_sdrangel
    +from swagger_sdrangel.rest import ApiException
    +from pprint import pprint
    +
    +# create an instance of the API class
    +api_instance = swagger_sdrangel.FeatureSetApi()
    +featureIndex = 56 # Integer | Index of feature in the feature set
    +
    +try: 
    +    api_response = api_instance.featureset_feature_workspace_get(featureIndex)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling FeatureSetApi->featuresetFeatureWorkspaceGet: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    featureIndex* + + +
    +
    +
    + + Integer + + +
    + Index of feature in the feature set +
    +
    +
    + Required +
    +
    +
    +
    + + + + + +

    Responses

    +

    Status: 200 - On success return workspace information

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 400 - Invalid feature set index

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 500 - Error

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +

    featuresetFeatureWorkspacePut

    +

    +
    +
    +
    +

    +

    move feature UI to workspace (GUI)

    +

    +
    +
    /sdrangel/featureset/feature/{featureIndex}/workspace
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PUT "http://localhost/sdrangel/featureset/feature/{featureIndex}/workspace"
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.FeatureSetApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class FeatureSetApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        FeatureSetApi apiInstance = new FeatureSetApi();
    +        Integer featureIndex = 56; // Integer | Index of feature in the feature set
    +        WorkspaceInfo body = ; // WorkspaceInfo | Destination workspace information
    +        try {
    +            SuccessResponse result = apiInstance.featuresetFeatureWorkspacePut(featureIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling FeatureSetApi#featuresetFeatureWorkspacePut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.FeatureSetApi;
    +
    +public class FeatureSetApiExample {
    +
    +    public static void main(String[] args) {
    +        FeatureSetApi apiInstance = new FeatureSetApi();
    +        Integer featureIndex = 56; // Integer | Index of feature in the feature set
    +        WorkspaceInfo body = ; // WorkspaceInfo | Destination workspace information
    +        try {
    +            SuccessResponse result = apiInstance.featuresetFeatureWorkspacePut(featureIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling FeatureSetApi#featuresetFeatureWorkspacePut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *featureIndex = 56; // Index of feature in the feature set
    +WorkspaceInfo *body = ; // Destination workspace information
    +
    +FeatureSetApi *apiInstance = [[FeatureSetApi alloc] init];
    +
    +[apiInstance featuresetFeatureWorkspacePutWith:featureIndex
    +    body:body
    +              completionHandler: ^(SuccessResponse output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.FeatureSetApi()
    +
    +var featureIndex = 56; // {Integer} Index of feature in the feature set
    +
    +var body = ; // {WorkspaceInfo} Destination workspace information
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.featuresetFeatureWorkspacePut(featureIndex, body, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class featuresetFeatureWorkspacePutExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new FeatureSetApi();
    +            var featureIndex = 56;  // Integer | Index of feature in the feature set
    +            var body = new WorkspaceInfo(); // WorkspaceInfo | Destination workspace information
    +
    +            try
    +            {
    +                SuccessResponse result = apiInstance.featuresetFeatureWorkspacePut(featureIndex, body);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling FeatureSetApi.featuresetFeatureWorkspacePut: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\FeatureSetApi();
    +$featureIndex = 56; // Integer | Index of feature in the feature set
    +$body = ; // WorkspaceInfo | Destination workspace information
    +
    +try {
    +    $result = $api_instance->featuresetFeatureWorkspacePut($featureIndex, $body);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling FeatureSetApi->featuresetFeatureWorkspacePut: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::FeatureSetApi;
    +
    +my $api_instance = SWGSDRangel::FeatureSetApi->new();
    +my $featureIndex = 56; # Integer | Index of feature in the feature set
    +my $body = SWGSDRangel::Object::WorkspaceInfo->new(); # WorkspaceInfo | Destination workspace information
    +
    +eval { 
    +    my $result = $api_instance->featuresetFeatureWorkspacePut(featureIndex => $featureIndex, body => $body);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling FeatureSetApi->featuresetFeatureWorkspacePut: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_sdrangel
    +from swagger_sdrangel.rest import ApiException
    +from pprint import pprint
    +
    +# create an instance of the API class
    +api_instance = swagger_sdrangel.FeatureSetApi()
    +featureIndex = 56 # Integer | Index of feature in the feature set
    +body =  # WorkspaceInfo | Destination workspace information
    +
    +try: 
    +    api_response = api_instance.featureset_feature_workspace_put(featureIndex, body)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling FeatureSetApi->featuresetFeatureWorkspacePut: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    featureIndex* + + +
    +
    +
    + + Integer + + +
    + Index of feature in the feature set +
    +
    +
    + Required +
    +
    +
    +
    + + +
    Body parameters
    + + + + + + + + + +
    NameDescription
    body * + + + +
    +
    + + + +

    Responses

    +

    Status: 202 - Message to perform action was sent successfully

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 400 - Invalid device set or workspace index

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 500 - Error

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    @@ -56503,7 +60155,7 @@ except ApiException as e:
    - Generated 2022-05-09T01:10:06.823+02:00 + Generated 2022-05-13T21:51:44.838+02:00
    diff --git a/sdrbase/resources/webapi/doc/swagger/swagger.yaml b/sdrbase/resources/webapi/doc/swagger/swagger.yaml index d6b6fda7e..1a659acfd 100644 --- a/sdrbase/resources/webapi/doc/swagger/swagger.yaml +++ b/sdrbase/resources/webapi/doc/swagger/swagger.yaml @@ -1584,6 +1584,63 @@ paths: "501": $ref: "#/responses/Response_501" + /sdrangel/deviceset/{deviceSetIndex}/spectrum/workspace: + x-swagger-router-controller: deviceset + get: + description: Get main spectrum UI workspace information (GUI) + operationId: devicesetSpectrumWorkspaceGet + tags: + - DeviceSet + parameters: + - in: path + name: deviceSetIndex + type: integer + required: true + description: Index of device set in the device set list + responses: + "200": + description: On success return main spectrum UI workspace index + schema: + $ref: "#/definitions/WorkspaceInfo" + "404": + description: Invalid index + schema: + $ref: "#/definitions/ErrorResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + put: + description: move main spectrum UI to workspace (GUI) + operationId: devicesetSpectrumWorkspacePut + tags: + - DeviceSet + parameters: + - in: path + name: deviceSetIndex + type: integer + required: true + description: Index of device set in the device set list + - name: body + in: body + description: Destination workspace information + required: true + schema: + $ref: "#/definitions/WorkspaceInfo" + responses: + "202": + description: Message to perform action was sent successfully + schema: + $ref: "#/definitions/SuccessResponse" + "400": + description: Invalid device set or workspace index + schema: + $ref: "#/definitions/ErrorResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + /sdrangel/deviceset/{deviceSetIndex}/device: x-swagger-router-controller: deviceset put: @@ -1605,7 +1662,7 @@ paths: $ref: "#/definitions/DeviceListItem" responses: "202": - description: On successful semdomg of the message it returns the details of the device being set + description: On successful semding of the message it returns the details of the device being set schema: $ref: "#/definitions/DeviceListItem" "400": @@ -2021,6 +2078,63 @@ paths: "501": $ref: "#/responses/Response_501" + /sdrangel/deviceset/{deviceSetIndex}/device/workspace: + x-swagger-router-controller: deviceset + get: + description: get device UI workspace information (GUI) + operationId: devicesetDeviceWorkspaceGet + tags: + - DeviceSet + parameters: + - in: path + name: deviceSetIndex + type: integer + required: true + description: Index of device set in the device set list + responses: + "200": + description: On success return workspace information + schema: + $ref: "#/definitions/WorkspaceInfo" + "400": + description: Invalid device set index + schema: + $ref: "#/definitions/ErrorResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + put: + description: move device UI to workspace (GUI) + operationId: devicesetDeviceWorkspacePut + tags: + - DeviceSet + parameters: + - in: path + name: deviceSetIndex + type: integer + required: true + description: Index of device set in the device set list + - name: body + in: body + description: Destination workspace information + required: true + schema: + $ref: "#/definitions/WorkspaceInfo" + responses: + "202": + description: Message to perform action was sent successfully + schema: + $ref: "#/definitions/SuccessResponse" + "400": + description: Invalid device set or workspace index + schema: + $ref: "#/definitions/ErrorResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + /sdrangel/deviceset/{deviceSetIndex}/channel: x-swagger-router-controller: deviceset post: @@ -2286,6 +2400,73 @@ paths: "501": $ref: "#/responses/Response_501" + /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/workspace: + x-swagger-router-controller: deviceset + get: + description: get channel UI workspace information (GUI) + operationId: devicesetChannelWorkspaceGet + tags: + - DeviceSet + parameters: + - in: path + name: deviceSetIndex + type: integer + required: true + description: Index of device set in the device set list + - in: path + name: channelIndex + type: integer + required: true + description: Index of the channel in the channels list for this device set + responses: + "200": + description: On success return workspace information + schema: + $ref: "#/definitions/WorkspaceInfo" + "400": + description: Invalid device set index + schema: + $ref: "#/definitions/ErrorResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + put: + description: move channel UI to workspace (GUI) + operationId: devicesetChannelWorkspacePut + tags: + - DeviceSet + parameters: + - in: path + name: deviceSetIndex + type: integer + required: true + description: Index of device set in the device set list + - in: path + name: channelIndex + type: integer + required: true + description: Index of the channel in the channels list for this device set + - name: body + in: body + description: Destination workspace information + required: true + schema: + $ref: "#/definitions/WorkspaceInfo" + responses: + "202": + description: Message to perform action was sent successfully + schema: + $ref: "#/definitions/SuccessResponse" + "400": + description: Invalid device set or workspace index + schema: + $ref: "#/definitions/ErrorResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + /sdrangel/featureset: x-swagger-router-controller: featureset get: @@ -2708,6 +2889,63 @@ paths: "501": $ref: "#/responses/Response_501" + /sdrangel/featureset/feature/{featureIndex}/workspace: + x-swagger-router-controller: featureset + get: + description: get feature UI workspace information (GUI) + operationId: featuresetFeatureWorkspaceGet + tags: + - FeatureSet + parameters: + - in: path + name: featureIndex + type: integer + required: true + description: Index of feature in the feature set + responses: + "200": + description: On success return workspace information + schema: + $ref: "#/definitions/WorkspaceInfo" + "400": + description: Invalid feature set index + schema: + $ref: "#/definitions/ErrorResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + put: + description: move feature UI to workspace (GUI) + operationId: featuresetFeatureWorkspacePut + tags: + - FeatureSet + parameters: + - in: path + name: featureIndex + type: integer + required: true + description: Index of feature in the feature set + - name: body + in: body + description: Destination workspace information + required: true + schema: + $ref: "#/definitions/WorkspaceInfo" + responses: + "202": + description: Message to perform action was sent successfully + schema: + $ref: "#/definitions/SuccessResponse" + "400": + description: Invalid device set or workspace index + schema: + $ref: "#/definitions/ErrorResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + /swagger: x-swagger-pipe: swagger_raw @@ -3116,6 +3354,14 @@ definitions: items: $ref: "#/definitions/Channel" + WorkspaceInfo: + description: "Workspace information" + required: + - index + properties: + index: + description: index of workspace in the list of workspaces + type: integer AudioDevices: description: "List of audio devices available in the system" diff --git a/sdrbase/webapi/webapiadapter.cpp b/sdrbase/webapi/webapiadapter.cpp index 7b5e84aba..0e2b859ef 100644 --- a/sdrbase/webapi/webapiadapter.cpp +++ b/sdrbase/webapi/webapiadapter.cpp @@ -36,6 +36,7 @@ #include "dsp/dspdevicesinkengine.h" #include "dsp/dspdevicemimoengine.h" #include "dsp/dspengine.h" +#include "dsp/spectrumvis.h" #include "plugin/pluginapi.h" #include "plugin/pluginmanager.h" #include "channel/channelapi.h" @@ -68,6 +69,7 @@ #include "SWGDeviceState.h" #include "SWGDeviceReport.h" #include "SWGDeviceActions.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelsDetail.h" #include "SWGChannelSettings.h" #include "SWGChannelReport.h" @@ -2254,6 +2256,48 @@ int WebAPIAdapter::devicesetSpectrumServerDelete( } } +int WebAPIAdapter::devicesetSpectrumWorkspaceGet( + int deviceSetIndex, + SWGSDRangel::SWGWorkspaceInfo& response, + SWGSDRangel::SWGErrorResponse& error) +{ + if ((deviceSetIndex >= 0) && (deviceSetIndex < (int) m_mainCore->m_deviceSets.size())) + { + const DeviceSet *deviceSet = m_mainCore->m_deviceSets[deviceSetIndex]; + response.setIndex(deviceSet->m_spectrumVis->getWorkspaceIndex()); + return 200; + } + else + { + error.init(); + *error.getMessage() = QString("There is no device set with index %1").arg(deviceSetIndex); + return 404; + } +} + +int WebAPIAdapter::devicesetSpectrumWorkspacePut( + int deviceSetIndex, + SWGSDRangel::SWGWorkspaceInfo& query, + SWGSDRangel::SWGSuccessResponse& response, + SWGSDRangel::SWGErrorResponse& error) +{ + if ((deviceSetIndex >= 0) && (deviceSetIndex < (int) m_mainCore->m_deviceSets.size())) + { + int workspaceIndex = query.getIndex(); + MainCore::MsgMoveMainSpectrumUIToWorkspace *msg = MainCore::MsgMoveMainSpectrumUIToWorkspace::create(deviceSetIndex, workspaceIndex); + m_mainCore->m_mainMessageQueue->push(msg); + response.init(); + *response.getMessage() = QString("Message to move a main spectrum to workspace (MsgMoveMainSpectrumUIToWorkspace) was submitted successfully"); + return 202; + } + else + { + error.init(); + *error.getMessage() = QString("There is no device set with index %1").arg(deviceSetIndex); + return 404; + } +} + int WebAPIAdapter::devicesetDevicePut( int deviceSetIndex, SWGSDRangel::SWGDeviceListItem& query, @@ -2510,6 +2554,47 @@ int WebAPIAdapter::devicesetDeviceActionsPost( } } +int WebAPIAdapter::devicesetDeviceWorkspaceGet( + int deviceSetIndex, + SWGSDRangel::SWGWorkspaceInfo& response, + SWGSDRangel::SWGErrorResponse& error) +{ + if ((deviceSetIndex >= 0) && (deviceSetIndex < (int) m_mainCore->m_deviceSets.size())) + { + response.setIndex(m_mainCore->m_deviceSets[deviceSetIndex]->m_deviceAPI->getWorkspaceIndex()); + return 200; + } + else + { + error.init(); + *error.getMessage() = QString("There is no device set with index %1").arg(deviceSetIndex); + return 404; + } +} + +int WebAPIAdapter::devicesetDeviceWorkspacePut( + int deviceSetIndex, + SWGSDRangel::SWGWorkspaceInfo& query, + SWGSDRangel::SWGSuccessResponse& response, + SWGSDRangel::SWGErrorResponse& error) +{ + if ((deviceSetIndex >= 0) && (deviceSetIndex < (int) m_mainCore->m_deviceSets.size())) + { + int workspaceIndex = query.getIndex(); + MainCore::MsgMoveDeviceUIToWorkspace *msg = MainCore::MsgMoveDeviceUIToWorkspace::create(deviceSetIndex, workspaceIndex); + m_mainCore->m_mainMessageQueue->push(msg); + response.init(); + *response.getMessage() = QString("Message to move a device UI to workspace (MsgMoveDeviceUIToWorkspace) was submitted successfully"); + return 202; + } + else + { + error.init(); + *error.getMessage() = QString("There is no device set with index %1").arg(deviceSetIndex); + return 404; + } +} + int WebAPIAdapter::devicesetDeviceSettingsPutPatch( int deviceSetIndex, bool force, @@ -3380,6 +3465,129 @@ int WebAPIAdapter::devicesetChannelActionsPost( } } +int WebAPIAdapter::devicesetChannelWorkspaceGet( + int deviceSetIndex, + int channelIndex, + SWGSDRangel::SWGWorkspaceInfo& response, + SWGSDRangel::SWGErrorResponse& error) +{ + error.init(); + + if ((deviceSetIndex >= 0) && (deviceSetIndex < (int) m_mainCore->m_deviceSets.size())) + { + DeviceSet *deviceSet = m_mainCore->m_deviceSets[deviceSetIndex]; + + if (deviceSet->m_deviceSourceEngine) // Single Rx + { + ChannelAPI *channelAPI = deviceSet->m_deviceAPI->getChanelSinkAPIAt(channelIndex); + + if (channelAPI == nullptr) + { + *error.getMessage() = QString("There is no channel with index %1").arg(channelIndex); + return 404; + } + else + { + return channelAPI->webapiWorkspaceGet(response, *error.getMessage()); + } + } + else if (deviceSet->m_deviceSinkEngine) // Single Tx + { + ChannelAPI *channelAPI = deviceSet->m_deviceAPI->getChanelSourceAPIAt(channelIndex); + + if (channelAPI == 0) + { + *error.getMessage() = QString("There is no channel with index %1").arg(channelIndex); + return 404; + } + else + { + return channelAPI->webapiWorkspaceGet(response, *error.getMessage()); + } + } + else if (deviceSet->m_deviceMIMOEngine) // MIMO + { + int nbSinkChannels = deviceSet->m_deviceAPI->getNbSinkChannels(); + int nbSourceChannels = deviceSet->m_deviceAPI->getNbSourceChannels(); + int nbMIMOChannels = deviceSet->m_deviceAPI->getNbMIMOChannels(); + ChannelAPI *channelAPI = nullptr; + + if (channelIndex < nbSinkChannels) + { + channelAPI = deviceSet->m_deviceAPI->getChanelSinkAPIAt(channelIndex); + } + else if (channelIndex < nbSinkChannels + nbSourceChannels) + { + channelAPI = deviceSet->m_deviceAPI->getChanelSourceAPIAt(channelIndex - nbSinkChannels); + } + else if (channelIndex < nbSinkChannels + nbSourceChannels + nbMIMOChannels) + { + channelAPI = deviceSet->m_deviceAPI->getMIMOChannelAPIAt(channelIndex - nbSinkChannels - nbSourceChannels); + } + else + { + *error.getMessage() = QString("There is no channel with index %1").arg(channelIndex); + return 404; + } + + if (channelAPI) + { + return channelAPI->webapiWorkspaceGet(response, *error.getMessage()); + } + else + { + *error.getMessage() = QString("There is no channel with index %1").arg(channelIndex); + return 404; + } + } + else + { + *error.getMessage() = QString("DeviceSet error"); + return 500; + } + } + else + { + *error.getMessage() = QString("There is no device set with index %1").arg(deviceSetIndex); + return 404; + } +} + +int WebAPIAdapter::devicesetChannelWorkspacePut( + int deviceSetIndex, + int channelIndex, + SWGSDRangel::SWGWorkspaceInfo& query, + SWGSDRangel::SWGSuccessResponse& response, + SWGSDRangel::SWGErrorResponse& error) +{ + error.init(); + + if ((deviceSetIndex >= 0) && (deviceSetIndex < (int) m_mainCore->m_deviceSets.size())) + { + DeviceSet *deviceSet = m_mainCore->m_deviceSets[deviceSetIndex]; + + if ((channelIndex >= 0) && (channelIndex < deviceSet->getNumberOfChannels())) + { + int workspaceIndex = query.getIndex(); + MainCore::MsgMoveChannelUIToWorkspace *msg = MainCore::MsgMoveChannelUIToWorkspace::create(deviceSetIndex, channelIndex, workspaceIndex); + m_mainCore->m_mainMessageQueue->push(msg); + response.init(); + *response.getMessage() = QString("Message to move a channel UI to workspace (MsgMoveChannelUIToWorkspace) was submitted successfully"); + return 202; + } + else + { + *error.getMessage() = QString("There is no channel with index %1 in device set %2").arg(channelIndex).arg(deviceSetIndex); + return 404; + } + } + else + { + *error.getMessage() = QString("There is no device set with index %1").arg(deviceSetIndex); + return 404; + } +} + int WebAPIAdapter::devicesetChannelSettingsPutPatch( int deviceSetIndex, int channelIndex, @@ -3962,6 +4170,49 @@ int WebAPIAdapter::featuresetFeatureActionsPost( } } +int WebAPIAdapter::featuresetFeatureWorkspaceGet( + int featureIndex, + SWGSDRangel::SWGWorkspaceInfo& response, + SWGSDRangel::SWGErrorResponse& error) +{ + if ((featureIndex >= 0) && (featureIndex < (int) m_mainCore->m_featureSets.size())) + { + FeatureSet *featureSet = m_mainCore->m_featureSets[0]; + Feature *feature = featureSet->getFeatureAt(featureIndex); + response.setIndex(feature->getWorkspaceIndex()); + return 200; + } + else + { + error.init(); + *error.getMessage() = QString("There is no feature with index %1").arg(featureIndex); + return 404; + } +} + +int WebAPIAdapter::featuresetFeatureWorkspacePut( + int featureIndex, + SWGSDRangel::SWGWorkspaceInfo& query, + SWGSDRangel::SWGSuccessResponse& response, + SWGSDRangel::SWGErrorResponse& error) +{ + if ((featureIndex >= 0) && (featureIndex < (int) m_mainCore->m_featureSets.size())) + { + int workspaceIndex = query.getIndex(); + MainCore::MsgMoveFeatureUIToWorkspace *msg = MainCore::MsgMoveFeatureUIToWorkspace::create(featureIndex, workspaceIndex); + m_mainCore->m_mainMessageQueue->push(msg); + response.init(); + *response.getMessage() = QString("Message to move a feature UI to workspace (MsgMoveFeatureUIToWorkspace) was submitted successfully"); + return 202; + } + else + { + error.init(); + *error.getMessage() = QString("There is no feature with index %1").arg(featureIndex); + return 404; + } +} + void WebAPIAdapter::getDeviceSetList(SWGSDRangel::SWGDeviceSetList* deviceSetList) { deviceSetList->init(); diff --git a/sdrbase/webapi/webapiadapter.h b/sdrbase/webapi/webapiadapter.h index e90d3416a..f8966aefc 100644 --- a/sdrbase/webapi/webapiadapter.h +++ b/sdrbase/webapi/webapiadapter.h @@ -321,6 +321,17 @@ public: SWGSDRangel::SWGSuccessResponse& response, SWGSDRangel::SWGErrorResponse& error); + virtual int devicesetSpectrumWorkspaceGet( + int deviceSetIndex, + SWGSDRangel::SWGWorkspaceInfo& response, + SWGSDRangel::SWGErrorResponse& error); + + virtual int devicesetSpectrumWorkspacePut( + int deviceSetIndex, + SWGSDRangel::SWGWorkspaceInfo& query, + SWGSDRangel::SWGSuccessResponse& response, + SWGSDRangel::SWGErrorResponse& error); + virtual int devicesetDevicePut( int deviceSetIndex, SWGSDRangel::SWGDeviceListItem& query, @@ -339,6 +350,17 @@ public: SWGSDRangel::SWGSuccessResponse& response, SWGSDRangel::SWGErrorResponse& error); + virtual int devicesetDeviceWorkspaceGet( + int deviceSetIndex, + SWGSDRangel::SWGWorkspaceInfo& response, + SWGSDRangel::SWGErrorResponse& error); + + virtual int devicesetDeviceWorkspacePut( + int deviceSetIndex, + SWGSDRangel::SWGWorkspaceInfo& query, + SWGSDRangel::SWGSuccessResponse& response, + SWGSDRangel::SWGErrorResponse& error); + virtual int devicesetDeviceSettingsPutPatch( int deviceSetIndex, bool force, @@ -429,6 +451,19 @@ public: SWGSDRangel::SWGChannelReport& response, SWGSDRangel::SWGErrorResponse& error); + virtual int devicesetChannelWorkspaceGet( + int deviceSetIndex, + int channelIndex, + SWGSDRangel::SWGWorkspaceInfo& response, + SWGSDRangel::SWGErrorResponse& error); + + virtual int devicesetChannelWorkspacePut( + int deviceSetIndex, + int channelIndex, + SWGSDRangel::SWGWorkspaceInfo& query, + SWGSDRangel::SWGSuccessResponse& response, + SWGSDRangel::SWGErrorResponse& error); + virtual int featuresetGet( int deviceSetIndex, SWGSDRangel::SWGFeatureSet& response, @@ -507,6 +542,17 @@ public: SWGSDRangel::SWGSuccessResponse& response, SWGSDRangel::SWGErrorResponse& error); + virtual int featuresetFeatureWorkspaceGet( + int featureIndex, + SWGSDRangel::SWGWorkspaceInfo& response, + SWGSDRangel::SWGErrorResponse& error); + + virtual int featuresetFeatureWorkspacePut( + int featureIndex, + SWGSDRangel::SWGWorkspaceInfo& query, + SWGSDRangel::SWGSuccessResponse& response, + SWGSDRangel::SWGErrorResponse& error); + private: MainCore *m_mainCore; diff --git a/sdrbase/webapi/webapiadapterinterface.cpp b/sdrbase/webapi/webapiadapterinterface.cpp index 5aa38447a..2bef497f6 100644 --- a/sdrbase/webapi/webapiadapterinterface.cpp +++ b/sdrbase/webapi/webapiadapterinterface.cpp @@ -58,24 +58,28 @@ std::regex WebAPIAdapterInterface::devicesetURLRe("^/sdrangel/deviceset/([0-9]{1 std::regex WebAPIAdapterInterface::devicesetFocusURLRe("^/sdrangel/deviceset/([0-9]{1,2})/focus$"); std::regex WebAPIAdapterInterface::devicesetSpectrumSettingsURLRe("^/sdrangel/deviceset/([0-9]{1,2})/spectrum/settings$"); std::regex WebAPIAdapterInterface::devicesetSpectrumServerURLRe("^/sdrangel/deviceset/([0-9]{1,2})/spectrum/server$"); +std::regex WebAPIAdapterInterface::devicesetSpectrumWorkspaceURLRe("^/sdrangel/deviceset/([0-9]{1,2})/spectrum/workspace$"); std::regex WebAPIAdapterInterface::devicesetDeviceURLRe("^/sdrangel/deviceset/([0-9]{1,2})/device$"); std::regex WebAPIAdapterInterface::devicesetDeviceSettingsURLRe("^/sdrangel/deviceset/([0-9]{1,2})/device/settings$"); std::regex WebAPIAdapterInterface::devicesetDeviceRunURLRe("^/sdrangel/deviceset/([0-9]{1,2})/device/run$"); std::regex WebAPIAdapterInterface::devicesetDeviceSubsystemRunURLRe("^/sdrangel/deviceset/([0-9]{1,2})/subdevice/([0-9]{1,2})/run$"); std::regex WebAPIAdapterInterface::devicesetDeviceReportURLRe("^/sdrangel/deviceset/([0-9]{1,2})/device/report$"); std::regex WebAPIAdapterInterface::devicesetDeviceActionsURLRe("^/sdrangel/deviceset/([0-9]{1,2})/device/actions$"); +std::regex WebAPIAdapterInterface::devicesetDeviceWorkspaceURLRe("^/sdrangel/deviceset/([0-9]{1,2})/device/workspace$"); std::regex WebAPIAdapterInterface::devicesetChannelsReportURLRe("^/sdrangel/deviceset/([0-9]{1,2})/channels/report$"); std::regex WebAPIAdapterInterface::devicesetChannelURLRe("^/sdrangel/deviceset/([0-9]{1,2})/channel$"); std::regex WebAPIAdapterInterface::devicesetChannelIndexURLRe("^/sdrangel/deviceset/([0-9]{1,2})/channel/([0-9]{1,2})$"); std::regex WebAPIAdapterInterface::devicesetChannelSettingsURLRe("^/sdrangel/deviceset/([0-9]{1,2})/channel/([0-9]{1,2})/settings$"); std::regex WebAPIAdapterInterface::devicesetChannelReportURLRe("^/sdrangel/deviceset/([0-9]{1,2})/channel/([0-9]{1,2})/report"); std::regex WebAPIAdapterInterface::devicesetChannelActionsURLRe("^/sdrangel/deviceset/([0-9]{1,2})/channel/([0-9]{1,2})/actions"); +std::regex WebAPIAdapterInterface::devicesetChannelWorkspaceURLRe("^/sdrangel/deviceset/([0-9]{1,2})/channel/([0-9]{1,2})/workspace"); std::regex WebAPIAdapterInterface::featuresetFeatureIndexURLRe("^/sdrangel/featureset/feature/([0-9]{1,2})$"); std::regex WebAPIAdapterInterface::featuresetFeatureRunURLRe("^/sdrangel/featureset/feature/([0-9]{1,2})/run$"); std::regex WebAPIAdapterInterface::featuresetFeatureSettingsURLRe("^/sdrangel/featureset/feature/([0-9]{1,2})/settings$"); std::regex WebAPIAdapterInterface::featuresetFeatureReportURLRe("^/sdrangel/featureset/feature/([0-9]{1,2})/report$"); std::regex WebAPIAdapterInterface::featuresetFeatureActionsURLRe("^/sdrangel/featureset/feature/([0-9]{1,2})/actions$"); +std::regex WebAPIAdapterInterface::featuresetFeatureWorkspaceURLRe("^/sdrangel/featureset/feature/([0-9]{1,2})/workspace$"); void WebAPIAdapterInterface::ConfigKeys::debug() const { diff --git a/sdrbase/webapi/webapiadapterinterface.h b/sdrbase/webapi/webapiadapterinterface.h index 11c4cd31f..0e91f9a53 100644 --- a/sdrbase/webapi/webapiadapterinterface.h +++ b/sdrbase/webapi/webapiadapterinterface.h @@ -66,6 +66,7 @@ namespace SWGSDRangel class SWGDeviceState; class SWGDeviceReport; class SWGDeviceActions; + class SWGWorkspaceInfo; class SWGChannelsDetail; class SWGChannelSettings; class SWGChannelReport; @@ -1084,6 +1085,40 @@ public: return 501; } + /** + * Handler of /sdrangel/deviceset/{devicesetIndex}/spectrum/workspace (GET) + * returns the Http status code (default 501: not implemented) + */ + virtual int devicesetSpectrumWorkspaceGet( + int deviceSetIndex, + SWGSDRangel::SWGWorkspaceInfo& response, + SWGSDRangel::SWGErrorResponse& error) + { + (void) deviceSetIndex; + (void) response; + error.init(); + *error.getMessage() = QString("Function not implemented"); + return 501; + } + + /** + * Handler of /sdrangel/deviceset/{devicesetIndex}/spectrum/workspace (GET) + * returns the Http status code (default 501: not implemented) + */ + virtual int devicesetSpectrumWorkspacePut( + int deviceSetIndex, + SWGSDRangel::SWGWorkspaceInfo& query, + SWGSDRangel::SWGSuccessResponse& response, + SWGSDRangel::SWGErrorResponse& error) + { + (void) deviceSetIndex; + (void) query; + (void) response; + error.init(); + *error.getMessage() = QString("Function not implemented"); + return 501; + } + /** * Handler of /sdrangel/deviceset/{devicesetIndex}/device (PUT) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels * returns the Http status code (default 501: not implemented) @@ -1293,6 +1328,40 @@ public: return 501; } + /** + * Handler of /sdrangel/deviceset/{devicesetIndex}/device/workspace (GET) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels + * returns the Http status code (default 501: not implemented) + */ + virtual int devicesetDeviceWorkspaceGet( + int deviceSetIndex, + SWGSDRangel::SWGWorkspaceInfo& response, + SWGSDRangel::SWGErrorResponse& error) + { + (void) deviceSetIndex; + (void) response; + error.init(); + *error.getMessage() = QString("Function not implemented"); + return 501; + } + + /** + * Handler of /sdrangel/deviceset/{devicesetIndex}/device/workspace (PUT) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels + * returns the Http status code (default 501: not implemented) + */ + virtual int devicesetDeviceWorkspacePut( + int deviceSetIndex, + SWGSDRangel::SWGWorkspaceInfo& query, + SWGSDRangel::SWGSuccessResponse& response, + SWGSDRangel::SWGErrorResponse& error) + { + (void) deviceSetIndex; + (void) query; + (void) response; + error.init(); + *error.getMessage() = QString("Function not implemented"); + return 501; + } + /** * Handler of /sdrangel/deviceset/{deviceSetIndex}/channel (POST) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels * returns the Http status code (default 501: not implemented) @@ -1372,7 +1441,7 @@ public: /** - * Handler of /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/settings (GET) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels + * Handler of /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/report (GET) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels * returns the Http status code (default 501: not implemented) */ virtual int devicesetChannelReportGet( @@ -1411,6 +1480,44 @@ public: return 501; } + /** + * Handler of /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/workspace (GET) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels + * returns the Http status code (default 501: not implemented) + */ + virtual int devicesetChannelWorkspaceGet( + int deviceSetIndex, + int channelIndex, + SWGSDRangel::SWGWorkspaceInfo& response, + SWGSDRangel::SWGErrorResponse& error) + { + (void) deviceSetIndex; + (void) channelIndex; + (void) response; + error.init(); + *error.getMessage() = QString("Function not implemented"); + return 501; + } + + /** + * Handler of /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/workspace (GET) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels + * returns the Http status code (default 501: not implemented) + */ + virtual int devicesetChannelWorkspacePut( + int deviceSetIndex, + int channelIndex, + SWGSDRangel::SWGWorkspaceInfo& query, + SWGSDRangel::SWGSuccessResponse& response, + SWGSDRangel::SWGErrorResponse& error) + { + (void) deviceSetIndex; + (void) channelIndex; + (void) query; + (void) response; + error.init(); + *error.getMessage() = QString("Function not implemented"); + return 501; + } + /** * Handler of /sdrangel/featureset/{featuresetIndex} (GET) * returns the Http status code (default 501: not implemented) @@ -1649,6 +1756,40 @@ public: return 501; } + /** + * Handler of /sdrangel/featureset/feature/{featureIndex}/workspace (GET) + * returns the Http status code (default 501: not implemented) + */ + virtual int featuresetFeatureWorkspaceGet( + int featureIndex, + SWGSDRangel::SWGWorkspaceInfo& response, + SWGSDRangel::SWGErrorResponse& error) + { + (void) featureIndex; + (void) response; + error.init(); + *error.getMessage() = QString("Function not implemented"); + return 501; + } + + /** + * Handler of /sdrangel/featureset/feature/{featureIndex}/workspace (PUT) + * returns the Http status code (default 501: not implemented) + */ + virtual int featuresetFeatureWorkspacePut( + int featureIndex, + SWGSDRangel::SWGWorkspaceInfo& query, + SWGSDRangel::SWGSuccessResponse& response, + SWGSDRangel::SWGErrorResponse& error) + { + (void) featureIndex; + (void) query; + (void) response; + error.init(); + *error.getMessage() = QString("Function not implemented"); + return 501; + } + static QString instanceSummaryURL; static QString instanceConfigURL; static QString instanceDevicesURL; @@ -1687,23 +1828,27 @@ public: static std::regex devicesetFocusURLRe; static std::regex devicesetSpectrumSettingsURLRe; static std::regex devicesetSpectrumServerURLRe; + static std::regex devicesetSpectrumWorkspaceURLRe; static std::regex devicesetDeviceURLRe; static std::regex devicesetDeviceSettingsURLRe; static std::regex devicesetDeviceRunURLRe; static std::regex devicesetDeviceSubsystemRunURLRe; static std::regex devicesetDeviceReportURLRe; static std::regex devicesetDeviceActionsURLRe; + static std::regex devicesetDeviceWorkspaceURLRe; static std::regex devicesetChannelURLRe; static std::regex devicesetChannelIndexURLRe; static std::regex devicesetChannelSettingsURLRe; static std::regex devicesetChannelReportURLRe; static std::regex devicesetChannelActionsURLRe; + static std::regex devicesetChannelWorkspaceURLRe; static std::regex devicesetChannelsReportURLRe; static std::regex featuresetFeatureIndexURLRe; static std::regex featuresetFeatureRunURLRe; static std::regex featuresetFeatureSettingsURLRe; static std::regex featuresetFeatureReportURLRe; static std::regex featuresetFeatureActionsURLRe; + static std::regex featuresetFeatureWorkspaceURLRe; }; diff --git a/sdrbase/webapi/webapirequestmapper.cpp b/sdrbase/webapi/webapirequestmapper.cpp index e2f7566ec..2c5b42369 100644 --- a/sdrbase/webapi/webapirequestmapper.cpp +++ b/sdrbase/webapi/webapirequestmapper.cpp @@ -52,6 +52,7 @@ #include "SWGDeviceState.h" #include "SWGDeviceReport.h" #include "SWGDeviceActions.h" +#include "SWGWorkspaceInfo.h" #include "SWGChannelsDetail.h" #include "SWGChannelSettings.h" #include "SWGChannelReport.h" @@ -198,6 +199,8 @@ void WebAPIRequestMapper::service(qtwebapp::HttpRequest& request, qtwebapp::Http devicesetSpectrumSettingsService(std::string(desc_match[1]), request, response); } else if (std::regex_match(pathStr, desc_match, WebAPIAdapterInterface::devicesetSpectrumServerURLRe)) { devicesetSpectrumServerService(std::string(desc_match[1]), request, response); + } else if (std::regex_match(pathStr, desc_match, WebAPIAdapterInterface::devicesetSpectrumWorkspaceURLRe)) { + devicesetSpectrumWorkspaceService(std::string(desc_match[1]), request, response); } else if (std::regex_match(pathStr, desc_match, WebAPIAdapterInterface::devicesetDeviceSettingsURLRe)) { devicesetDeviceSettingsService(std::string(desc_match[1]), request, response); } else if (std::regex_match(pathStr, desc_match, WebAPIAdapterInterface::devicesetDeviceRunURLRe)) { @@ -208,6 +211,8 @@ void WebAPIRequestMapper::service(qtwebapp::HttpRequest& request, qtwebapp::Http devicesetDeviceReportService(std::string(desc_match[1]), request, response); } else if (std::regex_match(pathStr, desc_match, WebAPIAdapterInterface::devicesetDeviceActionsURLRe)) { devicesetDeviceActionsService(std::string(desc_match[1]), request, response); + } else if (std::regex_match(pathStr, desc_match, WebAPIAdapterInterface::devicesetDeviceWorkspaceURLRe)) { + devicesetDeviceWorkspaceService(std::string(desc_match[1]), request, response); } else if (std::regex_match(pathStr, desc_match, WebAPIAdapterInterface::devicesetChannelsReportURLRe)) { devicesetChannelsReportService(std::string(desc_match[1]), request, response); } else if (std::regex_match(pathStr, desc_match, WebAPIAdapterInterface::devicesetChannelURLRe)) { @@ -220,6 +225,8 @@ void WebAPIRequestMapper::service(qtwebapp::HttpRequest& request, qtwebapp::Http devicesetChannelReportService(std::string(desc_match[1]), std::string(desc_match[2]), request, response); } else if (std::regex_match(pathStr, desc_match, WebAPIAdapterInterface::devicesetChannelActionsURLRe)) { devicesetChannelActionsService(std::string(desc_match[1]), std::string(desc_match[2]), request, response); + } else if (std::regex_match(pathStr, desc_match, WebAPIAdapterInterface::devicesetChannelWorkspaceURLRe)) { + devicesetChannelWorkspaceService(std::string(desc_match[1]), std::string(desc_match[2]), request, response); } else if (std::regex_match(pathStr, desc_match, WebAPIAdapterInterface::featuresetFeatureIndexURLRe)) { featuresetFeatureIndexService(std::string(desc_match[1]), request, response); } else if (std::regex_match(pathStr, desc_match, WebAPIAdapterInterface::featuresetFeatureRunURLRe)) { @@ -230,6 +237,8 @@ void WebAPIRequestMapper::service(qtwebapp::HttpRequest& request, qtwebapp::Http featuresetFeatureReportService(std::string(desc_match[1]), request, response); } else if (std::regex_match(pathStr, desc_match, WebAPIAdapterInterface::featuresetFeatureActionsURLRe)) { featuresetFeatureActionsService(std::string(desc_match[1]), request, response); + } else if (std::regex_match(pathStr, desc_match, WebAPIAdapterInterface::featuresetFeatureWorkspaceURLRe)) { + featuresetFeatureWorkspaceService(std::string(desc_match[1]), request, response); } else // serve static documentation pages { @@ -2259,6 +2268,80 @@ void WebAPIRequestMapper::devicesetSpectrumServerService(const std::string& inde } } +void WebAPIRequestMapper::devicesetSpectrumWorkspaceService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response) +{ + SWGSDRangel::SWGErrorResponse errorResponse; + response.setHeader("Content-Type", "application/json"); + response.setHeader("Access-Control-Allow-Origin", "*"); + + try + { + int deviceSetIndex = boost::lexical_cast(indexStr); + + if (request.getMethod() == "GET") + { + SWGSDRangel::SWGWorkspaceInfo normalResponse; + int status = m_adapter->devicesetSpectrumWorkspaceGet(deviceSetIndex, normalResponse, errorResponse); + response.setStatus(status); + + if (status/100 == 2) { + response.write(normalResponse.asJson().toUtf8()); + } else { + response.write(errorResponse.asJson().toUtf8()); + } + } + else if (request.getMethod() == "PUT") + { + QString jsonStr = request.getBody(); + QJsonObject jsonObject; + + if (parseJsonBody(jsonStr, jsonObject, response)) + { + SWGSDRangel::SWGWorkspaceInfo query; + SWGSDRangel::SWGSuccessResponse normalResponse; + + if (validateWorkspaceInfo(query, jsonObject)) + { + int status = m_adapter->devicesetSpectrumWorkspacePut( + deviceSetIndex, + query, + normalResponse, + errorResponse + ); + response.setStatus(status); + + if (status/100 == 2) { + response.write(normalResponse.asJson().toUtf8()); + } else { + response.write(errorResponse.asJson().toUtf8()); + } + } + else + { + response.setStatus(400,"Invalid JSON request"); + errorResponse.init(); + *errorResponse.getMessage() = "Invalid JSON request"; + response.write(errorResponse.asJson().toUtf8()); + } + } + else + { + response.setStatus(400,"Invalid JSON format"); + errorResponse.init(); + *errorResponse.getMessage() = "Invalid JSON format"; + response.write(errorResponse.asJson().toUtf8()); + } + } + } + catch (const boost::bad_lexical_cast &e) + { + errorResponse.init(); + *errorResponse.getMessage() = "Wrong integer conversion on device set index"; + response.setStatus(400,"Invalid data"); + response.write(errorResponse.asJson().toUtf8()); + } +} + void WebAPIRequestMapper::devicesetDeviceService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response) { SWGSDRangel::SWGErrorResponse errorResponse; @@ -2582,6 +2665,80 @@ void WebAPIRequestMapper::devicesetDeviceReportService(const std::string& indexS } } +void WebAPIRequestMapper::devicesetDeviceWorkspaceService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response) +{ + SWGSDRangel::SWGErrorResponse errorResponse; + response.setHeader("Content-Type", "application/json"); + response.setHeader("Access-Control-Allow-Origin", "*"); + + try + { + int deviceSetIndex = boost::lexical_cast(indexStr); + + if (request.getMethod() == "GET") + { + SWGSDRangel::SWGWorkspaceInfo normalResponse; + int status = m_adapter->devicesetDeviceWorkspaceGet(deviceSetIndex, normalResponse, errorResponse); + response.setStatus(status); + + if (status/100 == 2) { + response.write(normalResponse.asJson().toUtf8()); + } else { + response.write(errorResponse.asJson().toUtf8()); + } + } + else if (request.getMethod() == "PUT") + { + QString jsonStr = request.getBody(); + QJsonObject jsonObject; + + if (parseJsonBody(jsonStr, jsonObject, response)) + { + SWGSDRangel::SWGWorkspaceInfo query; + SWGSDRangel::SWGSuccessResponse normalResponse; + + if (validateWorkspaceInfo(query, jsonObject)) + { + int status = m_adapter->devicesetDeviceWorkspacePut( + deviceSetIndex, + query, + normalResponse, + errorResponse + ); + response.setStatus(status); + + if (status/100 == 2) { + response.write(normalResponse.asJson().toUtf8()); + } else { + response.write(errorResponse.asJson().toUtf8()); + } + } + else + { + response.setStatus(400,"Invalid JSON request"); + errorResponse.init(); + *errorResponse.getMessage() = "Invalid JSON request"; + response.write(errorResponse.asJson().toUtf8()); + } + } + else + { + response.setStatus(400,"Invalid JSON format"); + errorResponse.init(); + *errorResponse.getMessage() = "Invalid JSON format"; + response.write(errorResponse.asJson().toUtf8()); + } + } + } + catch(const boost::bad_lexical_cast &e) + { + errorResponse.init(); + *errorResponse.getMessage() = "Wrong integer conversion on device set index"; + response.setStatus(400,"Invalid data"); + response.write(errorResponse.asJson().toUtf8()); + } +} + void WebAPIRequestMapper::devicesetDeviceActionsService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response) { SWGSDRangel::SWGErrorResponse errorResponse; @@ -3024,6 +3181,94 @@ void WebAPIRequestMapper::devicesetChannelActionsService( } } + +void WebAPIRequestMapper::devicesetChannelWorkspaceService( + const std::string& deviceSetIndexStr, + const std::string& channelIndexStr, + qtwebapp::HttpRequest& request, + qtwebapp::HttpResponse& response) +{ + SWGSDRangel::SWGErrorResponse errorResponse; + response.setHeader("Content-Type", "application/json"); + response.setHeader("Access-Control-Allow-Origin", "*"); + + try + { + int deviceSetIndex = boost::lexical_cast(deviceSetIndexStr); + int channelIndex = boost::lexical_cast(channelIndexStr); + + if (request.getMethod() == "GET") + { + SWGSDRangel::SWGWorkspaceInfo normalResponse; + int status = m_adapter->devicesetChannelWorkspaceGet(deviceSetIndex, channelIndex, normalResponse, errorResponse); + response.setStatus(status); + + if (status/100 == 2) { + response.write(normalResponse.asJson().toUtf8()); + } else { + response.write(errorResponse.asJson().toUtf8()); + } + } + else if (request.getMethod() == "PUT") + { + QString jsonStr = request.getBody(); + QJsonObject jsonObject; + + if (parseJsonBody(jsonStr, jsonObject, response)) + { + SWGSDRangel::SWGWorkspaceInfo query; + SWGSDRangel::SWGSuccessResponse normalResponse; + + if (validateWorkspaceInfo(query, jsonObject)) + { + int status = m_adapter->devicesetChannelWorkspacePut( + deviceSetIndex, + channelIndex, + query, + normalResponse, + errorResponse + ); + response.setStatus(status); + + if (status/100 == 2) { + response.write(normalResponse.asJson().toUtf8()); + } else { + response.write(errorResponse.asJson().toUtf8()); + } + } + else + { + response.setStatus(400,"Invalid JSON request"); + errorResponse.init(); + *errorResponse.getMessage() = "Invalid JSON request"; + response.write(errorResponse.asJson().toUtf8()); + } + } + else + { + response.setStatus(400,"Invalid JSON format"); + errorResponse.init(); + *errorResponse.getMessage() = "Invalid JSON format"; + response.write(errorResponse.asJson().toUtf8()); + } + } + else + { + response.setStatus(405,"Invalid HTTP method"); + errorResponse.init(); + *errorResponse.getMessage() = "Invalid HTTP method"; + response.write(errorResponse.asJson().toUtf8()); + } + } + catch(const boost::bad_lexical_cast &e) + { + errorResponse.init(); + *errorResponse.getMessage() = "Wrong integer conversion on index"; + response.setStatus(400,"Invalid data"); + response.write(errorResponse.asJson().toUtf8()); + } +} + void WebAPIRequestMapper::featuresetService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response) { SWGSDRangel::SWGErrorResponse errorResponse; @@ -3555,6 +3800,90 @@ void WebAPIRequestMapper::featuresetFeatureActionsService( } } +void WebAPIRequestMapper::featuresetFeatureWorkspaceService( + const std::string& featureIndexStr, + qtwebapp::HttpRequest& request, + qtwebapp::HttpResponse& response) +{ + SWGSDRangel::SWGErrorResponse errorResponse; + response.setHeader("Content-Type", "application/json"); + response.setHeader("Access-Control-Allow-Origin", "*"); + + try + { + int featureIndex = boost::lexical_cast(featureIndexStr); + + if (request.getMethod() == "GET") + { + SWGSDRangel::SWGWorkspaceInfo normalResponse; + int status = m_adapter->featuresetFeatureWorkspaceGet(featureIndex, normalResponse, errorResponse); + response.setStatus(status); + + if (status/100 == 2) { + response.write(normalResponse.asJson().toUtf8()); + } else { + response.write(errorResponse.asJson().toUtf8()); + } + } + else if (request.getMethod() == "PUT") + { + QString jsonStr = request.getBody(); + QJsonObject jsonObject; + + if (parseJsonBody(jsonStr, jsonObject, response)) + { + SWGSDRangel::SWGWorkspaceInfo query; + SWGSDRangel::SWGSuccessResponse normalResponse; + + if (validateWorkspaceInfo(query, jsonObject)) + { + int status = m_adapter->featuresetFeatureWorkspacePut( + featureIndex, + query, + normalResponse, + errorResponse + ); + response.setStatus(status); + + if (status/100 == 2) { + response.write(normalResponse.asJson().toUtf8()); + } else { + response.write(errorResponse.asJson().toUtf8()); + } + } + else + { + response.setStatus(400,"Invalid JSON request"); + errorResponse.init(); + *errorResponse.getMessage() = "Invalid JSON request"; + response.write(errorResponse.asJson().toUtf8()); + } + } + else + { + response.setStatus(400,"Invalid JSON format"); + errorResponse.init(); + *errorResponse.getMessage() = "Invalid JSON format"; + response.write(errorResponse.asJson().toUtf8()); + } + } + else + { + response.setStatus(405,"Invalid HTTP method"); + errorResponse.init(); + *errorResponse.getMessage() = "Invalid HTTP method"; + response.write(errorResponse.asJson().toUtf8()); + } + } + catch(const boost::bad_lexical_cast &e) + { + errorResponse.init(); + *errorResponse.getMessage() = "Wrong integer conversion on index"; + response.setStatus(400,"Invalid data"); + response.write(errorResponse.asJson().toUtf8()); + } +} + bool WebAPIRequestMapper::parseJsonBody(QString& jsonStr, QJsonObject& jsonObject, qtwebapp::HttpResponse& response) { SWGSDRangel::SWGErrorResponse errorResponse; @@ -4237,6 +4566,17 @@ bool WebAPIRequestMapper::validateSpectrumSettings(SWGSDRangel::SWGGLSpectrum& s return true; } +bool WebAPIRequestMapper::validateWorkspaceInfo(SWGSDRangel::SWGWorkspaceInfo& workspaceInfo, QJsonObject& jsonObject) +{ + if (jsonObject.contains("index")) + { + workspaceInfo.setIndex(jsonObject["index"].toInt()); + return true; + } + + return false; +} + bool WebAPIRequestMapper::validateConfig( SWGSDRangel::SWGInstanceConfigResponse& config, QJsonObject& jsonObject, diff --git a/sdrbase/webapi/webapirequestmapper.h b/sdrbase/webapi/webapirequestmapper.h index 3921a5ad4..663ac030f 100644 --- a/sdrbase/webapi/webapirequestmapper.h +++ b/sdrbase/webapi/webapirequestmapper.h @@ -91,18 +91,21 @@ private: void devicesetFocusService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void devicesetSpectrumSettingsService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void devicesetSpectrumServerService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); + void devicesetSpectrumWorkspaceService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void devicesetDeviceService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void devicesetDeviceSettingsService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void devicesetDeviceRunService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void devicesetDeviceSubsystemRunService(const std::string& indexStr, const std::string& subsystemIndexStr,qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void devicesetDeviceReportService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void devicesetDeviceActionsService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); + void devicesetDeviceWorkspaceService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void devicesetChannelsReportService(const std::string& deviceSetIndexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void devicesetChannelService(const std::string& deviceSetIndexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void devicesetChannelIndexService(const std::string& deviceSetIndexStr, const std::string& channelIndexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void devicesetChannelSettingsService(const std::string& deviceSetIndexStr, const std::string& channelIndexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void devicesetChannelReportService(const std::string& deviceSetIndexStr, const std::string& channelIndexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void devicesetChannelActionsService(const std::string& deviceSetIndexStr, const std::string& channelIndexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); + void devicesetChannelWorkspaceService(const std::string& deviceSetIndexStr, const std::string& channelIndexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void featuresetService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void featuresetFeatureService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); @@ -112,7 +115,7 @@ private: void featuresetFeatureSettingsService(const std::string& featureIndexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void featuresetFeatureReportService(const std::string& featureIndexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); void featuresetFeatureActionsService(const std::string& featureIndexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); - + void featuresetFeatureWorkspaceService(const std::string& featureIndexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response); bool validatePresetTransfer(SWGSDRangel::SWGPresetTransfer& presetTransfer); bool validatePresetIdentifer(SWGSDRangel::SWGPresetIdentifier& presetIdentifier); @@ -131,6 +134,7 @@ private: bool validateAMBEDevices(SWGSDRangel::SWGAMBEDevices& ambeDevices, QJsonObject& jsonObject); bool validateLimeRFEConfig(SWGSDRangel::SWGLimeRFESettings& limeRFESettings, QJsonObject& jsonObject, QStringList& limeRFESettingsKeys); bool validateConfig(SWGSDRangel::SWGInstanceConfigResponse& config, QJsonObject& jsonObject, WebAPIAdapterInterface::ConfigKeys& configKeys); + bool validateWorkspaceInfo(SWGSDRangel::SWGWorkspaceInfo& workspaceInfo, QJsonObject& jsonObject); bool validateConfigurationIdentifier(SWGSDRangel::SWGConfigurationIdentifier& configurationIdentifier); bool validateConfigurationImportExport(SWGSDRangel::SWGConfigurationImportExport& configuratopmImportExport); diff --git a/sdrgui/device/devicegui.cpp b/sdrgui/device/devicegui.cpp index 4e313c03b..e7f32e484 100644 --- a/sdrgui/device/devicegui.cpp +++ b/sdrgui/device/devicegui.cpp @@ -29,10 +29,13 @@ #include "mainwindow.h" #include "gui/workspaceselectiondialog.h" #include "gui/samplingdevicedialog.h" +#include "device/deviceuiset.h" +#include "device/deviceapi.h" #include "devicegui.h" DeviceGUI::DeviceGUI(QWidget *parent) : QMdiSubWindow(parent), + m_deviceUISet(nullptr), m_deviceType(DeviceRx), m_deviceSetIndex(0), m_contextMenuType(ContextMenuNone), @@ -223,6 +226,15 @@ DeviceGUI::~DeviceGUI() qDebug("DeviceGUI::~DeviceGUI: end"); } +void DeviceGUI::setWorkspaceIndex(int index) +{ + m_workspaceIndex = index; + + if (m_deviceUISet) { + m_deviceUISet->m_deviceAPI->setWorkspaceIndex(index); + } +} + void DeviceGUI::closeEvent(QCloseEvent *event) { qDebug("DeviceGUI::closeEvent"); diff --git a/sdrgui/device/devicegui.h b/sdrgui/device/devicegui.h index a615e2643..32f4a90f8 100644 --- a/sdrgui/device/devicegui.h +++ b/sdrgui/device/devicegui.h @@ -37,6 +37,8 @@ class QPushButton; class QVBoxLayout; class QHBoxLayout; class QSizeGrip; +class DeviceUISet; + class SDRGUI_API DeviceGUI : public QMdiSubWindow { Q_OBJECT public: @@ -60,7 +62,7 @@ public: virtual void resetToDefaults() = 0; virtual QByteArray serialize() const = 0; virtual bool deserialize(const QByteArray& data) = 0; - void setWorkspaceIndex(int index) { m_workspaceIndex = index; } + void setWorkspaceIndex(int index); int getWorkspaceIndex() const { return m_workspaceIndex; } virtual MessageQueue* getInputMessageQueue() = 0; @@ -85,6 +87,7 @@ protected: void resetContextMenuType() { m_contextMenuType = ContextMenuNone; } int getAdditionalHeight() const { return 22 + 22; } + DeviceUISet* m_deviceUISet; DeviceType m_deviceType; int m_deviceSetIndex; int m_workspaceIndex; diff --git a/sdrgui/feature/featuregui.h b/sdrgui/feature/featuregui.h index 2d764f2a2..0491d7ad8 100644 --- a/sdrgui/feature/featuregui.h +++ b/sdrgui/feature/featuregui.h @@ -32,6 +32,7 @@ class QPushButton; class QVBoxLayout; class QHBoxLayout; class QSizeGrip; +class Feature; class SDRGUI_API FeatureGUI : public QMdiSubWindow { @@ -74,6 +75,7 @@ protected: void resetContextMenuType() { m_contextMenuType = ContextMenuNone; } int getAdditionalHeight() const { return 22 + 22; } // height of top and bottom bars + Feature *m_feature; int m_featureIndex; QString m_helpURL; RollupContents m_rollupContents; diff --git a/sdrgui/gui/glspectrum.h b/sdrgui/gui/glspectrum.h index a7676afd9..5347b5746 100644 --- a/sdrgui/gui/glspectrum.h +++ b/sdrgui/gui/glspectrum.h @@ -170,6 +170,7 @@ public: m_displayStreamIndex = streamIndex; } void setSpectrumVis(SpectrumVis *spectrumVis) { m_spectrumVis = spectrumVis; } + SpectrumVis *getSpectrumVis() { return m_spectrumVis; } const QList& getHistogramMarkers() const { return m_histogramMarkers; } QList& getHistogramMarkers() { return m_histogramMarkers; } void setHistogramMarkers(const QList& histogramMarkers); diff --git a/sdrgui/mainspectrum/mainspectrumgui.cpp b/sdrgui/mainspectrum/mainspectrumgui.cpp index 55de3a1f0..3eadc41d0 100644 --- a/sdrgui/mainspectrum/mainspectrumgui.cpp +++ b/sdrgui/mainspectrum/mainspectrumgui.cpp @@ -28,6 +28,7 @@ #include "gui/glspectrum.h" #include "gui/glspectrumgui.h" #include "gui/workspaceselectiondialog.h" +#include "dsp/spectrumvis.h" #include "mainspectrumgui.h" MainSpectrumGUI::MainSpectrumGUI(GLSpectrum *spectrum, GLSpectrumGUI *spectrumGUI, QWidget *parent) : @@ -166,6 +167,12 @@ MainSpectrumGUI::~MainSpectrumGUI() qDebug("MainSpectrumGUI::~MainSpectrumGUI: end"); } +void MainSpectrumGUI::setWorkspaceIndex(int index) +{ + m_workspaceIndex = index; + m_spectrum->getSpectrumVis()->setWorkspaceIndex(index); +} + void MainSpectrumGUI::closeEvent(QCloseEvent *event) { qDebug("MainSpectrumGUI::closeEvent"); diff --git a/sdrgui/mainspectrum/mainspectrumgui.h b/sdrgui/mainspectrum/mainspectrumgui.h index 9adf00a91..3373c8055 100644 --- a/sdrgui/mainspectrum/mainspectrumgui.h +++ b/sdrgui/mainspectrum/mainspectrumgui.h @@ -54,7 +54,7 @@ public: void setToolTip(const QString& tooltip); void setIndex(int index); int getIndex() const { return m_deviceSetIndex; } - void setWorkspaceIndex(int index) { m_workspaceIndex = index; } + void setWorkspaceIndex(int index); int getWorkspaceIndex() const { return m_workspaceIndex; } void setGeometryBytes(const QByteArray& blob) { m_geometryBytes = blob; } const QByteArray& getGeometryBytes() const { return m_geometryBytes; } diff --git a/sdrgui/mainwindow.cpp b/sdrgui/mainwindow.cpp index dcdb11c3f..696fc8eba 100644 --- a/sdrgui/mainwindow.cpp +++ b/sdrgui/mainwindow.cpp @@ -1754,6 +1754,66 @@ bool MainWindow::handleMessage(const Message& cmd) deleteFeature(notif.getFeatureSetIndex(), notif.getFeatureIndex()); return true; } + else if (MainCore::MsgMoveDeviceUIToWorkspace::match(cmd)) + { + MainCore::MsgMoveDeviceUIToWorkspace& notif = (MainCore::MsgMoveDeviceUIToWorkspace&) cmd; + int deviceSetIndex = notif.getDeviceSetIndex(); + + if (deviceSetIndex < (int) m_deviceUIs.size()) + { + DeviceUISet *deviceUISet = m_deviceUIs[deviceSetIndex]; + DeviceGUI *gui = deviceUISet->m_deviceGUI; + deviceMove(gui, notif.getWorkspaceIndex()); + } + + return true; + } + else if (MainCore::MsgMoveMainSpectrumUIToWorkspace::match(cmd)) + { + MainCore::MsgMoveMainSpectrumUIToWorkspace& notif = (MainCore::MsgMoveMainSpectrumUIToWorkspace&) cmd; + int deviceSetIndex = notif.getDeviceSetIndex(); + + if (deviceSetIndex < (int) m_deviceUIs.size()) + { + DeviceUISet *deviceUISet = m_deviceUIs[deviceSetIndex]; + MainSpectrumGUI *gui = deviceUISet->m_mainSpectrumGUI; + mainSpectrumMove(gui, notif.getWorkspaceIndex()); + } + + return true; + } + else if (MainCore::MsgMoveFeatureUIToWorkspace::match(cmd)) + { + MainCore::MsgMoveFeatureUIToWorkspace& notif = (MainCore::MsgMoveFeatureUIToWorkspace&) cmd; + int featureIndex = notif.getFeatureIndex(); + + if (featureIndex < (int) m_featureUIs[0]->getNumberOfFeatures()) + { + FeatureGUI *gui = m_featureUIs[0]->getFeatureGuiAt(featureIndex); + featureMove(gui, notif.getWorkspaceIndex()); + } + + return true; + } + else if (MainCore::MsgMoveChannelUIToWorkspace::match(cmd)) + { + MainCore::MsgMoveChannelUIToWorkspace& notif = (MainCore::MsgMoveChannelUIToWorkspace&) cmd; + int deviceSetIndex = notif.getDeviceSetIndex(); + + if (deviceSetIndex < (int) m_deviceUIs.size()) + { + int channelIndex = notif.getChannelIndex(); + DeviceUISet *deviceUISet = m_deviceUIs[deviceSetIndex]; + + if (channelIndex < deviceUISet->getNumberOfChannels()) + { + ChannelGUI *gui = deviceUISet->getChannelGUIAt(channelIndex); + channelMove(gui, notif.getWorkspaceIndex()); + } + } + + return true; + } else if (MainCore::MsgApplySettings::match(cmd)) { applySettings(); diff --git a/swagger/sdrangel/api/swagger/swagger.yaml b/swagger/sdrangel/api/swagger/swagger.yaml index cbb350a9b..318f68e15 100644 --- a/swagger/sdrangel/api/swagger/swagger.yaml +++ b/swagger/sdrangel/api/swagger/swagger.yaml @@ -1584,6 +1584,63 @@ paths: "501": $ref: "#/responses/Response_501" + /sdrangel/deviceset/{deviceSetIndex}/spectrum/workspace: + x-swagger-router-controller: deviceset + get: + description: Get main spectrum UI workspace information (GUI) + operationId: devicesetSpectrumWorkspaceGet + tags: + - DeviceSet + parameters: + - in: path + name: deviceSetIndex + type: integer + required: true + description: Index of device set in the device set list + responses: + "200": + description: On success return main spectrum UI workspace index + schema: + $ref: "#/definitions/WorkspaceInfo" + "404": + description: Invalid index + schema: + $ref: "#/definitions/ErrorResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + put: + description: move main spectrum UI to workspace (GUI) + operationId: devicesetSpectrumWorkspacePut + tags: + - DeviceSet + parameters: + - in: path + name: deviceSetIndex + type: integer + required: true + description: Index of device set in the device set list + - name: body + in: body + description: Destination workspace information + required: true + schema: + $ref: "#/definitions/WorkspaceInfo" + responses: + "202": + description: Message to perform action was sent successfully + schema: + $ref: "#/definitions/SuccessResponse" + "400": + description: Invalid device set or workspace index + schema: + $ref: "#/definitions/ErrorResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + /sdrangel/deviceset/{deviceSetIndex}/device: x-swagger-router-controller: deviceset put: @@ -1605,7 +1662,7 @@ paths: $ref: "#/definitions/DeviceListItem" responses: "202": - description: On successful semdomg of the message it returns the details of the device being set + description: On successful semding of the message it returns the details of the device being set schema: $ref: "#/definitions/DeviceListItem" "400": @@ -2021,6 +2078,63 @@ paths: "501": $ref: "#/responses/Response_501" + /sdrangel/deviceset/{deviceSetIndex}/device/workspace: + x-swagger-router-controller: deviceset + get: + description: get device UI workspace information (GUI) + operationId: devicesetDeviceWorkspaceGet + tags: + - DeviceSet + parameters: + - in: path + name: deviceSetIndex + type: integer + required: true + description: Index of device set in the device set list + responses: + "200": + description: On success return workspace information + schema: + $ref: "#/definitions/WorkspaceInfo" + "400": + description: Invalid device set index + schema: + $ref: "#/definitions/ErrorResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + put: + description: move device UI to workspace (GUI) + operationId: devicesetDeviceWorkspacePut + tags: + - DeviceSet + parameters: + - in: path + name: deviceSetIndex + type: integer + required: true + description: Index of device set in the device set list + - name: body + in: body + description: Destination workspace information + required: true + schema: + $ref: "#/definitions/WorkspaceInfo" + responses: + "202": + description: Message to perform action was sent successfully + schema: + $ref: "#/definitions/SuccessResponse" + "400": + description: Invalid device set or workspace index + schema: + $ref: "#/definitions/ErrorResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + /sdrangel/deviceset/{deviceSetIndex}/channel: x-swagger-router-controller: deviceset post: @@ -2286,6 +2400,73 @@ paths: "501": $ref: "#/responses/Response_501" + /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/workspace: + x-swagger-router-controller: deviceset + get: + description: get channel UI workspace information (GUI) + operationId: devicesetChannelWorkspaceGet + tags: + - DeviceSet + parameters: + - in: path + name: deviceSetIndex + type: integer + required: true + description: Index of device set in the device set list + - in: path + name: channelIndex + type: integer + required: true + description: Index of the channel in the channels list for this device set + responses: + "200": + description: On success return workspace information + schema: + $ref: "#/definitions/WorkspaceInfo" + "400": + description: Invalid device set index + schema: + $ref: "#/definitions/ErrorResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + put: + description: move channel UI to workspace (GUI) + operationId: devicesetChannelWorkspacePut + tags: + - DeviceSet + parameters: + - in: path + name: deviceSetIndex + type: integer + required: true + description: Index of device set in the device set list + - in: path + name: channelIndex + type: integer + required: true + description: Index of the channel in the channels list for this device set + - name: body + in: body + description: Destination workspace information + required: true + schema: + $ref: "#/definitions/WorkspaceInfo" + responses: + "202": + description: Message to perform action was sent successfully + schema: + $ref: "#/definitions/SuccessResponse" + "400": + description: Invalid device set or workspace index + schema: + $ref: "#/definitions/ErrorResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + /sdrangel/featureset: x-swagger-router-controller: featureset get: @@ -2708,6 +2889,63 @@ paths: "501": $ref: "#/responses/Response_501" + /sdrangel/featureset/feature/{featureIndex}/workspace: + x-swagger-router-controller: featureset + get: + description: get feature UI workspace information (GUI) + operationId: featuresetFeatureWorkspaceGet + tags: + - FeatureSet + parameters: + - in: path + name: featureIndex + type: integer + required: true + description: Index of feature in the feature set + responses: + "200": + description: On success return workspace information + schema: + $ref: "#/definitions/WorkspaceInfo" + "400": + description: Invalid feature set index + schema: + $ref: "#/definitions/ErrorResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + put: + description: move feature UI to workspace (GUI) + operationId: featuresetFeatureWorkspacePut + tags: + - FeatureSet + parameters: + - in: path + name: featureIndex + type: integer + required: true + description: Index of feature in the feature set + - name: body + in: body + description: Destination workspace information + required: true + schema: + $ref: "#/definitions/WorkspaceInfo" + responses: + "202": + description: Message to perform action was sent successfully + schema: + $ref: "#/definitions/SuccessResponse" + "400": + description: Invalid device set or workspace index + schema: + $ref: "#/definitions/ErrorResponse" + "500": + $ref: "#/responses/Response_500" + "501": + $ref: "#/responses/Response_501" + /swagger: x-swagger-pipe: swagger_raw @@ -3116,6 +3354,14 @@ definitions: items: $ref: "#/definitions/Channel" + WorkspaceInfo: + description: "Workspace information" + required: + - index + properties: + index: + description: index of workspace in the list of workspaces + type: integer AudioDevices: description: "List of audio devices available in the system" diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index b685023c3..ef261f77e 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -14039,6 +14039,16 @@ margin-bottom: 20px; } }, "description" : "WFMMod" +}; + defs.WorkspaceInfo = { + "required" : [ "index" ], + "properties" : { + "index" : { + "type" : "integer", + "description" : "index of workspace in the list of workspaces" + } + }, + "description" : "Workspace information" }; defs.XtrxInputReport = { "properties" : { @@ -14491,6 +14501,12 @@ margin-bottom: 20px;
  • devicesetChannelSettingsPut
  • +
  • + devicesetChannelWorkspaceGet +
  • +
  • + devicesetChannelWorkspacePut +
  • devicesetChannelsReportGet
  • @@ -14530,6 +14546,12 @@ margin-bottom: 20px;
  • devicesetDeviceSubsystemRunPost
  • +
  • + devicesetDeviceWorkspaceGet +
  • +
  • + devicesetDeviceWorkspacePut +
  • devicesetFocusPatch
  • @@ -14554,6 +14576,12 @@ margin-bottom: 20px;
  • devicesetSpectrumSettingsPut
  • +
  • + devicesetSpectrumWorkspaceGet +
  • +
  • + devicesetSpectrumWorkspacePut +
  • instanceDeviceSetDelete
  • @@ -14591,6 +14619,12 @@ margin-bottom: 20px;
  • featuresetFeatureSettingsPatch
  • +
  • + featuresetFeatureWorkspaceGet +
  • +
  • + featuresetFeatureWorkspacePut +
  • featuresetGet
  • @@ -18427,6 +18461,960 @@ $(document).ready(function() {
    +
    +
    +
    +

    devicesetChannelWorkspaceGet

    +

    +
    +
    +
    +

    +

    get channel UI workspace information (GUI)

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/workspace
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X GET "http://localhost/sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/workspace"
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.DeviceSetApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        Integer channelIndex = 56; // Integer | Index of the channel in the channels list for this device set
    +        try {
    +            WorkspaceInfo result = apiInstance.devicesetChannelWorkspaceGet(deviceSetIndex, channelIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetChannelWorkspaceGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.DeviceSetApi;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        Integer channelIndex = 56; // Integer | Index of the channel in the channels list for this device set
    +        try {
    +            WorkspaceInfo result = apiInstance.devicesetChannelWorkspaceGet(deviceSetIndex, channelIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetChannelWorkspaceGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +Integer *channelIndex = 56; // Index of the channel in the channels list for this device set
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetChannelWorkspaceGetWith:deviceSetIndex
    +    channelIndex:channelIndex
    +              completionHandler: ^(WorkspaceInfo output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.DeviceSetApi()
    +
    +var deviceSetIndex = 56; // {Integer} Index of device set in the device set list
    +
    +var channelIndex = 56; // {Integer} Index of the channel in the channels list for this device set
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.devicesetChannelWorkspaceGet(deviceSetIndex, channelIndex, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetChannelWorkspaceGetExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +            var channelIndex = 56;  // Integer | Index of the channel in the channels list for this device set
    +
    +            try
    +            {
    +                WorkspaceInfo result = apiInstance.devicesetChannelWorkspaceGet(deviceSetIndex, channelIndex);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetChannelWorkspaceGet: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\DeviceSetApi();
    +$deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +$channelIndex = 56; // Integer | Index of the channel in the channels list for this device set
    +
    +try {
    +    $result = $api_instance->devicesetChannelWorkspaceGet($deviceSetIndex, $channelIndex);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetChannelWorkspaceGet: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::DeviceSetApi;
    +
    +my $api_instance = SWGSDRangel::DeviceSetApi->new();
    +my $deviceSetIndex = 56; # Integer | Index of device set in the device set list
    +my $channelIndex = 56; # Integer | Index of the channel in the channels list for this device set
    +
    +eval { 
    +    my $result = $api_instance->devicesetChannelWorkspaceGet(deviceSetIndex => $deviceSetIndex, channelIndex => $channelIndex);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetChannelWorkspaceGet: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_sdrangel
    +from swagger_sdrangel.rest import ApiException
    +from pprint import pprint
    +
    +# create an instance of the API class
    +api_instance = swagger_sdrangel.DeviceSetApi()
    +deviceSetIndex = 56 # Integer | Index of device set in the device set list
    +channelIndex = 56 # Integer | Index of the channel in the channels list for this device set
    +
    +try: 
    +    api_response = api_instance.deviceset_channel_workspace_get(deviceSetIndex, channelIndex)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetChannelWorkspaceGet: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + + + + + +
    NameDescription
    deviceSetIndex* + + +
    +
    +
    + + Integer + + +
    + Index of device set in the device set list +
    +
    +
    + Required +
    +
    +
    +
    channelIndex* + + +
    +
    +
    + + Integer + + +
    + Index of the channel in the channels list for this device set +
    +
    +
    + Required +
    +
    +
    +
    + + + + + +

    Responses

    +

    Status: 200 - On success return workspace information

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 400 - Invalid device set index

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 500 - Error

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +

    devicesetChannelWorkspacePut

    +

    +
    +
    +
    +

    +

    move channel UI to workspace (GUI)

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/workspace
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PUT "http://localhost/sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/workspace"
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.DeviceSetApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        Integer channelIndex = 56; // Integer | Index of the channel in the channels list for this device set
    +        WorkspaceInfo body = ; // WorkspaceInfo | Destination workspace information
    +        try {
    +            SuccessResponse result = apiInstance.devicesetChannelWorkspacePut(deviceSetIndex, channelIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetChannelWorkspacePut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.DeviceSetApi;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        Integer channelIndex = 56; // Integer | Index of the channel in the channels list for this device set
    +        WorkspaceInfo body = ; // WorkspaceInfo | Destination workspace information
    +        try {
    +            SuccessResponse result = apiInstance.devicesetChannelWorkspacePut(deviceSetIndex, channelIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetChannelWorkspacePut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +Integer *channelIndex = 56; // Index of the channel in the channels list for this device set
    +WorkspaceInfo *body = ; // Destination workspace information
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetChannelWorkspacePutWith:deviceSetIndex
    +    channelIndex:channelIndex
    +    body:body
    +              completionHandler: ^(SuccessResponse output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.DeviceSetApi()
    +
    +var deviceSetIndex = 56; // {Integer} Index of device set in the device set list
    +
    +var channelIndex = 56; // {Integer} Index of the channel in the channels list for this device set
    +
    +var body = ; // {WorkspaceInfo} Destination workspace information
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.devicesetChannelWorkspacePut(deviceSetIndex, channelIndex, body, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetChannelWorkspacePutExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +            var channelIndex = 56;  // Integer | Index of the channel in the channels list for this device set
    +            var body = new WorkspaceInfo(); // WorkspaceInfo | Destination workspace information
    +
    +            try
    +            {
    +                SuccessResponse result = apiInstance.devicesetChannelWorkspacePut(deviceSetIndex, channelIndex, body);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetChannelWorkspacePut: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\DeviceSetApi();
    +$deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +$channelIndex = 56; // Integer | Index of the channel in the channels list for this device set
    +$body = ; // WorkspaceInfo | Destination workspace information
    +
    +try {
    +    $result = $api_instance->devicesetChannelWorkspacePut($deviceSetIndex, $channelIndex, $body);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetChannelWorkspacePut: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::DeviceSetApi;
    +
    +my $api_instance = SWGSDRangel::DeviceSetApi->new();
    +my $deviceSetIndex = 56; # Integer | Index of device set in the device set list
    +my $channelIndex = 56; # Integer | Index of the channel in the channels list for this device set
    +my $body = SWGSDRangel::Object::WorkspaceInfo->new(); # WorkspaceInfo | Destination workspace information
    +
    +eval { 
    +    my $result = $api_instance->devicesetChannelWorkspacePut(deviceSetIndex => $deviceSetIndex, channelIndex => $channelIndex, body => $body);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetChannelWorkspacePut: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_sdrangel
    +from swagger_sdrangel.rest import ApiException
    +from pprint import pprint
    +
    +# create an instance of the API class
    +api_instance = swagger_sdrangel.DeviceSetApi()
    +deviceSetIndex = 56 # Integer | Index of device set in the device set list
    +channelIndex = 56 # Integer | Index of the channel in the channels list for this device set
    +body =  # WorkspaceInfo | Destination workspace information
    +
    +try: 
    +    api_response = api_instance.deviceset_channel_workspace_put(deviceSetIndex, channelIndex, body)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetChannelWorkspacePut: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + + + + + +
    NameDescription
    deviceSetIndex* + + +
    +
    +
    + + Integer + + +
    + Index of device set in the device set list +
    +
    +
    + Required +
    +
    +
    +
    channelIndex* + + +
    +
    +
    + + Integer + + +
    + Index of the channel in the channels list for this device set +
    +
    +
    + Required +
    +
    +
    +
    + + +
    Body parameters
    + + + + + + + + + +
    NameDescription
    body * + + + +
    +
    + + + +

    Responses

    +

    Status: 202 - Message to perform action was sent successfully

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 400 - Invalid device set or workspace index

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 500 - Error

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    @@ -19696,7 +20684,7 @@ $(document).ready(function() {

    Responses

    -

    Status: 202 - On successful semdomg of the message it returns the details of the device being set

    +

    Status: 202 - On successful semding of the message it returns the details of the device being set

    + +
    + + +

    Status: 400 - Invalid device set index

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 500 - Error

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +

    devicesetDeviceWorkspacePut

    +

    +
    +
    +
    +

    +

    move device UI to workspace (GUI)

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/device/workspace
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PUT "http://localhost/sdrangel/deviceset/{deviceSetIndex}/device/workspace"
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.DeviceSetApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        WorkspaceInfo body = ; // WorkspaceInfo | Destination workspace information
    +        try {
    +            SuccessResponse result = apiInstance.devicesetDeviceWorkspacePut(deviceSetIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetDeviceWorkspacePut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.DeviceSetApi;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        WorkspaceInfo body = ; // WorkspaceInfo | Destination workspace information
    +        try {
    +            SuccessResponse result = apiInstance.devicesetDeviceWorkspacePut(deviceSetIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetDeviceWorkspacePut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +WorkspaceInfo *body = ; // Destination workspace information
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetDeviceWorkspacePutWith:deviceSetIndex
    +    body:body
    +              completionHandler: ^(SuccessResponse output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.DeviceSetApi()
    +
    +var deviceSetIndex = 56; // {Integer} Index of device set in the device set list
    +
    +var body = ; // {WorkspaceInfo} Destination workspace information
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.devicesetDeviceWorkspacePut(deviceSetIndex, body, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetDeviceWorkspacePutExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +            var body = new WorkspaceInfo(); // WorkspaceInfo | Destination workspace information
    +
    +            try
    +            {
    +                SuccessResponse result = apiInstance.devicesetDeviceWorkspacePut(deviceSetIndex, body);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetDeviceWorkspacePut: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\DeviceSetApi();
    +$deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +$body = ; // WorkspaceInfo | Destination workspace information
    +
    +try {
    +    $result = $api_instance->devicesetDeviceWorkspacePut($deviceSetIndex, $body);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetDeviceWorkspacePut: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::DeviceSetApi;
    +
    +my $api_instance = SWGSDRangel::DeviceSetApi->new();
    +my $deviceSetIndex = 56; # Integer | Index of device set in the device set list
    +my $body = SWGSDRangel::Object::WorkspaceInfo->new(); # WorkspaceInfo | Destination workspace information
    +
    +eval { 
    +    my $result = $api_instance->devicesetDeviceWorkspacePut(deviceSetIndex => $deviceSetIndex, body => $body);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetDeviceWorkspacePut: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_sdrangel
    +from swagger_sdrangel.rest import ApiException
    +from pprint import pprint
    +
    +# create an instance of the API class
    +api_instance = swagger_sdrangel.DeviceSetApi()
    +deviceSetIndex = 56 # Integer | Index of device set in the device set list
    +body =  # WorkspaceInfo | Destination workspace information
    +
    +try: 
    +    api_response = api_instance.deviceset_device_workspace_put(deviceSetIndex, body)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetDeviceWorkspacePut: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    deviceSetIndex* + + +
    +
    +
    + + Integer + + +
    + Index of device set in the device set list +
    +
    +
    + Required +
    +
    +
    +
    + + +
    Body parameters
    + + + + + + + + + +
    NameDescription
    body * + + + +
    +
    + + + +

    Responses

    +

    Status: 202 - Message to perform action was sent successfully

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 400 - Invalid device set or workspace index

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 500 - Error

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    @@ -28387,6 +30263,894 @@ $(document).ready(function() {

    +
    +
    +
    +

    devicesetSpectrumWorkspaceGet

    +

    +
    +
    +
    +

    +

    Get main spectrum UI workspace information (GUI)

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/spectrum/workspace
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X GET "http://localhost/sdrangel/deviceset/{deviceSetIndex}/spectrum/workspace"
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.DeviceSetApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        try {
    +            WorkspaceInfo result = apiInstance.devicesetSpectrumWorkspaceGet(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumWorkspaceGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.DeviceSetApi;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        try {
    +            WorkspaceInfo result = apiInstance.devicesetSpectrumWorkspaceGet(deviceSetIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumWorkspaceGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetSpectrumWorkspaceGetWith:deviceSetIndex
    +              completionHandler: ^(WorkspaceInfo output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.DeviceSetApi()
    +
    +var deviceSetIndex = 56; // {Integer} Index of device set in the device set list
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.devicesetSpectrumWorkspaceGet(deviceSetIndex, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetSpectrumWorkspaceGetExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +
    +            try
    +            {
    +                WorkspaceInfo result = apiInstance.devicesetSpectrumWorkspaceGet(deviceSetIndex);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetSpectrumWorkspaceGet: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\DeviceSetApi();
    +$deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +
    +try {
    +    $result = $api_instance->devicesetSpectrumWorkspaceGet($deviceSetIndex);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetSpectrumWorkspaceGet: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::DeviceSetApi;
    +
    +my $api_instance = SWGSDRangel::DeviceSetApi->new();
    +my $deviceSetIndex = 56; # Integer | Index of device set in the device set list
    +
    +eval { 
    +    my $result = $api_instance->devicesetSpectrumWorkspaceGet(deviceSetIndex => $deviceSetIndex);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetSpectrumWorkspaceGet: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_sdrangel
    +from swagger_sdrangel.rest import ApiException
    +from pprint import pprint
    +
    +# create an instance of the API class
    +api_instance = swagger_sdrangel.DeviceSetApi()
    +deviceSetIndex = 56 # Integer | Index of device set in the device set list
    +
    +try: 
    +    api_response = api_instance.deviceset_spectrum_workspace_get(deviceSetIndex)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetSpectrumWorkspaceGet: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    deviceSetIndex* + + +
    +
    +
    + + Integer + + +
    + Index of device set in the device set list +
    +
    +
    + Required +
    +
    +
    +
    + + + + + +

    Responses

    +

    Status: 200 - On success return main spectrum UI workspace index

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 404 - Invalid index

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 500 - Error

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +

    devicesetSpectrumWorkspacePut

    +

    +
    +
    +
    +

    +

    move main spectrum UI to workspace (GUI)

    +

    +
    +
    /sdrangel/deviceset/{deviceSetIndex}/spectrum/workspace
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PUT "http://localhost/sdrangel/deviceset/{deviceSetIndex}/spectrum/workspace"
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.DeviceSetApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        WorkspaceInfo body = ; // WorkspaceInfo | Destination workspace information
    +        try {
    +            SuccessResponse result = apiInstance.devicesetSpectrumWorkspacePut(deviceSetIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumWorkspacePut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.DeviceSetApi;
    +
    +public class DeviceSetApiExample {
    +
    +    public static void main(String[] args) {
    +        DeviceSetApi apiInstance = new DeviceSetApi();
    +        Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +        WorkspaceInfo body = ; // WorkspaceInfo | Destination workspace information
    +        try {
    +            SuccessResponse result = apiInstance.devicesetSpectrumWorkspacePut(deviceSetIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DeviceSetApi#devicesetSpectrumWorkspacePut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *deviceSetIndex = 56; // Index of device set in the device set list
    +WorkspaceInfo *body = ; // Destination workspace information
    +
    +DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
    +
    +[apiInstance devicesetSpectrumWorkspacePutWith:deviceSetIndex
    +    body:body
    +              completionHandler: ^(SuccessResponse output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.DeviceSetApi()
    +
    +var deviceSetIndex = 56; // {Integer} Index of device set in the device set list
    +
    +var body = ; // {WorkspaceInfo} Destination workspace information
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.devicesetSpectrumWorkspacePut(deviceSetIndex, body, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class devicesetSpectrumWorkspacePutExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new DeviceSetApi();
    +            var deviceSetIndex = 56;  // Integer | Index of device set in the device set list
    +            var body = new WorkspaceInfo(); // WorkspaceInfo | Destination workspace information
    +
    +            try
    +            {
    +                SuccessResponse result = apiInstance.devicesetSpectrumWorkspacePut(deviceSetIndex, body);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DeviceSetApi.devicesetSpectrumWorkspacePut: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\DeviceSetApi();
    +$deviceSetIndex = 56; // Integer | Index of device set in the device set list
    +$body = ; // WorkspaceInfo | Destination workspace information
    +
    +try {
    +    $result = $api_instance->devicesetSpectrumWorkspacePut($deviceSetIndex, $body);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DeviceSetApi->devicesetSpectrumWorkspacePut: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::DeviceSetApi;
    +
    +my $api_instance = SWGSDRangel::DeviceSetApi->new();
    +my $deviceSetIndex = 56; # Integer | Index of device set in the device set list
    +my $body = SWGSDRangel::Object::WorkspaceInfo->new(); # WorkspaceInfo | Destination workspace information
    +
    +eval { 
    +    my $result = $api_instance->devicesetSpectrumWorkspacePut(deviceSetIndex => $deviceSetIndex, body => $body);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DeviceSetApi->devicesetSpectrumWorkspacePut: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_sdrangel
    +from swagger_sdrangel.rest import ApiException
    +from pprint import pprint
    +
    +# create an instance of the API class
    +api_instance = swagger_sdrangel.DeviceSetApi()
    +deviceSetIndex = 56 # Integer | Index of device set in the device set list
    +body =  # WorkspaceInfo | Destination workspace information
    +
    +try: 
    +    api_response = api_instance.deviceset_spectrum_workspace_put(deviceSetIndex, body)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DeviceSetApi->devicesetSpectrumWorkspacePut: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    deviceSetIndex* + + +
    +
    +
    + + Integer + + +
    + Index of device set in the device set list +
    +
    +
    + Required +
    +
    +
    +
    + + +
    Body parameters
    + + + + + + + + + +
    NameDescription
    body * + + + +
    +
    + + + +

    Responses

    +

    Status: 202 - Message to perform action was sent successfully

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 400 - Invalid device set or workspace index

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 500 - Error

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    @@ -33790,6 +36554,894 @@ $(document).ready(function() {

    +
    +
    +
    +

    featuresetFeatureWorkspaceGet

    +

    +
    +
    +
    +

    +

    get feature UI workspace information (GUI)

    +

    +
    +
    /sdrangel/featureset/feature/{featureIndex}/workspace
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X GET "http://localhost/sdrangel/featureset/feature/{featureIndex}/workspace"
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.FeatureSetApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class FeatureSetApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        FeatureSetApi apiInstance = new FeatureSetApi();
    +        Integer featureIndex = 56; // Integer | Index of feature in the feature set
    +        try {
    +            WorkspaceInfo result = apiInstance.featuresetFeatureWorkspaceGet(featureIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling FeatureSetApi#featuresetFeatureWorkspaceGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.FeatureSetApi;
    +
    +public class FeatureSetApiExample {
    +
    +    public static void main(String[] args) {
    +        FeatureSetApi apiInstance = new FeatureSetApi();
    +        Integer featureIndex = 56; // Integer | Index of feature in the feature set
    +        try {
    +            WorkspaceInfo result = apiInstance.featuresetFeatureWorkspaceGet(featureIndex);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling FeatureSetApi#featuresetFeatureWorkspaceGet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *featureIndex = 56; // Index of feature in the feature set
    +
    +FeatureSetApi *apiInstance = [[FeatureSetApi alloc] init];
    +
    +[apiInstance featuresetFeatureWorkspaceGetWith:featureIndex
    +              completionHandler: ^(WorkspaceInfo output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.FeatureSetApi()
    +
    +var featureIndex = 56; // {Integer} Index of feature in the feature set
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.featuresetFeatureWorkspaceGet(featureIndex, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class featuresetFeatureWorkspaceGetExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new FeatureSetApi();
    +            var featureIndex = 56;  // Integer | Index of feature in the feature set
    +
    +            try
    +            {
    +                WorkspaceInfo result = apiInstance.featuresetFeatureWorkspaceGet(featureIndex);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling FeatureSetApi.featuresetFeatureWorkspaceGet: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\FeatureSetApi();
    +$featureIndex = 56; // Integer | Index of feature in the feature set
    +
    +try {
    +    $result = $api_instance->featuresetFeatureWorkspaceGet($featureIndex);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling FeatureSetApi->featuresetFeatureWorkspaceGet: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::FeatureSetApi;
    +
    +my $api_instance = SWGSDRangel::FeatureSetApi->new();
    +my $featureIndex = 56; # Integer | Index of feature in the feature set
    +
    +eval { 
    +    my $result = $api_instance->featuresetFeatureWorkspaceGet(featureIndex => $featureIndex);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling FeatureSetApi->featuresetFeatureWorkspaceGet: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_sdrangel
    +from swagger_sdrangel.rest import ApiException
    +from pprint import pprint
    +
    +# create an instance of the API class
    +api_instance = swagger_sdrangel.FeatureSetApi()
    +featureIndex = 56 # Integer | Index of feature in the feature set
    +
    +try: 
    +    api_response = api_instance.featureset_feature_workspace_get(featureIndex)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling FeatureSetApi->featuresetFeatureWorkspaceGet: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    featureIndex* + + +
    +
    +
    + + Integer + + +
    + Index of feature in the feature set +
    +
    +
    + Required +
    +
    +
    +
    + + + + + +

    Responses

    +

    Status: 200 - On success return workspace information

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 400 - Invalid feature set index

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 500 - Error

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +

    featuresetFeatureWorkspacePut

    +

    +
    +
    +
    +

    +

    move feature UI to workspace (GUI)

    +

    +
    +
    /sdrangel/featureset/feature/{featureIndex}/workspace
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PUT "http://localhost/sdrangel/featureset/feature/{featureIndex}/workspace"
    +
    +
    +
    import SWGSDRangel.*;
    +import SWGSDRangel.auth.*;
    +import SWGSDRangel.model.*;
    +import SWGSDRangel.api.FeatureSetApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class FeatureSetApiExample {
    +
    +    public static void main(String[] args) {
    +        
    +        FeatureSetApi apiInstance = new FeatureSetApi();
    +        Integer featureIndex = 56; // Integer | Index of feature in the feature set
    +        WorkspaceInfo body = ; // WorkspaceInfo | Destination workspace information
    +        try {
    +            SuccessResponse result = apiInstance.featuresetFeatureWorkspacePut(featureIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling FeatureSetApi#featuresetFeatureWorkspacePut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    import SWGSDRangel.api.FeatureSetApi;
    +
    +public class FeatureSetApiExample {
    +
    +    public static void main(String[] args) {
    +        FeatureSetApi apiInstance = new FeatureSetApi();
    +        Integer featureIndex = 56; // Integer | Index of feature in the feature set
    +        WorkspaceInfo body = ; // WorkspaceInfo | Destination workspace information
    +        try {
    +            SuccessResponse result = apiInstance.featuresetFeatureWorkspacePut(featureIndex, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling FeatureSetApi#featuresetFeatureWorkspacePut");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Integer *featureIndex = 56; // Index of feature in the feature set
    +WorkspaceInfo *body = ; // Destination workspace information
    +
    +FeatureSetApi *apiInstance = [[FeatureSetApi alloc] init];
    +
    +[apiInstance featuresetFeatureWorkspacePutWith:featureIndex
    +    body:body
    +              completionHandler: ^(SuccessResponse output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    var SdRangel = require('sd_rangel');
    +
    +var api = new SdRangel.FeatureSetApi()
    +
    +var featureIndex = 56; // {Integer} Index of feature in the feature set
    +
    +var body = ; // {WorkspaceInfo} Destination workspace information
    +
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.featuresetFeatureWorkspacePut(featureIndex, body, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using SWGSDRangel.Api;
    +using SWGSDRangel.Client;
    +using SWGSDRangel.Model;
    +
    +namespace Example
    +{
    +    public class featuresetFeatureWorkspacePutExample
    +    {
    +        public void main()
    +        {
    +            
    +            var apiInstance = new FeatureSetApi();
    +            var featureIndex = 56;  // Integer | Index of feature in the feature set
    +            var body = new WorkspaceInfo(); // WorkspaceInfo | Destination workspace information
    +
    +            try
    +            {
    +                SuccessResponse result = apiInstance.featuresetFeatureWorkspacePut(featureIndex, body);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling FeatureSetApi.featuresetFeatureWorkspacePut: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +$api_instance = new Swagger\Client\Api\FeatureSetApi();
    +$featureIndex = 56; // Integer | Index of feature in the feature set
    +$body = ; // WorkspaceInfo | Destination workspace information
    +
    +try {
    +    $result = $api_instance->featuresetFeatureWorkspacePut($featureIndex, $body);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling FeatureSetApi->featuresetFeatureWorkspacePut: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use SWGSDRangel::Configuration;
    +use SWGSDRangel::FeatureSetApi;
    +
    +my $api_instance = SWGSDRangel::FeatureSetApi->new();
    +my $featureIndex = 56; # Integer | Index of feature in the feature set
    +my $body = SWGSDRangel::Object::WorkspaceInfo->new(); # WorkspaceInfo | Destination workspace information
    +
    +eval { 
    +    my $result = $api_instance->featuresetFeatureWorkspacePut(featureIndex => $featureIndex, body => $body);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling FeatureSetApi->featuresetFeatureWorkspacePut: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_sdrangel
    +from swagger_sdrangel.rest import ApiException
    +from pprint import pprint
    +
    +# create an instance of the API class
    +api_instance = swagger_sdrangel.FeatureSetApi()
    +featureIndex = 56 # Integer | Index of feature in the feature set
    +body =  # WorkspaceInfo | Destination workspace information
    +
    +try: 
    +    api_response = api_instance.featureset_feature_workspace_put(featureIndex, body)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling FeatureSetApi->featuresetFeatureWorkspacePut: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    featureIndex* + + +
    +
    +
    + + Integer + + +
    + Index of feature in the feature set +
    +
    +
    + Required +
    +
    +
    +
    + + +
    Body parameters
    + + + + + + + + + +
    NameDescription
    body * + + + +
    +
    + + + +

    Responses

    +

    Status: 202 - Message to perform action was sent successfully

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 400 - Invalid device set or workspace index

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 500 - Error

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 501 - Function not implemented

    + + + +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    @@ -56503,7 +60155,7 @@ except ApiException as e:
    - Generated 2022-05-09T01:10:06.823+02:00 + Generated 2022-05-13T21:51:44.838+02:00
    diff --git a/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.cpp b/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.cpp index 65fca7131..5b63d957a 100644 --- a/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.cpp @@ -430,6 +430,121 @@ SWGDeviceSetApi::devicesetChannelSettingsPutCallback(SWGHttpRequestWorker * work } } +void +SWGDeviceSetApi::devicesetChannelWorkspaceGet(qint32 device_set_index, qint32 channel_index) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/workspace"); + + QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}"); + fullPath.replace(device_set_indexPathParam, stringValue(device_set_index)); + QString channel_indexPathParam("{"); channel_indexPathParam.append("channelIndex").append("}"); + fullPath.replace(channel_indexPathParam, stringValue(channel_index)); + + + SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); + SWGHttpRequestInput input(fullPath, "GET"); + + + + + + foreach(QString key, this->defaultHeaders.keys()) { + input.headers.insert(key, this->defaultHeaders.value(key)); + } + + connect(worker, + &SWGHttpRequestWorker::on_execution_finished, + this, + &SWGDeviceSetApi::devicesetChannelWorkspaceGetCallback); + + worker->execute(&input); +} + +void +SWGDeviceSetApi::devicesetChannelWorkspaceGetCallback(SWGHttpRequestWorker * worker) { + QString msg; + QString error_str = worker->error_str; + QNetworkReply::NetworkError error_type = worker->error_type; + + if (worker->error_type == QNetworkReply::NoError) { + msg = QString("Success! %1 bytes").arg(worker->response.length()); + } + else { + msg = "Error: " + worker->error_str; + } + + + QString json(worker->response); + SWGWorkspaceInfo* output = static_cast(create(json, QString("SWGWorkspaceInfo"))); + worker->deleteLater(); + + if (worker->error_type == QNetworkReply::NoError) { + emit devicesetChannelWorkspaceGetSignal(output); + } else { + emit devicesetChannelWorkspaceGetSignalE(output, error_type, error_str); + emit devicesetChannelWorkspaceGetSignalEFull(worker, error_type, error_str); + } +} + +void +SWGDeviceSetApi::devicesetChannelWorkspacePut(qint32 device_set_index, qint32 channel_index, SWGWorkspaceInfo& body) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/workspace"); + + QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}"); + fullPath.replace(device_set_indexPathParam, stringValue(device_set_index)); + QString channel_indexPathParam("{"); channel_indexPathParam.append("channelIndex").append("}"); + fullPath.replace(channel_indexPathParam, stringValue(channel_index)); + + + SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); + SWGHttpRequestInput input(fullPath, "PUT"); + + + + QString output = body.asJson(); + input.request_body.append(output.toUtf8()); + + + + foreach(QString key, this->defaultHeaders.keys()) { + input.headers.insert(key, this->defaultHeaders.value(key)); + } + + connect(worker, + &SWGHttpRequestWorker::on_execution_finished, + this, + &SWGDeviceSetApi::devicesetChannelWorkspacePutCallback); + + worker->execute(&input); +} + +void +SWGDeviceSetApi::devicesetChannelWorkspacePutCallback(SWGHttpRequestWorker * worker) { + QString msg; + QString error_str = worker->error_str; + QNetworkReply::NetworkError error_type = worker->error_type; + + if (worker->error_type == QNetworkReply::NoError) { + msg = QString("Success! %1 bytes").arg(worker->response.length()); + } + else { + msg = "Error: " + worker->error_str; + } + + + QString json(worker->response); + SWGSuccessResponse* output = static_cast(create(json, QString("SWGSuccessResponse"))); + worker->deleteLater(); + + if (worker->error_type == QNetworkReply::NoError) { + emit devicesetChannelWorkspacePutSignal(output); + } else { + emit devicesetChannelWorkspacePutSignalE(output, error_type, error_str); + emit devicesetChannelWorkspacePutSignalEFull(worker, error_type, error_str); + } +} + void SWGDeviceSetApi::devicesetChannelsReportGet(qint32 device_set_index) { QString fullPath; @@ -1162,6 +1277,117 @@ SWGDeviceSetApi::devicesetDeviceSubsystemRunPostCallback(SWGHttpRequestWorker * } } +void +SWGDeviceSetApi::devicesetDeviceWorkspaceGet(qint32 device_set_index) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/device/workspace"); + + QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}"); + fullPath.replace(device_set_indexPathParam, stringValue(device_set_index)); + + + SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); + SWGHttpRequestInput input(fullPath, "GET"); + + + + + + foreach(QString key, this->defaultHeaders.keys()) { + input.headers.insert(key, this->defaultHeaders.value(key)); + } + + connect(worker, + &SWGHttpRequestWorker::on_execution_finished, + this, + &SWGDeviceSetApi::devicesetDeviceWorkspaceGetCallback); + + worker->execute(&input); +} + +void +SWGDeviceSetApi::devicesetDeviceWorkspaceGetCallback(SWGHttpRequestWorker * worker) { + QString msg; + QString error_str = worker->error_str; + QNetworkReply::NetworkError error_type = worker->error_type; + + if (worker->error_type == QNetworkReply::NoError) { + msg = QString("Success! %1 bytes").arg(worker->response.length()); + } + else { + msg = "Error: " + worker->error_str; + } + + + QString json(worker->response); + SWGWorkspaceInfo* output = static_cast(create(json, QString("SWGWorkspaceInfo"))); + worker->deleteLater(); + + if (worker->error_type == QNetworkReply::NoError) { + emit devicesetDeviceWorkspaceGetSignal(output); + } else { + emit devicesetDeviceWorkspaceGetSignalE(output, error_type, error_str); + emit devicesetDeviceWorkspaceGetSignalEFull(worker, error_type, error_str); + } +} + +void +SWGDeviceSetApi::devicesetDeviceWorkspacePut(qint32 device_set_index, SWGWorkspaceInfo& body) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/device/workspace"); + + QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}"); + fullPath.replace(device_set_indexPathParam, stringValue(device_set_index)); + + + SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); + SWGHttpRequestInput input(fullPath, "PUT"); + + + + QString output = body.asJson(); + input.request_body.append(output.toUtf8()); + + + + foreach(QString key, this->defaultHeaders.keys()) { + input.headers.insert(key, this->defaultHeaders.value(key)); + } + + connect(worker, + &SWGHttpRequestWorker::on_execution_finished, + this, + &SWGDeviceSetApi::devicesetDeviceWorkspacePutCallback); + + worker->execute(&input); +} + +void +SWGDeviceSetApi::devicesetDeviceWorkspacePutCallback(SWGHttpRequestWorker * worker) { + QString msg; + QString error_str = worker->error_str; + QNetworkReply::NetworkError error_type = worker->error_type; + + if (worker->error_type == QNetworkReply::NoError) { + msg = QString("Success! %1 bytes").arg(worker->response.length()); + } + else { + msg = "Error: " + worker->error_str; + } + + + QString json(worker->response); + SWGSuccessResponse* output = static_cast(create(json, QString("SWGSuccessResponse"))); + worker->deleteLater(); + + if (worker->error_type == QNetworkReply::NoError) { + emit devicesetDeviceWorkspacePutSignal(output); + } else { + emit devicesetDeviceWorkspacePutSignalE(output, error_type, error_str); + emit devicesetDeviceWorkspacePutSignalEFull(worker, error_type, error_str); + } +} + void SWGDeviceSetApi::devicesetFocusPatch(qint32 device_set_index) { QString fullPath; @@ -1600,6 +1826,117 @@ SWGDeviceSetApi::devicesetSpectrumSettingsPutCallback(SWGHttpRequestWorker * wor } } +void +SWGDeviceSetApi::devicesetSpectrumWorkspaceGet(qint32 device_set_index) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/spectrum/workspace"); + + QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}"); + fullPath.replace(device_set_indexPathParam, stringValue(device_set_index)); + + + SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); + SWGHttpRequestInput input(fullPath, "GET"); + + + + + + foreach(QString key, this->defaultHeaders.keys()) { + input.headers.insert(key, this->defaultHeaders.value(key)); + } + + connect(worker, + &SWGHttpRequestWorker::on_execution_finished, + this, + &SWGDeviceSetApi::devicesetSpectrumWorkspaceGetCallback); + + worker->execute(&input); +} + +void +SWGDeviceSetApi::devicesetSpectrumWorkspaceGetCallback(SWGHttpRequestWorker * worker) { + QString msg; + QString error_str = worker->error_str; + QNetworkReply::NetworkError error_type = worker->error_type; + + if (worker->error_type == QNetworkReply::NoError) { + msg = QString("Success! %1 bytes").arg(worker->response.length()); + } + else { + msg = "Error: " + worker->error_str; + } + + + QString json(worker->response); + SWGWorkspaceInfo* output = static_cast(create(json, QString("SWGWorkspaceInfo"))); + worker->deleteLater(); + + if (worker->error_type == QNetworkReply::NoError) { + emit devicesetSpectrumWorkspaceGetSignal(output); + } else { + emit devicesetSpectrumWorkspaceGetSignalE(output, error_type, error_str); + emit devicesetSpectrumWorkspaceGetSignalEFull(worker, error_type, error_str); + } +} + +void +SWGDeviceSetApi::devicesetSpectrumWorkspacePut(qint32 device_set_index, SWGWorkspaceInfo& body) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/spectrum/workspace"); + + QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}"); + fullPath.replace(device_set_indexPathParam, stringValue(device_set_index)); + + + SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); + SWGHttpRequestInput input(fullPath, "PUT"); + + + + QString output = body.asJson(); + input.request_body.append(output.toUtf8()); + + + + foreach(QString key, this->defaultHeaders.keys()) { + input.headers.insert(key, this->defaultHeaders.value(key)); + } + + connect(worker, + &SWGHttpRequestWorker::on_execution_finished, + this, + &SWGDeviceSetApi::devicesetSpectrumWorkspacePutCallback); + + worker->execute(&input); +} + +void +SWGDeviceSetApi::devicesetSpectrumWorkspacePutCallback(SWGHttpRequestWorker * worker) { + QString msg; + QString error_str = worker->error_str; + QNetworkReply::NetworkError error_type = worker->error_type; + + if (worker->error_type == QNetworkReply::NoError) { + msg = QString("Success! %1 bytes").arg(worker->response.length()); + } + else { + msg = "Error: " + worker->error_str; + } + + + QString json(worker->response); + SWGSuccessResponse* output = static_cast(create(json, QString("SWGSuccessResponse"))); + worker->deleteLater(); + + if (worker->error_type == QNetworkReply::NoError) { + emit devicesetSpectrumWorkspacePutSignal(output); + } else { + emit devicesetSpectrumWorkspacePutSignalE(output, error_type, error_str); + emit devicesetSpectrumWorkspacePutSignalEFull(worker, error_type, error_str); + } +} + void SWGDeviceSetApi::instanceDeviceSetDelete() { QString fullPath; diff --git a/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.h b/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.h index d0cf0a1d8..808cb02cc 100644 --- a/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.h +++ b/swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.h @@ -29,6 +29,7 @@ #include "SWGGLSpectrum.h" #include "SWGSpectrumServer.h" #include "SWGSuccessResponse.h" +#include "SWGWorkspaceInfo.h" #include @@ -53,6 +54,8 @@ public: void devicesetChannelSettingsGet(qint32 device_set_index, qint32 channel_index); void devicesetChannelSettingsPatch(qint32 device_set_index, qint32 channel_index, SWGChannelSettings& body); void devicesetChannelSettingsPut(qint32 device_set_index, qint32 channel_index, SWGChannelSettings& body); + void devicesetChannelWorkspaceGet(qint32 device_set_index, qint32 channel_index); + void devicesetChannelWorkspacePut(qint32 device_set_index, qint32 channel_index, SWGWorkspaceInfo& body); void devicesetChannelsReportGet(qint32 device_set_index); void devicesetDeviceActionsPost(qint32 device_set_index, SWGDeviceActions& body); void devicesetDevicePut(qint32 device_set_index, SWGDeviceListItem& body); @@ -66,6 +69,8 @@ public: void devicesetDeviceSubsystemRunDelete(qint32 device_set_index, qint32 subsystem_index, SWGDeviceSettings& body); void devicesetDeviceSubsystemRunGet(qint32 device_set_index, qint32 subsystem_index); void devicesetDeviceSubsystemRunPost(qint32 device_set_index, qint32 subsystem_index, SWGDeviceSettings& body); + void devicesetDeviceWorkspaceGet(qint32 device_set_index); + void devicesetDeviceWorkspacePut(qint32 device_set_index, SWGWorkspaceInfo& body); void devicesetFocusPatch(qint32 device_set_index); void devicesetGet(qint32 device_set_index); void devicesetSpectrumServerDelete(qint32 device_set_index); @@ -74,6 +79,8 @@ public: void devicesetSpectrumSettingsGet(qint32 device_set_index); void devicesetSpectrumSettingsPatch(qint32 device_set_index, SWGGLSpectrum& body); void devicesetSpectrumSettingsPut(qint32 device_set_index, SWGGLSpectrum& body); + void devicesetSpectrumWorkspaceGet(qint32 device_set_index); + void devicesetSpectrumWorkspacePut(qint32 device_set_index, SWGWorkspaceInfo& body); void instanceDeviceSetDelete(); void instanceDeviceSetPost(qint32 direction); @@ -85,6 +92,8 @@ private: void devicesetChannelSettingsGetCallback (SWGHttpRequestWorker * worker); void devicesetChannelSettingsPatchCallback (SWGHttpRequestWorker * worker); void devicesetChannelSettingsPutCallback (SWGHttpRequestWorker * worker); + void devicesetChannelWorkspaceGetCallback (SWGHttpRequestWorker * worker); + void devicesetChannelWorkspacePutCallback (SWGHttpRequestWorker * worker); void devicesetChannelsReportGetCallback (SWGHttpRequestWorker * worker); void devicesetDeviceActionsPostCallback (SWGHttpRequestWorker * worker); void devicesetDevicePutCallback (SWGHttpRequestWorker * worker); @@ -98,6 +107,8 @@ private: void devicesetDeviceSubsystemRunDeleteCallback (SWGHttpRequestWorker * worker); void devicesetDeviceSubsystemRunGetCallback (SWGHttpRequestWorker * worker); void devicesetDeviceSubsystemRunPostCallback (SWGHttpRequestWorker * worker); + void devicesetDeviceWorkspaceGetCallback (SWGHttpRequestWorker * worker); + void devicesetDeviceWorkspacePutCallback (SWGHttpRequestWorker * worker); void devicesetFocusPatchCallback (SWGHttpRequestWorker * worker); void devicesetGetCallback (SWGHttpRequestWorker * worker); void devicesetSpectrumServerDeleteCallback (SWGHttpRequestWorker * worker); @@ -106,6 +117,8 @@ private: void devicesetSpectrumSettingsGetCallback (SWGHttpRequestWorker * worker); void devicesetSpectrumSettingsPatchCallback (SWGHttpRequestWorker * worker); void devicesetSpectrumSettingsPutCallback (SWGHttpRequestWorker * worker); + void devicesetSpectrumWorkspaceGetCallback (SWGHttpRequestWorker * worker); + void devicesetSpectrumWorkspacePutCallback (SWGHttpRequestWorker * worker); void instanceDeviceSetDeleteCallback (SWGHttpRequestWorker * worker); void instanceDeviceSetPostCallback (SWGHttpRequestWorker * worker); @@ -117,6 +130,8 @@ signals: void devicesetChannelSettingsGetSignal(SWGChannelSettings* summary); void devicesetChannelSettingsPatchSignal(SWGChannelSettings* summary); void devicesetChannelSettingsPutSignal(SWGChannelSettings* summary); + void devicesetChannelWorkspaceGetSignal(SWGWorkspaceInfo* summary); + void devicesetChannelWorkspacePutSignal(SWGSuccessResponse* summary); void devicesetChannelsReportGetSignal(SWGChannelsDetail* summary); void devicesetDeviceActionsPostSignal(SWGSuccessResponse* summary); void devicesetDevicePutSignal(SWGDeviceListItem* summary); @@ -130,6 +145,8 @@ signals: void devicesetDeviceSubsystemRunDeleteSignal(SWGDeviceState* summary); void devicesetDeviceSubsystemRunGetSignal(SWGDeviceState* summary); void devicesetDeviceSubsystemRunPostSignal(SWGDeviceState* summary); + void devicesetDeviceWorkspaceGetSignal(SWGWorkspaceInfo* summary); + void devicesetDeviceWorkspacePutSignal(SWGSuccessResponse* summary); void devicesetFocusPatchSignal(SWGSuccessResponse* summary); void devicesetGetSignal(SWGDeviceSet* summary); void devicesetSpectrumServerDeleteSignal(SWGSuccessResponse* summary); @@ -138,6 +155,8 @@ signals: void devicesetSpectrumSettingsGetSignal(SWGGLSpectrum* summary); void devicesetSpectrumSettingsPatchSignal(SWGGLSpectrum* summary); void devicesetSpectrumSettingsPutSignal(SWGGLSpectrum* summary); + void devicesetSpectrumWorkspaceGetSignal(SWGWorkspaceInfo* summary); + void devicesetSpectrumWorkspacePutSignal(SWGSuccessResponse* summary); void instanceDeviceSetDeleteSignal(SWGSuccessResponse* summary); void instanceDeviceSetPostSignal(SWGSuccessResponse* summary); @@ -148,6 +167,8 @@ signals: void devicesetChannelSettingsGetSignalE(SWGChannelSettings* summary, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetChannelSettingsPatchSignalE(SWGChannelSettings* summary, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetChannelSettingsPutSignalE(SWGChannelSettings* summary, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetChannelWorkspaceGetSignalE(SWGWorkspaceInfo* summary, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetChannelWorkspacePutSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetChannelsReportGetSignalE(SWGChannelsDetail* summary, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetDeviceActionsPostSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetDevicePutSignalE(SWGDeviceListItem* summary, QNetworkReply::NetworkError error_type, QString& error_str); @@ -161,6 +182,8 @@ signals: void devicesetDeviceSubsystemRunDeleteSignalE(SWGDeviceState* summary, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetDeviceSubsystemRunGetSignalE(SWGDeviceState* summary, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetDeviceSubsystemRunPostSignalE(SWGDeviceState* summary, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetDeviceWorkspaceGetSignalE(SWGWorkspaceInfo* summary, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetDeviceWorkspacePutSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetFocusPatchSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetGetSignalE(SWGDeviceSet* summary, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetSpectrumServerDeleteSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str); @@ -169,6 +192,8 @@ signals: void devicesetSpectrumSettingsGetSignalE(SWGGLSpectrum* summary, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetSpectrumSettingsPatchSignalE(SWGGLSpectrum* summary, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetSpectrumSettingsPutSignalE(SWGGLSpectrum* summary, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetSpectrumWorkspaceGetSignalE(SWGWorkspaceInfo* summary, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetSpectrumWorkspacePutSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str); void instanceDeviceSetDeleteSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str); void instanceDeviceSetPostSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str); @@ -179,6 +204,8 @@ signals: void devicesetChannelSettingsGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetChannelSettingsPatchSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetChannelSettingsPutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetChannelWorkspaceGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetChannelWorkspacePutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetChannelsReportGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetDeviceActionsPostSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetDevicePutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); @@ -192,6 +219,8 @@ signals: void devicesetDeviceSubsystemRunDeleteSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetDeviceSubsystemRunGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetDeviceSubsystemRunPostSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetDeviceWorkspaceGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetDeviceWorkspacePutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetFocusPatchSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetSpectrumServerDeleteSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); @@ -200,6 +229,8 @@ signals: void devicesetSpectrumSettingsGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetSpectrumSettingsPatchSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void devicesetSpectrumSettingsPutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetSpectrumWorkspaceGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + void devicesetSpectrumWorkspacePutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void instanceDeviceSetDeleteSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void instanceDeviceSetPostSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); diff --git a/swagger/sdrangel/code/qt5/client/SWGFeatureSetApi.cpp b/swagger/sdrangel/code/qt5/client/SWGFeatureSetApi.cpp index c35ae5cd4..9f66210ba 100644 --- a/swagger/sdrangel/code/qt5/client/SWGFeatureSetApi.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGFeatureSetApi.cpp @@ -578,6 +578,117 @@ SWGFeatureSetApi::featuresetFeatureSettingsPatchCallback(SWGHttpRequestWorker * } } +void +SWGFeatureSetApi::featuresetFeatureWorkspaceGet(qint32 feature_index) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/featureset/feature/{featureIndex}/workspace"); + + QString feature_indexPathParam("{"); feature_indexPathParam.append("featureIndex").append("}"); + fullPath.replace(feature_indexPathParam, stringValue(feature_index)); + + + SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); + SWGHttpRequestInput input(fullPath, "GET"); + + + + + + foreach(QString key, this->defaultHeaders.keys()) { + input.headers.insert(key, this->defaultHeaders.value(key)); + } + + connect(worker, + &SWGHttpRequestWorker::on_execution_finished, + this, + &SWGFeatureSetApi::featuresetFeatureWorkspaceGetCallback); + + worker->execute(&input); +} + +void +SWGFeatureSetApi::featuresetFeatureWorkspaceGetCallback(SWGHttpRequestWorker * worker) { + QString msg; + QString error_str = worker->error_str; + QNetworkReply::NetworkError error_type = worker->error_type; + + if (worker->error_type == QNetworkReply::NoError) { + msg = QString("Success! %1 bytes").arg(worker->response.length()); + } + else { + msg = "Error: " + worker->error_str; + } + + + QString json(worker->response); + SWGWorkspaceInfo* output = static_cast(create(json, QString("SWGWorkspaceInfo"))); + worker->deleteLater(); + + if (worker->error_type == QNetworkReply::NoError) { + emit featuresetFeatureWorkspaceGetSignal(output); + } else { + emit featuresetFeatureWorkspaceGetSignalE(output, error_type, error_str); + emit featuresetFeatureWorkspaceGetSignalEFull(worker, error_type, error_str); + } +} + +void +SWGFeatureSetApi::featuresetFeatureWorkspacePut(qint32 feature_index, SWGWorkspaceInfo& body) { + QString fullPath; + fullPath.append(this->host).append(this->basePath).append("/sdrangel/featureset/feature/{featureIndex}/workspace"); + + QString feature_indexPathParam("{"); feature_indexPathParam.append("featureIndex").append("}"); + fullPath.replace(feature_indexPathParam, stringValue(feature_index)); + + + SWGHttpRequestWorker *worker = new SWGHttpRequestWorker(); + SWGHttpRequestInput input(fullPath, "PUT"); + + + + QString output = body.asJson(); + input.request_body.append(output.toUtf8()); + + + + foreach(QString key, this->defaultHeaders.keys()) { + input.headers.insert(key, this->defaultHeaders.value(key)); + } + + connect(worker, + &SWGHttpRequestWorker::on_execution_finished, + this, + &SWGFeatureSetApi::featuresetFeatureWorkspacePutCallback); + + worker->execute(&input); +} + +void +SWGFeatureSetApi::featuresetFeatureWorkspacePutCallback(SWGHttpRequestWorker * worker) { + QString msg; + QString error_str = worker->error_str; + QNetworkReply::NetworkError error_type = worker->error_type; + + if (worker->error_type == QNetworkReply::NoError) { + msg = QString("Success! %1 bytes").arg(worker->response.length()); + } + else { + msg = "Error: " + worker->error_str; + } + + + QString json(worker->response); + SWGSuccessResponse* output = static_cast(create(json, QString("SWGSuccessResponse"))); + worker->deleteLater(); + + if (worker->error_type == QNetworkReply::NoError) { + emit featuresetFeatureWorkspacePutSignal(output); + } else { + emit featuresetFeatureWorkspacePutSignalE(output, error_type, error_str); + emit featuresetFeatureWorkspacePutSignalEFull(worker, error_type, error_str); + } +} + void SWGFeatureSetApi::featuresetGet() { QString fullPath; diff --git a/swagger/sdrangel/code/qt5/client/SWGFeatureSetApi.h b/swagger/sdrangel/code/qt5/client/SWGFeatureSetApi.h index 712d54f44..69356b9de 100644 --- a/swagger/sdrangel/code/qt5/client/SWGFeatureSetApi.h +++ b/swagger/sdrangel/code/qt5/client/SWGFeatureSetApi.h @@ -24,6 +24,7 @@ #include "SWGFeatureSettings.h" #include "SWGPresetIdentifier.h" #include "SWGSuccessResponse.h" +#include "SWGWorkspaceInfo.h" #include @@ -51,6 +52,8 @@ public: void featuresetFeatureRunPost(qint32 feature_index); void featuresetFeatureSettingsGet(qint32 feature_index); void featuresetFeatureSettingsPatch(qint32 feature_index, SWGFeatureSettings& body); + void featuresetFeatureWorkspaceGet(qint32 feature_index); + void featuresetFeatureWorkspacePut(qint32 feature_index, SWGWorkspaceInfo& body); void featuresetGet(); void featuresetPresetPatch(SWGFeaturePresetIdentifier& body); void featuresetPresetPost(SWGFeaturePresetIdentifier& body); @@ -67,6 +70,8 @@ private: void featuresetFeatureRunPostCallback (SWGHttpRequestWorker * worker); void featuresetFeatureSettingsGetCallback (SWGHttpRequestWorker * worker); void featuresetFeatureSettingsPatchCallback (SWGHttpRequestWorker * worker); + void featuresetFeatureWorkspaceGetCallback (SWGHttpRequestWorker * worker); + void featuresetFeatureWorkspacePutCallback (SWGHttpRequestWorker * worker); void featuresetGetCallback (SWGHttpRequestWorker * worker); void featuresetPresetPatchCallback (SWGHttpRequestWorker * worker); void featuresetPresetPostCallback (SWGHttpRequestWorker * worker); @@ -83,6 +88,8 @@ signals: void featuresetFeatureRunPostSignal(SWGDeviceState* summary); void featuresetFeatureSettingsGetSignal(SWGFeatureSettings* summary); void featuresetFeatureSettingsPatchSignal(SWGFeatureSettings* summary); + void featuresetFeatureWorkspaceGetSignal(SWGWorkspaceInfo* summary); + void featuresetFeatureWorkspacePutSignal(SWGSuccessResponse* summary); void featuresetGetSignal(SWGFeatureSet* summary); void featuresetPresetPatchSignal(SWGFeaturePresetIdentifier* summary); void featuresetPresetPostSignal(SWGPresetIdentifier* summary); @@ -98,6 +105,8 @@ signals: void featuresetFeatureRunPostSignalE(SWGDeviceState* summary, QNetworkReply::NetworkError error_type, QString& error_str); void featuresetFeatureSettingsGetSignalE(SWGFeatureSettings* summary, QNetworkReply::NetworkError error_type, QString& error_str); void featuresetFeatureSettingsPatchSignalE(SWGFeatureSettings* summary, QNetworkReply::NetworkError error_type, QString& error_str); + void featuresetFeatureWorkspaceGetSignalE(SWGWorkspaceInfo* summary, QNetworkReply::NetworkError error_type, QString& error_str); + void featuresetFeatureWorkspacePutSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str); void featuresetGetSignalE(SWGFeatureSet* summary, QNetworkReply::NetworkError error_type, QString& error_str); void featuresetPresetPatchSignalE(SWGFeaturePresetIdentifier* summary, QNetworkReply::NetworkError error_type, QString& error_str); void featuresetPresetPostSignalE(SWGPresetIdentifier* summary, QNetworkReply::NetworkError error_type, QString& error_str); @@ -113,6 +122,8 @@ signals: void featuresetFeatureRunPostSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void featuresetFeatureSettingsGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void featuresetFeatureSettingsPatchSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + void featuresetFeatureWorkspaceGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); + void featuresetFeatureWorkspacePutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void featuresetGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void featuresetPresetPatchSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); void featuresetPresetPostSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str); diff --git a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h index 3009f2864..6cc164b54 100644 --- a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h +++ b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h @@ -317,6 +317,7 @@ #include "SWGWFMDemodSettings.h" #include "SWGWFMModReport.h" #include "SWGWFMModSettings.h" +#include "SWGWorkspaceInfo.h" #include "SWGXtrxInputReport.h" #include "SWGXtrxInputSettings.h" #include "SWGXtrxMIMOReport.h" @@ -1842,6 +1843,11 @@ namespace SWGSDRangel { obj->init(); return obj; } + if(QString("SWGWorkspaceInfo").compare(type) == 0) { + SWGWorkspaceInfo *obj = new SWGWorkspaceInfo(); + obj->init(); + return obj; + } if(QString("SWGXtrxInputReport").compare(type) == 0) { SWGXtrxInputReport *obj = new SWGXtrxInputReport(); obj->init(); diff --git a/swagger/sdrangel/code/qt5/client/SWGWorkspaceInfo.cpp b/swagger/sdrangel/code/qt5/client/SWGWorkspaceInfo.cpp new file mode 100644 index 000000000..80b97d873 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGWorkspaceInfo.cpp @@ -0,0 +1,108 @@ +/** + * SDRangel + * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time --- + * + * OpenAPI spec version: 6.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +#include "SWGWorkspaceInfo.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGWorkspaceInfo::SWGWorkspaceInfo(QString* json) { + init(); + this->fromJson(*json); +} + +SWGWorkspaceInfo::SWGWorkspaceInfo() { + index = 0; + m_index_isSet = false; +} + +SWGWorkspaceInfo::~SWGWorkspaceInfo() { + this->cleanup(); +} + +void +SWGWorkspaceInfo::init() { + index = 0; + m_index_isSet = false; +} + +void +SWGWorkspaceInfo::cleanup() { + +} + +SWGWorkspaceInfo* +SWGWorkspaceInfo::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGWorkspaceInfo::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&index, pJson["index"], "qint32", ""); + +} + +QString +SWGWorkspaceInfo::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGWorkspaceInfo::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(m_index_isSet){ + obj->insert("index", QJsonValue(index)); + } + + return obj; +} + +qint32 +SWGWorkspaceInfo::getIndex() { + return index; +} +void +SWGWorkspaceInfo::setIndex(qint32 index) { + this->index = index; + this->m_index_isSet = true; +} + + +bool +SWGWorkspaceInfo::isSet(){ + bool isObjectUpdated = false; + do{ + if(m_index_isSet){ + isObjectUpdated = true; break; + } + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGWorkspaceInfo.h b/swagger/sdrangel/code/qt5/client/SWGWorkspaceInfo.h new file mode 100644 index 000000000..c49005842 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGWorkspaceInfo.h @@ -0,0 +1,58 @@ +/** + * SDRangel + * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time --- + * + * OpenAPI spec version: 6.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/* + * SWGWorkspaceInfo.h + * + * Workspace information + */ + +#ifndef SWGWorkspaceInfo_H_ +#define SWGWorkspaceInfo_H_ + +#include + + + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGWorkspaceInfo: public SWGObject { +public: + SWGWorkspaceInfo(); + SWGWorkspaceInfo(QString* json); + virtual ~SWGWorkspaceInfo(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGWorkspaceInfo* fromJson(QString &jsonString) override; + + qint32 getIndex(); + void setIndex(qint32 index); + + + virtual bool isSet() override; + +private: + qint32 index; + bool m_index_isSet; + +}; + +} + +#endif /* SWGWorkspaceInfo_H_ */