+ if (
+ this.chargingStation.getBeginEndMeterValues() &&
+ this.chargingStation.getOcppStrictCompliance() &&
+ !this.chargingStation.getOutOfOrderEndMeterValues()
+ ) {
+ // FIXME: Implement OCPP version agnostic helpers
+ const transactionEndMeterValue = OCPP16ServiceUtils.buildTransactionEndMeterValue(
+ this.chargingStation,
+ connectorId,
+ this.chargingStation.getEnergyActiveImportRegisterByTransactionId(transactionId)
+ );
+ await this.chargingStation.ocppRequestService.sendMessageHandler<
+ OCPP16MeterValuesRequest,
+ OCPP16MeterValuesResponse
+ >(OCPP16RequestCommand.METER_VALUES, {
+ connectorId,
+ transactionId,
+ meterValue: transactionEndMeterValue,
+ });
+ }
+ const stopResponse = await this.chargingStation.ocppRequestService.sendMessageHandler<
+ OCPP16StopTransactionRequest,
+ OCPP16StopTransactionResponse
+ >(OCPP16RequestCommand.STOP_TRANSACTION, {