Add UML diagram and classes for infrastructure V2
This commit is contained in:
72
docs/brainstorm/UML-infrastrucuteV2.md
Normal file
72
docs/brainstorm/UML-infrastrucuteV2.md
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
```mermaid
|
||||||
|
classDiagram
|
||||||
|
setup --> websocketSetup
|
||||||
|
loop --> screenButtonHandler
|
||||||
|
screenButtonHandler --> DisplayText
|
||||||
|
screenButtonHandler --> sendData
|
||||||
|
sendData --> Server
|
||||||
|
setup --> loop
|
||||||
|
python --> Server
|
||||||
|
Server --> website
|
||||||
|
|
||||||
|
|
||||||
|
namespace ESP32Questionbox {
|
||||||
|
class setup {
|
||||||
|
+int questionID
|
||||||
|
+char*[] Question
|
||||||
|
+char*[] Answer
|
||||||
|
+Adafruit_ST7796S_kbv tft
|
||||||
|
+DisplayText displayText
|
||||||
|
+void websocketSetup()
|
||||||
|
}
|
||||||
|
|
||||||
|
class loop {
|
||||||
|
+void screenButtonHandler()
|
||||||
|
+void sendData(int question, String answer)
|
||||||
|
+void hexdump(const void* mem, uint32_t len, uint8_t cols)
|
||||||
|
}
|
||||||
|
|
||||||
|
class websocketSetup {
|
||||||
|
+connectWifi()
|
||||||
|
+websocketConnect()
|
||||||
|
}
|
||||||
|
|
||||||
|
class screenButtonHandler {
|
||||||
|
-bool redButton
|
||||||
|
-bool greenButton
|
||||||
|
-bool whiteButton
|
||||||
|
+displayText.writeText()
|
||||||
|
+sendData()
|
||||||
|
}
|
||||||
|
class DisplayText {
|
||||||
|
+void writeText(char* text, int size, int posX, int posY, int screenTime, bool center, bool bottom)
|
||||||
|
-int centerText(char* text)
|
||||||
|
-void printWordsFull(char* text, bool bottom)
|
||||||
|
}
|
||||||
|
class sendData{
|
||||||
|
+webSocket.sendTXT
|
||||||
|
}
|
||||||
|
}
|
||||||
|
namespace server {
|
||||||
|
class python {
|
||||||
|
+databaseScript()
|
||||||
|
+websocketScript()
|
||||||
|
+flaskScript()
|
||||||
|
}
|
||||||
|
class Server {
|
||||||
|
+websocket()
|
||||||
|
+flask()
|
||||||
|
+mariaDB()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace user {
|
||||||
|
class website {
|
||||||
|
+ getLiveData()
|
||||||
|
+ getHistoricalData()
|
||||||
|
+ showData()
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
Reference in New Issue
Block a user