await this.stopTransaction(connectorId);
}
} else {
- this.connectorsStatus.get(connectorId).skippedConsecutiveTransactions++;
- this.connectorsStatus.get(connectorId).skippedTransactions++;
+ ++this.connectorsStatus.get(connectorId).skippedConsecutiveTransactions;
+ ++this.connectorsStatus.get(connectorId).skippedTransactions;
logger.info(
`${this.logPrefix(connectorId)} skipped consecutively ${this.connectorsStatus
.get(connectorId)
this.connectorsStatus.get(connectorId).stopDate = new Date(
this.connectorsStatus.get(connectorId).startDate.getTime() +
(this.chargingStation.getAutomaticTransactionGeneratorConfiguration().stopAfterHours ??
- Constants.CHARGING_STATION_ATG_DEFAULT_STOP_AFTER_HOURS) *
+ Constants.DEFAULT_ATG_STOP_AFTER_HOURS) *
3600 *
1000 -
previousRunDuration
>(this.chargingStation, RequestCommand.AUTHORIZE, {
idTag,
});
- this.connectorsStatus.get(connectorId).authorizeRequests++;
+ ++this.connectorsStatus.get(connectorId).authorizeRequests;
if (authorizeResponse?.idTagInfo?.status === AuthorizationStatus.ACCEPTED) {
- this.connectorsStatus.get(connectorId).acceptedAuthorizeRequests++;
+ ++this.connectorsStatus.get(connectorId).acceptedAuthorizeRequests;
logger.info(startTransactionLogMsg);
// Start transaction
startResponse = await this.chargingStation.ocppRequestService.requestHandler<
PerformanceStatistics.endMeasure(measureId, beginId);
return startResponse;
}
- this.connectorsStatus.get(connectorId).rejectedAuthorizeRequests++;
+ ++this.connectorsStatus.get(connectorId).rejectedAuthorizeRequests;
PerformanceStatistics.endMeasure(measureId, beginId);
return startResponse;
}
let stopResponse: StopTransactionResponse;
if (this.chargingStation.getConnectorStatus(connectorId)?.transactionStarted === true) {
stopResponse = await this.chargingStation.stopTransactionOnConnector(connectorId, reason);
- this.connectorsStatus.get(connectorId).stopTransactionRequests++;
+ ++this.connectorsStatus.get(connectorId).stopTransactionRequests;
if (stopResponse?.idTagInfo?.status === AuthorizationStatus.ACCEPTED) {
- this.connectorsStatus.get(connectorId).acceptedStopTransactionRequests++;
+ ++this.connectorsStatus.get(connectorId).acceptedStopTransactionRequests;
} else {
- this.connectorsStatus.get(connectorId).rejectedStopTransactionRequests++;
+ ++this.connectorsStatus.get(connectorId).rejectedStopTransactionRequests;
}
} else {
const transactionId = this.chargingStation.getConnectorStatus(connectorId)?.transactionId;
connectorId: number,
startResponse: StartTransactionResponse
): void {
- this.connectorsStatus.get(connectorId).startTransactionRequests++;
+ ++this.connectorsStatus.get(connectorId).startTransactionRequests;
if (startResponse?.idTagInfo?.status === AuthorizationStatus.ACCEPTED) {
- this.connectorsStatus.get(connectorId).acceptedStartTransactionRequests++;
+ ++this.connectorsStatus.get(connectorId).acceptedStartTransactionRequests;
} else {
logger.warn(`${this.logPrefix(connectorId)} start transaction rejected`);
- this.connectorsStatus.get(connectorId).rejectedStartTransactionRequests++;
+ ++this.connectorsStatus.get(connectorId).rejectedStartTransactionRequests;
}
}
}