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

Method scriptDryRun

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

* @brief Dry-run a script by kind (frame_parser / transform / painter). */

Source from the content-addressed store, hash-verified

354 * @brief Dry-run a script by kind (frame_parser / transform / painter).
355 */
356API::CommandResponse API::Handlers::AssistantHandler::scriptDryRun(const QString& id,
357 const QJsonObject& params)
358{
359 const auto kind = params.value(QStringLiteral("kind")).toString();
360 const auto inner = dryRunCommandForKind(kind);
361 if (inner.isEmpty())
362 return unknownKindError(
363 id, kind, QStringLiteral("frame_parser, transform, painter, output_widget, end_to_end"));
364
365 QJsonObject innerParams = params;
366 innerParams.remove(QStringLiteral("kind"));
367 return forward(inner, id, innerParams);
368}
369
370/**
371 * @brief Dry-run a script then write it via the matching setCode endpoint.

Callers

nothing calls this directly

Calls 6

unknownKindErrorFunction · 0.85
forwardFunction · 0.85
isEmptyMethod · 0.80
dryRunCommandForKindFunction · 0.70
valueMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected