mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-01 21:54:55 -04:00
Web API: /sdrangel/deviceset/{index} (GET) implementation
This commit is contained in:
@@ -593,6 +593,27 @@ int WebAPIAdapterGUI::instanceDeviceSetsDelete(
|
||||
}
|
||||
}
|
||||
|
||||
int WebAPIAdapterGUI::devicesetGet(
|
||||
int deviceSetIndex,
|
||||
Swagger::SWGDeviceSet& response,
|
||||
Swagger::SWGErrorResponse& error)
|
||||
{
|
||||
if ((deviceSetIndex >= 0) && (deviceSetIndex < (int) m_mainWindow.m_deviceUIs.size()))
|
||||
{
|
||||
const DeviceUISet *deviceSet = m_mainWindow.m_deviceUIs[deviceSetIndex];
|
||||
getDeviceSet(&response, deviceSet, deviceSetIndex);
|
||||
|
||||
return 200;
|
||||
}
|
||||
else
|
||||
{
|
||||
error.init();
|
||||
*error.getMessage() = QString("There is no device set with index %1").arg(deviceSetIndex);
|
||||
|
||||
return 404;
|
||||
}
|
||||
}
|
||||
|
||||
void WebAPIAdapterGUI::getDeviceSetList(Swagger::SWGDeviceSetList* deviceSetList)
|
||||
{
|
||||
deviceSetList->init();
|
||||
|
||||
Reference in New Issue
Block a user