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

Function dryRunInputBytes

app/src/API/Handlers/ProjectHandler.cpp:5879–5886  ·  view source on GitHub ↗

* @brief Decodes the caller-supplied raw stream bytes; non-empty inputBytesHex wins, an empty * string in either field counts as absent so the other field can still supply the data. */

Source from the content-addressed store, hash-verified

5877 * string in either field counts as absent so the other field can still supply the data.
5878 */
5879static QByteArray dryRunInputBytes(const QJsonObject& params)
5880{
5881 const auto hex = params.value(QStringLiteral("inputBytesHex")).toString();
5882 if (!hex.trimmed().isEmpty())
5883 return SerialStudio::hexToBytes(hex);
5884
5885 return params.value(QStringLiteral("inputBytes")).toString().toUtf8();
5886}
5887
5888/**
5889 * @brief Serializes a single pipeline frame into the dryRun response shape.

Callers 1

frameParserDryRunMethod · 0.85

Calls 2

isEmptyMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected