Add realistic ten-IED synthetic demo workspace - #45
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1bdc5e9783
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Index = 1, | ||
| Name = "demo://station-bus", | ||
| FriendlyName = "Station Bus VLAN 100 (Synthetic)", | ||
| Description = "ArIED built-in demonstration adapter", |
There was a problem hiding this comment.
Keep demo GOOSE state separate from live capture controls
In demo mode, if a user clicks GOOSE Stop and then Start, this reuses the real IsGooseCapturing flag even though _gooseSubscriberRuntime.StartAsync was never called for the synthetic data. StopGooseSubscriberAsync sets the flag back to false, which enables Start; StartGooseSubscriber_Click then uses the demo adapter's Selector (Index = 1) and can start an actual Npcap capture on adapter 1 while demo mode is still active. Use a demo-only capture state or make the GOOSE start/stop commands ignore demo mode.
Useful? React with 👍 / 👎.
| _demoTimer.Interval = TimeSpan.FromMilliseconds(1100); | ||
| _demoTimer.Tick -= DemoTimer_Tick; | ||
| _demoTimer.Tick += DemoTimer_Tick; | ||
| _demoTimer.Start(); |
There was a problem hiding this comment.
Block live workspace actions while demo is running
While the demo timer is running, the always-visible Add IED/Open SCL/Open Project controls remain enabled, and Add IED reaches AddOrDiscoverEndpointAsync → ConnectAndConfigureDeviceAsync → _runtime.ConnectAndDiscoverAsync. That lets a user start real MMS sessions inside the advertised read-only demo; subsequent demo ticks still mutate events/status from the old synthetic state, and exiting demo clears Devices without stopping any runtime session added during demo. Guard workspace-mutating actions with IsDemoMode or force demo deactivation before they run.
Useful? React with 👍 / 👎.
Summary
Adds a built-in, clearly labeled synthetic substation demo that can be opened with Ctrl+Shift+D.
Demo content
Safety and UX