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

Function frameParserDryRunCommand

app/src/AI/ToolDispatcher.cpp:1092–1117  ·  view source on GitHub ↗

* @brief Picks the frame-parser dry-run command and seeds its inputs. */

Source from the content-addressed store, hash-verified

1090 * @brief Picks the frame-parser dry-run command and seeds its inputs.
1091 */
1092static QString frameParserDryRunCommand(const QJsonObject& args, QJsonObject& dryArgs, int language)
1093{
1094 dryArgs[QStringLiteral("language")] = language;
1095
1096 if (args.contains(QStringLiteral("inputBytes"))
1097 || args.contains(QStringLiteral("inputBytesHex"))) {
1098 static const Keys::KeyView keys[] = {
1099 Keys::KeyView("inputBytes"),
1100 Keys::KeyView("inputBytesHex"),
1101 Keys::DecoderMethod,
1102 Keys::FrameDetection,
1103 Keys::FrameStart,
1104 Keys::FrameEnd,
1105 Keys::HexadecimalDelimiters,
1106 Keys::ChecksumAlgorithm,
1107 Keys::KeyView("operationMode"),
1108 };
1109 for (const auto& k : keys)
1110 if (args.contains(k))
1111 dryArgs[k] = args.value(k);
1112
1113 return QStringLiteral("project.frameParser.dryRun");
1114 }
1115
1116 return QStringLiteral("project.frameParser.dryCompile");
1117}
1118
1119/**
1120 * @brief Populates transform dry-run inputs with language and sample values.

Callers 1

dryRunCommandForKindFunction · 0.85

Calls 2

containsMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected