connectorId,
this.chargingStation.getEnergyActiveImportRegisterByTransactionId(transactionId)
);
- await this.chargingStation.ocppRequestService.sendTransactionEndMeterValues(
- connectorId,
- transactionId,
- transactionEndMeterValue
+ await this.chargingStation.ocppRequestService.sendMessageHandler(
+ RequestCommand.METER_VALUES,
+ {
+ connectorId,
+ transactionId,
+ meterValue: transactionEndMeterValue,
+ }
);
}
stopResponse = (await this.chargingStation.ocppRequestService.sendMessageHandler(
connectorId,
this.getEnergyActiveImportRegisterByTransactionId(transactionId)
);
- await this.ocppRequestService.sendTransactionEndMeterValues(
+ await this.ocppRequestService.sendMessageHandler(RequestCommand.METER_VALUES, {
connectorId,
transactionId,
- transactionEndMeterValue
- );
+ meterValue: transactionEndMeterValue,
+ });
}
await this.ocppRequestService.sendMessageHandler(RequestCommand.STOP_TRANSACTION, {
transactionId,
connectorId,
this.chargingStation.getEnergyActiveImportRegisterByTransactionId(transactionId)
);
- await this.chargingStation.ocppRequestService.sendTransactionEndMeterValues(
- connectorId,
- transactionId,
- transactionEndMeterValue
+ await this.chargingStation.ocppRequestService.sendMessageHandler(
+ OCPP16RequestCommand.METER_VALUES,
+ {
+ connectorId,
+ transactionId,
+ meterValue: transactionEndMeterValue,
+ }
);
}
const stopResponse = (await this.chargingStation.ocppRequestService.sendMessageHandler(
connectorId,
this.chargingStation.getEnergyActiveImportRegisterByTransactionId(transactionId)
);
- await this.chargingStation.ocppRequestService.sendTransactionEndMeterValues(
- connectorId,
- transactionId,
- transactionEndMeterValue
+ await this.chargingStation.ocppRequestService.sendMessageHandler(
+ OCPP16RequestCommand.METER_VALUES,
+ {
+ connectorId,
+ transactionId,
+ meterValue: transactionEndMeterValue,
+ }
);
}
await this.chargingStation.ocppRequestService.sendMessageHandler(
);
}
- public async sendTransactionEndMeterValues(
- connectorId: number,
- transactionId: number,
- endMeterValue: OCPP16MeterValue
- ): Promise<void> {
- const payload: MeterValuesRequest = {
- connectorId,
- transactionId,
- meterValue: [endMeterValue],
- };
- await this.sendMessage(Utils.generateUUID(), payload, OCPP16RequestCommand.METER_VALUES);
- }
-
public async sendDiagnosticsStatusNotification(
diagnosticsStatus: OCPP16DiagnosticsStatus
): Promise<void> {
this.chargingStation.getBeginEndMeterValues() &&
!this.chargingStation.getOcppStrictCompliance() &&
this.chargingStation.getOutOfOrderEndMeterValues() &&
- (await this.chargingStation.ocppRequestService.sendTransactionEndMeterValues(
- transactionConnectorId,
- requestPayload.transactionId,
- OCPP16ServiceUtils.buildTransactionEndMeterValue(
- this.chargingStation,
- transactionConnectorId,
- requestPayload.meterStop
- )
+ (await this.chargingStation.ocppRequestService.sendMessageHandler(
+ OCPP16RequestCommand.METER_VALUES,
+ {
+ connectorId: transactionConnectorId,
+ transactionId: requestPayload.transactionId,
+ meterValue: OCPP16ServiceUtils.buildTransactionEndMeterValue(
+ this.chargingStation,
+ transactionConnectorId,
+ requestPayload.meterStop
+ ),
+ }
));
if (
!this.chargingStation.isChargingStationAvailable() ||
params?: SendParams
): Promise<ResponseType>;
- public abstract sendTransactionEndMeterValues(
- connectorId: number,
- transactionId: number,
- endMeterValue: MeterValue
- ): Promise<void>;
-
public abstract sendDiagnosticsStatusNotification(
diagnosticsStatus: DiagnosticsStatus
): Promise<void>;