-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Bug Report
This may be a bug or just config change I need to update. My scenario.yaml (attached) config is no longer working and I think it's due to the scan-rate option that was recently introduced.
Description
If scan-rate is not set defined for dnp3 device, phenix throws an error when processing the config.
Stack trace:
Oct 17 12:07:01.912 WRN app returned stderr type=PHENIX-APP stderr="Traceback (most recent call last):
File \"/usr/local/bin/phenix-app-ot-sim\", line 8, in <module> sys.exit(main()) ^^^^^^
File \"/usr/local/lib/python3.12/dist-packages/phenix_apps/apps/otsim/otsim.py\", line 375, in main OTSim()
File \"/usr/local/lib/python3.12/dist-packages/phenix_apps/apps/otsim/otsim.py\", line 23, in __init__ self.execute_stage() File \"/usr/local/lib/python3.12/dist-packages/phenix_apps/apps/__init__.py\", line 75, in execute_stage stages_dict[self.stage]()
File \"/usr/local/lib/python3.12/dist-packages/phenix_apps/apps/otsim/otsim.py\", line 339, in pre_start device.configure(config, ot_devices) File \"/usr/local/lib/python3.12/dist-packages/phenix_apps/apps/otsim/device.py\", line 269, in configure client.registers_to_xml(device.registers['dnp3'])
File \"/usr/local/lib/python3.12/dist-packages/phenix_apps/apps/otsim/protocols/dnp3.py\", line 78, in registers_to_xml parent = self.outstn if self.mode == 'server' else self.master
I believe the error is this line.
If scan-rate is not defined, client.init_master_xml is never called and so 'self.master' never gets set https://github.com/sandialabs/sceptre-phenix-apps/blob/main/src/python/phenix_apps/apps/otsim/protocols/dnp3.py#L78
Expected Behavior
Should process the scenario file.
Actual Behavior
Errors when hitting self.master on https://github.com/sandialabs/sceptre-phenix-apps/blob/main/src/python/phenix_apps/apps/otsim/protocols/dnp3.py#L78 since it's not defined.
Environment
- Linux
- Browser: (e.g., Chrome, Firefox, Safari)
- Version: (e.g., 1.0.0)
Additional Context
Add any other context about the problem here, such as logs or error messages.
Checklist
- I have included no proprietary/sensitive information in my issue.