fix(abcip): #611 review round 1 — native keeps BOOL type distinction, WriteWidthRefusal tests, doc caveats
- L2: WriteWidthRefusal leaves a BOOL over a wider value to a runtime that sees the CIP type (native): mistyped integer member -> BadTypeMismatch (as its read), 0xD3 BOOL-array DWORD -> BadNotSupported; libplctag keeps BadNotSupported for both (size only). - L4: direct theory over WriteWidthRefusal (1/2/4/8 widths incl LINT/ULINT/LREAL, String/Dt, unknown size) + array/bit-selector exemptions with a non-vacuous control. - L1: CLAUDE.md member/BIT-member writes are ab_server-proven only. - L3: patch 0003 blind spots documented (Docker README, AbServer-Test-Fixture.md); nits. Claude-Session: https://claude.ai/code/session_01Ef2ozxS7QPanGT8uoATbTe
This commit is contained in:
@@ -90,6 +90,14 @@ things for the discovered-UDT-member write suite (`AbCipUdtMemberWriteTests`, Gi
|
||||
`0x03` (libplctag `ErrorBadParam`), so no libplctag BOOL/SINT write could pass here. The
|
||||
patch drops exactly one trailing pad byte when it alone would overrun an odd-sized target.
|
||||
|
||||
**Blind spots this patch introduces (accepted for a fixture):** (a) the pad trim also accepts a genuinely
|
||||
wrong 2-byte payload aimed at a 1-byte tag, so ab_server can no longer catch a client over-writing an
|
||||
odd-sized target by exactly one byte — the driver's own pre-write width check (`AbCipDriver.WriteWidthRefusal`)
|
||||
covers our paths; (b) because `.` is legal in a `--tag` name, a malformed *single* symbolic segment
|
||||
`"UdtSeg.ID"` (which a real Logix rejects) also resolves, via the original exact-match lookup —
|
||||
`NativeAbCipTagRuntimeTests.A_member_path_write_names_the_member_and_sends_only_its_own_bytes` pins that our
|
||||
encoder splits members into separate segments.
|
||||
|
||||
**Bumping `LIBPLCTAG_TAG` means re-checking every patch against the new tag.** It
|
||||
is a concrete tag rather than the `release` branch precisely so that this stays
|
||||
a deliberate act — the branch moves, and the Dockerfile previously called it
|
||||
@@ -159,7 +167,7 @@ place means updating both.
|
||||
|
||||
| Family | Seeded tags | Notes |
|
||||
|---|---|---|
|
||||
| ControlLogix | `TestDINT` `TestREAL` `TestBOOL` `TestSINT` `TestString` `TestArray` `Pump_1_Speed` `Line1_Count` `Motor_Run` `UdtSeg.*` | Widest-coverage; PR 9 baseline. UDT emulation missing from ab_server; the `UdtSeg.*` member tags (patch 0003) serve member-path writes only. The last three serve the controller-browse gate and are additive — the read/write suites key off the `Test*` tags. `Motor_Run` (9), `Line1_Count` (11) and `TestArray` (9) have **odd-length names on purpose**: entries are unpadded, so an odd name puts every following entry on an odd offset, and a decoder that assumes even alignment loses everything behind it |
|
||||
| ControlLogix | `TestDINT` `TestREAL` `TestBOOL` `TestSINT` `TestString` `TestArray` `Pump_1_Speed` `Line1_Count` `Motor_Run` `UdtSeg.*` | Widest-coverage; PR 9 baseline. UDT emulation missing from ab_server; the `UdtSeg.*` member tags (patch 0003) serve member-path writes only. `Pump_1_Speed`, `Line1_Count` and `Motor_Run` serve the controller-browse gate and are additive — the read/write suites key off the `Test*` tags. `Motor_Run` (9), `Line1_Count` (11) and `TestArray` (9) have **odd-length names on purpose**: entries are unpadded, so an odd name puts every following entry on an odd offset, and a decoder that assumes even alignment loses everything behind it |
|
||||
| CompactLogix | `TestDINT` `TestREAL` `TestBOOL` | Narrow ConnectionSize cap enforced driver-side; ab_server accepts any size |
|
||||
| Micro800 | `TestDINT` `TestREAL` | ab_server has no `micro800` mode; falls back to `controllogix` emulation |
|
||||
| GuardLogix | `TestDINT` `SafetyDINT_S` | ab_server has no safety subsystem; `_S` suffix triggers driver-side classification only |
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ services:
|
||||
restart: "no"
|
||||
ports:
|
||||
- "44818:44818"
|
||||
# The last three are here for the controller-browse gate (Gitea #468) and
|
||||
# Pump_1_Speed, Line1_Count and Motor_Run are here for the controller-browse gate (Gitea #468) and
|
||||
# are additive — the read/write suites key off the Test* tags above.
|
||||
# The UdtSeg.* tags (Gitea #611) stand in for the members of a UDT tag `UdtSeg`
|
||||
# (modelled on the Z-35162 press's UDT_TemperatureProfile_Segment): ab_server has
|
||||
|
||||
Reference in New Issue
Block a user