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

#18#30#40 improve dnp3demo #39

Merged
merged 13 commits into from
May 3, 2023

Conversation

kefeimo
Copy link
Contributor

@kefeimo kefeimo commented Apr 26, 2023

Addressing #18 #30 #40

Note: spwan from PR #38

Highlight: added --init--random options to improve user-experience during demo

(dnp3py311) kefei@ubuntu-22:~/project/dnp3-python$ dnp3demo outstation -h
usage: dnp3demo outstation [-h] [--outstation-ip= <IP>] [--port= <PORT>] [--master-id= <ID>] [--outstation-id= <ID>] [--init-random]

run a configurable outstation interactive program

options:
  -h, --help            show this help message and exit
  --outstation-ip= <IP>
                        outstation ip, default: 0.0.0.0
  --port= <PORT>        port, default: 20000
  --master-id= <ID>     master id, default: 2
  --outstation-id= <ID>
                        master id, default: 1
  --init-random         if appears, init with random values
(dnp3py311) kefei@ubuntu-22:~/project/dnp3-python$ dnp3demo outstation --init-random
dnp3demo.run_outstation {'command': 'outstation', 'outstation_ip=': '0.0.0.0', 'port=': 20000, 'master_id=': 2, 'outstation_id=': 1, 'init_random': True}
ms(1682550171617) INFO    manager - Starting thread (0)
2023-04-26 18:02:51,619 control_workflow_demo   INFO    Connection Config
2023-04-26 18:02:51,619 control_workflow_demo   INFO    Connection Config
2023-04-26 18:02:51,619 control_workflow_demo   INFO    Connection Config
ms(1682550171620) INFO    server - Listening on: 0.0.0.0:20000
2023-04-26 18:02:51,620 control_workflow_demo   DEBUG   Initialization complete. Outstation in command loop.
2023-04-26 18:02:51,620 control_workflow_demo   DEBUG   Initialization complete. Outstation in command loop.
2023-04-26 18:02:51,620 control_workflow_demo   DEBUG   Initialization complete. Outstation in command loop.

==== Outstation Operation MENU ==================================
<ai> - update analog-input point value (for local reading)
<ao> - update analog-output point value (for local control)
<bi> - update binary-input point value (for local reading)
<bo> - update binary-output point value (for local control)
<dd> - display database
<dc> - display configuration
=================================================================

!!!!!!!!! WARNING: The Outstation is NOT connected !!!!!!!!!

======== Your Input Here: ==(Outstation-Main Menu)======
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
dd
You chose < dd > - display database
{'Analog': {0: 0.7757433660476051, 1: 5.482252351704057, 2: 25.11172662646517, 3: 672.9395625566162, 4: 9844.35342339536}, 'AnalogOutputStatus': {0: 0.960324135906234, 1: 1.2891067616088125, 2: 39.585372356085614, 3: 730.1321995619002, 4: 3655.484404009317}, 'Binary': {0: True, 1: True, 2: False, 3: False, 4: False}, 'BinaryOutputStatus': {0: False, 1: False, 2: True, 3: True, 4: True}}

@kefeimo kefeimo self-assigned this Apr 26, 2023
@kefeimo kefeimo changed the title #18#30 improve dnp3demo #18#30#40 improve dnp3demo Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant