feat: création classe abstraite capteur #44
@ -18,7 +18,49 @@ Class Program {
|
|||||||
+ setup()
|
+ 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
|
||||||
|
|
||||||
|
|
||||||
|
Program <-- Balance
|
||||||
|
Program <-- Ultrason
|
||||||
|
Program <-- HumiTemp
|
||||||
|
|
||||||
|
|
||||||
@enduml
|
@enduml
|
Loading…
x
Reference in New Issue
Block a user