* @brief Parses a delimiter field (frameStart / frameEnd) honoring the hexadecimalDelimiters flag. */
| 5859 | * @brief Parses a delimiter field (frameStart / frameEnd) honoring the hexadecimalDelimiters flag. |
| 5860 | */ |
| 5861 | static QByteArray dryRunDelimiter(const QJsonObject& params, const QString& key, bool hex) |
| 5862 | { |
| 5863 | const auto raw = params.value(key).toString(); |
| 5864 | if (raw.isEmpty()) |
| 5865 | return {}; |
| 5866 | |
| 5867 | if (hex) { |
| 5868 | const auto resolved = SerialStudio::resolveEscapeSequences(raw); |
| 5869 | return QByteArray::fromHex(QString(resolved).remove(' ').toUtf8()); |
| 5870 | } |
| 5871 | |
| 5872 | return SerialStudio::resolveEscapeSequences(raw).toUtf8(); |
| 5873 | } |
| 5874 | |
| 5875 | /** |
| 5876 | * @brief Decodes the caller-supplied raw stream bytes; non-empty inputBytesHex wins, an empty |
no test coverage detected