Skip to content

Commit 89c3f25

Browse files
authored
Update constants.py
Added RetryOnInvalid flag and Backoff delay.
1 parent 635d8ab commit 89c3f25

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

pymodbus/constants.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ class Defaults(Singleton):
1919
2020
The default modbus tcp over tls server port (802)
2121
22+
.. attribute:: Backoff
23+
24+
The default exponential backoff delay (0.3 seconds)
25+
2226
.. attribute:: Retries
2327
2428
The default number of times a client should retry the given
@@ -28,7 +32,12 @@ class Defaults(Singleton):
2832
2933
A flag indicating if a transaction should be retried in the
3034
case that an empty response is received. This is useful for
31-
slow clients that may need more time to process a requst.
35+
slow clients that may need more time to process a request.
36+
37+
.. attribute:: RetryOnInvalid
38+
39+
A flag indicating if a transaction should be retried in the
40+
case that an invalid response is received.
3241
3342
.. attribute:: Timeout
3443
@@ -104,8 +113,10 @@ class Defaults(Singleton):
104113
'''
105114
Port = 502
106115
TLSPort = 802
116+
Backoff = 0.3
107117
Retries = 3
108118
RetryOnEmpty = False
119+
RetryOnInvalid = False
109120
Timeout = 3
110121
Reconnects = 0
111122
TransactionId = 0

0 commit comments

Comments
 (0)