20 #include <QDirIterator> 21 #include <QJsonDocument> 24 #include <boost/lexical_cast.hpp> 51 HttpRequestHandler(parent),
55 Q_INIT_RESOURCE(webapi);
58 docrootSettings.
path =
":/webapi";
66 Q_CLEANUP_RESOURCE(webapi);
75 response.
setHeader(
"Content-Type",
"application/json");
76 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
77 response.
setStatus(500,
"Service not available");
80 *errorResponse.
getMessage() =
"Service not available";
85 QByteArray path=request.
getPath();
90 qDebug(
"WebAPIRequestMapper::service: method OPTIONS: assume pre-flight");
91 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
92 response.
setHeader(
"Access-Control-Allow-Headers",
"*");
93 response.
setHeader(
"Access-Control-Allow-Methods",
"*");
137 std::smatch desc_match;
138 std::string pathStr(path.constData(), path.length());
180 response.
setHeader(
"Content-Type",
"application/json");
181 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
190 if (status/100 == 2) {
196 else if (request.
getMethod() ==
"DELETE")
203 if (status/100 == 2) {
211 response.
setStatus(405,
"Invalid HTTP method");
212 errorResponse.
init();
213 *errorResponse.
getMessage() =
"Invalid HTTP method";
221 response.
setHeader(
"Content-Type",
"application/json");
222 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
230 if (status/100 == 2) {
242 response.
setHeader(
"Content-Type",
"application/json");
243 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
250 if (dirStr.length() != 0)
253 int tmp = dirStr.toInt(&ok);
262 if (status/100 == 2) {
270 response.
setStatus(405,
"Invalid HTTP method");
271 errorResponse.
init();
272 *errorResponse.
getMessage() =
"Invalid HTTP method";
281 response.
setHeader(
"Content-Type",
"application/json");
282 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
289 if (dirStr.length() != 0)
292 int tmp = dirStr.toInt(&ok);
301 if (status/100 == 2) {
309 response.
setStatus(405,
"Invalid HTTP method");
310 errorResponse.
init();
311 *errorResponse.
getMessage() =
"Invalid HTTP method";
321 response.
setHeader(
"Content-Type",
"application/json");
322 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
329 if (status/100 == 2) {
337 QString jsonStr = request.
getBody();
338 QJsonObject jsonObject;
346 if (status/100 == 2) {
354 response.
setStatus(400,
"Invalid JSON format");
355 errorResponse.
init();
356 *errorResponse.
getMessage() =
"Invalid JSON format";
362 response.
setStatus(405,
"Invalid HTTP method");
363 errorResponse.
init();
364 *errorResponse.
getMessage() =
"Invalid HTTP method";
372 response.
setHeader(
"Content-Type",
"application/json");
373 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
382 if (status/100 == 2) {
390 response.
setStatus(405,
"Invalid HTTP method");
391 errorResponse.
init();
392 *errorResponse.
getMessage() =
"Invalid HTTP method";
400 response.
setHeader(
"Content-Type",
"application/json");
401 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
403 QString jsonStr = request.
getBody();
404 QJsonObject jsonObject;
410 QStringList audioInputDeviceKeys;
418 audioInputDeviceKeys,
422 if (status/100 == 2) {
428 else if (request.
getMethod() ==
"DELETE")
435 if (status/100 == 2) {
443 response.
setStatus(405,
"Invalid HTTP method");
444 errorResponse.
init();
445 *errorResponse.
getMessage() =
"Invalid HTTP method";
451 response.
setStatus(400,
"Invalid JSON request");
452 errorResponse.
init();
453 *errorResponse.
getMessage() =
"Invalid JSON request";
459 response.
setStatus(400,
"Invalid JSON format");
460 errorResponse.
init();
461 *errorResponse.
getMessage() =
"Invalid JSON format";
469 response.
setHeader(
"Content-Type",
"application/json");
470 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
472 QString jsonStr = request.
getBody();
473 QJsonObject jsonObject;
479 QStringList audioOutputDeviceKeys;
487 audioOutputDeviceKeys,
491 if (status/100 == 2) {
497 else if (request.
getMethod() ==
"DELETE")
504 if (status/100 == 2) {
512 response.
setStatus(405,
"Invalid HTTP method");
513 errorResponse.
init();
514 *errorResponse.
getMessage() =
"Invalid HTTP method";
520 response.
setStatus(400,
"Invalid JSON request");
521 errorResponse.
init();
522 *errorResponse.
getMessage() =
"Invalid JSON request";
528 response.
setStatus(400,
"Invalid JSON format");
529 errorResponse.
init();
530 *errorResponse.
getMessage() =
"Invalid JSON format";
538 response.
setHeader(
"Content-Type",
"application/json");
539 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
548 if (status/100 == 2) {
556 response.
setStatus(405,
"Invalid HTTP method");
557 errorResponse.
init();
558 *errorResponse.
getMessage() =
"Invalid HTTP method";
566 response.
setHeader(
"Content-Type",
"application/json");
567 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
576 if (status/100 == 2) {
584 response.
setStatus(405,
"Invalid HTTP method");
585 errorResponse.
init();
586 *errorResponse.
getMessage() =
"Invalid HTTP method";
594 response.
setHeader(
"Content-Type",
"application/json");
595 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
604 if (status/100 == 2) {
613 QString jsonStr = request.
getBody();
614 QJsonObject jsonObject;
622 if (status/100 == 2) {
630 response.
setStatus(400,
"Invalid JSON format");
631 errorResponse.
init();
632 *errorResponse.
getMessage() =
"Invalid JSON format";
638 response.
setStatus(405,
"Invalid HTTP method");
639 errorResponse.
init();
640 *errorResponse.
getMessage() =
"Invalid HTTP method";
648 response.
setHeader(
"Content-Type",
"application/json");
649 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
658 if (status/100 == 2) {
666 response.
setStatus(405,
"Invalid HTTP method");
667 errorResponse.
init();
668 *errorResponse.
getMessage() =
"Invalid HTTP method";
676 response.
setHeader(
"Content-Type",
"application/json");
677 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
686 if (status/100 == 2) {
696 QString jsonStr = request.
getBody();
697 QJsonObject jsonObject;
713 if (status/100 == 2) {
721 response.
setStatus(400,
"Invalid JSON request");
722 errorResponse.
init();
723 *errorResponse.
getMessage() =
"Invalid JSON request";
729 response.
setStatus(400,
"Invalid JSON format");
730 errorResponse.
init();
731 *errorResponse.
getMessage() =
"Invalid JSON format";
735 else if (request.
getMethod() ==
"DELETE")
742 if (status/100 == 2) {
750 response.
setStatus(405,
"Invalid HTTP method");
751 errorResponse.
init();
752 *errorResponse.
getMessage() =
"Invalid HTTP method";
760 response.
setHeader(
"Content-Type",
"application/json");
761 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
769 if (status/100 == 2) {
780 response.
setHeader(
"Content-Type",
"application/json");
781 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
787 QString jsonStr = request.
getBody();
788 QJsonObject jsonObject;
799 if (status/100 == 2) {
807 response.
setStatus(400,
"Invalid JSON request");
808 errorResponse.
init();
809 *errorResponse.
getMessage() =
"Invalid JSON request";
815 response.
setStatus(400,
"Invalid JSON format");
816 errorResponse.
init();
817 *errorResponse.
getMessage() =
"Invalid JSON format";
825 QString jsonStr = request.
getBody();
826 QJsonObject jsonObject;
837 if (status/100 == 2) {
845 response.
setStatus(400,
"Invalid JSON request");
846 errorResponse.
init();
847 *errorResponse.
getMessage() =
"Invalid JSON request";
853 response.
setStatus(400,
"Invalid JSON format");
854 errorResponse.
init();
855 *errorResponse.
getMessage() =
"Invalid JSON format";
863 QString jsonStr = request.
getBody();
864 QJsonObject jsonObject;
875 if (status/100 == 2) {
883 response.
setStatus(400,
"Invalid JSON request");
884 errorResponse.
init();
885 *errorResponse.
getMessage() =
"Invalid JSON request";
891 response.
setStatus(400,
"Invalid JSON format");
892 errorResponse.
init();
893 *errorResponse.
getMessage() =
"Invalid JSON format";
897 else if (request.
getMethod() ==
"DELETE")
900 QString jsonStr = request.
getBody();
901 QJsonObject jsonObject;
912 if (status/100 == 2) {
920 response.
setStatus(400,
"Invalid JSON request");
921 errorResponse.
init();
922 *errorResponse.
getMessage() =
"Invalid JSON request";
928 response.
setStatus(400,
"Invalid JSON format");
929 errorResponse.
init();
930 *errorResponse.
getMessage() =
"Invalid JSON format";
936 response.
setStatus(405,
"Invalid HTTP method");
937 errorResponse.
init();
938 *errorResponse.
getMessage() =
"Invalid HTTP method";
946 response.
setHeader(
"Content-Type",
"application/json");
947 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
953 QString jsonStr = request.
getBody();
954 QJsonObject jsonObject;
965 if (status/100 == 2) {
973 response.
setStatus(400,
"Invalid JSON request");
974 errorResponse.
init();
975 *errorResponse.
getMessage() =
"Invalid JSON request";
981 response.
setStatus(400,
"Invalid JSON format");
982 errorResponse.
init();
983 *errorResponse.
getMessage() =
"Invalid JSON format";
991 QString jsonStr = request.
getBody();
992 QJsonObject jsonObject;
1003 if (status/100 == 2) {
1011 response.
setStatus(400,
"Invalid JSON request");
1012 errorResponse.
init();
1013 *errorResponse.
getMessage() =
"Invalid JSON request";
1019 response.
setStatus(400,
"Invalid JSON format");
1020 errorResponse.
init();
1021 *errorResponse.
getMessage() =
"Invalid JSON format";
1027 response.
setStatus(405,
"Invalid HTTP method");
1028 errorResponse.
init();
1029 *errorResponse.
getMessage() =
"Invalid HTTP method";
1037 response.
setHeader(
"Content-Type",
"application/json");
1038 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
1046 if (status/100 == 2) {
1054 response.
setStatus(405,
"Invalid HTTP method");
1055 errorResponse.
init();
1056 *errorResponse.
getMessage() =
"Invalid HTTP method";
1064 response.
setHeader(
"Content-Type",
"application/json");
1065 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
1073 if (dirStr.length() != 0)
1076 int tmp = dirStr.toInt(&ok);
1085 if (status/100 == 2) {
1091 else if (request.
getMethod() ==
"DELETE")
1097 if (status/100 == 2) {
1105 response.
setStatus(405,
"Invalid HTTP method");
1106 errorResponse.
init();
1107 *errorResponse.
getMessage() =
"Invalid HTTP method";
1115 response.
setHeader(
"Content-Type",
"application/json");
1116 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
1123 int deviceSetIndex = boost::lexical_cast<
int>(indexStr);
1127 if (status/100 == 2) {
1133 catch (
const boost::bad_lexical_cast &e)
1135 errorResponse.
init();
1136 *errorResponse.
getMessage() =
"Wrong integer conversion on device set index";
1143 response.
setStatus(405,
"Invalid HTTP method");
1144 errorResponse.
init();
1145 *errorResponse.
getMessage() =
"Invalid HTTP method";
1153 response.
setHeader(
"Content-Type",
"application/json");
1154 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
1158 int deviceSetIndex = boost::lexical_cast<
int>(indexStr);
1167 if (status/100 == 2) {
1175 response.
setStatus(405,
"Invalid HTTP method");
1176 errorResponse.
init();
1177 *errorResponse.
getMessage() =
"Invalid HTTP method";
1181 catch (
const boost::bad_lexical_cast &e)
1183 errorResponse.
init();
1184 *errorResponse.
getMessage() =
"Wrong integer conversion on device set index";
1193 response.
setHeader(
"Content-Type",
"application/json");
1194 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
1198 int deviceSetIndex = boost::lexical_cast<
int>(indexStr);
1202 QString jsonStr = request.
getBody();
1203 QJsonObject jsonObject;
1215 if (status/100 == 2) {
1223 response.
setStatus(400,
"Missing device identification");
1224 errorResponse.
init();
1225 *errorResponse.
getMessage() =
"Missing device identification";
1231 response.
setStatus(400,
"Invalid JSON format");
1232 errorResponse.
init();
1233 *errorResponse.
getMessage() =
"Invalid JSON format";
1239 response.
setStatus(405,
"Invalid HTTP method");
1240 errorResponse.
init();
1241 *errorResponse.
getMessage() =
"Invalid HTTP method";
1245 catch (
const boost::bad_lexical_cast &e)
1247 errorResponse.
init();
1248 *errorResponse.
getMessage() =
"Wrong integer conversion on device set index";
1257 response.
setHeader(
"Content-Type",
"application/json");
1258 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
1262 int deviceSetIndex = boost::lexical_cast<
int>(indexStr);
1266 QString jsonStr = request.
getBody();
1267 QJsonObject jsonObject;
1273 QStringList deviceSettingsKeys;
1285 if (status/100 == 2) {
1293 response.
setStatus(400,
"Invalid JSON request");
1294 errorResponse.
init();
1295 *errorResponse.
getMessage() =
"Invalid JSON request";
1301 response.
setStatus(400,
"Invalid JSON format");
1302 errorResponse.
init();
1303 *errorResponse.
getMessage() =
"Invalid JSON format";
1314 if (status/100 == 2) {
1322 response.
setStatus(405,
"Invalid HTTP method");
1323 errorResponse.
init();
1324 *errorResponse.
getMessage() =
"Invalid HTTP method";
1328 catch (
const boost::bad_lexical_cast &e)
1330 errorResponse.
init();
1331 *errorResponse.
getMessage() =
"Wrong integer conversion on device set index";
1340 response.
setHeader(
"Content-Type",
"application/json");
1341 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
1345 int deviceSetIndex = boost::lexical_cast<
int>(indexStr);
1354 if (status/100 == 2) {
1367 if (status/100 == 2) {
1373 else if (request.
getMethod() ==
"DELETE")
1380 if (status/100 == 2) {
1388 response.
setStatus(405,
"Invalid HTTP method");
1389 errorResponse.
init();
1390 *errorResponse.
getMessage() =
"Invalid HTTP method";
1394 catch (
const boost::bad_lexical_cast &e)
1396 errorResponse.
init();
1397 *errorResponse.
getMessage() =
"Wrong integer conversion on device set index";
1406 response.
setHeader(
"Content-Type",
"application/json");
1407 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
1415 int deviceSetIndex = boost::lexical_cast<
int>(indexStr);
1419 if (status/100 == 2) {
1425 catch (
const boost::bad_lexical_cast &e)
1427 errorResponse.
init();
1428 *errorResponse.
getMessage() =
"Wrong integer conversion on device set index";
1435 response.
setStatus(405,
"Invalid HTTP method");
1436 errorResponse.
init();
1437 *errorResponse.
getMessage() =
"Invalid HTTP method";
1445 response.
setHeader(
"Content-Type",
"application/json");
1446 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
1453 int deviceSetIndex = boost::lexical_cast<
int>(indexStr);
1457 if (status/100 == 2) {
1463 catch (
const boost::bad_lexical_cast &e)
1465 errorResponse.
init();
1466 *errorResponse.
getMessage() =
"Wrong integer conversion on device set index";
1473 response.
setStatus(405,
"Invalid HTTP method");
1474 errorResponse.
init();
1475 *errorResponse.
getMessage() =
"Invalid HTTP method";
1481 const std::string& deviceSetIndexStr,
1486 response.
setHeader(
"Content-Type",
"application/json");
1487 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
1491 int deviceSetIndex = boost::lexical_cast<
int>(deviceSetIndexStr);
1495 QString jsonStr = request.
getBody();
1496 QJsonObject jsonObject;
1504 if (jsonObject.contains(
"direction")) {
1510 if (jsonObject.contains(
"channelType") && jsonObject[
"channelType"].isString())
1512 query.
setChannelType(
new QString(jsonObject[
"channelType"].toString()));
1518 if (status/100 == 2) {
1526 response.
setStatus(400,
"Invalid JSON request");
1527 errorResponse.
init();
1528 *errorResponse.
getMessage() =
"Invalid JSON request";
1534 response.
setStatus(400,
"Invalid JSON format");
1535 errorResponse.
init();
1536 *errorResponse.
getMessage() =
"Invalid JSON format";
1542 response.
setStatus(405,
"Invalid HTTP method");
1543 errorResponse.
init();
1544 *errorResponse.
getMessage() =
"Invalid HTTP method";
1548 catch (
const boost::bad_lexical_cast &e)
1550 errorResponse.
init();
1551 *errorResponse.
getMessage() =
"Wrong integer conversion on index";
1558 const std::string& deviceSetIndexStr,
1559 const std::string& channelIndexStr,
1564 response.
setHeader(
"Content-Type",
"application/json");
1565 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
1569 int deviceSetIndex = boost::lexical_cast<
int>(deviceSetIndexStr);
1570 int channelIndex = boost::lexical_cast<
int>(channelIndexStr);
1579 if (status/100 == 2) {
1587 response.
setStatus(405,
"Invalid HTTP method");
1588 errorResponse.
init();
1589 *errorResponse.
getMessage() =
"Invalid HTTP method";
1593 catch (
const boost::bad_lexical_cast &e)
1595 errorResponse.
init();
1596 *errorResponse.
getMessage() =
"Wrong integer conversion on index";
1603 const std::string& deviceSetIndexStr,
1604 const std::string& channelIndexStr,
1609 response.
setHeader(
"Content-Type",
"application/json");
1610 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
1614 int deviceSetIndex = boost::lexical_cast<
int>(deviceSetIndexStr);
1615 int channelIndex = boost::lexical_cast<
int>(channelIndexStr);
1624 if (status/100 == 2) {
1632 QString jsonStr = request.
getBody();
1633 QJsonObject jsonObject;
1639 QStringList channelSettingsKeys;
1647 channelSettingsKeys,
1652 if (status/100 == 2) {
1660 response.
setStatus(400,
"Invalid JSON request");
1661 errorResponse.
init();
1662 *errorResponse.
getMessage() =
"Invalid JSON request";
1668 response.
setStatus(400,
"Invalid JSON format");
1669 errorResponse.
init();
1670 *errorResponse.
getMessage() =
"Invalid JSON format";
1676 response.
setStatus(405,
"Invalid HTTP method");
1677 errorResponse.
init();
1678 *errorResponse.
getMessage() =
"Invalid HTTP method";
1682 catch (
const boost::bad_lexical_cast &e)
1684 errorResponse.
init();
1685 *errorResponse.
getMessage() =
"Wrong integer conversion on index";
1692 const std::string& deviceSetIndexStr,
1693 const std::string& channelIndexStr,
1698 response.
setHeader(
"Content-Type",
"application/json");
1699 response.
setHeader(
"Access-Control-Allow-Origin",
"*");
1703 int deviceSetIndex = boost::lexical_cast<
int>(deviceSetIndexStr);
1704 int channelIndex = boost::lexical_cast<
int>(channelIndexStr);
1713 if (status/100 == 2) {
1720 catch (
const boost::bad_lexical_cast &e)
1722 errorResponse.
init();
1723 *errorResponse.
getMessage() =
"Wrong integer conversion on index";
1735 QByteArray jsonBytes(jsonStr.toStdString().c_str());
1736 QJsonParseError error;
1737 QJsonDocument doc = QJsonDocument::fromJson(jsonBytes, &error);
1739 if (error.error == QJsonParseError::NoError)
1741 jsonObject = doc.object();
1745 QString errorMsg = QString(
"Input JSON error: ") + error.errorString() + QString(
" at offset ") + QString::number(error.offset);
1746 errorResponse.
init();
1748 response.
setStatus(400, errorMsg.toUtf8());
1752 return (error.error == QJsonParseError::NoError);
1754 catch (
const std::exception& ex)
1756 QString errorMsg = QString(
"Error parsing request: ") + ex.what();
1757 errorResponse.
init();
1759 response.
setStatus(500, errorMsg.toUtf8());
1770 if (presetIdentifier == 0) {
1790 if (presetIdentifier == 0) {
1799 if (jsonObject.contains(
"direction")) {
1800 deviceListItem.
setDirection(jsonObject[
"direction"].toInt());
1805 bool identified =
false;
1807 if (jsonObject.contains(
"displayedName") && jsonObject[
"displayedName"].isString())
1809 deviceListItem.
setDisplayedName(
new QString(jsonObject[
"displayedName"].toString()));
1816 if (jsonObject.contains(
"hwType") && jsonObject[
"hwType"].isString())
1818 deviceListItem.
setHwType(
new QString(jsonObject[
"hwType"].toString()));
1824 if (jsonObject.contains(
"serial") && jsonObject[
"serial"].isString())
1826 deviceListItem.
setSerial(
new QString(jsonObject[
"serial"].toString()));
1832 if (jsonObject.contains(
"index")) {
1833 deviceListItem.
setIndex(jsonObject[
"index"].toInt(-1));
1838 if (jsonObject.contains(
"sequence")){
1839 deviceListItem.
setSequence(jsonObject[
"sequence"].toInt(-1));
1844 if (jsonObject.contains(
"deviceStreamIndex")) {
1855 QJsonObject& jsonObject,
1856 QStringList& deviceSettingsKeys)
1858 if (jsonObject.contains(
"direction")) {
1859 deviceSettings.
setDirection(jsonObject[
"direction"].toInt());
1864 if (jsonObject.contains(
"deviceHwType") && jsonObject[
"deviceHwType"].isString()) {
1865 deviceSettings.
setDeviceHwType(
new QString(jsonObject[
"deviceHwType"].toString()));
1872 if ((*deviceHwType ==
"Airspy") && (deviceSettings.
getDirection() == 0))
1874 if (jsonObject.contains(
"airspySettings") && jsonObject[
"airspySettings"].isObject())
1876 QJsonObject airspySettingsJsonObject = jsonObject[
"airspySettings"].toObject();
1877 deviceSettingsKeys = airspySettingsJsonObject.keys();
1887 else if ((*deviceHwType ==
"AirspyHF") && (deviceSettings.
getDirection() == 0))
1889 if (jsonObject.contains(
"airspyHFSettings") && jsonObject[
"airspyHFSettings"].isObject())
1891 QJsonObject airspyHFSettingsJsonObject = jsonObject[
"airspyHFSettings"].toObject();
1892 deviceSettingsKeys = airspyHFSettingsJsonObject.keys();
1902 else if ((*deviceHwType ==
"BladeRF1") && (deviceSettings.
getDirection() == 0))
1904 if (jsonObject.contains(
"bladeRF1InputSettings") && jsonObject[
"bladeRF1InputSettings"].isObject())
1906 QJsonObject bladeRF1InputSettingsJsonObject = jsonObject[
"bladeRF1InputSettings"].toObject();
1907 deviceSettingsKeys = bladeRF1InputSettingsJsonObject.keys();
1917 else if ((*deviceHwType ==
"BladeRF1") && (deviceSettings.
getDirection() == 1))
1919 if (jsonObject.contains(
"bladeRF1OutputSettings") && jsonObject[
"bladeRF1OutputSettings"].isObject())
1921 QJsonObject bladeRF1OutputSettingsJsonObject = jsonObject[
"bladeRF1OutputSettings"].toObject();
1922 deviceSettingsKeys = bladeRF1OutputSettingsJsonObject.keys();
1932 else if ((*deviceHwType ==
"BladeRF2") && (deviceSettings.
getDirection() == 0))
1934 if (jsonObject.contains(
"bladeRF2InputSettings") && jsonObject[
"bladeRF2InputSettings"].isObject())
1936 QJsonObject bladeRF2InputSettingsJsonObject = jsonObject[
"bladeRF2InputSettings"].toObject();
1937 deviceSettingsKeys = bladeRF2InputSettingsJsonObject.keys();
1947 else if ((*deviceHwType ==
"BladeRF2") && (deviceSettings.
getDirection() == 1))
1949 if (jsonObject.contains(
"bladeRF2OutputSettings") && jsonObject[
"bladeRF2OutputSettings"].isObject())
1951 QJsonObject bladeRF2OutputSettingsJsonObject = jsonObject[
"bladeRF2OutputSettings"].toObject();
1952 deviceSettingsKeys = bladeRF2OutputSettingsJsonObject.keys();
1962 else if (*deviceHwType ==
"FCDPro")
1964 if (jsonObject.contains(
"fcdProSettings") && jsonObject[
"fcdProSettings"].isObject())
1966 QJsonObject fcdProSettingsJsonObject = jsonObject[
"fcdProSettings"].toObject();
1967 deviceSettingsKeys = fcdProSettingsJsonObject.keys();
1977 else if (*deviceHwType ==
"FCDPro+")
1979 if (jsonObject.contains(
"fcdProPlusSettings") && jsonObject[
"fcdProPlusSettings"].isObject())
1981 QJsonObject fcdProPlusSettingsJsonObject = jsonObject[
"fcdProPlusSettings"].toObject();
1982 deviceSettingsKeys = fcdProPlusSettingsJsonObject.keys();
1992 else if (*deviceHwType ==
"FileInput")
1994 if (jsonObject.contains(
"fileInputSettings") && jsonObject[
"fileInputSettings"].isObject())
1996 QJsonObject fileInputSettingsJsonObject = jsonObject[
"fileInputSettings"].toObject();
1997 deviceSettingsKeys = fileInputSettingsJsonObject.keys();
2007 else if ((*deviceHwType ==
"HackRF") && (deviceSettings.
getDirection() == 0))
2009 if (jsonObject.contains(
"hackRFInputSettings") && jsonObject[
"hackRFInputSettings"].isObject())
2011 QJsonObject hackRFInputSettingsJsonObject = jsonObject[
"hackRFInputSettings"].toObject();
2012 deviceSettingsKeys = hackRFInputSettingsJsonObject.keys();
2022 else if ((*deviceHwType ==
"HackRF") && (deviceSettings.
getDirection() == 1))
2024 if (jsonObject.contains(
"hackRFOutputSettings") && jsonObject[
"hackRFOutputSettings"].isObject())
2026 QJsonObject hackRFOutputSettingsJsonObject = jsonObject[
"hackRFOutputSettings"].toObject();
2027 deviceSettingsKeys = hackRFOutputSettingsJsonObject.keys();
2037 else if ((*deviceHwType ==
"KiwiSDR") && (deviceSettings.
getDirection() == 0))
2039 if (jsonObject.contains(
"kiwiSDRSettings") && jsonObject[
"kiwiSDRSettings"].isObject())
2041 QJsonObject kiwiSDRSettingsJsonObject = jsonObject[
"kiwiSDRSettings"].toObject();
2042 deviceSettingsKeys = kiwiSDRSettingsJsonObject.keys();
2052 else if ((*deviceHwType ==
"LimeSDR") && (deviceSettings.
getDirection() == 0))
2054 if (jsonObject.contains(
"limeSdrInputSettings") && jsonObject[
"limeSdrInputSettings"].isObject())
2056 QJsonObject limeSdrInputSettingsJsonObject = jsonObject[
"limeSdrInputSettings"].toObject();
2057 deviceSettingsKeys = limeSdrInputSettingsJsonObject.keys();
2067 else if ((*deviceHwType ==
"LimeSDR") && (deviceSettings.
getDirection() == 1))
2069 if (jsonObject.contains(
"limeSdrOutputSettings") && jsonObject[
"limeSdrOutputSettings"].isObject())
2071 QJsonObject limeSdrOutputSettingsJsonObject = jsonObject[
"limeSdrOutputSettings"].toObject();
2072 deviceSettingsKeys = limeSdrOutputSettingsJsonObject.keys();
2082 else if (*deviceHwType ==
"Perseus")
2084 if (jsonObject.contains(
"perseusSettings") && jsonObject[
"perseusSettings"].isObject())
2086 QJsonObject perseusSettingsJsonObject = jsonObject[
"perseusSettings"].toObject();
2087 deviceSettingsKeys = perseusSettingsJsonObject.keys();
2097 else if ((*deviceHwType ==
"PlutoSDR") && (deviceSettings.
getDirection() == 0))
2099 if (jsonObject.contains(
"plutoSdrInputSettings") && jsonObject[
"plutoSdrInputSettings"].isObject())
2101 QJsonObject plutoSdrInputSettingsJsonObject = jsonObject[
"plutoSdrInputSettings"].toObject();
2102 deviceSettingsKeys = plutoSdrInputSettingsJsonObject.keys();
2112 else if ((*deviceHwType ==
"PlutoSDR") && (deviceSettings.
getDirection() == 1))
2114 if (jsonObject.contains(
"plutoSdrOutputSettings") && jsonObject[
"plutoSdrOutputSettings"].isObject())
2116 QJsonObject plutoSdrOutputSettingsJsonObject = jsonObject[
"plutoSdrOutputSettings"].toObject();
2117 deviceSettingsKeys = plutoSdrOutputSettingsJsonObject.keys();
2127 else if (*deviceHwType ==
"RTLSDR")
2129 if (jsonObject.contains(
"rtlSdrSettings") && jsonObject[
"rtlSdrSettings"].isObject())
2131 QJsonObject rtlSdrSettingsJsonObject = jsonObject[
"rtlSdrSettings"].toObject();
2132 deviceSettingsKeys = rtlSdrSettingsJsonObject.keys();
2142 else if (*deviceHwType ==
"SDRplay1")
2144 if (jsonObject.contains(
"sdrPlaySettings") && jsonObject[
"sdrPlaySettings"].isObject())
2146 QJsonObject sdrPlaySettingsJsonObject = jsonObject[
"sdrPlaySettings"].toObject();
2147 deviceSettingsKeys = sdrPlaySettingsJsonObject.keys();
2157 else if ((*deviceHwType ==
"SoapySDR") && (deviceSettings.
getDirection() == 0))
2159 if (jsonObject.contains(
"soapySDRInputSettings") && jsonObject[
"soapySDRInputSettings"].isObject())
2161 QJsonObject soapySdrInputSettingsJsonObject = jsonObject[
"soapySDRInputSettings"].toObject();
2162 deviceSettingsKeys = soapySdrInputSettingsJsonObject.keys();
2173 else if ((*deviceHwType ==
"SoapySDR") && (deviceSettings.
getDirection() == 1))
2175 if (jsonObject.contains(
"soapySDROutputSettings") && jsonObject[
"soapySDROutputSettings"].isObject())
2177 QJsonObject soapySdrOutputSettingsJsonObject = jsonObject[
"soapySDROutputSettings"].toObject();
2178 deviceSettingsKeys = soapySdrOutputSettingsJsonObject.keys();
2189 else if (*deviceHwType ==
"TestSource")
2191 if (jsonObject.contains(
"testSourceSettings") && jsonObject[
"testSourceSettings"].isObject())
2193 QJsonObject testSourceSettingsJsonObject = jsonObject[
"testSourceSettings"].toObject();
2194 deviceSettingsKeys = testSourceSettingsJsonObject.keys();
2204 else if ((*deviceHwType ==
"TestMI") && (deviceSettings.
getDirection() == 2))
2206 if (jsonObject.contains(
"TestMISettings") && jsonObject[
"TestMISettings"].isObject())
2208 QJsonObject testMISettingsJsonObject = jsonObject[
"TestMISettings"].toObject();
2209 deviceSettingsKeys = testMISettingsJsonObject.keys();
2211 if (deviceSettingsKeys.contains(
"streams") && testMISettingsJsonObject[
"streams"].isArray())
2225 else if ((*deviceHwType ==
"XTRX") && (deviceSettings.
getDirection() == 0))
2227 if (jsonObject.contains(
"xtrxInputSettings") && jsonObject[
"xtrxInputSettings"].isObject())
2229 QJsonObject xtrxInputSettingsJsonObject = jsonObject[
"xtrxInputSettings"].toObject();
2230 deviceSettingsKeys = xtrxInputSettingsJsonObject.keys();
2240 else if ((*deviceHwType ==
"XTRX") && (deviceSettings.
getDirection() == 1))
2242 if (jsonObject.contains(
"xtrxOutputSettings") && jsonObject[
"xtrxOutputSettings"].isObject())
2244 QJsonObject xtrxOutputSettingsJsonObject = jsonObject[
"xtrxOutputSettings"].toObject();
2245 deviceSettingsKeys = xtrxOutputSettingsJsonObject.keys();
2255 else if ((*deviceHwType ==
"RemoteInput") && (deviceSettings.
getDirection() == 0))
2257 if (jsonObject.contains(
"remoteInputSettings") && jsonObject[
"remoteInputSettings"].isObject())
2259 QJsonObject remoteInputSettingsJsonObject = jsonObject[
"remoteInputSettings"].toObject();
2260 deviceSettingsKeys = remoteInputSettingsJsonObject.keys();
2270 else if ((*deviceHwType ==
"LocalInput") && (deviceSettings.
getDirection() == 0))
2272 if (jsonObject.contains(
"localInputSettings") && jsonObject[
"localInputSettings"].isObject())
2274 QJsonObject localInputSettingsJsonObject = jsonObject[
"localInputSettings"].toObject();
2275 deviceSettingsKeys = localInputSettingsJsonObject.keys();
2285 else if ((*deviceHwType ==
"RemoteOutput") && (deviceSettings.
getDirection() == 1))
2287 if (jsonObject.contains(
"remoteOutputSettings") && jsonObject[
"remoteOutputSettings"].isObject())
2289 QJsonObject remoteOutputSettingsJsonObject = jsonObject[
"remoteOutputSettings"].toObject();
2290 deviceSettingsKeys = remoteOutputSettingsJsonObject.keys();
2300 else if ((*deviceHwType ==
"LocalOutput") && (deviceSettings.
getDirection() == 1))
2302 if (jsonObject.contains(
"localOutputSettings") && jsonObject[
"localOutputSettings"].isObject())
2304 QJsonObject localOutputSettingsJsonObject = jsonObject[
"localOutputSettings"].toObject();
2305 deviceSettingsKeys = localOutputSettingsJsonObject.keys();
2323 QJsonObject& jsonObject,
2324 QStringList& channelSettingsKeys)
2326 if (jsonObject.contains(
"direction")) {
2327 channelSettings.
setDirection(jsonObject[
"direction"].toInt());
2332 if (jsonObject.contains(
"channelType") && jsonObject[
"channelType"].isString()) {
2333 channelSettings.
setChannelType(
new QString(jsonObject[
"channelType"].toString()));
2340 if (*channelType ==
"AMDemod")
2344 QJsonObject amDemodSettingsJsonObject = jsonObject[
"AMDemodSettings"].toObject();
2345 channelSettingsKeys = amDemodSettingsJsonObject.keys();
2354 else if (*channelType ==
"AMMod")
2358 QJsonObject amModSettingsJsonObject = jsonObject[
"AMModSettings"].toObject();
2359 channelSettingsKeys = amModSettingsJsonObject.keys();
2361 if (channelSettingsKeys.contains(
"cwKeyer"))
2363 QJsonObject cwKeyerSettingsJsonObject;
2364 appendSettingsSubKeys(amModSettingsJsonObject, cwKeyerSettingsJsonObject,
"cwKeyer", channelSettingsKeys);
2375 else if (*channelType ==
"ATVMod")
2379 QJsonObject atvModSettingsJsonObject = jsonObject[
"ATVModSettings"].toObject();
2380 channelSettingsKeys = atvModSettingsJsonObject.keys();
2389 else if (*channelType ==
"BFMDemod")
2393 QJsonObject bfmDemodSettingsJsonObject = jsonObject[
"BFMDemodSettings"].toObject();
2394 channelSettingsKeys = bfmDemodSettingsJsonObject.keys();
2403 else if (*channelType ==
"DSDDemod")
2407 QJsonObject dsdDemodSettingsJsonObject = jsonObject[
"DSDDemodSettings"].toObject();
2408 channelSettingsKeys = dsdDemodSettingsJsonObject.keys();
2417 else if (*channelType ==
"FreeDVDemod")
2421 QJsonObject freeDVDemodSettingsJsonObject = jsonObject[
"FreeDVDemodSettings"].toObject();
2422 channelSettingsKeys = freeDVDemodSettingsJsonObject.keys();
2431 else if (*channelType ==
"FreeDVMod")
2435 QJsonObject freeDVModSettingsJsonObject = jsonObject[
"FreeDVModSettings"].toObject();
2436 channelSettingsKeys = freeDVModSettingsJsonObject.keys();
2445 else if (*channelType ==
"FreqTracker")
2449 QJsonObject freqTrackerSettingsJsonObject = jsonObject[
"FreqTrackerSettings"].toObject();
2450 channelSettingsKeys = freqTrackerSettingsJsonObject.keys();
2459 else if (*channelType ==
"NFMDemod")
2463 QJsonObject nfmDemodSettingsJsonObject = jsonObject[
"NFMDemodSettings"].toObject();
2464 channelSettingsKeys = nfmDemodSettingsJsonObject.keys();
2473 else if (*channelType ==
"NFMMod")
2477 QJsonObject nfmModSettingsJsonObject = jsonObject[
"NFMModSettings"].toObject();
2478 channelSettingsKeys = nfmModSettingsJsonObject.keys();
2480 if (channelSettingsKeys.contains(
"cwKeyer"))
2482 QJsonObject cwKeyerSettingsJsonObject;
2483 appendSettingsSubKeys(nfmModSettingsJsonObject, cwKeyerSettingsJsonObject,
"cwKeyer", channelSettingsKeys);
2494 else if (*channelType ==
"LocalSink")
2498 QJsonObject localChannelSinkSettingsJsonObject = jsonObject[
"LocalSinkSettings"].toObject();
2499 channelSettingsKeys = localChannelSinkSettingsJsonObject.keys();
2508 else if (*channelType ==
"LocalSource")
2512 QJsonObject localChannelSourceSettingsJsonObject = jsonObject[
"LocalSourceSettings"].toObject();
2513 channelSettingsKeys = localChannelSourceSettingsJsonObject.keys();
2522 else if (*channelType ==
"RemoteSink")
2526 QJsonObject remoteChannelSinkSettingsJsonObject = jsonObject[
"RemoteSinkSettings"].toObject();
2527 channelSettingsKeys = remoteChannelSinkSettingsJsonObject.keys();
2536 else if (*channelType ==
"RemoteSource")
2540 QJsonObject remoteChannelSourceSettingsJsonObject = jsonObject[
"RemoteSourceSettings"].toObject();
2541 channelSettingsKeys = remoteChannelSourceSettingsJsonObject.keys();
2550 else if (*channelType ==
"SSBDemod")
2554 QJsonObject ssbDemodSettingsJsonObject = jsonObject[
"SSBDemodSettings"].toObject();
2555 channelSettingsKeys = ssbDemodSettingsJsonObject.keys();
2564 else if (*channelType ==
"SSBMod")
2568 QJsonObject ssbModSettingsJsonObject = jsonObject[
"SSBModSettings"].toObject();
2569 channelSettingsKeys = ssbModSettingsJsonObject.keys();
2571 if (channelSettingsKeys.contains(
"cwKeyer"))
2573 QJsonObject cwKeyerSettingsJsonObject;
2574 appendSettingsSubKeys(ssbModSettingsJsonObject, cwKeyerSettingsJsonObject,
"cwKeyer", channelSettingsKeys);
2585 else if (*channelType ==
"UDPSource")
2589 QJsonObject udpSourceSettingsJsonObject = jsonObject[
"UDPSourceSettings"].toObject();
2590 channelSettingsKeys = udpSourceSettingsJsonObject.keys();
2599 else if (*channelType ==
"UDPSink")
2603 QJsonObject udpSinkSettingsJsonObject = jsonObject[
"UDPSinkSettings"].toObject();
2604 channelSettingsKeys = udpSinkSettingsJsonObject.keys();
2613 else if (*channelType ==
"WFMDemod")
2617 QJsonObject wfmDemodSettingsJsonObject = jsonObject[
"WFMDemodSettings"].toObject();
2618 channelSettingsKeys = wfmDemodSettingsJsonObject.keys();
2627 else if (*channelType ==
"WFMMod")
2631 QJsonObject wfmModSettingsJsonObject = jsonObject[
"WFMModSettings"].toObject();
2632 channelSettingsKeys = wfmModSettingsJsonObject.keys();
2634 if (channelSettingsKeys.contains(
"cwKeyer"))
2636 QJsonObject cwKeyerSettingsJsonObject;
2637 appendSettingsSubKeys(wfmModSettingsJsonObject, cwKeyerSettingsJsonObject,
"cwKeyer", channelSettingsKeys);
2656 QJsonObject& jsonObject,
2657 QStringList& audioInputDeviceKeys)
2659 if (jsonObject.contains(
"index")) {
2660 audioInputDevice.
setIndex(jsonObject[
"index"].toInt());
2664 if (jsonObject.contains(
"sampleRate"))
2666 audioInputDevice.
setSampleRate(jsonObject[
"sampleRate"].toInt());
2667 audioInputDeviceKeys.append(
"sampleRate");
2669 if (jsonObject.contains(
"volume"))
2671 audioInputDevice.
setVolume(jsonObject[
"volume"].toDouble());
2672 audioInputDeviceKeys.append(
"volume");
2679 QJsonObject& jsonObject,
2680 QStringList& audioOutputDeviceKeys)
2682 if (jsonObject.contains(
"index")) {
2683 audioOutputDevice.
setIndex(jsonObject[
"index"].toInt());
2687 if (jsonObject.contains(
"sampleRate"))
2689 audioOutputDevice.
setSampleRate(jsonObject[
"sampleRate"].toInt());
2690 audioOutputDeviceKeys.append(
"sampleRate");
2692 if (jsonObject.contains(
"copyToUDP"))
2694 audioOutputDevice.
setCopyToUdp(jsonObject[
"copyToUDP"].toInt() == 0 ? 0 : 1);
2695 audioOutputDeviceKeys.append(
"copyToUDP");
2697 if (jsonObject.contains(
"udpUsesRTP"))
2699 audioOutputDevice.
setUdpUsesRtp(jsonObject[
"udpUsesRTP"].toInt() == 0 ? 0 : 1);
2700 audioOutputDeviceKeys.append(
"udpUsesRTP");
2702 if (jsonObject.contains(
"udpChannelMode"))
2705 audioOutputDeviceKeys.append(
"udpChannelMode");
2707 if (jsonObject.contains(
"udpChannelCodec"))
2710 audioOutputDeviceKeys.append(
"udpChannelCodec");
2712 if (jsonObject.contains(
"udpDecimationFactor"))
2715 audioOutputDeviceKeys.append(
"udpDecimationFactor");
2717 if (jsonObject.contains(
"udpAddress"))
2719 audioOutputDevice.
setUdpAddress(
new QString(jsonObject[
"udpAddress"].toString()));
2720 audioOutputDeviceKeys.append(
"udpAddress");
2722 if (jsonObject.contains(
"udpPort"))
2724 audioOutputDevice.
setUdpPort(jsonObject[
"udpPort"].toInt());
2725 audioOutputDeviceKeys.append(
"udpPort");
2732 if (jsonObject.contains(
"nbDevices"))
2734 int nbDevices = jsonObject[
"nbDevices"].toInt();
2736 if (jsonObject.contains(
"ambeDevices"))
2738 QJsonArray ambeDevicesJson = jsonObject[
"ambeDevices"].toArray();
2740 if (nbDevices != ambeDevicesJson.size()) {
2746 QList<SWGSDRangel::SWGAMBEDevice *> *ambeList = ambeDevices.
getAmbeDevices();
2748 for (
int i = 0;
i < nbDevices;
i++)
2750 QJsonObject ambeDeviceJson = ambeDevicesJson.at(
i).toObject();
2751 if (ambeDeviceJson.contains(
"deviceRef") && ambeDeviceJson.contains(
"delete"))
2754 ambeList->back()->init();
2755 ambeList->back()->setDeviceRef(
new QString(ambeDeviceJson[
"deviceRef"].toString()));
2756 ambeList->back()->setDelete(ambeDeviceJson[
"delete"].toInt());
2772 const QJsonObject& parentSettingsJsonObject,
2773 QJsonObject& childSettingsJsonObject,
2774 const QString& parentKey,
2775 QStringList& keyList)
2777 childSettingsJsonObject = parentSettingsJsonObject[parentKey].toObject();
2778 QStringList childSettingsKeys = childSettingsJsonObject.keys();
2780 for (
int i = 0;
i < childSettingsKeys.size();
i++) {
2781 keyList.append(parentKey + QString(
".") + childSettingsKeys.at(
i));
2786 const QJsonObject& parentSettingsJsonObject,
2787 const QString& parentKey,
2788 QStringList& keyList)
2790 QJsonArray streams = parentSettingsJsonObject[parentKey].toArray();
2792 for (
int istream = 0; istream < streams.count(); istream++)
2794 QJsonValue v = streams.takeAt(istream);
2798 QJsonObject streamSettingsJsonObject = v.toObject();
2799 QStringList streamSettingsKeys = streamSettingsJsonObject.keys();
2801 for (
int i = 0;
i < streamSettingsKeys.size();
i++) {
2802 keyList.append(tr(
"streams[%1].%2").
arg(istream).
arg(streamSettingsKeys[
i]));
virtual int devicesetDeviceRunGet(int deviceSetIndex, SWGSDRangel::SWGDeviceState &response, SWGSDRangel::SWGErrorResponse &error)
WebAPIRequestMapper(QObject *parent=0)
virtual int devicesetFocusPatch(int deviceSetIndex, SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
qtwebapp::StaticFileController * m_staticFileController
virtual void fromJsonObject(QJsonObject &json) override
virtual void fromJsonObject(QJsonObject &json) override
void resetChannelSettings(SWGSDRangel::SWGChannelSettings &deviceSettings)
static QString instanceDevicesURL
QByteArray getBody() const
void setDeviceStreamIndex(qint32 device_stream_index)
void setSsbDemodSettings(SWGSSBDemodSettings *ssb_demod_settings)
void setSdrPlayReport(SWGSDRPlayReport *sdr_play_report)
void setLimeSdrOutputReport(SWGLimeSdrOutputReport *lime_sdr_output_report)
void setDeviceHwType(QString *device_hw_type)
bool validateAudioInputDevice(SWGSDRangel::SWGAudioInputDevice &audioInputDevice, QJsonObject &jsonObject, QStringList &audioInputDeviceKeys)
virtual int instanceDeviceSetDelete(SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
void setSsbModReport(SWGSSBModReport *ssb_mod_report)
virtual int instanceAMBEDevicesDelete(SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual void fromJsonObject(QJsonObject &json) override
SWGLocalSourceSettings * getLocalSourceSettings()
void setLocalInputSettings(SWGLocalInputSettings *local_input_settings)
SWGFCDProSettings * getFcdProSettings()
virtual int instancePresetDelete(SWGSDRangel::SWGPresetIdentifier &response, SWGSDRangel::SWGErrorResponse &error)
SWGLocalInputSettings * getLocalInputSettings()
virtual int devicesetChannelSettingsGet(int deviceSetIndex, int channelIndex, SWGSDRangel::SWGChannelSettings &response, SWGSDRangel::SWGErrorResponse &error)
void instanceAMBEDevicesService(qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
void setBladeRf1OutputSettings(SWGBladeRF1OutputSettings *blade_rf1_output_settings)
void setBladeRf1InputSettings(SWGBladeRF1InputSettings *blade_rf1_input_settings)
void devicesetDeviceService(const std::string &indexStr, qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
void setBfmDemodSettings(SWGBFMDemodSettings *bfm_demod_settings)
virtual SWGPresetImport * fromJson(QString &jsonString) override
virtual int instanceSummary(SWGSDRangel::SWGInstanceSummaryResponse &response, SWGSDRangel::SWGErrorResponse &error)
static std::regex devicesetDeviceSettingsURLRe
void setSsbDemodReport(SWGSSBDemodReport *ssb_demod_report)
SWGBladeRF2OutputSettings * getBladeRf2OutputSettings()
void instanceChannelsService(qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
void setPlutoSdrOutputSettings(SWGPlutoSdrOutputSettings *pluto_sdr_output_settings)
static QString instanceChannelsURL
SWGNFMDemodSettings * getNfmDemodSettings()
bool validateAudioOutputDevice(SWGSDRangel::SWGAudioOutputDevice &audioOutputDevice, QJsonObject &jsonObject, QStringList &audioOutputDeviceKeys)
void instanceAMBESerialService(qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
void setPerseusReport(SWGPerseusReport *perseus_report)
void devicesetChannelSettingsService(const std::string &deviceSetIndexStr, const std::string &channelIndexStr, qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
static QString instanceAMBESerialURL
virtual void fromJsonObject(QJsonObject &json) override
void setLimeSdrInputSettings(SWGLimeSdrInputSettings *lime_sdr_input_settings)
virtual QString asJson() override
static std::regex devicesetDeviceReportURLRe
void setWfmDemodSettings(SWGWFMDemodSettings *wfm_demod_settings)
void instanceConfigService(qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
SWGSDRPlaySettings * getSdrPlaySettings()
void setNfmModSettings(SWGNFMModSettings *nfm_mod_settings)
void setRemoteInputReport(SWGRemoteInputReport *remote_input_report)
void setXtrxInputSettings(SWGXtrxInputSettings *xtrx_input_settings)
void devicesetChannelService(const std::string &deviceSetIndexStr, qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
SWGTestSourceSettings * getTestSourceSettings()
virtual QString asJson() override
void setRemoteSourceReport(SWGRemoteSourceReport *remote_source_report)
void devicesetDeviceSettingsService(const std::string &indexStr, qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
SWGBladeRF1OutputSettings * getBladeRf1OutputSettings()
static QString instancePresetFileURL
virtual QString asJson() override
virtual int instanceLocationGet(SWGSDRangel::SWGLocationInformation &response, SWGSDRangel::SWGErrorResponse &error)
QByteArray getParameter(const QByteArray &name) const
void setWfmModSettings(SWGWFMModSettings *wfm_mod_settings)
static QString instanceAudioOutputParametersURL
virtual QString asJson() override
SWGLimeSdrOutputSettings * getLimeSdrOutputSettings()
static QString instanceSummaryURL
bool validatePresetTransfer(SWGSDRangel::SWGPresetTransfer &presetTransfer)
void setUdpPort(qint32 udp_port)
bool validatePresetExport(SWGSDRangel::SWGPresetExport &presetExport)
void resetDeviceSettings(SWGSDRangel::SWGDeviceSettings &deviceSettings)
void devicesetDeviceReportService(const std::string &indexStr, qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
SWGRtlSdrSettings * getRtlSdrSettings()
QByteArray getPath() const
SWGPerseusSettings * getPerseusSettings()
void setDsdDemodReport(SWGDSDDemodReport *dsd_demod_report)
void setSoapySdrOutputSettings(SWGSoapySDROutputSettings *soapy_sdr_output_settings)
virtual int devicesetChannelSettingsPutPatch(int deviceSetIndex, int channelIndex, bool force, const QStringList &channelSettingsKeys, SWGSDRangel::SWGChannelSettings &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceLoggingGet(SWGSDRangel::SWGLoggingInfo &response, SWGSDRangel::SWGErrorResponse &error)
virtual int devicesetDeviceReportGet(int deviceSetIndex, SWGSDRangel::SWGDeviceReport &response, SWGSDRangel::SWGErrorResponse &error)
virtual void fromJsonObject(QJsonObject &json) override
virtual QString asJson() override
static QString instanceAudioOutputCleanupURL
void setSdrPlaySettings(SWGSDRPlaySettings *sdr_play_settings)
virtual void fromJsonObject(QJsonObject &json) override
virtual void fromJsonObject(QJsonObject &json) override
virtual void fromJsonObject(QJsonObject &json) override
void setNfmDemodSettings(SWGNFMDemodSettings *nfm_demod_settings)
SWGSoapySDROutputSettings * getSoapySdrOutputSettings()
void setPerseusSettings(SWGPerseusSettings *perseus_settings)
QString * getDeviceHwType()
void setDirection(qint32 direction)
SWGUDPSourceSettings * getUdpSourceSettings()
virtual void fromJsonObject(QJsonObject &json) override
SWGAirspySettings * getAirspySettings()
bool validateAMBEDevices(SWGSDRangel::SWGAMBEDevices &ambeDevices, QJsonObject &jsonObject)
virtual void fromJsonObject(QJsonObject &json) override
SWGFreqTrackerSettings * getFreqTrackerSettings()
void instanceAudioService(qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
virtual QString asJson() override
virtual QString asJson() override
void instanceAudioOutputCleanupService(qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
SWGPlutoSdrOutputSettings * getPlutoSdrOutputSettings()
void setAirspyReport(SWGAirspyReport *airspy_report)
void setHeader(QByteArray name, QByteArray value)
virtual int devicesetDeviceRunPost(int deviceSetIndex, SWGSDRangel::SWGDeviceState &response, SWGSDRangel::SWGErrorResponse &error)
void devicesetChannelsReportService(const std::string &deviceSetIndexStr, qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
virtual int instanceAMBESerialGet(SWGSDRangel::SWGDVSerialDevices &response, SWGSDRangel::SWGErrorResponse &error)
bool validatePresetIdentifer(SWGSDRangel::SWGPresetIdentifier &presetIdentifier)
void setChannelType(QString *channel_type)
SWGTestMISettings * getTestMiSettings()
virtual SWGPresetTransfer * fromJson(QString &jsonString) override
void setLocalSinkSettings(SWGLocalSinkSettings *local_sink_settings)
virtual void fromJsonObject(QJsonObject &json) override
virtual void fromJsonObject(QJsonObject &json) override
virtual void fromJsonObject(QJsonObject &json) override
virtual QString asJson() override
virtual QString asJson() override
void devicesetService(const std::string &indexStr, qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
void setAirspySettings(SWGAirspySettings *airspy_settings)
void setUdpSinkReport(SWGUDPSinkReport *udp_sink_report)
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
void setRemoteSourceSettings(SWGRemoteSourceSettings *remote_source_settings)
virtual int devicesetDeviceRunDelete(int deviceSetIndex, SWGSDRangel::SWGDeviceState &response, SWGSDRangel::SWGErrorResponse &error)
SWGPresetIdentifier * getPreset()
virtual int instanceAudioInputCleanupPatch(SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual int devicesetGet(int deviceSetIndex, SWGSDRangel::SWGDeviceSet &response, SWGSDRangel::SWGErrorResponse &error)
virtual QString asJson() override
virtual int instancePresetPut(SWGSDRangel::SWGPresetTransfer &query, SWGSDRangel::SWGPresetIdentifier &response, SWGSDRangel::SWGErrorResponse &error)
void devicesetChannelIndexService(const std::string &deviceSetIndexStr, const std::string &channelIndexStr, qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
virtual void fromJsonObject(QJsonObject &json) override
static QString instanceDeviceSetsURL
void appendSettingsArrayKeys(const QJsonObject &parentSettingsJsonObject, const QString &parentKey, QStringList &keyList)
SWGPresetIdentifier * getPreset()
SWGBladeRF1InputSettings * getBladeRf1InputSettings()
virtual void fromJsonObject(QJsonObject &json) override
SWGLocalOutputSettings * getLocalOutputSettings()
void instanceDevicesService(qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
void setUdpAddress(QString *udp_address)
SWGWFMDemodSettings * getWfmDemodSettings()
void instanceDeviceSetService(qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
static QString instanceDeviceSetURL
virtual int instanceAudioOutputCleanupPatch(SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceAMBEDevicesPatch(SWGSDRangel::SWGAMBEDevices &query, SWGSDRangel::SWGAMBEDevices &response, SWGSDRangel::SWGErrorResponse &error)
SWGBFMDemodSettings * getBfmDemodSettings()
SWGFreeDVModSettings * getFreeDvModSettings()
virtual int instancePresetPost(SWGSDRangel::SWGPresetTransfer &query, SWGSDRangel::SWGPresetIdentifier &response, SWGSDRangel::SWGErrorResponse &error)
void setChannelType(QString *channel_type)
static std::regex devicesetURLRe
void setAtvModReport(SWGATVModReport *atv_mod_report)
virtual int instancePresetsGet(SWGSDRangel::SWGPresets &response, SWGSDRangel::SWGErrorResponse &error)
virtual int devicesetDeviceSettingsGet(int deviceSetIndex, SWGSDRangel::SWGDeviceSettings &response, SWGSDRangel::SWGErrorResponse &error)
SWGDSDDemodSettings * getDsdDemodSettings()
SWGXtrxInputSettings * getXtrxInputSettings()
virtual int instanceAudioInputPatch(SWGSDRangel::SWGAudioInputDevice &response, const QStringList &audioInputKeys, SWGSDRangel::SWGErrorResponse &error)
bool parseJsonBody(QString &jsonStr, QJsonObject &jsonObject, qtwebapp::HttpResponse &response)
void setHackRfOutputSettings(SWGHackRFOutputSettings *hack_rf_output_settings)
virtual int devicesetDevicePut(int deviceSetIndex, SWGSDRangel::SWGDeviceListItem &query, SWGSDRangel::SWGDeviceListItem &response, SWGSDRangel::SWGErrorResponse &error)
SWGAMDemodSettings * getAmDemodSettings()
void setNbDevices(qint32 nb_devices)
void setSampleRate(qint32 sample_rate)
virtual void fromJsonObject(QJsonObject &json) override
void setLocalOutputSettings(SWGLocalOutputSettings *local_output_settings)
void setPlutoSdrOutputReport(SWGPlutoSdrOutputReport *pluto_sdr_output_report)
SWGXtrxOutputSettings * getXtrxOutputSettings()
void setFileInputSettings(SWGFileInputSettings *file_input_settings)
virtual int instanceAudioOutputDelete(SWGSDRangel::SWGAudioOutputDevice &response, SWGSDRangel::SWGErrorResponse &error)
void setAmDemodSettings(SWGAMDemodSettings *am_demod_settings)
void instancePresetService(qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
void setName(QString *name)
void setDisplayedName(QString *displayed_name)
virtual int instanceAMBEDevicesGet(SWGSDRangel::SWGAMBEDevices &response, SWGSDRangel::SWGErrorResponse &error)
virtual QString asJson() override
void instanceLoggingService(qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
static QString instanceAudioInputParametersURL
void setWfmModReport(SWGWFMModReport *wfm_mod_report)
void setBfmDemodReport(SWGBFMDemodReport *bfm_demod_report)
void setWfmDemodReport(SWGWFMDemodReport *wfm_demod_report)
virtual int instanceChannels(int direction, SWGSDRangel::SWGInstanceChannelsResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual void fromJsonObject(QJsonObject &json) override
void instanceAudioInputCleanupService(qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
virtual void fromJsonObject(QJsonObject &json) override
void setSsbModSettings(SWGSSBModSettings *ssb_mod_settings)
void instanceSummaryService(qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
void setTestSourceSettings(SWGTestSourceSettings *test_source_settings)
SWGATVModSettings * getAtvModSettings()
WebAPIAdapterInterface * m_adapter
void setRtlSdrReport(SWGRtlSdrReport *rtl_sdr_report)
virtual void fromJsonObject(QJsonObject &json) override
void setUdpDecimationFactor(qint32 udp_decimation_factor)
void setRemoteOutputReport(SWGRemoteOutputReport *remote_output_report)
static QString instancePresetsURL
void setKiwiSdrSettings(SWGKiwiSDRSettings *kiwi_sdr_settings)
void setUdpSinkSettings(SWGUDPSinkSettings *udp_sink_settings)
virtual SWGPresetIdentifier * fromJson(QString &jsonString) override
bool validateChannelSettings(SWGSDRangel::SWGChannelSettings &deviceSettings, QJsonObject &jsonObject, QStringList &channelSettingsKeys)
virtual void fromJsonObject(QJsonObject &json) override
virtual void fromJsonObject(QJsonObject &json) override
virtual void fromJsonObject(QJsonObject &json) override
SWGSSBModSettings * getSsbModSettings()
virtual int instanceAudioGet(SWGSDRangel::SWGAudioDevices &response, SWGSDRangel::SWGErrorResponse &error)
SWGFCDProPlusSettings * getFcdProPlusSettings()
virtual int devicesetChannelsReportGet(int deviceSetIndex, SWGSDRangel::SWGChannelsDetail &response, SWGSDRangel::SWGErrorResponse &error)
void resetAudioInputDevice(SWGSDRangel::SWGAudioInputDevice &audioInputDevice)
void devicesetDeviceRunService(const std::string &indexStr, qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
void setBladeRf2InputSettings(SWGBladeRF2InputSettings *blade_rf2_input_settings)
void setIndex(qint32 index)
void setHwType(QString *hw_type)
void service(qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
void setDirection(qint32 direction)
void setLimeSdrOutputSettings(SWGLimeSdrOutputSettings *lime_sdr_output_settings)
virtual void fromJsonObject(QJsonObject &json) override
void setIndex(qint32 index)
void setFileInputReport(SWGFileInputReport *file_input_report)
virtual QString asJson() override
static QString instanceAudioInputCleanupURL
virtual void fromJsonObject(QJsonObject &json) override
virtual QString asJson() override
virtual void fromJsonObject(QJsonObject &json) override
void setFcdProSettings(SWGFCDProSettings *fcd_pro_settings)
virtual int instancePresetFilePost(SWGSDRangel::SWGPresetExport &query, SWGSDRangel::SWGPresetIdentifier &response, SWGSDRangel::SWGErrorResponse &error)
void devicesetFocusService(const std::string &indexStr, qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
void setRtlSdrSettings(SWGRtlSdrSettings *rtl_sdr_settings)
virtual int instanceAudioOutputPatch(SWGSDRangel::SWGAudioOutputDevice &response, const QStringList &audioOutputKeys, SWGSDRangel::SWGErrorResponse &error)
QString * getChannelType()
void setAmModSettings(SWGAMModSettings *am_mod_settings)
SWGAirspyHFSettings * getAirspyHfSettings()
void setUdpChannelCodec(qint32 udp_channel_codec)
static std::regex devicesetChannelsReportURLRe
void setFcdProPlusSettings(SWGFCDProPlusSettings *fcd_pro_plus_settings)
virtual int devicesetChannelReportGet(int deviceSetIndex, int channelIndex, SWGSDRangel::SWGChannelReport &response, SWGSDRangel::SWGErrorResponse &error)
void resetDeviceReport(SWGSDRangel::SWGDeviceReport &deviceReport)
void setRemoteOutputSettings(SWGRemoteOutputSettings *remote_output_settings)
virtual int instanceLoggingPut(SWGSDRangel::SWGLoggingInfo &query, SWGSDRangel::SWGLoggingInfo &response, SWGSDRangel::SWGErrorResponse &error)
SWGWFMModSettings * getWfmModSettings()
virtual void fromJsonObject(QJsonObject &json) override
bool validateDeviceSettings(SWGSDRangel::SWGDeviceSettings &deviceSettings, QJsonObject &jsonObject, QStringList &deviceSettingsKeys)
static std::regex devicesetChannelReportURLRe
void setTestMiSettings(SWGTestMISettings *test_mi_settings)
virtual void fromJsonObject(QJsonObject &json) override
void setRemoteInputSettings(SWGRemoteInputSettings *remote_input_settings)
SWGSSBDemodSettings * getSsbDemodSettings()
static std::regex devicesetFocusURLRe
virtual QString asJson() override
void setAirspyHfReport(SWGAirspyHFReport *airspy_hf_report)
void setFreqTrackerSettings(SWGFreqTrackerSettings *freq_tracker_settings)
static QString instanceAudioURL
void setFreeDvDemodSettings(SWGFreeDVDemodSettings *free_dv_demod_settings)
virtual QString asJson() override
virtual QString asJson() override
SWGFileInputSettings * getFileInputSettings()
virtual void fromJsonObject(QJsonObject &json) override
SWGFreeDVDemodSettings * getFreeDvDemodSettings()
static QString instanceAMBEDevicesURL
void setAmDemodReport(SWGAMDemodReport *am_demod_report)
void setDsdDemodSettings(SWGDSDDemodSettings *dsd_demod_settings)
virtual QString asJson() override
virtual void fromJsonObject(QJsonObject &json) override
void write(QByteArray data, bool lastPart=false)
virtual void fromJsonObject(QJsonObject &json) override
virtual SWGPresetExport * fromJson(QString &jsonString) override
void setStatus(int statusCode, QByteArray description=QByteArray())
static std::regex devicesetChannelSettingsURLRe
void setRemoteSinkSettings(SWGRemoteSinkSettings *remote_sink_settings)
QList< SWGAMBEDevice * > * getAmbeDevices()
virtual int instancePresetFilePut(SWGSDRangel::SWGPresetImport &query, SWGSDRangel::SWGPresetIdentifier &response, SWGSDRangel::SWGErrorResponse &error)
SWGLocalSinkSettings * getLocalSinkSettings()
void devicesetChannelReportService(const std::string &deviceSetIndexStr, const std::string &channelIndexStr, qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
virtual int instanceConfigGet(SWGSDRangel::SWGInstanceConfigResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual QString asJson() override
static QString instanceLocationURL
void instanceLocationService(qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
SWGHackRFOutputSettings * getHackRfOutputSettings()
void setHackRfInputSettings(SWGHackRFInputSettings *hack_rf_input_settings)
SWGAMModSettings * getAmModSettings()
void setNfmDemodReport(SWGNFMDemodReport *nfm_demod_report)
void setAtvModSettings(SWGATVModSettings *atv_mod_settings)
static std::regex devicesetDeviceURLRe
virtual QString asJson() override
virtual int instanceDelete(SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceAMBEDevicesPut(SWGSDRangel::SWGAMBEDevices &query, SWGSDRangel::SWGAMBEDevices &response, SWGSDRangel::SWGErrorResponse &error)
SWGRemoteOutputSettings * getRemoteOutputSettings()
virtual int instanceLocationPut(SWGSDRangel::SWGLocationInformation &response, SWGSDRangel::SWGErrorResponse &error)
virtual void fromJsonObject(QJsonObject &json) override
SWGHackRFInputSettings * getHackRfInputSettings()
SWGNFMModSettings * getNfmModSettings()
virtual void fromJsonObject(QJsonObject &json) override
static std::regex devicesetChannelURLRe
SWGPlutoSdrInputSettings * getPlutoSdrInputSettings()
void resetAudioOutputDevice(SWGSDRangel::SWGAudioOutputDevice &audioOutputDevice)
static QString instanceConfigURL
virtual QString asJson() override
void setSequence(qint32 sequence)
void setSerial(QString *serial)
void instanceDeviceSetsService(qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
void appendSettingsSubKeys(const QJsonObject &parentSettingsJsonObject, QJsonObject &childSettingsJsonObject, const QString &parentKey, QStringList &keyList)
void setNfmModReport(SWGNFMModReport *nfm_mod_report)
static std::regex devicesetDeviceRunURLRe
virtual void fromJsonObject(QJsonObject &json) override
void setUdpUsesRtp(qint32 udp_uses_rtp)
virtual void fromJsonObject(QJsonObject &json) override
SWGUDPSinkSettings * getUdpSinkSettings()
void setAirspyHfSettings(SWGAirspyHFSettings *airspy_hf_settings)
SWGRemoteSinkSettings * getRemoteSinkSettings()
void instanceAudioOutputParametersService(qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
SWGRemoteInputSettings * getRemoteInputSettings()
virtual int devicesetChannelDelete(int deviceSetIndex, int channelIndex, SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
void instancePresetsService(qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
virtual QString asJson() override
virtual int devicesetDeviceSettingsPutPatch(int deviceSetIndex, bool force, const QStringList &channelSettingsKeys, SWGSDRangel::SWGDeviceSettings &response, SWGSDRangel::SWGErrorResponse &error)
void setPlutoSdrInputSettings(SWGPlutoSdrInputSettings *pluto_sdr_input_settings)
void setSoapySdrInputSettings(SWGSoapySDRInputSettings *soapy_sdr_input_settings)
void service(HttpRequest &request, HttpResponse &response)
SWGLimeSdrInputSettings * getLimeSdrInputSettings()
void setDirection(qint32 direction)
virtual int instanceDeviceSetPost(int direction, SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
void setAmModReport(SWGAMModReport *am_mod_report)
void resetChannelReport(SWGSDRangel::SWGChannelReport &deviceSettings)
void setLocalSourceSettings(SWGLocalSourceSettings *local_source_settings)
virtual int instancePresetPatch(SWGSDRangel::SWGPresetTransfer &query, SWGSDRangel::SWGPresetIdentifier &response, SWGSDRangel::SWGErrorResponse &error)
virtual int instanceDeviceSetsGet(SWGSDRangel::SWGDeviceSetList &response, SWGSDRangel::SWGErrorResponse &error)
void instanceAudioInputParametersService(qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
virtual void fromJsonObject(QJsonObject &json) override
virtual int instanceAudioInputDelete(SWGSDRangel::SWGAudioInputDevice &response, SWGSDRangel::SWGErrorResponse &error)
virtual void fromJsonObject(QJsonObject &json) override
SWGRemoteSourceSettings * getRemoteSourceSettings()
virtual void fromJsonObject(QJsonObject &json) override
virtual QString asJson() override
void setUdpSourceReport(SWGUDPSourceReport *udp_source_report)
virtual int devicesetChannelPost(int deviceSetIndex, SWGSDRangel::SWGChannelSettings &query, SWGSDRangel::SWGSuccessResponse &response, SWGSDRangel::SWGErrorResponse &error)
virtual SWGLoggingInfo * fromJson(QString &jsonString) override
void instancePresetFileService(qtwebapp::HttpRequest &request, qtwebapp::HttpResponse &response)
void setXtrxOutputSettings(SWGXtrxOutputSettings *xtrx_output_settings)
SWGBladeRF2InputSettings * getBladeRf2InputSettings()
void setDeviceHwType(QString *device_hw_type)
QByteArray getMethod() const
virtual void fromJsonObject(QJsonObject &json) override
void setPlutoSdrInputReport(SWGPlutoSdrInputReport *pluto_sdr_input_report)
static QString instancePresetURL
void setLimeSdrInputReport(SWGLimeSdrInputReport *lime_sdr_input_report)
void setUdpSourceSettings(SWGUDPSourceSettings *udp_source_settings)
void setCopyToUdp(qint32 copy_to_udp)
void setBladeRf2OutputSettings(SWGBladeRF2OutputSettings *blade_rf2_output_settings)
virtual void fromJsonObject(QJsonObject &json) override
SWGKiwiSDRSettings * getKiwiSdrSettings()
static QString instanceLoggingURL
SWGSoapySDRInputSettings * getSoapySdrInputSettings()
static std::regex devicesetChannelIndexURLRe
void setUdpChannelMode(qint32 udp_channel_mode)
virtual int instanceDevices(int direction, SWGSDRangel::SWGInstanceDevicesResponse &response, SWGSDRangel::SWGErrorResponse &error)
void setFreeDvModSettings(SWGFreeDVModSettings *free_dv_mod_settings)
bool validateDeviceListItem(SWGSDRangel::SWGDeviceListItem &deviceListItem, QJsonObject &jsonObject)