diff options
author | UnavailableDev <ggwildplay@gmail.com> | 2022-12-14 19:31:16 +0100 |
---|---|---|
committer | UnavailableDev <ggwildplay@gmail.com> | 2022-12-14 19:31:16 +0100 |
commit | 4ae266365cb2d6d8db73ad8fee36a3e561569c8f (patch) | |
tree | ac6764ff087882839af42aa1835cfc71ddd64497 | |
parent | de08b4a3f217a9321c52c237f974a6733564504e (diff) |
QT Serial Port Design Doc.
-rw-r--r-- | docs/design.md | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/docs/design.md b/docs/design.md index d2a3144..21cfce9 100644 --- a/docs/design.md +++ b/docs/design.md @@ -1,4 +1,13 @@ -# QT Serial port communication (joshua) +# Asynchronous QT Serial port + +The serial data communication is done in an asynchronous manner, which allows the program to efficiently handle data that is arriving on a serial port. + +## Benefits +Using an asynchronous approach allows the program to efficiently handle incoming data from the serial port, while still allowing the UI to remain responsive. This also prevents the program from having to continuously poll the serial port to check for new data. Without an asynchronous approach, this could freeze the UI and consume a lot of CPU resources. By using an asynchronous approach, the application can handle incoming data as soon as it arrives, without blocking the UI or consuming excessive CPU resources. + +## Data processing +When new data arrives at the serial port, it sends out a "ready read" signal. This signal tells the Qt event loop to call the asynchronous serial data read function, which processes the data at the next available opportunity. This ensures that the data is handled efficiently and asynchronously, without blocking the UI or consuming excessive CPU resources. + # General system architecture (loek) # Custom serial protocol (loek) # Multitasking on nodes (niels) |