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

Method evaluateAlarms

app/src/UI/AlarmMonitor.cpp:117–134  ·  view source on GitHub ↗

* @brief Evaluates every tracked dataset against its bands; datasets are resolved by uniqueId * on each pass so a Dashboard reset between signals can never dangle a tracker. */

Source from the content-addressed store, hash-verified

115 * on each pass so a Dashboard reset between signals can never dangle a tracker.
116 */
117void UI::AlarmMonitor::evaluateAlarms()
118{
119 if (m_trackers.empty())
120 return;
121
122 const auto& datasets = UI::Dashboard::instance().datasets();
123 for (auto& tracker : m_trackers) {
124 const auto it = datasets.constFind(tracker.uniqueId);
125 if (it == datasets.cend())
126 continue;
127
128 const auto& dataset = it.value();
129 if (!dataset.isNumeric || !std::isfinite(dataset.numericValue))
130 continue;
131
132 processValue(tracker, dataset.numericValue);
133 }
134}
135
136/**
137 * @brief Returns the index of the band that contains @a value; -1 if none.

Callers

nothing calls this directly

Calls 5

isfiniteFunction · 0.85
processValueFunction · 0.85
emptyMethod · 0.80
cendMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected