Repository navigation
v0.2.0
Release v0.2.0
Date: 2026-03-17
Summary
Migrate from github.com/otfabric/modbus to github.com/otfabric/go-modbus. The library now uses the shared transport and register API from go-modbus and delegates SunSpec marker detection and model-header enumeration to go-modbus/sunspec, while keeping this package as the high-level decoded SunSpec API.
Changes
Breaking
- Modbus dependency —
github.com/otfabric/modbusv0.2.2 replaced bygithub.com/otfabric/go-modbusv1.0.1. Import paths and type names change:- Import:
github.com/otfabric/go-modbus(andgithub.com/otfabric/go-modbus/sunspecwhere low-level discovery types are needed) *modbus.ModbusClient→*modbus.Clientmodbus.ClientConfiguration→modbus.Configmodbus.NewClient(...)→modbus.New(...)modbus.ServerConfiguration→modbus.ServerConfig(test utilities)
- Import:
- Public API — SunSpec result types are now owned by this package instead of re-exported from modbus:
Detect()now returns*sunspec.DetectionResult(was*modbus.SunSpecDetectionResult)ModelInstance.Headeris nowsunspec.ModelHeader(wasmodbus.SunSpecModelHeader)DiscoveryResult.Rawis now*gmsunspec.DiscoveryResult(was*modbus.SunSpecDiscoveryResult). New typesDetectionResult,ProbeAttempt, andModelHeaderare defined in this package.
Added
- CLI —
newClient()now setsTimeout,DialTimeout(5s), andLogger(NopLogger) explicitly for clearer transport behaviour.
Unchanged
- Discovery flow, registry enrichment, decode API, and CLI commands (
detect,models,read,read-model,read-point,poll, etc.) are unchanged. Behaviour and output shape remain compatible.
Dependencies
- Go 1.21+
- otfabric/go-modbus v1.0.1
- spf13/cobra v1.10.2 (CLI only)