Release v0.35.0 — 80 of 88 report fields from the file, and monitor logs (.MLG) #60

Merged
serversdown merged 50 commits from dev into main 2026-11-16 15:49:06 -05:00
2 changed files with 17 additions and 1 deletions
Showing only changes of commit 47da0ddef0 - Show all commits

No files matched your search

+3 -1
View File
@@ -764,7 +764,9 @@ class S3FrameParser:
n_chk = 2 if body[-2] == DLE and body[-1] in (STX, ETX, 0x04) else 1
raw_payload = body[:-n_chk] # everything except the checksum
chk_received = body[-1]
chk_computed = checksum(raw_payload)
# SUM8 of the payload unescaped: the kept `10` of a `10 02/03/04` is not
# summed (7,747 of 7,747 recorded replies check this way).
chk_computed = checksum(unescape_reply(raw_payload))
if len(raw_payload) < 5:
return None
+14
View File
@@ -75,6 +75,20 @@ def test_a_last_data_byte_of_0x10_survives_an_escaped_checksum(chk):
assert (unescape_reply(f.data), f.chk_byte) == (data, chk)
REPLY_RECORDINGS = ["minimate-bench-10-25-26/BE9441_event0_01110000_rx.bin",
"minimate-bench-10-25-26/BE9441_event1_0111646a_rx.bin",
"minimate-bench-10-26-26-blastware/unit_replies.bin",
"minimate-bench-10-26-26-histogram/unit_replies.bin"]
@pytest.mark.parametrize("name", REPLY_RECORDINGS)
def test_every_recorded_reply_checks(name):
# BE9441, October 2026: 2,509 replies, 62 with an escaped checksum.
frames = S3FrameParser().feed((FIX / name).read_bytes())
assert frames
assert [i for i, f in enumerate(frames) if not f.checksum_valid] == []
@pytest.mark.parametrize("chk", [0x10, 0x00, 0x55])
def test_any_other_checksum_reads_as_before(chk):
data = data_for(chk, last=0x10)