aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-01-17 22:12:50 +0100
committerlonkaars <loek@pipeframe.xyz>2023-01-17 22:12:50 +0100
commitd6b9985602e12dd612891604d79241aacc978401 (patch)
tree328e6f7b24665e862dc3fb583bc8aeb48da07e09
parentfabf078d519acdd47f3dec6df19b46d53321e981 (diff)
parent95101cb750b8f749509f757cd1cd8ebbad7c67ad (diff)
Merge branch 'dev' of https://github.com/UnavailableDev/avans-domotica into dev
-rw-r--r--docs/design.md44
-rw-r--r--docs/img/fig-AsyncCommunication.svg1
2 files changed, 43 insertions, 2 deletions
diff --git a/docs/design.md b/docs/design.md
index ca6f8c8..91e0047 100644
--- a/docs/design.md
+++ b/docs/design.md
@@ -23,6 +23,47 @@ details are:
features to edit the configuration and node state, but all action handling is
happening on the nodes.
+
+# Framework
+
+The following two are the possible frameworks for this project to use:
+
+## segger:
+
+For this there was very little to non research before starting this project.
+
+## Zephyr:
+
+This can be used with either a makefile system and the correct libraries or with the highly integrated visualstudio code extension. Because of this integration making a custom makefile is too time intensive for this project and the visualstudio code extension works great already.
+
+Further more zephyr and nordic both keep supporting their software with frequent updates and there are plenty of examples made with this.
+
+Thus the desicion has been made to use this option.
+
+
+
+# Data transfer between GUI and mesh network
+
+## Asynchronous data handling
+
+Because the data will be received asynchronously, certain decisions will have to be made about how to deal with this. In this case the GUI or client sends out requests/tasks to the border router. The border node then responds after x time. In both cases this triggers a callback function on the receiving end, so that the data can be handled accordingly, see the image below.
+
+![img](img/fig-AsyncCommunication.svg)
+
+## Communication standards
+
+There are two options available, each has its own set of benefits listed in the table below.
+
+<figure>
+| UART | Bluetooth |
+| --------------------- | ---------- |
+| Less interference | Wireless |
+| Simpler | Complexer |
+| Available on all pc's | (opposite) |
+<figcaption>Benefits of UART vs Bluetooth</figcaption>
+</figure>
+Seeing that there are more pro's to using UART then Bluetooth, it makes the most sense to use UART.
+
# Custom serial protocol
The border router node communicates with the QT application using a USART
@@ -114,5 +155,4 @@ There are two semaphores created in the provisioner software. The first one is c
|Zephyr|3.1|
|nRF SDK|2.1.2|
<figcaption>Software and library functions</figcaption>
-</figure>
-
+</figure> \ No newline at end of file
diff --git a/docs/img/fig-AsyncCommunication.svg b/docs/img/fig-AsyncCommunication.svg
new file mode 100644
index 0000000..f04034a
--- /dev/null
+++ b/docs/img/fig-AsyncCommunication.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:lucid="lucid" width="463.25" height="446"><g transform="translate(-385.1250000000001 -300)" lucid:page-tab-id="0_0"><path d="M405.13 325a5 5 0 0 1 5-5h150a5 5 0 0 1 5 5v60a5 5 0 0 1-5 5h-150a5 5 0 0 1-5-5z" stroke="#000" stroke-opacity="0" fill="#a5ceff"/><use xlink:href="#a" transform="matrix(1,0,0,1,410.1250000000001,325) translate(59.025 33.15)"/><path d="M668.38 325a5 5 0 0 1 5-5h150a5 5 0 0 1 5 5v60a5 5 0 0 1-5 5h-150a5 5 0 0 1-5-5z" stroke="#000" stroke-opacity="0" fill="#a5ceff"/><use xlink:href="#b" transform="matrix(1,0,0,1,673.3750000000001,325) translate(58.05 33.15)"/><path d="M465.13 445a5 5 0 0 1 5-5h30a5 5 0 0 1 5 5v70a5 5 0 0 1-5 5h-30a5 5 0 0 1-5-5z" stroke="#000" stroke-opacity="0" fill="#d6d6d6"/><path d="M485.13 390.5v32.12" stroke="#333" fill="none"/><path d="M485.63 390.5h-1v-.5h1z" stroke="#333" stroke-width=".05" fill="#333"/><path d="M485.13 437.38l-4.64-14.26h9.26z" stroke="#333" fill="#333"/><path d="M728.13 445a5 5 0 0 1 5-5h30a5 5 0 0 1 5 5v210a5 5 0 0 1-5 5h-30a5 5 0 0 1-5-5z" stroke="#000" stroke-opacity="0" fill="#d6d6d6"/><path d="M748.38 390.5v32.12" stroke="#333" fill="none"/><path d="M748.88 390.5h-1v-.5h1z" stroke="#333" stroke-width=".05" fill="#333"/><path d="M748.38 437.38l-4.64-14.26H753z" stroke="#333" fill="#333"/><path d="M505.63 455.7H727.6" stroke="#333" fill="none"/><path d="M505.64 456.2h-.5v-1h.5z" stroke="#333" stroke-width=".05" fill="#333"/><path d="M709.8 445.02l18.07 10.7" stroke="#333" fill="none"/><use xlink:href="#c" transform="matrix(1,0,0,1,586.6499295526492,430.11435348204594) translate(0 14.4)"/><path d="M485.13 520.5v2.03m0 4.05v4.06m0 4.05v4.05m0 4.06v4.06m0 4.06v4.05m0 4.06v4.05m0 4.06v4.05m0 4.05v4.06m0 4.06v4.06m0 4.05v4.06m0 4.05v4.06m0 4.05v4.05m0 4.06v4.06m0 4.06v4.05m0 4.06v4.05m0 4.06v4.05m0 4.05v4.06m0 4.06v4.06m0 4.05v4.06m0 4.05v4.06m0 4.05v4.05m0 4.06v4.06m0 4.06v4.05m0 4.06v4.05m0 4.06v4.05m0 4.05v4.06m0 4.06v4.06m0 4.05v2.03" stroke="#333" fill="none"/><path d="M485.63 520.5h-1v-.5h1z" stroke="#333" stroke-width=".05" fill="#333"/><path d="M485.13 739.5v.5M727.63 580.48H506.1" stroke="#333" fill="none"/><path d="M728.13 580.98h-.52v-1h.52z" stroke="#333" stroke-width=".05" fill="#333"/><path d="M524.18 569.8l-18.07 10.68 18.08 10.7" stroke="#333" fill="none"/><use xlink:href="#d" transform="matrix(1,0,0,1,579.6499094842635,554.876263986471) translate(0 14.4)"/><path d="M465.13 575a5 5 0 0 1 5-5h30a5 5 0 0 1 5 5v70a5 5 0 0 1-5 5h-30a5 5 0 0 1-5-5z" stroke="#000" stroke-opacity="0" fill="#d6d6d6"/><path d="M748.13 660.5v1.98m0 3.94v3.96m0 3.95v3.94m0 3.96v3.94m0 3.96v3.95m0 3.94V702m0 3.94v3.96m0 3.95v3.94m0 3.96v3.94m0 3.96v3.95m0 3.94v1.98" stroke="#333" fill="none"/><path d="M748.63 660.5h-1v-.5h1z" stroke="#333" stroke-width=".05" fill="#333"/><path d="M748.13 739.5v.5" stroke="#333" fill="none"/><defs><path fill="#333" d="M143 4C61 4 22-44 18-125c-5-107 100-154 193-111 17 8 29 25 37 43l-32 9c-13-25-37-40-76-40-61 0-88 39-88 99 0 61 29 100 91 101 35 0 62-11 79-27v-45h-74v-28h105v86C228-13 192 4 143 4" id="e"/><path fill="#333" d="M232-93c-1 65-40 97-104 97C67 4 28-28 28-90v-158h33c8 89-33 224 67 224 102 0 64-133 71-224h33v155" id="f"/><path fill="#333" d="M33 0v-248h34V0H33" id="g"/><g id="a"><use transform="matrix(0.05,0,0,0.05,0,0)" xlink:href="#e"/><use transform="matrix(0.05,0,0,0.05,14,0)" xlink:href="#f"/><use transform="matrix(0.05,0,0,0.05,26.950000000000003,0)" xlink:href="#g"/><path fill="#333" d="M-.9 1.25h33.75v1.32H-.9z"/></g><path fill="#333" d="M117-194c89-4 53 116 60 194h-32v-121c0-31-8-49-39-48C34-167 62-67 57 0H25l-1-190h30c1 10-1 24 2 32 11-22 29-35 61-36" id="h"/><path fill="#333" d="M233-177c-1 41-23 64-60 70L243 0h-38l-65-103H63V0H30v-248c88 3 205-21 203 71zM63-129c60-2 137 13 137-47 0-61-80-42-137-45v92" id="i"/><path fill="#333" d="M63-220v92h138v28H63V0H30v-248h175v28H63" id="j"/><g id="b"><use transform="matrix(0.05,0,0,0.05,0,0)" xlink:href="#h"/><use transform="matrix(0.05,0,0,0.05,10,0)" xlink:href="#i"/><use transform="matrix(0.05,0,0,0.05,22.950000000000003,0)" xlink:href="#j"/><path fill="#333" d="M-.9 1.25h35.7v1.32H-.9z"/></g><path fill="#333" d="M114-163C36-179 61-72 57 0H25l-1-190h30c1 12-1 29 2 39 6-27 23-49 58-41v29" id="k"/><path fill="#333" d="M100-194c63 0 86 42 84 106H49c0 40 14 67 53 68 26 1 43-12 49-29l28 8c-11 28-37 45-77 45C44 4 14-33 15-96c1-61 26-98 85-98zm52 81c6-60-76-77-97-28-3 7-6 17-6 28h103" id="l"/><path fill="#333" d="M145-31C134-9 116 4 85 4 32 4 16-35 15-94c0-59 17-99 70-100 32-1 48 14 60 33 0-11-1-24 2-32h30l-1 268h-32zM93-21c41 0 51-33 51-76s-8-73-50-73c-40 0-46 35-46 75s5 74 45 74" id="m"/><path fill="#333" d="M84 4C-5 8 30-112 23-190h32v120c0 31 7 50 39 49 72-2 45-101 50-169h31l1 190h-30c-1-10 1-25-2-33-11 22-28 36-60 37" id="n"/><path fill="#333" d="M135-143c-3-34-86-38-87 0 15 53 115 12 119 90S17 21 10-45l28-5c4 36 97 45 98 0-10-56-113-15-118-90-4-57 82-63 122-42 12 7 21 19 24 35" id="o"/><path fill="#333" d="M59-47c-2 24 18 29 38 22v24C64 9 27 4 27-40v-127H5v-23h24l9-43h21v43h35v23H59v120" id="p"/><g id="c"><use transform="matrix(0.05,0,0,0.05,0,0)" xlink:href="#k"/><use transform="matrix(0.05,0,0,0.05,5.95,0)" xlink:href="#l"/><use transform="matrix(0.05,0,0,0.05,15.949999999999998,0)" xlink:href="#m"/><use transform="matrix(0.05,0,0,0.05,25.950000000000003,0)" xlink:href="#n"/><use transform="matrix(0.05,0,0,0.05,35.95,0)" xlink:href="#l"/><use transform="matrix(0.05,0,0,0.05,45.95,0)" xlink:href="#o"/><use transform="matrix(0.05,0,0,0.05,54.95,0)" xlink:href="#p"/></g><path fill="#333" d="M115-194c55 1 70 41 70 98S169 2 115 4C84 4 66-9 55-30l1 105H24l-1-265h31l2 30c10-21 28-34 59-34zm-8 174c40 0 45-34 45-75s-6-73-45-74c-42 0-51 32-51 76 0 43 10 73 51 73" id="q"/><path fill="#333" d="M100-194c62-1 85 37 85 99 1 63-27 99-86 99S16-35 15-95c0-66 28-99 85-99zM99-20c44 1 53-31 53-75 0-43-8-75-51-75s-53 32-53 75 10 74 51 75" id="r"/><g id="d"><use transform="matrix(0.05,0,0,0.05,0,0)" xlink:href="#k"/><use transform="matrix(0.05,0,0,0.05,5.95,0)" xlink:href="#l"/><use transform="matrix(0.05,0,0,0.05,15.949999999999998,0)" xlink:href="#o"/><use transform="matrix(0.05,0,0,0.05,24.95,0)" xlink:href="#q"/><use transform="matrix(0.05,0,0,0.05,34.95,0)" xlink:href="#r"/><use transform="matrix(0.05,0,0,0.05,44.95,0)" xlink:href="#h"/><use transform="matrix(0.05,0,0,0.05,54.95,0)" xlink:href="#o"/><use transform="matrix(0.05,0,0,0.05,63.95,0)" xlink:href="#l"/></g></defs></g></svg> \ No newline at end of file