1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-07 00:14:49 -04:00

UDP Sink: Web API: settings and report implementation

This commit is contained in:
f4exb
2018-04-15 18:25:22 +02:00
parent 62998101d3
commit 274e6c645d
23 changed files with 1476 additions and 33 deletions
+28
View File
@@ -1931,6 +1931,20 @@ bool WebAPIRequestMapper::validateChannelSettings(
return false;
}
}
else if (*channelType == "UDPSink")
{
if (channelSettings.getTx() != 0)
{
QJsonObject udpSinkSettingsJsonObject = jsonObject["UDPSinkSettings"].toObject();
channelSettingsKeys = udpSinkSettingsJsonObject.keys();
channelSettings.setUdpSinkSettings(new SWGSDRangel::SWGUDPSinkSettings());
channelSettings.getUdpSinkSettings()->fromJsonObject(udpSinkSettingsJsonObject);
return true;
}
else {
return false;
}
}
else if (*channelType == "WFMMod")
{
if (channelSettings.getTx() != 0)
@@ -2061,6 +2075,20 @@ bool WebAPIRequestMapper::validateChannelReport(
return false;
}
}
else if (*channelType == "UDPSink")
{
if (channelReport.getTx() != 0)
{
QJsonObject udpSinkReportJsonObject = jsonObject["UDPSinkReport"].toObject();
channelReportKeys = udpSinkReportJsonObject.keys();
channelReport.setUdpSinkReport(new SWGSDRangel::SWGUDPSinkReport());
channelReport.getUdpSinkReport()->fromJsonObject(udpSinkReportJsonObject);
return true;
}
else {
return false;
}
}
else if (*channelType == "WFMMod")
{
if (channelReport.getTx() != 0)