build(simulator): constants, requests and responses for reservation scenario added
authorJulian Buecher <julian.buecher@gmx.de>
Wed, 24 May 2023 20:51:52 +0000 (22:51 +0200)
committerJulian Buecher <julian.buecher@gmx.de>
Wed, 24 May 2023 20:51:52 +0000 (22:51 +0200)
src/types/ocpp/1.6/Requests.ts
src/types/ocpp/1.6/Responses.ts
src/types/ocpp/Responses.ts

index 60c1787fefe5e06972a72dfcd5ba730e013f3350..786ea617be0fb38e518003d52ffcacd007ca82af 100644 (file)
@@ -183,3 +183,15 @@ export interface OCPP16DataTransferRequest extends JsonObject {
   messageId?: string;
   data?: string;
 }
+
+export interface OCPP16ReserveNowRequest {
+  connectorId: string;
+  expiryDate: Date;
+  idTag: string;
+  parentIdTag?: string;
+  reservationId: number;
+}
+
+export interface OCPP16CancelReservationRequest {
+  reservationId: number;
+}
index a6683caa87962b9050f6ef9fa1d4e7b8a3b48f2c..6a5ebfe4cd7b4ae58762f67b6697d748dd1ceb58 100644 (file)
@@ -109,3 +109,24 @@ export interface OCPP16DataTransferResponse extends JsonObject {
   status: OCPP16DataTransferStatus;
   data?: string;
 }
+
+export enum OCPP16ReservationStatus {
+  ACCEPTED = 'Accepted',
+  FAULTED = 'Faulted',
+  OCCUPIED = 'Occupied',
+  REJECTED = 'Rejected',
+  UNAVAILABLE = 'Unavailable',
+}
+
+export interface OCPP16ReserveNowResponse {
+  status: OCPP16ReservationStatus;
+}
+
+export enum OCPP16CancelReservationStatus {
+  ACCEPTED = 'Accepted',
+  REJECTED = 'Rejected',
+}
+
+export interface OCPP16CancelReservationResponse {
+  status: OCPP16CancelReservationStatus;
+}
index 24b8b848bebe9656660c4c884af6faf5a75df932..da5948a92fe7fca90ab0d4b3f5144cd1a5a0432b 100644 (file)
@@ -2,6 +2,7 @@ import type { OCPP16MeterValuesResponse } from './1.6/MeterValues';
 import {
   OCPP16AvailabilityStatus,
   type OCPP16BootNotificationResponse,
+  OCPP16CancelReservationStatus,
   OCPP16ChargingProfileStatus,
   OCPP16ClearChargingProfileStatus,
   OCPP16ConfigurationStatus,
@@ -10,6 +11,7 @@ import {
   type OCPP16DiagnosticsStatusNotificationResponse,
   type OCPP16FirmwareStatusNotificationResponse,
   type OCPP16HeartbeatResponse,
+  OCPP16ReservationStatus,
   type OCPP16StatusNotificationResponse,
   OCPP16TriggerMessageStatus,
   OCPP16UnlockStatus,
@@ -103,3 +105,15 @@ export const DataTransferStatus = {
   ...OCPP16DataTransferStatus,
 } as const;
 export type DataTransferStatus = OCPP16DataTransferStatus;
+
+export type ReservationStatus = OCPP16ReservationStatus;
+
+export const ReservationStatus = {
+  ...OCPP16ReservationStatus,
+};
+
+export type CancelReservationStatus = OCPP16CancelReservationStatus;
+
+export const CancelReservationStatus = {
+  ...OCPP16CancelReservationStatus,
+};