67 lines
1.4 KiB
Plaintext
67 lines
1.4 KiB
Plaintext
@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 {
|
|
+ Program()
|
|
+ setup()
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
class Ultrason{
|
|
- capteur: DHT*
|
|
+ HumiTemp(pin: int, type: String, fullVal: String)
|
|
+ read(): String
|
|
}
|
|
|
|
class Ultrason{
|
|
- capteur: Ultrasonic*
|
|
+ Ultrason(triguer: int, echo: int, fullVal: String)
|
|
+ read(): String
|
|
}
|
|
|
|
Balance --|> Capteur
|
|
Ultrason --|> Capteur
|
|
HumiTemp --|> Capteur
|
|
|
|
|
|
API -> Program
|
|
Program <-- Balance
|
|
Program <-- Ultrason
|
|
Program <-- HumiTemp
|
|
|
|
|
|
@enduml |