Skip to content

Commit bbc46e0

Browse files
dhoomakethujaniversen
authored andcommitted
Fix doc generation errors and re-organize examples
1 parent c77a65e commit bbc46e0

16 files changed

+8
-191
lines changed

doc/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
# examples = os.path.join(parent_dir, "examples")
2727
example_contrib = os.path.join(parent_dir, "examples/contrib")
2828
example_common = os.path.join(parent_dir, "examples/common")
29-
example_gui = os.path.join(parent_dir, "examples/gui")
29+
# example_gui = os.path.join(parent_dir, "examples/gui")
3030

3131
sys.path.insert(0, os.path.abspath(os.pardir))
3232
sys.path.append(example_common)
3333
sys.path.append(example_contrib)
34-
sys.path.append(example_gui)
34+
# sys.path.append(example_gui)
3535
# sys.path.extend([examples, example_common, example_contrib, example_gui])
3636
# sys.path.insert(0, os.path.abspath("../"))
3737

doc/source/example/modbus_tls_client.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.

doc/source/library/pymodbus.internal.rst renamed to doc/source/library/pymodbus.constants.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
pymodbus\.internal package
1+
pymodbus\.constants package
22
==========================
33

4-
.. automodule:: pymodbus.internal
4+
.. automodule:: pymodbus.constants
55
:members:
66
:undoc-members:
77
:show-inheritance:

doc/source/library/pymodbus.rst

Lines changed: 0 additions & 179 deletions
This file was deleted.

examples/common/synchronous_server.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# --------------------------------------------------------------------------- #
1414
from pymodbus.version import version
1515

16-
# from pymodbus.server.sync import StartTcpServer #NOSONAR
16+
from pymodbus.server.sync import StartTcpServer #NOSONAR
1717
# from pymodbus.server.sync import StartTlsServer #NOSONAR
1818
# from pymodbus.server.sync import StartUdpServer #NOSONAR
1919
# from pymodbus.server.sync import StartSerialServer #NOSONAR
@@ -100,14 +100,14 @@ def run_server():
100100
ir=ModbusSequentialDataBlock(0, [17] * 100),
101101
)
102102

103-
ModbusServerContext(slaves=store, single=True)
103+
context = ModbusServerContext(slaves=store, single=True)
104104

105105
# ----------------------------------------------------------------------- #
106106
# initialize the server information
107107
# ----------------------------------------------------------------------- #
108108
# If you don"t set this or any fields, they are defaulted to empty strings.
109109
# ----------------------------------------------------------------------- #
110-
ModbusDeviceIdentification(
110+
identity = ModbusDeviceIdentification(
111111
info_name={
112112
"VendorName": "Pymodbus",
113113
"ProductCode": "PM",
@@ -122,7 +122,7 @@ def run_server():
122122
# run the server you want
123123
# ----------------------------------------------------------------------- #
124124
# Tcp:
125-
# StartTcpServer(context, identity=identity, address=("", 5020))
125+
StartTcpServer(context, identity=identity, address=("", 5020))
126126
#
127127
# TCP with different framer
128128
# StartTcpServer(context, identity=identity,

0 commit comments

Comments
 (0)