Expose modbus handler timeout (#603)

This commit is contained in:
andig 2021-01-22 17:29:29 +01:00 • committed by GitHub
parent d8f9dcaeca
commit 6d88b7be2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,6 +56,11 @@ func (mb *Connection) Logger(logger meters.Logger) {
mb.conn.Logger(logger)
}
// Timeout sets the connection timeout (not idle timeout)
func (mb *Connection) Timeout(timeout time.Duration) {
mb.conn.Timeout(timeout)
}
// ReadCoils wraps the underlying implementation
func (mb *Connection) ReadCoils(address, quantity uint16) ([]byte, error) {
mb.prepare()