Skip to content

Commit

Permalink
hot-fix namespace get
Browse files Browse the repository at this point in the history
  • Loading branch information
kefeimo committed Nov 4, 2024
1 parent 90bec3f commit d33ca95
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions src/dnp3_python/dnp3station/outstation.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,11 +550,11 @@ class OutStationApplication:

def __init__(
self,
outstation_ip: str = "0.0.0.0",
port: int = 20000,
master_id: int = 2,
outstation_id: int = 1,
concurrency_hint: int = 1,
outstation_ip: str | None = "0.0.0.0",
port: int | None = 20000,
master_id: int | None = 2,
outstation_id: int | None = 1,
concurrency_hint: int | None = 1,
channel_log_level=opendnp3.levels.NORMAL,
outstation_log_level=opendnp3.levels.NORMAL,
db_sizes: opendnp3.DatabaseSizes = None,
Expand Down
18 changes: 9 additions & 9 deletions src/dnp3demo/run_outstation.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,18 +152,18 @@ def main(parser=None, *args, **kwargs):

outstation_application = OutStationApplication(
# masterstation_ip_str=args.master_ip,
outstation_ip=args.get("outstation_ip="),
port=args.get("port="),
master_id=args.get("master_id="),
outstation_id=args.get("outstation_id="),
outstation_ip=d_args.get("outstation_ip="),
port=d_args.get("port="),
master_id=d_args.get("master_id="),
outstation_id=d_args.get("outstation_id="),
# db_sizes=db_sizes,
# channel_log_level=opendnp3.levels.ALL_COMMS,
# master_log_level=opendnp3.levels.ALL_COMMS
# soe_handler=SOEHandler(soehandler_log_level=logging.DEBUG)
numAnalog=args.get("n_ai="),
numAnalogOutputStatus=args.get("n_ao="),
numBinary=args.get("n_bi="),
numBinaryOutputStatus=args.get("n_bo="),
numAnalog=d_args.get("n_ai="),
numAnalogOutputStatus=d_args.get("n_ao="),
numBinary=d_args.get("n_bi="),
numBinaryOutputStatus=d_args.get("n_bo="),
)
_log.info("Connection Config", outstation_application.get_config())
outstation_application.start()
Expand All @@ -176,7 +176,7 @@ def main(parser=None, *args, **kwargs):

# Additional init for demo purposes
# if d_args.get("init_random")==True, init with random values
if args.get("init_random"):
if d_args.get("init_random"):
outstation_application.update_db_with_random()

count = 0
Expand Down

0 comments on commit d33ca95

Please sign in to comment.