Auto: s7-c1 — surface negotiated PDU size via DriverHealth.Diagnostics

Closes #294
This commit is contained in:
Joseph Doherty
2026-04-26 00:35:49 -04:00
parent f469cf7e0d
commit 6540bbe1ef
6 changed files with 165 additions and 1 deletions

View File

@@ -67,6 +67,18 @@ DB1 (1024 bytes) + MB (256 bytes) with typed seeds at known offsets:
Seed types supported: `u8`, `i8`, `u16`, `i16`, `u32`, `i32`, `f32`,
`bool` (with `"bit": 0..7`), `ascii` (S7 STRING).
## Negotiated PDU size
Snap7's `Server` always negotiates a **fixed 240-byte PDU** during the
COTP/S7comm handshake (the legacy default — Snap7 does not implement the
S7-1500 extended-PDU negotiation). The S7 driver surfaces this value
through `DriverHealth.Diagnostics["S7.NegotiatedPduSize"]`, exercised by
`S7_1500DiagnosticsTests.Driver_exposes_negotiated_pdu_size_post_init`.
Operators inspecting a driver against this fixture should therefore see
`S7.NegotiatedPduSize = 240`. Real S7-1500 CPUs running the extended PDU
report 480 or 960; that branch is hardware-only and not exercised here.
## Known limitations
From the `snap7.server.Server` docstring upstream: