goburrow / modbus

Fault-tolerant implementation of modbus protocol in Go (golang)
BSD 3-Clause "New" or "Revised" License
936 stars 366 forks source link

Added support for multiple slaves #87

Open mvkvl opened 2 years ago

mvkvl commented 2 years ago

Changed base Client interface to pass slaveId as an argument to all the methods, to allow communication with multiple slaves on a bus in on session. Mainly this is required for ENC (encapsulated RTU over TCP) mode, when we access a bus via TCP-gateway. Previous implementation required us to establish new TCP session for each slaveId, now we can establish one TCP session and communicate with multiple devices.

mehmetali10 commented 3 months ago

It works well. Thank you for your contribution!