-
Notifications
You must be signed in to change notification settings - Fork 2
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
ACK/NAK for Proto Messaging #40
Open
shivamdesai04
wants to merge
14
commits into
master
Choose a base branch
from
mai/acknak
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
…eMachine API to make StateMachine more reusable
…he code runs so I can test as I go
…ate into CoreProto.proto and ControlMessage.proto. Generate new .py and pyi files
…and function-wise. Please do NOT use yet.
… respective serialhandler thread (radio/uart) with the state machine manager. Adjust main function to only call the radio_thread and the state_machine manager thread to ensure they are using the same queue.
…te via shared queue and flag
…e not include logic for TIMEOUT. Have not tested.
…en mock sending out the msg to the DMB, then put the system in WAIT state. The Wait state will resend the same msg for now, until TIMEOUT logic is figured out next week.
…e to switch state and notify serial outgoing thread. Added self.serial_event.wait() after checking if the queue is not empty so we can notify the outgoing thread. The workflow goes as follows: serial_rx_thread receives a message (ACK/NAK) -> set a flag and notify the state machine -> state machine change state and notify the outgoing thread -> outgoing thread process the state change
…e. It should go serial handler incoming thread -> state machine -> serial handler outgoing thread -> state machine. The order of operation is shown here when running it on debug view. However, there is a race condition when the serial handler incoming thread and the serial handler outgoing thread are updating the serial event queue at the same time, causing the state machine to only see the event in the queue before the serial handler outgoing thread gets a chance to update the queue
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.
No description provided.