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:
@@ -151,6 +151,27 @@ TEST_CASE("S9F13 conversation timeout carries MEXP + EDID") {
|
||||
CHECK(parsed->edid == "EQUIP-01");
|
||||
}
|
||||
|
||||
// ---- S5F7 / S5F8 List Enabled Alarms -----------------------------------
|
||||
|
||||
TEST_CASE("S5F7 header-only; S5F8 round-trips alarm listing") {
|
||||
auto req = s5f7_list_enabled_alarms_request();
|
||||
CHECK(req.stream == 5);
|
||||
CHECK(req.function == 7);
|
||||
CHECK(req.reply_expected);
|
||||
CHECK_FALSE(req.body.has_value());
|
||||
|
||||
std::vector<AlarmListing> rows = {{0x84, 1, "Chiller Temp High"},
|
||||
{0x01, 2, "Door Open"}};
|
||||
auto m = s5f8_list_enabled_alarms_data(rows);
|
||||
auto parsed = parse_s5f8(m);
|
||||
REQUIRE(parsed.has_value());
|
||||
REQUIRE(parsed->size() == 2);
|
||||
CHECK((*parsed)[0].alcd == 0x84);
|
||||
CHECK((*parsed)[0].alid == 1);
|
||||
CHECK((*parsed)[1].alcd == 0x01);
|
||||
CHECK((*parsed)[1].altx == "Door Open");
|
||||
}
|
||||
|
||||
// ---- S1F19 / S1F20 Get GEM Compliance ----------------------------------
|
||||
|
||||
TEST_CASE("S1F19 is header-only and S1F20 round-trips capability list") {
|
||||
|
||||
Reference in New Issue
Block a user