refactor(simulator): remove unneeded condition check in log message
[e-mobility-charging-stations-simulator.git] / src / charging-station / ChargingStationUtils.ts
index 9d23f1b4d7e6135f94f9205b57c03b8b6ed175c8..efa8921c645707a293ecbd7a2b60dcb3de1d84c4 100644 (file)
@@ -4,31 +4,34 @@ import { fileURLToPath } from 'node:url';
 
 import moment from 'moment';
 
-import type ChargingStation from './ChargingStation';
-import BaseError from '../exception/BaseError';
-import type { ChargingStationInfo } from '../types/ChargingStationInfo';
+import type { ChargingStation } from './internal';
+import { BaseError } from '../exception';
 import {
   AmpereUnits,
+  type BootNotificationRequest,
+  BootReasonEnumType,
+  type ChargingProfile,
+  ChargingProfileKindType,
+  ChargingRateUnitType,
+  type ChargingSchedulePeriod,
+  type ChargingStationInfo,
   type ChargingStationTemplate,
   CurrentType,
+  type OCPP16BootNotificationRequest,
+  type OCPP20BootNotificationRequest,
+  OCPPVersion,
+  RecurrencyKindType,
   Voltage,
-} from '../types/ChargingStationTemplate';
-import { ChargingProfileKindType, RecurrencyKindType } from '../types/ocpp/1.6/ChargingProfile';
-import type { OCPP16BootNotificationRequest } from '../types/ocpp/1.6/Requests';
-import { BootReasonEnumType, type OCPP20BootNotificationRequest } from '../types/ocpp/2.0/Requests';
+} from '../types';
 import {
-  type ChargingProfile,
-  ChargingRateUnitType,
-  type ChargingSchedulePeriod,
-} from '../types/ocpp/ChargingProfile';
-import { OCPPVersion } from '../types/ocpp/OCPPVersion';
-import type { BootNotificationRequest } from '../types/ocpp/Requests';
-import { WorkerProcessType } from '../types/Worker';
-import Configuration from '../utils/Configuration';
-import Constants from '../utils/Constants';
-import { ACElectricUtils, DCElectricUtils } from '../utils/ElectricUtils';
-import logger from '../utils/Logger';
-import Utils from '../utils/Utils';
+  ACElectricUtils,
+  Configuration,
+  Constants,
+  DCElectricUtils,
+  Utils,
+  logger,
+} from '../utils';
+import { WorkerProcessType } from '../worker';
 
 const moduleName = 'ChargingStationUtils';
 
@@ -191,13 +194,13 @@ export class ChargingStationUtils {
   }
 
   public static workerPoolInUse(): boolean {
-    return [WorkerProcessType.DYNAMIC_POOL, WorkerProcessType.STATIC_POOL].includes(
+    return [WorkerProcessType.dynamicPool, WorkerProcessType.staticPool].includes(
       Configuration.getWorker().processType
     );
   }
 
   public static workerDynamicPoolInUse(): boolean {
-    return Configuration.getWorker().processType === WorkerProcessType.DYNAMIC_POOL;
+    return Configuration.getWorker().processType === WorkerProcessType.dynamicPool;
   }
 
   public static warnDeprecatedTemplateKey(