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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user