* @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. */
| 5877 | * string in either field counts as absent so the other field can still supply the data. |
| 5878 | */ |
| 5879 | static 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. |
no test coverage detected