Skip to content

Commit e5b4834

Browse files
committed
Advanced simulator with cross memory.
1 parent 46473ff commit e5b4834

File tree

3 files changed

+771
-417
lines changed

3 files changed

+771
-417
lines changed

examples/server_simulator.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,7 @@ def get_commandline():
6161
def setup_simulator(args, json_dict=None):
6262
"""Run server setup."""
6363
_logger.info("### Create datastore")
64-
context = ModbusSimulatorContext()
65-
66-
if args.json:
67-
context.load_file(args.json, None)
68-
else:
69-
context.load_dict(json_dict, None)
64+
context = ModbusSimulatorContext(json_dict, None)
7065
args.context = ModbusServerContext(slaves=context, single=True)
7166
return args
7267

0 commit comments

Comments
 (0)