Skip to content
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

Refactor serial port handling to support multiple patterns #15

Open
dexmona opened this issue Mar 13, 2019 · 1 comment
Open

Refactor serial port handling to support multiple patterns #15

dexmona opened this issue Mar 13, 2019 · 1 comment
Labels
Enhancement New feature or request Refactor

Comments

@dexmona
Copy link
Contributor

dexmona commented Mar 13, 2019

The current SerialConnector + Wrapper architecture in the backend is suitable only for recognizing one regex pattern, which eg. prevents us from receiving ACK messages and other non-telemetry data from the UPRA GND modem.
The Wrapper class could be expanded to be able to watch for several patterns with respective callback functions, or some other solution should be devised.

@dexmona dexmona added Enhancement New feature or request Implementation labels Mar 13, 2019
@martonbognar
Copy link
Member

A simple solution could be to replace the singular pattern and receiver parameters in Wrapper with a dictionary of regex -> handler_function pairs. Another thing to consider is to pass the regex match to this handler_function in Wrapper in case of a match to remove the redundant regex parsing in UpraGndWorker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Refactor
Projects
None yet
Development

No branches or pull requests

2 participants