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

Function dryRunDelimiter

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

* @brief Parses a delimiter field (frameStart / frameEnd) honoring the hexadecimalDelimiters flag. */

Source from the content-addressed store, hash-verified

5859 * @brief Parses a delimiter field (frameStart / frameEnd) honoring the hexadecimalDelimiters flag.
5860 */
5861static 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

Callers 1

frameParserDryRunMethod · 0.85

Calls 3

isEmptyMethod · 0.80
valueMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected