-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add maxwait, start time coordination and system events #206
Conversation
Benchmark results after merging this PR: Benchmark resultsPerformance:PingPongUc: PingPongC: ReactionLatencyUc: ReactionLatencyC: Memory usage:PingPongUc: PingPongC: ReactionLatencyUc: ReactionLatencyC: |
Memory usage after merging this PR will be: Memory Reportaction_empty_test_c
action_microstep_test_c
action_overwrite_test_c
action_test_c
deadline_test_c
delayed_conn_test_c
event_payload_pool_test_c
event_queue_test_c
nanopb_test_c
port_test_c
reaction_queue_test_c
request_shutdown_test_c
startup_test_c
tcp_channel_test_c
timer_test_c
|
StartupCoordinationState_HANDSHAKING = 2, | ||
StartupCoordinationState_NEGOTIATING = 3, | ||
StartupCoordinationState_RUNNING = 4 | ||
} StartupCoordinationState; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the connecting step here the waiting for the network channel to connect?
include/reactor-uc/tag.h
Outdated
@@ -71,7 +75,7 @@ typedef int64_t interval_t; | |||
/** | |||
* Microstep instant. | |||
*/ | |||
typedef uint32_t microstep_t; | |||
typedef int32_t microstep_t; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A microstep can be negative?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far, nice work! I just wrote some small comments / questions above.
Curious why the RIOT test is still failing though. But I could look into it when I have more free time I guess.
Thanks for the review. The segfault caught by RIOT was a mistake by me. Running tests on many different platforms turns out to be an asset as we are more likely to catch memory bugs |
This PR took on a lot of weight unfortunately and now contains three major features:
The
maxwait
property.This PR adds a
maxwait
property for each reaction with an optional STP violation handler. This includes changes the the code-generator and the grammar. In particular we must find the maximummaxwait
associated with any reaction triggered by an input. We also add anintended_tag
field to events so that we can detect the STP violations.Startup coordination.
We also add a StartupCoordinator which each federate will have one of. It does a blocking gossip algorithm at boot negotiating the startup tag of the federation.
SystemEvents
Finally, this PR adds the notion of system events and a system event queue. Still this is not used, but I will use it for implementing the ClockSync algorithm. The idea is that any received coordination message will be put on the SystemEventQueue so that we can do blocking IO in response to received messages.