refactor: cleanup loops over object keys
[e-mobility-charging-stations-simulator.git] / src / charging-station / ChargingStation.ts
index ba43ff985da31965f8900c21666361844b782c52..1494cc56365d983ec779c50dbd858af18cad739f 100644 (file)
@@ -250,10 +250,6 @@ export class ChargingStation {
     return this.stationInfo.mustAuthorizeAtRemoteStart ?? true;
   }
 
-  public getPayloadSchemaValidation(): boolean {
-    return this.stationInfo.payloadSchemaValidation ?? true;
-  }
-
   public getNumberOfPhases(stationInfo?: ChargingStationInfo): number | undefined {
     const localStationInfo: ChargingStationInfo = stationInfo ?? this.stationInfo;
     switch (this.getCurrentOutType(stationInfo)) {
@@ -352,7 +348,7 @@ export class ChargingStation {
   }
 
   public getOcppStrictCompliance(): boolean {
-    return this.stationInfo?.ocppStrictCompliance ?? false;
+    return this.stationInfo?.ocppStrictCompliance ?? true;
   }
 
   public getVoltageOut(stationInfo?: ChargingStationInfo): number | undefined {
@@ -698,9 +694,9 @@ export class ChargingStation {
                   } file have changed, reload`
                 );
                 this.sharedLRUCache.deleteChargingStationTemplate(this.templateFileHash);
-                // FIXME: cleanup idtags cache if idtags file has changed
                 // Initialize
                 this.initialize();
+                this.idTagsCache.deleteIdTags(getIdTagsFile(this.stationInfo));
                 // Restart the ATG
                 this.stopAutomaticTransactionGenerator();
                 if (this.getAutomaticTransactionGeneratorConfiguration()?.enable === true) {
@@ -984,9 +980,9 @@ export class ChargingStation {
       case ReservationTerminationReason.TRANSACTION_STARTED:
         delete connector.reservation;
         break;
-      case ReservationTerminationReason.RESERVATION_CANCELED ||
-        ReservationTerminationReason.REPLACE_EXISTING ||
-        ReservationTerminationReason.EXPIRED:
+      case ReservationTerminationReason.RESERVATION_CANCELED:
+      case ReservationTerminationReason.REPLACE_EXISTING:
+      case ReservationTerminationReason.EXPIRED:
         await OCPPServiceUtils.sendAndSetConnectorStatus(
           this,
           reservation.connectorId,