Repository navigation
Connection drop nodes on the canvas, SecsGemBase 1.0.0-build-0029 - #15
Merged
Merged
Conversation
A scenario can now drop the HSMS connection at a chosen point, keep the
port closed for a time and go on when communication is back (customer
request: simulate a connection loss after an event).
- Packages: SecsGemBase.MessageHandling and SecsGemBase.ScenarioEngine
from 1.0.0-build-0018 to 1.0.0-build-0029. The engine executes the
nodes DropConnection and WaitForCommunication; the packages also bring
the reconnect fixes made for this feature.
- Canvas: palette chips DROP CONNECTION and WAIT FOR COMM. Both nodes
have a success and a failure output, their own colour and a title that
shows the value ("Drop connection · 5000 ms", "Wait for communication ·
max 20000 ms") or what is wrong with it.
- Editor: NodeMillisecondsViewModel.For gives the editor for the three
node types with a time in ms. For the two new ones 0 is allowed, and
the hint says what it does.
- Connect button: disabled while a Drop connection node keeps the port
closed (Services/PortHold, ScenariosViewModel.PortClosedByScenario).
A click would open the port in the middle of the downtime.
- WaitTime.TryRead reads with the invariant culture only, as the engine
does since 1.0.0-build-0029. The shared text helpers moved to
NodeMilliseconds.
- README: section "Simulating a connection loss" with what to expect.
specification/features.md: new section.
New tests: ConnectionNodeTests, PortHoldTests, more cases in
NodeMillisecondsViewModelTests, WaitNodeTests and ScenarioRunTests
(61 new cases).
Internal board: secsgem/evencoolerfastsim issue 25.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A customer wants to see how their side copes with a lost connection at a defined moment, for example right after an S6F11 with a certain CEID (internal board, issue 25). Until now a connection could only be closed by hand with the Connect button: about a second late and as an orderly close.
The SecsGemBase engine has the two nodes for this since
1.0.0-build-0027. This PR brings them into the app.Changes
SecsGemBase.MessageHandlingandSecsGemBase.ScenarioEnginefrom1.0.0-build-0018to1.0.0-build-0029. The app builds against them unchanged. They also bring the reconnect fixes made for this feature, and the Wait node's warning for a time it cannot read.NodeMillisecondsViewModel.Forgives the editor for the three node types with a time in ms. For the two new ones 0 is allowed, and the hint says what it does.Services/PortHoldkeeps track per run; the end of a run releases its holds.WaitTime.TryReadreads with the invariant culture only, as the engine does since1.0.0-build-0029. The shared text helpers moved toNodeMilliseconds.specification/features.md: new section.specification/secsgembase_library.md: the bullet on the client loop described the old packages.Known limits
ScenariosViewModelandMainViewModelcannot be constructed in tests (internal issue 39).OpenNodeEditor, the tracking inRunOnceAsync,CanConnectand the XAML are covered by the run in the app only.CommunicationHandler.cs:187(now 376), and the Scenarios section lacks the two nodes.Verification
ConnectionNodeTests,PortHoldTests,NodeMillisecondsViewModelTests,WaitNodeTestsandScenarioRunTests.Forwithout Drop connection, with the two editors swapped, with an editor for every node typewindows-latest. Open for a manual check on Windows: does the reset arrive, can the port be bound again at once, are the times right.🤖 Generated with Claude Code