Skip to content

Commit

Permalink
Deprecation of BField and related methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
aldas committed Feb 9, 2025
1 parent f883daa commit 837f158
Show file tree
Hide file tree
Showing 6 changed files with 721 additions and 636 deletions.
19 changes: 16 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,27 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.3.0] - unreleased
## [0.3.0] - 2025.xx.xx

Alot of breaking changes. Biggest things:

* Introduced `Field` struct to be used instead of `modbus.BField`. `BField` and fluent interface is deprecated. When
adding fields in bulk and dynamically the struct (more idiomatic) approach is more ergonomic than fluent API.
* Added implementation of Poller in `poller` package. For example usage
see [cmd/modbus-poller/main.go](cmd/modbus-poller/main.go)

Breaking changes to following structs/methods/functions

* struct field `modbus.Field.RegisterAddress` was renamed to `Address`
* struct `modbus.RegisterRequest` was renamed to `BuilderRequest`
* method `BuilderRequest.ExtractFields()` signature changed
* removed type `packet.LooksLikeType` and related consts
* const `packet.DataTooShort`
* const `packet.IsNotTPCPacket`
* const `packet.LooksLikeTCPPacket`
* const `packet.UnsupportedFunctionCode`
* error `modbus.ErrClientNotConnected`: changed from `ClientError` to `*ClientError`
* error `modbus.ErrPacketTooLong`: changed from `ClientError` to `*ClientError`

### Added

Expand All @@ -22,8 +36,7 @@ Breaking changes to following structs/methods/functions
* `ReadDiscreteInputsTCP` combines fields into TCP Read Discrete Inputs (FC2) requests
* `ReadDiscreteInputsRTU` combines fields into RTU Read Discrete Inputs (FC2) requests


## [0.2.0] - unreleased
## [0.2.0] - 2024.02.04

### Added

Expand Down
Loading

0 comments on commit 837f158

Please sign in to comment.