Skip to content

8.11.2.1 and 8.11.2a: accept a READ answer deferred to the unsolicited confirm timeout - #96

Merged
jadamcrain merged 3 commits into
mainfrom
defer-read-at-startup
Oct 15, 2026
Merged

jadamcrain merged 3 commits into
mainfrom
defer-read-at-startup

Conversation

@jadamcrain

Copy link
Copy Markdown
Member

Closes #1

Step 24 of 8.11.2.1 (3.1r1's 8.11.2a) checks that the device answers the READ sent in step 23 while its startup unsolicited response is still unconfirmed. dnp3c waited only the response timeout plus 200 ms for that answer, so a device that defers the READ until the unsolicited confirm timeout expires failed whenever that timeout was the longer one (step 3 sets it to 5 seconds).

The procedures pull both ways here. Step 24, and 8.11.1's restart behavior, read as an answer within the usual response time. 8.11.1's rules for unsolicited and polled responses (in 2.7 and 3.1 rev 1 alike) have the device defer a READ received while any unsolicited response awaits confirmation, until the confirmation arrives or its timeout expires, and so does IEEE 1815-2012 4.6.6 rule 16. TB2015-002a makes the intent plain: it rewrites rule 16 to say the READ is deferred for the startup response too, then answered, then the startup response sent again. dnp3c now reads step 24 in that light, in both revisions.

Changes

  • Step 24 waits for the first fragment of the answer for the response timeout plus the unsolicited confirm timeout, plus the usual 200 ms (7200 ms with the defaults). Later fragments keep the normal timeout. -describe says so for step 24.
  • An answer that arrives well before the startup response's confirm timeout (more than 500 ms early) still passes, as step 24 as printed allows, with a warning that 1815-2012 4.6.6 rule 16, as amended by TB2015-002a, has it deferred. The log records how long after the unsolicited response the answer came.
  • TestDriver.readAllResponses takes an optional timeout for the first fragment, and the 200 ms read tolerance is now one constant, TestDriver.readToleranceMs.
  • The README moves this from its known limitations to the section on where the revision contradicts itself, with the resolution.

Checks

  • Tests: a device that defers the READ until a 5000 ms confirm timeout, with a 2000 ms response timeout, passes with no warning (it failed before); one that answers at once passes with the warning.
  • Run against an outstation that defers the READ, with a 2000 ms response timeout and a 5000 ms unsolicited confirm timeout: 8.11.2a passes, the answer arriving 5029 ms after the unsolicited response; before this change it failed at step 24.
  • -describe changes only for 8.11.2.1 and 8.11.2a: step 24's added line, and outstation.response.timeout.ms among the options they use.

…d confirm timeout

The test procedures' 8.11.1 has the device defer a READ received while an
unsolicited response awaits confirmation, until the confirmation arrives or
its timeout expires, as IEEE 1815-2012 4.6.6 rule 16 (with TB2015-002a)
requires, and step 24 only asks that the READ be answered. Step 24 now waits
for the answer for the response timeout plus the unsolicited confirm timeout
(and the usual 200 ms), and notes an answer that comes well before the
startup response's confirm timeout. Removes the README's known limitation.
@jadamcrain
jadamcrain added this pull request to the merge queue Oct 15, 2026
Merged via the queue into main with commit 582493e Oct 15, 2026
4 checks passed
@jadamcrain
jadamcrain deleted the defer-read-at-startup branch October 15, 2026 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8.11.2.1: may a device defer a READ while its startup unsolicited response is unconfirmed?

1 participant