78 lines
1.6 KiB
Markdown
78 lines
1.6 KiB
Markdown
```mermaid
|
|
classDiagram
|
|
setup --> websocketSetup
|
|
loop --> screenButtonHandler
|
|
screenButtonHandler --> DisplayText
|
|
screenButtonHandler --> sendData
|
|
sendData --> Server : Websocket
|
|
setup --> loop
|
|
python --> Server
|
|
Server --> website : Websocket
|
|
|
|
|
|
namespace ESP32Questionbox {
|
|
class setup {
|
|
+int questionID
|
|
+char*[] Question
|
|
+char*[] Answer
|
|
+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 websocketClient {
|
|
+loop()
|
|
+begin()
|
|
+sendTXT()
|
|
}
|
|
|
|
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()
|
|
|
|
}
|
|
}
|
|
|
|
```
|