78 lines
1.7 KiB
Plaintext
Raw Permalink Normal View History

2023-04-04 10:56:27 +02:00
@startuml Class Diagram
Class API {
- user: String
- password: String
- serveurHost: String
- https: bool
- client: WiFiEspClient*
- connect(): bool
+ API(user: String, password: String, host: String, https: bool = true)
+ wifiBegin(wifiId: String, wifiPass: String, espSerial: Stream*): bool
+ sendValue(val: String, pouvelleID: String, unit: String, full: bool): bool
}
Class Program {
2023-04-04 10:57:46 +02:00
+ Program()
2023-04-04 10:56:27 +02:00
+ setup()
}
2023-05-09 17:06:20 +02:00
abstract Class Capteur {
# full: bool
# type: String
# fullVall: String
+ Capteur(type: String, fullVal: String)
+ {abstract} tar(val: int): bool
+ {abstract} read(): String = 0
+ isFull(): bool
+ getValType(): String
}
class Balance{
- capteur: HX711*
- initialized: bool
- calibrationFact: int
- initialVal: long
+ Balance(doutPin: int, sck: int, fullVal:String)
+ read(): String
+ initCalibration(): bool
+ calibration(poidsRef: int, moyenneCalibration: int): bool
+ tar(val: int = 0): bool
}
2023-05-14 23:26:16 +02:00
class HumiTemp{
2023-05-09 17:06:20 +02:00
- capteur: DHT*
+ HumiTemp(pin: int, type: String, fullVal: String)
+ read(): String
}
class Ultrason{
- capteur: Ultrasonic*
+ Ultrason(triguer: int, echo: int, fullVal: String)
+ read(): String
}
2023-05-14 23:26:16 +02:00
class OledScreen{
- display: Adafruit_SSD1306*
+ OledScreen(screenWidth: int, screenHeight: int, oledResetPin: int = -1)
+ welcome(): void
+ clear(): void
+ wifiWaiting(): void
+ printVal(distance: String, poid: String, humitemp: String): void
}
2023-05-09 17:06:20 +02:00
Balance --|> Capteur
Ultrason --|> Capteur
HumiTemp --|> Capteur
2023-04-04 10:56:27 +02:00
2023-05-09 17:06:20 +02:00
Program <-- Balance
Program <-- Ultrason
Program <-- HumiTemp
2023-04-04 10:56:27 +02:00
2023-05-14 23:26:16 +02:00
Program <- API
OledScreen -> Program
2023-04-04 10:56:27 +02:00
@enduml