-import { OCPP16ChargePointStatus } from '../../../types';
+import { ConnectorStatusTransition, OCPP16ChargePointStatus } from '../../../types';
import { OCPPConstants } from '../internal';
-type Transition = Readonly<{
- from?: OCPP16ChargePointStatus;
- to: OCPP16ChargePointStatus;
-}>;
-
export class OCPP16Constants extends OCPPConstants {
- static readonly ChargePointStatusChargingStationTransitions: Readonly<Transition[]> =
+ static readonly ChargePointStatusChargingStationTransitions: Readonly<
+ ConnectorStatusTransition[]
+ > = Object.freeze([
+ { to: OCPP16ChargePointStatus.Available },
+ // { from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.Available },
+ { from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.Unavailable },
+ { from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.Faulted },
+ { to: OCPP16ChargePointStatus.Unavailable },
+ { from: OCPP16ChargePointStatus.Unavailable, to: OCPP16ChargePointStatus.Available },
+ // { from: OCPP16ChargePointStatus.Unavailable, to: OCPP16ChargePointStatus.Unavailable },
+ { from: OCPP16ChargePointStatus.Unavailable, to: OCPP16ChargePointStatus.Faulted },
+ { to: OCPP16ChargePointStatus.Faulted },
+ { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Available },
+ { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Unavailable },
+ // { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Faulted },
+ ]);
+
+ static readonly ChargePointStatusConnectorTransitions: Readonly<ConnectorStatusTransition[]> =
Object.freeze([
{ to: OCPP16ChargePointStatus.Available },
// { from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.Available },
+ { from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.Preparing },
+ { from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.Charging },
+ { from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.SuspendedEV },
+ { from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.SuspendedEVSE },
+ // { from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.Finishing },
+ { from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.Reserved },
{ from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.Unavailable },
{ from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.Faulted },
+ // { to: OCPP16ChargePointStatus.Preparing },
+ { from: OCPP16ChargePointStatus.Preparing, to: OCPP16ChargePointStatus.Available },
+ // { from: OCPP16ChargePointStatus.Preparing, to: OCPP16ChargePointStatus.Preparing },
+ { from: OCPP16ChargePointStatus.Preparing, to: OCPP16ChargePointStatus.Charging },
+ { from: OCPP16ChargePointStatus.Preparing, to: OCPP16ChargePointStatus.SuspendedEV },
+ { from: OCPP16ChargePointStatus.Preparing, to: OCPP16ChargePointStatus.SuspendedEVSE },
+ { from: OCPP16ChargePointStatus.Preparing, to: OCPP16ChargePointStatus.Finishing },
+ // { from: OCPP16ChargePointStatus.Preparing, to: OCPP16ChargePointStatus.Reserved },
+ // { from: OCPP16ChargePointStatus.Preparing, to: OCPP16ChargePointStatus.Unavailable },
+ { from: OCPP16ChargePointStatus.Preparing, to: OCPP16ChargePointStatus.Faulted },
+ // { to: OCPP16ChargePointStatus.Charging },
+ { from: OCPP16ChargePointStatus.Charging, to: OCPP16ChargePointStatus.Available },
+ // { from: OCPP16ChargePointStatus.Charging, to: OCPP16ChargePointStatus.Preparing },
+ // { from: OCPP16ChargePointStatus.Charging, to: OCPP16ChargePointStatus.Charging },
+ { from: OCPP16ChargePointStatus.Charging, to: OCPP16ChargePointStatus.SuspendedEV },
+ { from: OCPP16ChargePointStatus.Charging, to: OCPP16ChargePointStatus.SuspendedEVSE },
+ { from: OCPP16ChargePointStatus.Charging, to: OCPP16ChargePointStatus.Finishing },
+ // { from: OCPP16ChargePointStatus.Charging, to: OCPP16ChargePointStatus.Reserved },
+ { from: OCPP16ChargePointStatus.Charging, to: OCPP16ChargePointStatus.Unavailable },
+ { from: OCPP16ChargePointStatus.Charging, to: OCPP16ChargePointStatus.Faulted },
+ // { to: OCPP16ChargePointStatus.SuspendedEV },
+ { from: OCPP16ChargePointStatus.SuspendedEV, to: OCPP16ChargePointStatus.Available },
+ // { from: OCPP16ChargePointStatus.SuspendedEV, to: OCPP16ChargePointStatus.Preparing },
+ { from: OCPP16ChargePointStatus.SuspendedEV, to: OCPP16ChargePointStatus.Charging },
+ // { from: OCPP16ChargePointStatus.SuspendedEV, OCPP16ChargePointStatus.SuspendedEV },
+ { from: OCPP16ChargePointStatus.SuspendedEV, to: OCPP16ChargePointStatus.SuspendedEVSE },
+ { from: OCPP16ChargePointStatus.SuspendedEV, to: OCPP16ChargePointStatus.Finishing },
+ // { from: OCPP16ChargePointStatus.SuspendedEV, to: OCPP16ChargePointStatus.Reserved },
+ { from: OCPP16ChargePointStatus.SuspendedEV, to: OCPP16ChargePointStatus.Unavailable },
+ { from: OCPP16ChargePointStatus.SuspendedEV, to: OCPP16ChargePointStatus.Faulted },
+ // { to: OCPP16ChargePointStatus.SuspendedEVSE },
+ { from: OCPP16ChargePointStatus.SuspendedEVSE, to: OCPP16ChargePointStatus.Available },
+ // { from: OCPP16ChargePointStatus.SuspendedEVSE, to: OCPP16ChargePointStatus.Preparing },
+ { from: OCPP16ChargePointStatus.SuspendedEVSE, to: OCPP16ChargePointStatus.Charging },
+ { from: OCPP16ChargePointStatus.SuspendedEVSE, to: OCPP16ChargePointStatus.SuspendedEV },
+ // { from: OCPP16ChargePointStatus.SuspendedEVSE, to: OCPP16ChargePointStatus.SuspendedEVSE },
+ { from: OCPP16ChargePointStatus.SuspendedEVSE, to: OCPP16ChargePointStatus.Finishing },
+ // { from: OCPP16ChargePointStatus.SuspendedEVSE, to: OCPP16ChargePointStatus.Reserved },
+ { from: OCPP16ChargePointStatus.SuspendedEVSE, to: OCPP16ChargePointStatus.Unavailable },
+ { from: OCPP16ChargePointStatus.SuspendedEVSE, to: OCPP16ChargePointStatus.Faulted },
+ // { to: OCPP16ChargePointStatus.Finishing},
+ { from: OCPP16ChargePointStatus.Finishing, to: OCPP16ChargePointStatus.Available },
+ { from: OCPP16ChargePointStatus.Finishing, to: OCPP16ChargePointStatus.Preparing },
+ // { from: OCPP16ChargePointStatus.Finishing, to: OCPP16ChargePointStatus.Charging },
+ // { from: OCPP16ChargePointStatus.Finishing, to: OCPP16ChargePointStatus.SuspendedEV },
+ // { from: OCPP16ChargePointStatus.Finishing, to: OCPP16ChargePointStatus.SuspendedEVSE },
+ // { from: OCPP16ChargePointStatus.Finishing, to: OCPP16ChargePointStatus.Finishing },
+ // { from: OCPP16ChargePointStatus.Finishing, to: OCPP16ChargePointStatus.Reserved },
+ { from: OCPP16ChargePointStatus.Finishing, to: OCPP16ChargePointStatus.Unavailable },
+ { from: OCPP16ChargePointStatus.Finishing, to: OCPP16ChargePointStatus.Faulted },
+ // { to: OCPP16ChargePointStatus.Reserved },
+ { from: OCPP16ChargePointStatus.Reserved, to: OCPP16ChargePointStatus.Available },
+ { from: OCPP16ChargePointStatus.Reserved, to: OCPP16ChargePointStatus.Preparing },
+ // { from: OCPP16ChargePointStatus.Reserved, to: OCPP16ChargePointStatus.Charging },
+ // { from: OCPP16ChargePointStatus.Reserved, to: OCPP16ChargePointStatus.SuspendedEV },
+ // { from: OCPP16ChargePointStatus.Reserved, to: OCPP16ChargePointStatus.SuspendedEVSE },
+ // { from: OCPP16ChargePointStatus.Reserved, to: OCPP16ChargePointStatus.Finishing },
+ // { from: OCPP16ChargePointStatus.Reserved, to: OCPP16ChargePointStatus.Reserved },
+ { from: OCPP16ChargePointStatus.Reserved, to: OCPP16ChargePointStatus.Unavailable },
+ { from: OCPP16ChargePointStatus.Reserved, to: OCPP16ChargePointStatus.Faulted },
{ to: OCPP16ChargePointStatus.Unavailable },
{ from: OCPP16ChargePointStatus.Unavailable, to: OCPP16ChargePointStatus.Available },
+ { from: OCPP16ChargePointStatus.Unavailable, to: OCPP16ChargePointStatus.Preparing },
+ { from: OCPP16ChargePointStatus.Unavailable, to: OCPP16ChargePointStatus.Charging },
+ { from: OCPP16ChargePointStatus.Unavailable, to: OCPP16ChargePointStatus.SuspendedEV },
+ { from: OCPP16ChargePointStatus.Unavailable, to: OCPP16ChargePointStatus.SuspendedEVSE },
+ // { from: OCPP16ChargePointStatus.Unavailable, to: OCPP16ChargePointStatus.Finishing },
+ // { from: OCPP16ChargePointStatus.Unavailable, to: OCPP16ChargePointStatus.Reserved },
// { from: OCPP16ChargePointStatus.Unavailable, to: OCPP16ChargePointStatus.Unavailable },
{ from: OCPP16ChargePointStatus.Unavailable, to: OCPP16ChargePointStatus.Faulted },
{ to: OCPP16ChargePointStatus.Faulted },
{ from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Available },
+ { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Preparing },
+ { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Charging },
+ { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.SuspendedEV },
+ { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.SuspendedEVSE },
+ { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Finishing },
+ { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Reserved },
{ from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Unavailable },
// { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Faulted },
]);
-
- static readonly ChargePointStatusConnectorTransitions: Readonly<Transition[]> = Object.freeze([
- { to: OCPP16ChargePointStatus.Available },
- // { from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.Available },
- { from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.Preparing },
- { from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.Charging },
- { from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.SuspendedEV },
- { from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.SuspendedEVSE },
- // { from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.Finishing },
- { from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.Reserved },
- { from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.Unavailable },
- { from: OCPP16ChargePointStatus.Available, to: OCPP16ChargePointStatus.Faulted },
- // { to: OCPP16ChargePointStatus.Preparing },
- { from: OCPP16ChargePointStatus.Preparing, to: OCPP16ChargePointStatus.Available },
- // { from: OCPP16ChargePointStatus.Preparing, to: OCPP16ChargePointStatus.Preparing },
- { from: OCPP16ChargePointStatus.Preparing, to: OCPP16ChargePointStatus.Charging },
- { from: OCPP16ChargePointStatus.Preparing, to: OCPP16ChargePointStatus.SuspendedEV },
- { from: OCPP16ChargePointStatus.Preparing, to: OCPP16ChargePointStatus.SuspendedEVSE },
- { from: OCPP16ChargePointStatus.Preparing, to: OCPP16ChargePointStatus.Finishing },
- // { from: OCPP16ChargePointStatus.Preparing, to: OCPP16ChargePointStatus.Reserved },
- // { from: OCPP16ChargePointStatus.Preparing, to: OCPP16ChargePointStatus.Unavailable },
- { from: OCPP16ChargePointStatus.Preparing, to: OCPP16ChargePointStatus.Faulted },
- // { to: OCPP16ChargePointStatus.Charging },
- { from: OCPP16ChargePointStatus.Charging, to: OCPP16ChargePointStatus.Available },
- // { from: OCPP16ChargePointStatus.Charging, to: OCPP16ChargePointStatus.Preparing },
- // { from: OCPP16ChargePointStatus.Charging, to: OCPP16ChargePointStatus.Charging },
- { from: OCPP16ChargePointStatus.Charging, to: OCPP16ChargePointStatus.SuspendedEV },
- { from: OCPP16ChargePointStatus.Charging, to: OCPP16ChargePointStatus.SuspendedEVSE },
- { from: OCPP16ChargePointStatus.Charging, to: OCPP16ChargePointStatus.Finishing },
- // { from: OCPP16ChargePointStatus.Charging, to: OCPP16ChargePointStatus.Reserved },
- { from: OCPP16ChargePointStatus.Charging, to: OCPP16ChargePointStatus.Unavailable },
- { from: OCPP16ChargePointStatus.Charging, to: OCPP16ChargePointStatus.Faulted },
- // { to: OCPP16ChargePointStatus.SuspendedEV },
- { from: OCPP16ChargePointStatus.SuspendedEV, to: OCPP16ChargePointStatus.Available },
- // { from: OCPP16ChargePointStatus.SuspendedEV, to: OCPP16ChargePointStatus.Preparing },
- { from: OCPP16ChargePointStatus.SuspendedEV, to: OCPP16ChargePointStatus.Charging },
- // { from: OCPP16ChargePointStatus.SuspendedEV, OCPP16ChargePointStatus.SuspendedEV },
- { from: OCPP16ChargePointStatus.SuspendedEV, to: OCPP16ChargePointStatus.SuspendedEVSE },
- { from: OCPP16ChargePointStatus.SuspendedEV, to: OCPP16ChargePointStatus.Finishing },
- // { from: OCPP16ChargePointStatus.SuspendedEV, to: OCPP16ChargePointStatus.Reserved },
- { from: OCPP16ChargePointStatus.SuspendedEV, to: OCPP16ChargePointStatus.Unavailable },
- { from: OCPP16ChargePointStatus.SuspendedEV, to: OCPP16ChargePointStatus.Faulted },
- // { to: OCPP16ChargePointStatus.SuspendedEVSE },
- { from: OCPP16ChargePointStatus.SuspendedEVSE, to: OCPP16ChargePointStatus.Available },
- // { from: OCPP16ChargePointStatus.SuspendedEVSE, to: OCPP16ChargePointStatus.Preparing },
- { from: OCPP16ChargePointStatus.SuspendedEVSE, to: OCPP16ChargePointStatus.Charging },
- { from: OCPP16ChargePointStatus.SuspendedEVSE, to: OCPP16ChargePointStatus.SuspendedEV },
- // { from: OCPP16ChargePointStatus.SuspendedEVSE, to: OCPP16ChargePointStatus.SuspendedEVSE },
- { from: OCPP16ChargePointStatus.SuspendedEVSE, to: OCPP16ChargePointStatus.Finishing },
- // { from: OCPP16ChargePointStatus.SuspendedEVSE, to: OCPP16ChargePointStatus.Reserved },
- { from: OCPP16ChargePointStatus.SuspendedEVSE, to: OCPP16ChargePointStatus.Unavailable },
- { from: OCPP16ChargePointStatus.SuspendedEVSE, to: OCPP16ChargePointStatus.Faulted },
- // { to: OCPP16ChargePointStatus.Finishing},
- { from: OCPP16ChargePointStatus.Finishing, to: OCPP16ChargePointStatus.Available },
- { from: OCPP16ChargePointStatus.Finishing, to: OCPP16ChargePointStatus.Preparing },
- // { from: OCPP16ChargePointStatus.Finishing, to: OCPP16ChargePointStatus.Charging },
- // { from: OCPP16ChargePointStatus.Finishing, to: OCPP16ChargePointStatus.SuspendedEV },
- // { from: OCPP16ChargePointStatus.Finishing, to: OCPP16ChargePointStatus.SuspendedEVSE },
- // { from: OCPP16ChargePointStatus.Finishing, to: OCPP16ChargePointStatus.Finishing },
- // { from: OCPP16ChargePointStatus.Finishing, to: OCPP16ChargePointStatus.Reserved },
- { from: OCPP16ChargePointStatus.Finishing, to: OCPP16ChargePointStatus.Unavailable },
- { from: OCPP16ChargePointStatus.Finishing, to: OCPP16ChargePointStatus.Faulted },
- // { to: OCPP16ChargePointStatus.Reserved },
- { from: OCPP16ChargePointStatus.Reserved, to: OCPP16ChargePointStatus.Available },
- { from: OCPP16ChargePointStatus.Reserved, to: OCPP16ChargePointStatus.Preparing },
- // { from: OCPP16ChargePointStatus.Reserved, to: OCPP16ChargePointStatus.Charging },
- // { from: OCPP16ChargePointStatus.Reserved, to: OCPP16ChargePointStatus.SuspendedEV },
- // { from: OCPP16ChargePointStatus.Reserved, to: OCPP16ChargePointStatus.SuspendedEVSE },
- // { from: OCPP16ChargePointStatus.Reserved, to: OCPP16ChargePointStatus.Finishing },
- // { from: OCPP16ChargePointStatus.Reserved, to: OCPP16ChargePointStatus.Reserved },
- { from: OCPP16ChargePointStatus.Reserved, to: OCPP16ChargePointStatus.Unavailable },
- { from: OCPP16ChargePointStatus.Reserved, to: OCPP16ChargePointStatus.Faulted },
- { to: OCPP16ChargePointStatus.Unavailable },
- { from: OCPP16ChargePointStatus.Unavailable, to: OCPP16ChargePointStatus.Available },
- { from: OCPP16ChargePointStatus.Unavailable, to: OCPP16ChargePointStatus.Preparing },
- { from: OCPP16ChargePointStatus.Unavailable, to: OCPP16ChargePointStatus.Charging },
- { from: OCPP16ChargePointStatus.Unavailable, to: OCPP16ChargePointStatus.SuspendedEV },
- { from: OCPP16ChargePointStatus.Unavailable, to: OCPP16ChargePointStatus.SuspendedEVSE },
- // { from: OCPP16ChargePointStatus.Unavailable, to: OCPP16ChargePointStatus.Finishing },
- // { from: OCPP16ChargePointStatus.Unavailable, to: OCPP16ChargePointStatus.Reserved },
- // { from: OCPP16ChargePointStatus.Unavailable, to: OCPP16ChargePointStatus.Unavailable },
- { from: OCPP16ChargePointStatus.Unavailable, to: OCPP16ChargePointStatus.Faulted },
- { to: OCPP16ChargePointStatus.Faulted },
- { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Available },
- { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Preparing },
- { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Charging },
- { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.SuspendedEV },
- { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.SuspendedEVSE },
- { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Finishing },
- { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Reserved },
- { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Unavailable },
- // { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Faulted },
- ]);
}
-import { OCPP20ConnectorStatusEnumType } from '../../../types';
+import { ConnectorStatusTransition, OCPP20ConnectorStatusEnumType } from '../../../types';
import { OCPPConstants } from '../internal';
-type Transition = Readonly<{
- from?: OCPP20ConnectorStatusEnumType;
- to: OCPP20ConnectorStatusEnumType;
-}>;
-
export class OCPP20Constants extends OCPPConstants {
- static readonly ChargingStationStatusTransitions: Readonly<Transition[]> = Object.freeze([
- { to: OCPP20ConnectorStatusEnumType.Available },
- // { from: OCPP20ConnectorStatusEnumType.Available, to: OCPP20ConnectorStatusEnumType.Available },
- {
- from: OCPP20ConnectorStatusEnumType.Available,
- to: OCPP20ConnectorStatusEnumType.Unavailable,
- },
- { from: OCPP20ConnectorStatusEnumType.Available, to: OCPP20ConnectorStatusEnumType.Faulted },
- { to: OCPP20ConnectorStatusEnumType.Unavailable },
- {
- from: OCPP20ConnectorStatusEnumType.Unavailable,
- to: OCPP20ConnectorStatusEnumType.Available,
- },
- // {
- // from: OCPP20ConnectorStatusEnumType.Unavailable,
- // to: OCPP20ConnectorStatusEnumType.Unavailable,
- // },
- { from: OCPP20ConnectorStatusEnumType.Unavailable, to: OCPP20ConnectorStatusEnumType.Faulted },
- { to: OCPP20ConnectorStatusEnumType.Faulted },
- { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Available },
- { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Unavailable },
- // { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Faulted },
- ]);
+ static readonly ChargingStationStatusTransitions: Readonly<ConnectorStatusTransition[]> =
+ Object.freeze([
+ { to: OCPP20ConnectorStatusEnumType.Available },
+ // { from: OCPP20ConnectorStatusEnumType.Available, to: OCPP20ConnectorStatusEnumType.Available },
+ {
+ from: OCPP20ConnectorStatusEnumType.Available,
+ to: OCPP20ConnectorStatusEnumType.Unavailable,
+ },
+ { from: OCPP20ConnectorStatusEnumType.Available, to: OCPP20ConnectorStatusEnumType.Faulted },
+ { to: OCPP20ConnectorStatusEnumType.Unavailable },
+ {
+ from: OCPP20ConnectorStatusEnumType.Unavailable,
+ to: OCPP20ConnectorStatusEnumType.Available,
+ },
+ // {
+ // from: OCPP20ConnectorStatusEnumType.Unavailable,
+ // to: OCPP20ConnectorStatusEnumType.Unavailable,
+ // },
+ {
+ from: OCPP20ConnectorStatusEnumType.Unavailable,
+ to: OCPP20ConnectorStatusEnumType.Faulted,
+ },
+ { to: OCPP20ConnectorStatusEnumType.Faulted },
+ { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Available },
+ {
+ from: OCPP20ConnectorStatusEnumType.Faulted,
+ to: OCPP20ConnectorStatusEnumType.Unavailable,
+ },
+ // { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Faulted },
+ ]);
- static readonly ConnectorStatusTransitions: Readonly<Transition[]> = Object.freeze([
- { to: OCPP20ConnectorStatusEnumType.Available },
- // { from: OCPP20ConnectorStatusEnumType.Available, to: OCPP20ConnectorStatusEnumType.Available },
- { from: OCPP20ConnectorStatusEnumType.Available, to: OCPP20ConnectorStatusEnumType.Occupied },
- { from: OCPP20ConnectorStatusEnumType.Available, to: OCPP20ConnectorStatusEnumType.Reserved },
- {
- from: OCPP20ConnectorStatusEnumType.Available,
- to: OCPP20ConnectorStatusEnumType.Unavailable,
- },
- { from: OCPP20ConnectorStatusEnumType.Available, to: OCPP20ConnectorStatusEnumType.Faulted },
- // { to: OCPP20ConnectorStatusEnumType.Occupied },
- { from: OCPP20ConnectorStatusEnumType.Occupied, to: OCPP20ConnectorStatusEnumType.Available },
- // { from: OCPP20ConnectorStatusEnumType.Occupied, to: OCPP20ConnectorStatusEnumType.Occupied },
- // { from: OCPP20ConnectorStatusEnumType.Occupied, to: OCPP20ConnectorStatusEnumType.Reserved },
- { from: OCPP20ConnectorStatusEnumType.Occupied, to: OCPP20ConnectorStatusEnumType.Unavailable },
- { from: OCPP20ConnectorStatusEnumType.Occupied, to: OCPP20ConnectorStatusEnumType.Faulted },
- // { to: OCPP20ConnectorStatusEnumType.Reserved },
- { from: OCPP20ConnectorStatusEnumType.Reserved, to: OCPP20ConnectorStatusEnumType.Available },
- { from: OCPP20ConnectorStatusEnumType.Reserved, to: OCPP20ConnectorStatusEnumType.Occupied },
- // { from: OCPP20ConnectorStatusEnumType.Reserved, to: OCPP20ConnectorStatusEnumType.Reserved },
- { from: OCPP20ConnectorStatusEnumType.Reserved, to: OCPP20ConnectorStatusEnumType.Unavailable },
- { from: OCPP20ConnectorStatusEnumType.Reserved, to: OCPP20ConnectorStatusEnumType.Faulted },
- { to: OCPP20ConnectorStatusEnumType.Unavailable },
- {
- from: OCPP20ConnectorStatusEnumType.Unavailable,
- to: OCPP20ConnectorStatusEnumType.Available,
- },
- { from: OCPP20ConnectorStatusEnumType.Unavailable, to: OCPP20ConnectorStatusEnumType.Occupied },
- // { from: OCPP20ConnectorStatusEnumType.Unavailable, to: OCPP20ConnectorStatusEnumType.Reserved },
- // { from: OCPP20ConnectorStatusEnumType.Unavailable, to: OCPP20ConnectorStatusEnumType.Unavailable },
- { from: OCPP20ConnectorStatusEnumType.Unavailable, to: OCPP20ConnectorStatusEnumType.Faulted },
- { to: OCPP20ConnectorStatusEnumType.Faulted },
- { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Available },
- { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Occupied },
- { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Reserved },
- { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Unavailable },
- // { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Faulted },
- ]);
+ static readonly ConnectorStatusTransitions: Readonly<ConnectorStatusTransition[]> = Object.freeze(
+ [
+ { to: OCPP20ConnectorStatusEnumType.Available },
+ // { from: OCPP20ConnectorStatusEnumType.Available, to: OCPP20ConnectorStatusEnumType.Available },
+ { from: OCPP20ConnectorStatusEnumType.Available, to: OCPP20ConnectorStatusEnumType.Occupied },
+ { from: OCPP20ConnectorStatusEnumType.Available, to: OCPP20ConnectorStatusEnumType.Reserved },
+ {
+ from: OCPP20ConnectorStatusEnumType.Available,
+ to: OCPP20ConnectorStatusEnumType.Unavailable,
+ },
+ { from: OCPP20ConnectorStatusEnumType.Available, to: OCPP20ConnectorStatusEnumType.Faulted },
+ // { to: OCPP20ConnectorStatusEnumType.Occupied },
+ { from: OCPP20ConnectorStatusEnumType.Occupied, to: OCPP20ConnectorStatusEnumType.Available },
+ // { from: OCPP20ConnectorStatusEnumType.Occupied, to: OCPP20ConnectorStatusEnumType.Occupied },
+ // { from: OCPP20ConnectorStatusEnumType.Occupied, to: OCPP20ConnectorStatusEnumType.Reserved },
+ {
+ from: OCPP20ConnectorStatusEnumType.Occupied,
+ to: OCPP20ConnectorStatusEnumType.Unavailable,
+ },
+ { from: OCPP20ConnectorStatusEnumType.Occupied, to: OCPP20ConnectorStatusEnumType.Faulted },
+ // { to: OCPP20ConnectorStatusEnumType.Reserved },
+ { from: OCPP20ConnectorStatusEnumType.Reserved, to: OCPP20ConnectorStatusEnumType.Available },
+ { from: OCPP20ConnectorStatusEnumType.Reserved, to: OCPP20ConnectorStatusEnumType.Occupied },
+ // { from: OCPP20ConnectorStatusEnumType.Reserved, to: OCPP20ConnectorStatusEnumType.Reserved },
+ {
+ from: OCPP20ConnectorStatusEnumType.Reserved,
+ to: OCPP20ConnectorStatusEnumType.Unavailable,
+ },
+ { from: OCPP20ConnectorStatusEnumType.Reserved, to: OCPP20ConnectorStatusEnumType.Faulted },
+ { to: OCPP20ConnectorStatusEnumType.Unavailable },
+ {
+ from: OCPP20ConnectorStatusEnumType.Unavailable,
+ to: OCPP20ConnectorStatusEnumType.Available,
+ },
+ {
+ from: OCPP20ConnectorStatusEnumType.Unavailable,
+ to: OCPP20ConnectorStatusEnumType.Occupied,
+ },
+ // { from: OCPP20ConnectorStatusEnumType.Unavailable, to: OCPP20ConnectorStatusEnumType.Reserved },
+ // { from: OCPP20ConnectorStatusEnumType.Unavailable, to: OCPP20ConnectorStatusEnumType.Unavailable },
+ {
+ from: OCPP20ConnectorStatusEnumType.Unavailable,
+ to: OCPP20ConnectorStatusEnumType.Faulted,
+ },
+ { to: OCPP20ConnectorStatusEnumType.Faulted },
+ { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Available },
+ { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Occupied },
+ { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Reserved },
+ {
+ from: OCPP20ConnectorStatusEnumType.Faulted,
+ to: OCPP20ConnectorStatusEnumType.Unavailable,
+ },
+ // { from: OCPP20ConnectorStatusEnumType.Faulted, to: OCPP20ConnectorStatusEnumType.Faulted },
+ ]
+ );
}