diff --git a/docs/brainstorm/UML-infrastrucuteV2.md b/docs/brainstorm/UML-infrastrucuteV2.md new file mode 100644 index 0000000..059a1e5 --- /dev/null +++ b/docs/brainstorm/UML-infrastrucuteV2.md @@ -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() + + } +} + +```