100%/D: Trace Data Collection (S2F23/F24 + S6F1/F2, E30 §6.12)
tests / build-and-test (push) Failing after 32s
tests / build-and-test (push) Failing after 32s
New TraceStore keyed by TRID; each entry is a TraceConfig with
DSPER + TOTSMP + REPGSZ + SVID list. S2F23 validates that every SVID
exists (TIAACK=4 otherwise) and registers the trace.
S6F1's body is L,4 of {TRID U4, SMPLN U4, STIME ASCII, list_of <Item>}
— the application chooses whether each value Item is a scalar SVID
value or a packed batch.
The periodic sampling timer that turns an active TraceConfig into
S6F1 emissions is intentionally left to the application (E5 doesn't
mandate a specific scheduler and vendors typically already have one).
Four new SxFy in the catalog.
COMPLIANCE.md: Trace Data Collection Additional capability flips ✅.
Tests: 82 cases / 477 assertions.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -112,6 +112,32 @@ TEST_CASE("S10F3 terminal display round-trip") {
|
||||
CHECK(parsed->text == "ALARM: chiller temperature high");
|
||||
}
|
||||
|
||||
// ---- Trace Data Collection (S2F23/F24 + S6F1/F2) -----------------------
|
||||
|
||||
TEST_CASE("S2F23 round-trip") {
|
||||
TraceInit ti{7, "1000", 100, 10, {1, 2, 3}};
|
||||
auto m = s2f23_trace_initialize_send(ti.trid, ti.dsper, ti.totsmp, ti.repgsz, ti.svids);
|
||||
auto parsed = parse_s2f23(m);
|
||||
REQUIRE(parsed.has_value());
|
||||
CHECK(parsed->trid == 7);
|
||||
CHECK(parsed->dsper == "1000");
|
||||
CHECK(parsed->totsmp == 100);
|
||||
CHECK(parsed->repgsz == 10);
|
||||
CHECK(parsed->svids == std::vector<uint32_t>{1, 2, 3});
|
||||
}
|
||||
|
||||
TEST_CASE("S6F1 round-trip carries TRID + SMPLN + STIME + values") {
|
||||
std::vector<s2::Item> values = {s2::Item::u4(uint32_t{42}), s2::Item::ascii("hot")};
|
||||
auto m = s6f1_trace_data_send(7, 3, "20260606123000", values);
|
||||
auto parsed = parse_s6f1(m);
|
||||
REQUIRE(parsed.has_value());
|
||||
CHECK(parsed->trid == 7);
|
||||
CHECK(parsed->smpln == 3);
|
||||
CHECK(parsed->stime == "20260606123000");
|
||||
REQUIRE(parsed->values.size() == 2);
|
||||
CHECK(parsed->values[0] == s2::Item::u4(uint32_t{42}));
|
||||
}
|
||||
|
||||
// ---- Limits Monitoring (S2F45-F48) -------------------------------------
|
||||
|
||||
TEST_CASE("S2F45 round-trips define-limits request") {
|
||||
|
||||
Reference in New Issue
Block a user