-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiagram.puml
86 lines (69 loc) · 1.74 KB
/
diagram.puml
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
81
82
83
84
85
86
@startuml
[*] --> Boot: Entry Point
state Boot {
Heartbeat: Send Heartbeat to Car CAN
Heartbeat --> Wakeup
Wakeup: Send BMS Wakeup
Wakeup --> Init
Init: Initialize BMSs
Init --> CheckIMDFault
CheckIMDFault --> CheckContactors
CheckContactors --> CheckFault
}
Boot --> Idle
Boot --> AMSFault
state Idle {
CheckCarVoltages --> CheckCurrent
CheckCurrent --> CheckTemps
CheckTemps --> CheckCellVoltages
CheckCellVoltages --> CheckFaults
CheckFaults --> TransmitData
}
Idle --> Idle: Wait until HV started
Idle --> HVStart
Idle --> AMSFault
state HVStart {
NegContactorOn: dsadasd
NegContactorOn --> NegContactorOn: Wait until neg sense
NegContactorOn --> PreContactorOn
PreContactorOn --> Monitor
Monitor: Monitor Vvehicle - Vcar, time (possible fault)
Monitor --> PosContactorOn
PosContactorOn --> PosContactorOn: Wait until pos sense
PosContactorOn --> PreContactorOff
PreContactorOff --> LogicCheck
LogicCheck: Check Digital Logic
}
HVStart --> HVRun
state HVRun {
MonitorVoltages --> MonitorCurrent
MonitorCurrent --> MonitorCellTemps
MonitorCellTemps --> MonitorCellVoltages
MonitorCellVoltages --> CheckContactorLogic
CheckContactorLogic --> Transmit_Data
}
HVRun --> SCFault
HVRun --> HVStop
HVRun --> AMSFault
state HVStop {
ReceiveStopMsg --> PosContactorOff
PosContactorOff --> PosContactorOff: Wait for pos sense
PosContactorOff --> NegContactorOff
NegContactorOff --> NegContactorOff: Wait for neg sense
}
HVStop --> Idle
state SCFault {
[*] --> HV_Stop
HV_Stop: Redirect to HVStop
HV_Stop --> HVStop
state a <<choice>>
CheckAMS --> a: Is SC_SENSE=1?
a --> CheckAMS: No
a --> Exit: Yes
}
HVStop --> CheckAMS: Come back if directed by SCFault
state AMSFault {
TODO: "Until Leave Fault State"
TODO --> SendError
}
@enduml