aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-12-14 21:03:04 +0100
committerlonkaars <loek@pipeframe.xyz>2022-12-14 21:03:04 +0100
commit46ede2c109fe2aa390936ec4f0a30321fb7b5d86 (patch)
treed1645ece128fc13dce1b492e7439064ad060d1a5 /docs
parent35fbdc9670ac960a6a112ed047a70b1a1456a9c5 (diff)
parent4ae266365cb2d6d8db73ad8fee36a3e561569c8f (diff)
merge joshua design document
Diffstat (limited to 'docs')
-rw-r--r--docs/design.md13
1 files changed, 12 insertions, 1 deletions
diff --git a/docs/design.md b/docs/design.md
index 3b51bea..e63dff2 100644
--- a/docs/design.md
+++ b/docs/design.md
@@ -1,4 +1,3 @@
-# QT Serial port communication (joshua)
# General system architecture
![System architecture](img/fig-architecture.svg)
@@ -45,6 +44,18 @@ decodes the message back into a regular struct.
Exact specifications of the protocol can be found in the source tree in
markdown format, with included client and parser libaries.
+# 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.
+
# Mesh network
In mesh networking, there are a few choices made.