MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / extractRangeParams

Function extractRangeParams

app/src/API/Handlers/AssistantHandler.cpp:486–501  ·  view source on GitHub ↗

* @brief Subset of fields project.dataset.update accepts as range writes. */

Source from the content-addressed store, hash-verified

484 * @brief Subset of fields project.dataset.update accepts as range writes.
485 */
486static QJsonObject extractRangeParams(const QJsonObject& ranges)
487{
488 static const QStringList kKeys = {QStringLiteral("pltMin"),
489 QStringLiteral("pltMax"),
490 QStringLiteral("wgtMin"),
491 QStringLiteral("wgtMax"),
492 QStringLiteral("fftMin"),
493 QStringLiteral("fftMax"),
494 QStringLiteral("ledHigh")};
495 QJsonObject out;
496 for (const auto& k : kKeys)
497 if (ranges.contains(k))
498 out.insert(k, ranges.value(k));
499
500 return out;
501}
502
503/**
504 * @brief Resolve the target dataset for addTile; sets gid/did/uid in result on success.

Callers 1

applyAddTileRangesFunction · 0.85

Calls 2

containsMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected