X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2Focpp%2FOCPPConstants.ts;h=f8a5fa35046804a83544e124460bffd54bfb2d2a;hb=26a17d9368bd65430bea2a04d23df8ebe84aeac2;hp=e82b7d70a6704110df3950baeb059e01df9ce28a;hpb=b63b4a73f7869a2ff31e5bd259d056faaa53a5de;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ocpp/OCPPConstants.ts b/src/charging-station/ocpp/OCPPConstants.ts index e82b7d70..f8a5fa35 100644 --- a/src/charging-station/ocpp/OCPPConstants.ts +++ b/src/charging-station/ocpp/OCPPConstants.ts @@ -9,6 +9,7 @@ import { TriggerMessageStatus, UnlockStatus, } from '../../types'; +import { ReservationStatus } from '../../types/ocpp/Responses'; import { Constants } from '../../utils'; export class OCPPConstants { @@ -109,6 +110,34 @@ export class OCPPConstants { status: DataTransferStatus.UNKNOWN_VENDOR_ID, }); + static readonly OCPP_RESERVATION_RESPONSE_ACCEPTED = Object.freeze({ + status: ReservationStatus.ACCEPTED, + }); // Reservation has been made + + static readonly OCPP_RESERVATION_RESPONSE_FAULTED = Object.freeze({ + status: ReservationStatus.FAULTED, + }); // Reservation has not been made, because of connector in FAULTED state + + static readonly OCPP_RESERVATION_RESPONSE_OCCUPIED = Object.freeze({ + status: ReservationStatus.OCCUPIED, + }); // Reservation has not been made, because all connectors are OCCUPIED + + static readonly OCPP_RESERVATION_RESPONSE_REJECTED = Object.freeze({ + status: ReservationStatus.REJECTED, + }); // Reservation has not been made, because charging station is not configured to accept reservations + + static readonly OCPP_RESERVATION_RESPONSE_UNAVAILABLE = Object.freeze({ + status: ReservationStatus.UNAVAILABLE, + }); // Reservation has not been made, because connectors are spec. connector is in UNAVAILABLE state + + static readonly OCPP_CANCEL_RESERVATION_RESPONSE_ACCEPTED = Object.freeze({ + status: GenericStatus.Accepted, + }); // Reservation for id has been cancelled has been made + + static readonly OCPP_CANCEL_RESERVATION_RESPONSE_REJECTED = Object.freeze({ + status: GenericStatus.Rejected, + }); // Reservation could not be cancelled, because there is no reservation active for id + protected constructor() { // This is intentional }