Commit | Line | Data |
---|---|---|
c6045c84 | 1 | import { type ConnectorStatusTransition, OCPP20ConnectorStatusEnumType } from '../../../types'; |
48b75072 JB |
2 | import { OCPPConstants } from '../internal'; |
3 | ||
48b75072 | 4 | export class OCPP20Constants extends OCPPConstants { |
0a376442 JB |
5 | static readonly ChargingStationStatusTransitions: Readonly<ConnectorStatusTransition[]> = |
6 | Object.freeze([ | |
7 | { to: OCPP20ConnectorStatusEnumType.Available }, | |
8 | // { from: OCPP20ConnectorStatusEnumType.Available, to: OCPP20ConnectorStatusEnumType.Available }, | |
9 | { | |
10 | from: OCPP20ConnectorStatusEnumType.Available, | |
11 | to: OCPP20ConnectorStatusEnumType.Unavailable, | |
12 | }, | |
13 | { from: OCPP20ConnectorStatusEnumType.Available, to: OCPP20ConnectorStatusEnumType.Faulted }, | |
14 | { to: OCPP20ConnectorStatusEnumType.Unavailable }, | |
15 | { | |
16 | from: OCPP20ConnectorStatusEnumType.Unavailable, | |
17 | to: OCPP20ConnectorStatusEnumType.Available, | |
18 | }, | |
19 | // { | |
20 | // from: OCPP20ConnectorStatusEnumType.Unavailable, | |
21 | // to: OCPP20ConnectorStatusEnumType.Unavailable, | |
22 | // }, | |
23 | { | |
24 | from: OCPP20ConnectorStatusEnumType.Unavailable, | |
25 | to: OCPP20ConnectorStatusEnumType.Faulted, | |
26 | }, | |
27 | { to: OCPP20ConnectorStatusEnumType.Faulted }, | |
28 | { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Available }, | |
29 | { | |
30 | from: OCPP20ConnectorStatusEnumType.Faulted, | |
31 | to: OCPP20ConnectorStatusEnumType.Unavailable, | |
32 | }, | |
33 | // { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Faulted }, | |
34 | ]); | |
48b75072 | 35 | |
0a376442 JB |
36 | static readonly ConnectorStatusTransitions: Readonly<ConnectorStatusTransition[]> = Object.freeze( |
37 | [ | |
38 | { to: OCPP20ConnectorStatusEnumType.Available }, | |
39 | // { from: OCPP20ConnectorStatusEnumType.Available, to: OCPP20ConnectorStatusEnumType.Available }, | |
40 | { from: OCPP20ConnectorStatusEnumType.Available, to: OCPP20ConnectorStatusEnumType.Occupied }, | |
41 | { from: OCPP20ConnectorStatusEnumType.Available, to: OCPP20ConnectorStatusEnumType.Reserved }, | |
42 | { | |
43 | from: OCPP20ConnectorStatusEnumType.Available, | |
44 | to: OCPP20ConnectorStatusEnumType.Unavailable, | |
45 | }, | |
46 | { from: OCPP20ConnectorStatusEnumType.Available, to: OCPP20ConnectorStatusEnumType.Faulted }, | |
47 | // { to: OCPP20ConnectorStatusEnumType.Occupied }, | |
48 | { from: OCPP20ConnectorStatusEnumType.Occupied, to: OCPP20ConnectorStatusEnumType.Available }, | |
49 | // { from: OCPP20ConnectorStatusEnumType.Occupied, to: OCPP20ConnectorStatusEnumType.Occupied }, | |
50 | // { from: OCPP20ConnectorStatusEnumType.Occupied, to: OCPP20ConnectorStatusEnumType.Reserved }, | |
51 | { | |
52 | from: OCPP20ConnectorStatusEnumType.Occupied, | |
53 | to: OCPP20ConnectorStatusEnumType.Unavailable, | |
54 | }, | |
55 | { from: OCPP20ConnectorStatusEnumType.Occupied, to: OCPP20ConnectorStatusEnumType.Faulted }, | |
56 | // { to: OCPP20ConnectorStatusEnumType.Reserved }, | |
57 | { from: OCPP20ConnectorStatusEnumType.Reserved, to: OCPP20ConnectorStatusEnumType.Available }, | |
58 | { from: OCPP20ConnectorStatusEnumType.Reserved, to: OCPP20ConnectorStatusEnumType.Occupied }, | |
59 | // { from: OCPP20ConnectorStatusEnumType.Reserved, to: OCPP20ConnectorStatusEnumType.Reserved }, | |
60 | { | |
61 | from: OCPP20ConnectorStatusEnumType.Reserved, | |
62 | to: OCPP20ConnectorStatusEnumType.Unavailable, | |
63 | }, | |
64 | { from: OCPP20ConnectorStatusEnumType.Reserved, to: OCPP20ConnectorStatusEnumType.Faulted }, | |
65 | { to: OCPP20ConnectorStatusEnumType.Unavailable }, | |
66 | { | |
67 | from: OCPP20ConnectorStatusEnumType.Unavailable, | |
68 | to: OCPP20ConnectorStatusEnumType.Available, | |
69 | }, | |
70 | { | |
71 | from: OCPP20ConnectorStatusEnumType.Unavailable, | |
72 | to: OCPP20ConnectorStatusEnumType.Occupied, | |
73 | }, | |
74 | // { from: OCPP20ConnectorStatusEnumType.Unavailable, to: OCPP20ConnectorStatusEnumType.Reserved }, | |
75 | // { from: OCPP20ConnectorStatusEnumType.Unavailable, to: OCPP20ConnectorStatusEnumType.Unavailable }, | |
76 | { | |
77 | from: OCPP20ConnectorStatusEnumType.Unavailable, | |
78 | to: OCPP20ConnectorStatusEnumType.Faulted, | |
79 | }, | |
80 | { to: OCPP20ConnectorStatusEnumType.Faulted }, | |
81 | { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Available }, | |
82 | { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Occupied }, | |
83 | { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Reserved }, | |
84 | { | |
85 | from: OCPP20ConnectorStatusEnumType.Faulted, | |
86 | to: OCPP20ConnectorStatusEnumType.Unavailable, | |
87 | }, | |
88 | // { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Faulted }, | |
89 | ] | |
90 | ); | |
48b75072 | 91 | } |