Skip to content

Commit 2f12b4e

Browse files
authored
Doc updates. (#1493)
1 parent a838255 commit 2f12b4e

File tree

4 files changed

+14
-22
lines changed

4 files changed

+14
-22
lines changed

doc/source/library/client.rst

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,8 @@ Pymodbus offers clients with transport protocols for
77
- *TCP*
88
- *TLS*
99
- *UDP*
10-
- possibility to add a custom transport protocol
1110

12-
communication in 2 versions:
13-
14-
- :mod:`synchronous client`,
15-
- :mod:`asynchronous client` using asyncio.
11+
communication can be either using a :mod:`synchronous client` or a :mod:`asynchronous client` using asyncio.
1612

1713
Using pymodbus client to set/get information from a device (server)
1814
is done in a few simple steps, like the following synchronous example::

pymodbus/client/base.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,7 @@ class ModbusBaseClient(ModbusClientMixin):
4343
**reconnect_delay** to **reconnect_delay_max**.
4444
Set `reconnect_delay=0` to avoid automatic reconnection.
4545
46-
:mod:`ModbusBaseClient` is normally not referenced outside :mod:`pymodbus`,
47-
unless you want to make a custom client.
48-
49-
Custom client class **must** inherit :mod:`ModbusBaseClient`, example::
50-
51-
from pymodbus.client import ModbusBaseClient
52-
53-
class myOwnClient(ModbusBaseClient):
54-
55-
def __init__(self, **kwargs):
56-
super().__init__(kwargs)
57-
58-
def run():
59-
client = myOwnClient(...)
60-
client.connect()
61-
rr = client.read_coils(0x01)
62-
client.close()
46+
:mod:`ModbusBaseClient` is normally not referenced outside :mod:`pymodbus`.
6347
6448
**Application methods, common to all clients**:
6549
"""

pymodbus/client/tls.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ class AsyncModbusTlsClient(AsyncModbusTcpClient, asyncio.Protocol):
5454
:param server_hostname: (optional) Bind certificate to host
5555
:param kwargs: (optional) Experimental parameters
5656
57+
..tip::
58+
See ModbusBaseClient for common parameters.
59+
5760
Example::
5861
5962
from pymodbus.client import AsyncModbusTlsClient
@@ -122,6 +125,9 @@ class ModbusTlsClient(ModbusTcpClient):
122125
:param server_hostname: (optional) Bind certificate to host
123126
:param kwargs: (optional) Experimental parameters
124127
128+
..tip::
129+
See ModbusBaseClient for common parameters.
130+
125131
Example::
126132
127133
from pymodbus.client import ModbusTlsClient

pymodbus/client/udp.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ class AsyncModbusUdpClient(
2525
:param source_address: (optional) source address of client,
2626
:param kwargs: (optional) Experimental parameters
2727
28+
..tip::
29+
See ModbusBaseClient for common parameters.
30+
2831
Example::
2932
3033
from pymodbus.client import AsyncModbusUdpClient
@@ -164,6 +167,9 @@ class ModbusUdpClient(ModbusBaseClient):
164167
:param source_address: (optional) source address of client,
165168
:param kwargs: (optional) Experimental parameters
166169
170+
..tip::
171+
See ModbusBaseClient for common parameters.
172+
167173
Example::
168174
169175
from pymodbus.client import ModbusUdpClient

0 commit comments

Comments
 (0)