mirror of
https://gitee.com/pnoker/iot-dc3.git
synced 2026-10-31 10:11:49 +08:00
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
DC3 Driver PLC S7
Overview
dc3-driver-plcs7 is the Siemens S7 PLC driver of the IoT DC3 platform. It communicates with Siemens S7 series PLCs
(S7-200/300/400/1200/1500) using the S7 TCP protocol to read and write data block registers.
Module Information
- Group ID: io.github.pnoker
- Artifact ID: dc3-driver-plcs7
- Driver Name: PLC S7 Driver
Driver Attributes (Device-level)
| Attribute | Description |
|---|---|
| Host | PLC IP address |
| Port | S7 TCP port (typically 102) |
| PLC Type | Siemens PLC model (selects the S7 addressing scheme) |
Point Attributes
| Attribute | Description |
|---|---|
| DB Number | Siemens data block number |
| Byte Offset | Byte offset within the data block |
| Bit Offset | Bit offset within the byte (for boolean points) |
The module application.yml is authoritative for attribute codes, types, default values, scheduling, health, and local
buffering. Keep this README aligned when those user-facing settings change.
Prerequisites
- Siemens S7 PLC (S7-200 Smart, S7-1200, S7-1500 or compatible)
- PLC PUT/GET access enabled
- Compatible PLC programming: Siemens TIA Portal or STEP 7
Running Locally
1. Start Infrastructure and Center Services
make up-db
make up-dev GROUP=core
2. Build and Run
mvn -s .mvn/settings.xml -pl dc3-driver/dc3-driver-plcs7 -am package
java -jar dc3-driver/dc3-driver-plcs7/target/dc3-driver-plcs7.jar
Testing
Run the module tests from the repository root:
mvn -s .mvn/settings.xml -pl dc3-driver/dc3-driver-plcs7 -am test
Related Modules
dc3-common-driver— Driver SDK for registration, scheduling, and RabbitMQ integration