Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor fix for typo and consistency #1946

Merged
merged 4 commits into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/source/library/simulator/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ Example "setup" configuration:
**"co size"**, **"di size"**, **"hr size"**, **"ir size"**:

Define the size of each block.
If using shared block the register list size will be the size of the biggest block (25 reegisters)
If using shared block the register list size will be the size of the biggest block (25 registers)
If not using shared block the register list size will be the sum of the 4 block sizes (70 registers).

**"shared blocks"**
Expand Down
8 changes: 4 additions & 4 deletions pymodbus/server/simulator/http_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,17 @@ class ModbusSimulatorServer:

Example::

from pymodbus.server import StartAsyncSimulatorServer
from pymodbus.server.simulator.http_server import ModbusSimulatorServer
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please import from pymodbus.server, not lower levels.

janiversen marked this conversation as resolved.
Show resolved Hide resolved

async def run():
simulator = StartAsyncSimulatorServer(
simulator = ModbusSimulatorServer(
modbus_server="my server",
modbus_device="my device",
http_host="localhost",
http_port=8080)
await simulator.start()
await simulator.run_forever(only_start=True)
...
await simulator.close()
await simulator.stop()
"""

def __init__(
Expand Down