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

Function seedDefaultFrameParser

app/src/DataModel/ProjectModel.cpp:1503–1512  ·  view source on GitHub ↗

* @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. */

Source from the content-addressed store, hash-verified

1501 * Switching to a scripting language converts the template via the equivalence mapping.
1502 */
1503static 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).

Callers 2

addSourceMethod · 0.85
newJsonFileMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected