* @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. */
| 115 | * on each pass so a Dashboard reset between signals can never dangle a tracker. |
| 116 | */ |
| 117 | void 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. |
nothing calls this directly
no test coverage detected