X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FAutomaticTransactionGenerator.ts;h=3c2a2c38c80abf3b4eb7e32df83c453ec10bc8b0;hb=b2b606263e2676354259164d532ff9aa91ccdf87;hp=233f2519dcb4c8b120fe20d74293505af9c38761;hpb=9bf0ef23c51160abc6866ad8d07eea85e308edb8;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/AutomaticTransactionGenerator.ts b/src/charging-station/AutomaticTransactionGenerator.ts index 233f2519..3c2a2c38 100644 --- a/src/charging-station/AutomaticTransactionGenerator.ts +++ b/src/charging-station/AutomaticTransactionGenerator.ts @@ -3,7 +3,7 @@ import { AsyncResource } from 'node:async_hooks'; import type { ChargingStation } from './ChargingStation'; -import { ChargingStationUtils } from './ChargingStationUtils'; +import { checkChargingStation } from './ChargingStationUtils'; import { IdTagsCache } from './IdTagsCache'; import { BaseError } from '../exception'; import { PerformanceStatistics } from '../performance'; @@ -68,9 +68,7 @@ export class AutomaticTransactionGenerator extends AsyncResource { } public start(): void { - if ( - ChargingStationUtils.checkChargingStation(this.chargingStation, this.logPrefix()) === false - ) { + if (checkChargingStation(this.chargingStation, this.logPrefix()) === false) { return; } if (this.started === true) { @@ -103,12 +101,7 @@ export class AutomaticTransactionGenerator extends AsyncResource { } public startConnector(connectorId: number): void { - if ( - ChargingStationUtils.checkChargingStation( - this.chargingStation, - this.logPrefix(connectorId) - ) === false - ) { + if (checkChargingStation(this.chargingStation, this.logPrefix(connectorId)) === false) { return; } if (this.connectorsStatus.has(connectorId) === false) {