-
Notifications
You must be signed in to change notification settings - Fork 31
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
Move state machine init to after port connections? #537
Comments
Note that the preferred pattern for telemetry is to store it internally to the component and send it on a schedIn call. So telemetry sending may not be a big limitation here. |
Per @garthwatney: We can always model an initial state that does nothing except wait for a first RTI from schedIn. At that point everything is up, and the system can go to an initial state that emits an event. This is very clear and explicit. |
@LeStarch Is it OK to close this issue as completed? Resolution:
|
I am not convinced. As a potential user of state machines, I need to do a lot of contortions for what would often be a common pattern. While I don't think this is blocking work, I still think we should keep it on the roadmap. |
What are the contortions? (1) seems like the recommended pattern anyway. (2) seems reasonable to me and not a contortion. You are explicitly modeling the initial phase as a state of the system. To me this approach has advantages over relying on complex hard-wired initialization orders, which can be brittle and hard to remember. |
I'm fine with adopting a wait-and-see approach. |
Same here! Let's wait and see what users think. |
This issue came up in the review of #534. In the current design, state machine initialization occurs during component initialization. Since ports aren't connected at that point, this means that the initial state transition can't invoke output ports, including sending telemetry or emitting events. If we want to relax this restriction, then we will need to change the design.
The text was updated successfully, but these errors were encountered: