From 4a320b6387866a16be910b527b96306d83e04dc6 Mon Sep 17 00:00:00 2001 From: jadamcrain Date: Mon, 12 Oct 2026 16:40:14 -0700 Subject: [PATCH] Run the conformance tests with dnp3c 0.1.0 from Maven Central dnp4s is released as dnp3c, io.stepfunc:dnp3c on Maven Central, so CI no longer checks out and builds a pinned dnp4s commit. --- .github/workflows/ci.yml | 11 ----------- conformance/device.ini | 2 +- conformance/pom.xml | 8 ++++---- .../dnp3/Dnp3rsIntegrationPlugin.scala | 16 ++++++++-------- .../io/stepfunc/conformance/dnp3/Main.scala | 2 +- .../conformance/dnp3/TrackingDatabase.scala | 4 ++-- 6 files changed, 16 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index edeb7ac6..2b169a45 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -374,17 +374,6 @@ jobs: - name: Install Java bindings shell: bash run: (cd ffi/bindings/java/dnp3 && sudo mvn install) - - name: Checkout dnp4s - uses: actions/checkout@v6 - with: - repository: stepfunc/dnp4s - ssh-key: ${{ secrets.DNP4S_SSH_KEY }} - # a fixed dnp4s commit until dnp4s publishes releases - ref: be35ada4cfa99968cd07b292b9c88c4a36c32111 - path: dnp4s - - name: Build dnp4s - working-directory: dnp4s - run: sudo mvn --batch-mode install - name: Capture packets during the conformance tests working-directory: conformance # capturing needs root, which the tests run as; local runs leave it off diff --git a/conformance/device.ini b/conformance/device.ini index 00e7c27d..ac6975ee 100644 --- a/conformance/device.ini +++ b/conformance/device.ini @@ -332,7 +332,7 @@ analogInput.analogInputEventsClass = 3 # Unsolicited confirmation timeout value (in ms) min: 1 # The outstation has one confirm timeout, for solicited and unsolicited responses: 2000 ms unless a procedure sets it. # This and outstation.app.confirm.timeout.ms must match it. It must also be no longer than the response timeout: the -# outstation holds 8.11.2.1's READ until its startup response is confirmed or this timeout expires (dnp4s#7). +# outstation holds 8.11.2.1's READ until its startup response is confirmed or this timeout expires (stepfunc/dnp3c#1). unsolicited.unsolicitedConfirmTimeoutMs = 2000 # Other Master address where unsolicited responses can be configured to send to min: 0 max: 65519 diff --git a/conformance/pom.xml b/conformance/pom.xml index f8295aae..4e37be00 100644 --- a/conformance/pom.xml +++ b/conformance/pom.xml @@ -12,7 +12,7 @@ UTF-8 3.9.0 1.8.0-M1 - 0.1.0-SNAPSHOT + 0.1.0 4.10.0 @@ -63,9 +63,9 @@ compile - io.stepfunc.dnp4s - conformance - ${dnp4s.version} + io.stepfunc + dnp3c + ${dnp3c.version} io.stepfunc diff --git a/conformance/src/main/scala/io/stepfunc/conformance/dnp3/Dnp3rsIntegrationPlugin.scala b/conformance/src/main/scala/io/stepfunc/conformance/dnp3/Dnp3rsIntegrationPlugin.scala index 2a289462..72c6be4b 100644 --- a/conformance/src/main/scala/io/stepfunc/conformance/dnp3/Dnp3rsIntegrationPlugin.scala +++ b/conformance/src/main/scala/io/stepfunc/conformance/dnp3/Dnp3rsIntegrationPlugin.scala @@ -1,9 +1,9 @@ package io.stepfunc.conformance.dnp3 -import io.stepfunc.dnp4s.dnp3.app._ -import io.stepfunc.dnp4s.dnp3.app.objects.AttributeValue -import io.stepfunc.dnp4s.dnp3.{ActionResult, ActionTiming, CheckReporter, DeferredCheck, EventExpectation, InputKind, IntegrationPlugin, PluginReporter} -import io.stepfunc.dnp4s.protocol.parsing.UInt8 +import io.stepfunc.dnp3c.dnp3.app._ +import io.stepfunc.dnp3c.dnp3.app.objects.AttributeValue +import io.stepfunc.dnp3c.dnp3.{ActionResult, ActionTiming, CheckReporter, DeferredCheck, EventExpectation, InputKind, IntegrationPlugin, PluginReporter} +import io.stepfunc.dnp3c.protocol.parsing.UInt8 import io.stepfunc.dnp3.{AddressFilter, AnalogInput, AnalogOutputStatus, BinaryInput, BinaryOutputStatus, Counter, DoubleBit, DoubleBitBinaryInput, EventBufferConfig, FrozenCounter, LinkErrorMode, Outstation, Runtime, RuntimeConfig, OutstationServer} import org.joou.UInteger import org.joou.Unsigned.{uint, ushort} @@ -620,10 +620,10 @@ class Dnp3IntegrationPlugin extends IntegrationPlugin { if (expectedValue.idx != receivedValue.idx) throw new Exception("Unknown double-bit binary point event reported") // Check value - if ((expectedValue.value.value == DoubleBit.DETERMINED_OFF && receivedValue.point.value != io.stepfunc.dnp4s.dnp3.app.DoubleBit.DeterminedOff) || - (expectedValue.value.value == DoubleBit.DETERMINED_ON && receivedValue.point.value != io.stepfunc.dnp4s.dnp3.app.DoubleBit.DeterminedOn) || - (expectedValue.value.value == DoubleBit.INDETERMINATE && receivedValue.point.value != io.stepfunc.dnp4s.dnp3.app.DoubleBit.Indeterminate) || - (expectedValue.value.value == DoubleBit.INTERMEDIATE && receivedValue.point.value != io.stepfunc.dnp4s.dnp3.app.DoubleBit.Intermediate)) { + if ((expectedValue.value.value == DoubleBit.DETERMINED_OFF && receivedValue.point.value != io.stepfunc.dnp3c.dnp3.app.DoubleBit.DeterminedOff) || + (expectedValue.value.value == DoubleBit.DETERMINED_ON && receivedValue.point.value != io.stepfunc.dnp3c.dnp3.app.DoubleBit.DeterminedOn) || + (expectedValue.value.value == DoubleBit.INDETERMINATE && receivedValue.point.value != io.stepfunc.dnp3c.dnp3.app.DoubleBit.Indeterminate) || + (expectedValue.value.value == DoubleBit.INTERMEDIATE && receivedValue.point.value != io.stepfunc.dnp3c.dnp3.app.DoubleBit.Intermediate)) { throw new Exception(f"Double-bit binary ${receivedValue.idx} did not report proper value") } diff --git a/conformance/src/main/scala/io/stepfunc/conformance/dnp3/Main.scala b/conformance/src/main/scala/io/stepfunc/conformance/dnp3/Main.scala index 0fc301f2..418628c4 100644 --- a/conformance/src/main/scala/io/stepfunc/conformance/dnp3/Main.scala +++ b/conformance/src/main/scala/io/stepfunc/conformance/dnp3/Main.scala @@ -2,6 +2,6 @@ package io.stepfunc.conformance.dnp3 object Main { def main(args: Array[String]): Unit = { - io.stepfunc.dnp4s.conformance.Main.run(args, new Dnp3IntegrationPlugin()) + io.stepfunc.dnp3c.conformance.Main.run(args, new Dnp3IntegrationPlugin()) } } diff --git a/conformance/src/main/scala/io/stepfunc/conformance/dnp3/TrackingDatabase.scala b/conformance/src/main/scala/io/stepfunc/conformance/dnp3/TrackingDatabase.scala index 9977be4a..16279d26 100644 --- a/conformance/src/main/scala/io/stepfunc/conformance/dnp3/TrackingDatabase.scala +++ b/conformance/src/main/scala/io/stepfunc/conformance/dnp3/TrackingDatabase.scala @@ -1,7 +1,7 @@ package io.stepfunc.conformance.dnp3 -import io.stepfunc.dnp4s.dnp3.app.EventClass -import io.stepfunc.dnp4s.dnp3.app.objects.AttributeValue +import io.stepfunc.dnp3c.dnp3.app.EventClass +import io.stepfunc.dnp3c.dnp3.app.objects.AttributeValue import io.stepfunc.dnp3._ import org.joou.UByte import org.joou.Unsigned.{ubyte, uint, ushort}