16 Commits
Author SHA1 Message Date
pnoker 66aab58f20 build: standardize repository tooling and quality gates 2026-09-02 20:51:10 +08:00
pnoker 769d1cb977 style: apply repository-wide formatting
- expand single-line Javadocs to multi-line blocks, rewrap Markdown prose, and reflow POM, YAML, and TypeScript formatting
- formatting only: no Java code lines changed, no build-file semantics changed
- verified: backend compile and check_documentation.py pass, pnpm check and pnpm lint:check pass, and the dc3 YAML files parse
2026-08-25 13:35:00 +08:00
pnoker 51f0efd2d9 style(javadoc): document non-override public methods 2026-08-19 00:05:58 +08:00
pnoker dddf2e8690 test: enforce truthful coverage and behavioral quality 2026-08-18 23:24:58 +08:00
pnoker 956de3dd38 feat(driver)!: enforce lease-fenced durable telemetry
Use PostgreSQL leases and fencing for distributed ownership, require a durable SQLite outbox before RabbitMQ publication, and make Data Center ingestion transactional and idempotent.

BREAKING CHANGE: drivers require mandatory durable outbox configuration and use lease-aware ownership and telemetry contracts.
2026-08-18 00:50:57 +08:00
hongyuan.zhang 6b37cb5ccd docs(readme): refresh module documentation 2026-08-11 22:58:30 +08:00
pnoker 7bf615b3b1 feat(driver): configure driver buffer and mount container volume
28 driver application.yml add dc3.driver.buffer; Dockerfile each stage adds dc3/data dir and VOLUME; docker-compose main/dev add driver_data named volume
2026-07-26 00:13:31 +08:00
pnoker 0fd8d5b6b3 docs(drivers): align since tags with version across protocol drivers
Fix @since 2026.6.2 -> @since 2026.5.22 on 40 files across 17 protocol
drivers (serial, dlms, fins, mysql, ethernet-ip, zigbee, bacnet-ip,
snmp, ble, can, oracle, postgresql, iec104, lwm2m, tcp-udp, http,
sqlserver). The @since value was later than @version 2026.5.22, which
is impossible — a class cannot exist in 5.22 yet be introduced in 6.2.
2026-07-09 19:18:28 +08:00
pnoker d18bf4d03d style: fix table alignment and whitespace in README files 2026-06-26 13:17:38 +08:00
pnoker 452ed896f3 test(driver): add minimal unit tests for 13 previously untested drivers
Add offline MockitoExtension tests for bacnet-ip, can, ethernet-ip, fins, http,
lwm2m, mysql, oracle, postgresql, serial, snmp, sqlserver, and tcp-udp. Each
covers configuration validation (validate/validatePoint flag missing required
attributes) and deterministic lifecycle behavior. Network/hardware paths
(read/write/getConnector) are deliberately excluded to keep the suite fast and
deterministic. Takes these drivers from zero tests to baseline coverage.
2026-06-22 18:09:01 +08:00
pnoker 98f0ac3128 docs(readme): add READMEs for previously undocumented modules
Document 31 modules that had no README: dc3-center-agentic, dc3-e2e,
common modules (agentic, sql, test, resource-registrar) and the facade
subsystem (api/grpc/local-auth/local-data/local-manager), plus 21
drivers. Content is grounded in each module's pom/yaml/source; WIP
skeleton drivers (can, dlms, ethernet-ip, iec104, lwm2m, zigbee) are
flagged as such.
2026-06-22 16:50:08 +08:00
pnoker 0f1245f00e refactor(driver): centralize http driver json constants 2026-06-12 22:17:08 +08:00
pnoker be88efc379 feat(driver): add DriverValidator SPI for protocol-level sandbox validation
Introduce DriverValidator SPI with validate(), validateDevice(), validatePoint(),
and simulate() default methods. All 28 protocol drivers now implement per-driver
and per-point configuration validation, checking that required attributes are
present before attempting device I/O.

- Add ValidationReport DTO with structured AttributeIssue / IssueLevel reporting
- Add DriverValidator SPI interface with sensible defaults
- Integrate DriverValidator into DriverCustomService aggregate SPI
- Implement validation for all 28 drivers (Modbus TCP, OPC UA, BACnet, MQTT, etc.)
- Add validation contract tests for Modbus TCP driver
2026-06-07 01:11:07 +08:00
pnoker 038d0c092d refactor: fix low-severity code convention violations
- Replace e.getMessage() with exception object in 12 SLF4J log calls
  across 8 files to preserve full stack traces
- Replace hardcoded date pattern in @JsonFormat with TimeConstant
  reference in LatestPointValueVO and TimeseriesPointVO
- Standardize TopicVO: replace @Data with @Getter/@Setter/@ToString,
  add @NoArgsConstructor/@AllArgsConstructor, @JsonInclude, Serializable
- Replace fully-qualified class names with imports in DashboardController
2026-06-05 23:25:33 +08:00
pnoker f5743a89fc security(auth): remove hardcoded default keys, secrets, and password fallbacks
Remove DEFAULT_KEY and DEFAULT_PASSWORD constants from AlgorithmConstant.
Require DC3_SECURITY_KEY env var at startup — fail with IllegalStateException
if not configured instead of silently falling back to a well-known string.

Remove hardcoded default HMAC secret from HmacAuthProperties. Log a warning
when request signing is disabled in WebFilterConfig.

Require DC3_SECURITY_DEFAULT_PASSWORD for password reset operations instead
of falling back to the hardcoded 'dc3dc3dc3'.

Replace all YAML password fallback values (dc3dc3dc3) with empty defaults so
misconfigured deployments fail at connection time with a clear error rather
than silently connecting with a well-known password.
2026-06-05 22:35:50 +08:00
pnoker 26f6e91a64 feat(driver): add 17 protocol drivers to extend IoT connectivity coverage
## Common Foundation
- dc3-common-sql: AbstractJdbcDriverCustomService base class with HikariCP
  pool management and JDBC template methods

## Serial & General-Purpose (3)
- Serial: RS232/RS485/RS422 with configurable frame parsing (CRC16/XOR)
- HTTP: REST Client using Spring WebClient with JSON path extraction
- TCP/UDP Raw: generic socket driver with pluggable frame protocol

## Database Drivers (4)
- MySQL, PostgreSQL, Oracle (SID/ServiceName), SQL Server

## IoT & Wireless Protocols (3)
- LwM2M: Eclipse Leshan 2.0.0-M14 with CoAP server and device observation
- Zigbee: Z-Smart Systems 1.4.16.1 with Telegesis dongle support
- BLE: Sputnikdev Bluetooth Manager 1.5.3 with TinyB transport

## Building Automation & Smart Metering (2)
- BACnet IP: BACnet4J 6.0.1 with ReadProperty/WriteProperty support
- DLMS/COSEM: Gurux DLMS 4.0.79 for smart metering (TCP/Serial transport)

## Industrial & Power Protocols (4)
- IEC 104: OpenMUC j60870 1.7.2 for power telecontrol
- SNMP: SNMP4J 3.7.4 for network device monitoring
- EtherNet/IP: CIP Data Table Read/Write for Rockwell AB PLCs
- FINS: Omron PLC memory area read/write over TCP

## Automotive & Fieldbus (1)
- CAN Bus: SocketCAN interface with standard/extended frame support

## Build
- Register all 17 driver modules and dc3-common-sql in parent POMs
- Add version properties and dependencyManagement entries
2026-06-02 09:54:13 +08:00