Created
January 18, 2023 03:10
-
-
Save corecode/87bdf67140a8c74bdc49e4884b16c389 to your computer and use it in GitHub Desktop.
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
machine Protocol for ProtocolData { | |
<*> => wait_for_leader / set_randomized_timeout; | |
wait_for_leader + Timeout => leader; | |
machine leader { | |
entry / set_timer, transmit_data; | |
exit / cancel_timer; | |
self + Timeout / transmit_data; | |
self + p: TransmitData / packet = p; | |
} | |
self + d: ReceivedData => follower / received_data(d); | |
self + p: TransmitData => leader / packet = p; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment