100%/A: S5F7/F8 list enabled alarms
tests / build-and-test (push) Failing after 32s

Closes the small remaining hole in Alarm Management.  S5F7 is
header-only; S5F8 has the same wire shape as S5F6 (vector of
<L,3 <B ALCD> <U4 ALID> <A ALTX>>) but only includes alarms whose
enabled flag is set.  Codegen handles both as a list_of with
struct_name=AlarmListing; server pre-computes the per-row ALCD from
(severity_category, active state) before passing the rows in.

COMPLIANCE.md: Alarm Management Additional capability flips .

Tests: 78 cases / 454 assertions.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-07 01:52:11 +02:00
parent 813e011409
commit 88205037ec
4 changed files with 59 additions and 2 deletions
+12
View File
@@ -335,6 +335,18 @@ int main(int argc, char** argv) {
logfn(std::string("S5F3 -> S5F4 ACKC5=") + std::to_string(static_cast<int>(ack)));
return gem::s5f4_enable_alarm_ack(ack);
});
router.on(5, 7, [model, logfn](const s2::Message&) {
std::vector<gem::AlarmListing> rows;
for (const auto& a : model->alarms.all()) {
if (!model->alarms.enabled(a.id)) continue;
const uint8_t alcd = (a.severity_category & 0x7F) |
static_cast<uint8_t>(model->alarms.active(a.id) ? 0x80 : 0x00);
rows.push_back({alcd, a.id, a.text});
}
logfn("S5F7 -> S5F8 (" + std::to_string(rows.size()) + " enabled)");
return gem::s5f8_list_enabled_alarms_data(rows);
});
router.on(5, 5, [model, logfn](const s2::Message& msg) {
auto ids = gem::parse_u4_list_body(msg);
std::vector<gem::Alarm> alarms;