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

Method detectionIndex

app/src/DataModel/Editors/FrameParserModel.cpp:212–217  ·  view source on GitHub ↗

* @brief Returns the source's frame detection mode as a combobox index. */

Source from the content-addressed store, hash-verified

210 * @brief Returns the source's frame detection mode as a combobox index.
211 */
212int DataModel::FrameParserModel::detectionIndex() const
213{
214 const auto detection = static_cast<SerialStudio::FrameDetection>(currentSource().frameDetection);
215 const auto idx = kDetectionValues.indexOf(detection);
216 return idx >= 0 ? static_cast<int>(idx) : 0;
217}
218
219/**
220 * @brief Returns the source's checksum algorithm as a combobox index.

Callers

nothing calls this directly

Calls 1

indexOfMethod · 0.45

Tested by

no test coverage detected