-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgarage
More file actions
80 lines (67 loc) · 1.08 KB
/
garage
File metadata and controls
80 lines (67 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
@startuml
scale 2
class GarageManager{
+open()
+close()
+stop()
}
class Garage {
-name: string
-state: GarageState
-adress: string
+setName(string)
+setState(GarageState)
+getState(GarageState)
}
class Door {
-width: int
-height: int
-weight: int
-material: string
-color: string
+setColor(string)
}
class Motor {
-speed: int
-MAX_WEIGHT: int
-motor_pos: int
-motor_state: MotorState
+setSpeed(int)
+setMotorState(MotorState)
+runMotor()
}
class NotificationLight{
-state: NotificationLightState
-Light_Color: BulbColor
+setState(NotificationLightState)
+setLight(BulbColor)
}
Enum GarageState{
Empty
Full
}
Enum BulbColor{
None
GREEN
YELLOW
BLUE
}
Enum NotificationLightState{
Open
Doing
Close
}
Enum MotorState{
UP
DOWN
STOP
}
GarageManager -- Garage
Garage <|-- Door
Garage <|-- Motor
Garage <|-- NotificationLight
Garage --> GarageState
Motor --> MotorState
NotificationLight --> BulbColor
NotificationLight --> NotificationLightState
@enduml