Files
pnoker dc2164f46e fix(driver): repair boot, scheduling and registration regressions
a live-stack sweep of all 36 drivers surfaced five sdk-level defects
that left reads dead or the whole fleet unbootable:

- drop the empty spring.main stub in the shared driver profile; the
  boot 4.1 binder rejects null-valued keys and every driver died at
  startup with a bind exception
- rename the schedule enable flag to enable to match what every driver
  application.yml actually spells; with the old enabled key the read
  and custom quartz jobs were silently never scheduled
- treat proto3 zero-versions as unset when reconciling registration
  so a driver restart re-registers instead of failing the optimistic
  lock with 'driver version conflict'
- ignore the driver's own registration event that can be consumed
  before applymetadata finishes instead of logging an error
- initialize jdbc/serial connection maps eagerly: the registration
  event handler invalidates pools and nped on a lazy-null map
- ble: exclude the guava 18 pin dragged in by bluetooth-manager
- kafka: use the starter (boot 4 split autoconfigurations out of the
  bare jar) and read the compose-provided bootstrap variable
- lwm2m: pin californium to the 3.x api leshan m14 needs and
  configure an explicit coap endpoint
- mqtt: replace the orphaned spring-integration gateway with a paho
  publisher so the send path exists again
- boot sweep result: 36/36 drivers start, 0 errors
2026-09-18 09:48:19 +08:00
..

DC3 Driver DNP3

Overview

dc3-driver-dnp3 targets DNP3 (IEEE 1815) masters for utility automation. The protocol stack is provided by the io.stepfunc:dnp3 native FFI binding (Rust dnp3 runtime with per-platform native libraries bundled in the jar).

Status

Implemented. The module registers, validates its attributes, and implements the full DNP3 master read/write path: one native Runtime + TCP MasterChannel + association per outstation, class 0/1/2/3 integrity polling through a ReadHandler that caches point values by index, and DIRECT_OPERATE commands for binary and analog outputs.

The io.stepfunc:dnp3 stack is a native FFI binding (Rust dnp3 runtime with per-platform native libraries bundled in the jar). The code compiles and the API surface is confirmed against the binding, but commissioning against a real outstation is required to verify native-library loading and on-wire behaviour in a target environment.

Module Information

  • Group ID: io.github.pnoker
  • Artifact ID: dc3-driver-dnp3
  • Driver Name: DNP3 Driver

Driver Attributes (Device-level)

Attribute Code Type Default Description
Host host STRING DNP3 outstation address
Port port INT 20000 DNP3 TCP service port
Master Address masterAddress INT 1 Master link-layer address
Outstation Address outstationAddress INT 1 Outstation link-layer address

Point Attributes

Attribute Code Type Default Description
Point Index pointIndex INT 0 DNP3 point index within the selected point type
Point Type pointType STRING BINARY_INPUT BINARY_INPUT, ANALOG_INPUT, COUNTER, DOUBLE_BIT_BINARY_INPUT, BINARY_OUTPUT, or ANALOG_OUTPUT

Command Attributes (write)

Attribute Code Type Default Description
Point Index pointIndex INT 0 DNP3 point index within the selected output point type
Point Type pointType STRING BINARY_OUTPUT BINARY_OUTPUT or ANALOG_OUTPUT

The module application.yml is authoritative for attribute codes, types, defaults, scheduling, health, and local buffering. Keep this README aligned when those user-facing settings change.

Prerequisites

A reachable DNP3 outstation over TCP (default port 20000) with matching master/outstation link-layer addresses. Native library loading must be verified on the target platform before commissioning.

Running Locally

make up-db
make up-dev GROUP=core
mvn -s .mvn/settings.xml -pl dc3-driver/dc3-driver-dnp3 -am package
java -jar dc3-driver/dc3-driver-dnp3/target/dc3-driver-dnp3.jar

Testing

mvn -s .mvn/settings.xml -pl dc3-driver/dc3-driver-dnp3 -am test
  • dc3-common-driver — Driver SDK for registration, scheduling, and RabbitMQ integration