-
Events system (experimental)
-
ModbusFrameBuf is no longer mandatory. The crate functions accept frames of any length (u8-slices).
- ModbusContext has become a struct with custom context sizes with generic constants
- Use ModbusContextSmall for small contexts and ModbusContextFull for big ones
- Removed built-in dump/restore methods (use serde, bincode or custom ones)
- Moved modbus constants into a
consts
module. - Reworked the crate dependency and cargo-feature structure. Features are now
additive only. Instead of the
nostd
feature, astd
one can be opted-out by specifyingdefault-features = false
. Similarly, instead of thesmallcontext
feature, there is now afullcontext
feature which is also enabled by default. - Crate structure cleanup.
guess_request_frame_len
function now supports TCP (and perhaps UDP)- huge code refactoring, fixed and formatted for the nowadays Rust standards
- majority of functions correctly check overflows and report errors instead of invalid values/panics
- Common functions and structures moved to main crate module
- Modbus client
- Modbus context is no longer created automatically and no mutex guard is provided by default. Use ModbusContext::new() to create context object and then use it as you wish - protect with any kind of Mutex, with RwLock or just put into UnsafeCell.
- Context SDK changes: all functions moved inside context, removed unnecessary ones, function args optimized.
- FixedVec support included by default, both in std and nostd.
- Added support for 64-bit integers