* @brief Picks the frame-parser dry-run command and seeds its inputs. */
| 1090 | * @brief Picks the frame-parser dry-run command and seeds its inputs. |
| 1091 | */ |
| 1092 | static 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. |
no test coverage detected