Skip to content

Commit

Permalink
Use grid-x default timeouts (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Jun 19, 2023
1 parent d3c3174 commit eff79d9
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions meters/ascii.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ func NewASCIIClientHandler(device string, baudrate int, comset string) *modbus.A
log.Fatalf("Invalid communication set specified: %s. See -h for help.", comset)
}

handler.Timeout = 300 * time.Millisecond

return handler
}

Expand Down
1 change: 0 additions & 1 deletion meters/asciiovertcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ func NewASCIIOverTCPClientHandler(device string) *modbus.ASCIIOverTCPClientHandl
handler := modbus.NewASCIIOverTCPClientHandler(device)

// set default timings
handler.Timeout = 1 * time.Second
handler.ProtocolRecoveryTimeout = 10 * time.Second // not used
handler.LinkRecoveryTimeout = 15 * time.Second // not used

Expand Down
2 changes: 0 additions & 2 deletions meters/rtu.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ func NewClientHandler(device string, baudrate int, comset string) *modbus.RTUCli
log.Fatalf("Invalid communication set specified: %s. See -h for help.", comset)
}

handler.Timeout = 300 * time.Millisecond

return handler
}

Expand Down
1 change: 0 additions & 1 deletion meters/rtuovertcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ func NewRTUOverTCPClientHandler(device string) *modbus.RTUOverTCPClientHandler {
handler := modbus.NewRTUOverTCPClientHandler(device)

// set default timings
handler.Timeout = 1 * time.Second
handler.ProtocolRecoveryTimeout = 10 * time.Second // not used
handler.LinkRecoveryTimeout = 15 * time.Second // not used

Expand Down
2 changes: 0 additions & 2 deletions meters/tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ func NewTCPClientHandler(device string) *modbus.TCPClientHandler {
handler := modbus.NewTCPClientHandler(device)

// set default timings
handler.Timeout = 1 * time.Second
handler.IdleTimeout = 5 * time.Second
handler.ProtocolRecoveryTimeout = 10 * time.Second
handler.LinkRecoveryTimeout = 15 * time.Second

Expand Down

0 comments on commit eff79d9

Please sign in to comment.