Phase 3 PR 52 -- Modbus exception-code -> OPC UA StatusCode translation #51
Reference in New Issue
Block a user
Delete Branch "phase-3-pr52-dl205-exception-codes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Before this PR every Modbus exception and every transport failure collapsed to
BadInternalError, making field diagnosis from the OPC UA client impossible. AddsMapModbusExceptionToStatus:Also distinguishes socket-layer failures (
BadCommunicationError) from protocol-layer faults so operators know to check network vs. tag config.Per docs/v2/dl205.md, DL205/DL260 returns only codes 01-04; exception 04 (CPU in PROGRAM mode) is operator-recoverable, so surfacing it as BadDeviceFailure (not BadInternalError) makes the fix obvious.
Validation
Test plan