Skip to content

Commit a38e0d2

Browse files
committed
Merge branch 'dev'
2 parents efb02eb + aa8c479 commit a38e0d2

21 files changed

+122
-167
lines changed

AUTHORS.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Thanks to
1616
- Alex Ruddick
1717
- Alexander Lanin
1818
- Alexandre CUER
19+
- alexis-care
1920
- Alois Hockenschlohe
2021
- Andy Walker
2122
- Arjan
@@ -30,6 +31,7 @@ Thanks to
3031
- Chris Hung
3132
- Christian Krause
3233
- Christian Pfisterer
34+
- daanwtb
3335
- Daniel Rauber
3436
- dhoomakethu
3537
- doelki
@@ -74,6 +76,7 @@ Thanks to
7476
- Pavel Kostromitinov
7577
- peufeu2
7678
- Philip Couling
79+
- Philip Jones
7780
- Qi Li
7881
- Sebastian Machuca
7982
- Sefa Keleş

CHANGELOG.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ helps make pymodbus a better product.
77

88
:ref:`Authors`: contains a complete list of volunteers have contributed to each major version.
99

10+
Version 3.8.1
11+
-------------
12+
* Convert endianness (#2506)
13+
* Fix sync serial client, loop. (#2510)
14+
* Correct future. (#2507)
15+
* Correct #2501 (#2504)
16+
* Raise exception on no response in async client. (#2502)
17+
* re-instatiate Future on reconnect (#2501)
18+
* Remove all trailing zeroes during string decoding (#2493)
19+
* Fix too many sync client log messages. (#2491)
20+
1021
Version 3.8.0
1122
-------------
1223
* slave_id -> dev_id (internally). (#2486)

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Upgrade examples:
2626
- 3.6.1 -> 3.7.0: Smaller changes to the pymodbus calls might be needed
2727
- 2.5.4 -> 3.0.0: Major changes in the application might be needed
2828

29-
Current release is `3.8.0 <https://github.com/pymodbus-dev/pymodbus/releases/tag/v3.8.0>`_.
29+
Current release is `3.8.1 <https://github.com/pymodbus-dev/pymodbus/releases/tag/v3.8.1>`_.
3030

3131
Bleeding edge (not released) is `dev <https://github.com/pymodbus-dev/pymodbus/tree/dev>`_.
3232

doc/source/_static/examples.tgz

-594 KB
Binary file not shown.

doc/source/_static/examples.zip

218 Bytes
Binary file not shown.

doc/source/roadmap.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ It is the community that decides how pymodbus evolves NOT the maintainers !
1515

1616
The following bullet points are what the maintainers focus on:
1717

18-
- 3.8.1, bug fix release, with:
18+
- 3.8.2, bug fix release, with:
1919
- Currently not planned
2020
- 3.9.0, with:
21+
- All of branch wait_next_api
2122
- ModbusControlBlock pr slave
2223
- New custom PDU (function codes)
2324
- Remove remote_datastore

examples/client_async_calls.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,14 @@ async def async_handle_holding_registers(client):
146146
assert not rr.isError() # test that call was OK
147147
assert rr.registers == [10]
148148

149+
value_int32 = 13211
150+
registers = client.convert_to_registers(value_int32, client.DATATYPE.INT32)
151+
await client.write_registers(1, registers, slave=SLAVE)
152+
rr = await client.read_holding_registers(1, count=len(registers), slave=SLAVE)
153+
assert not rr.isError() # test that call was OK
154+
value = client.convert_from_registers(rr.registers, client.DATATYPE.INT32)
155+
assert value_int32 == value
156+
149157
_logger.info("### write read holding registers")
150158
arguments = {
151159
"read_address": 1,

examples/client_calls.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,13 @@ def handle_holding_registers(client):
135135
assert not rr.isError() # test that call was OK
136136
assert rr.registers[0] == 10
137137

138-
client.write_registers(1, [10] * 8, slave=SLAVE)
139-
rr = client.read_holding_registers(1, count=8, slave=SLAVE)
138+
value_int32 = 13211
139+
registers = client.convert_to_registers(value_int32, client.DATATYPE.INT32)
140+
client.write_registers(1, registers, slave=SLAVE)
141+
rr = client.read_holding_registers(1, count=len(registers), slave=SLAVE)
140142
assert not rr.isError() # test that call was OK
141-
assert rr.registers == [10] * 8
143+
value = client.convert_from_registers(rr.registers, client.DATATYPE.INT32)
144+
assert value_int32 == value
142145

143146
_logger.info("### write read holding registers")
144147
arguments = {

examples/client_custom_msg.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
from pymodbus import FramerType
1717
from pymodbus.client import AsyncModbusTcpClient as ModbusClient
18+
from pymodbus.exceptions import ModbusIOException
1819
from pymodbus.pdu import ExceptionResponse, ModbusPDU
1920
from pymodbus.pdu.bit_message import ReadCoilsRequest
2021

@@ -128,8 +129,12 @@ async def main(host="localhost", port=5020):
128129
client.register(CustomModbusPDU)
129130
slave=1
130131
request1 = CustomRequest(32, slave=slave)
131-
result = await client.execute(False, request1)
132-
print(result)
132+
try:
133+
result = await client.execute(False, request1)
134+
except ModbusIOException:
135+
print("Server do not support CustomRequest.")
136+
else:
137+
print(result)
133138

134139
# inherited request
135140
request2 = Read16CoilsRequest(32, slave)

pymodbus/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
from pymodbus.pdu import ExceptionResponse
1919

2020

21-
__version__ = "3.8.0"
21+
__version__ = "3.8.1"
2222
__version_full__ = f"[pymodbus, version {__version__}]"

0 commit comments

Comments
 (0)