Add charging station instance id
[e-mobility-charging-stations-simulator.git] / src / charging-station / ChargingStation.ts
index e05ad162d24a1d28dc02df1bb67f2d42b7134826..84756ab7caec814b9ac8f2d90a3f5ef91e609948 100644 (file)
@@ -52,6 +52,7 @@ export default class ChargingStation {
   public performanceStatistics!: PerformanceStatistics;
   public heartbeatSetInterval!: NodeJS.Timeout;
   public ocppRequestService!: OCPPRequestService;
+  private readonly id: string;
   private readonly index: number;
   private bootNotificationRequest!: BootNotificationRequest;
   private bootNotificationResponse!: BootNotificationResponse | null;
@@ -66,6 +67,7 @@ export default class ChargingStation {
   private webSocketPingSetInterval!: NodeJS.Timeout;
 
   constructor(index: number, stationTemplateFile: string) {
+    this.id = Utils.generateUUID();
     this.index = index;
     this.stationTemplateFile = stationTemplateFile;
     this.connectors = new Map<number, ConnectorStatus>();