* @brief Seeds a source with the default parser: the Native CSV (delimited/comma) template. * Switching to a scripting language converts the template via the equivalence mapping. */
| 1501 | * Switching to a scripting language converts the template via the equivalence mapping. |
| 1502 | */ |
| 1503 | static void seedDefaultFrameParser(DataModel::Source& source) |
| 1504 | { |
| 1505 | source.frameParserLanguage = static_cast<int>(SerialStudio::Native); |
| 1506 | source.frameParserTemplate = DataModel::defaultNativeTemplateId(); |
| 1507 | |
| 1508 | const auto* tmpl = DataModel::nativeTemplateById(source.frameParserTemplate); |
| 1509 | Q_ASSERT(tmpl != nullptr); |
| 1510 | if (tmpl) |
| 1511 | source.frameParserParams = DataModel::nativeTemplateDefaults(*tmpl); |
| 1512 | } |
| 1513 | |
| 1514 | /** |
| 1515 | * @brief Adds a new source to the project (GPL: capped to one source). |
no outgoing calls
no test coverage detected