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(
info.bytes / 1024
} bytes transferred from diagnostics archive ${info.name}`
);
- await this.chargingStation.ocppRequestService.sendDiagnosticsStatusNotification(
- OCPP16DiagnosticsStatus.Uploading
+ await this.chargingStation.ocppRequestService.sendMessageHandler(
+ OCPP16RequestCommand.DIAGNOSTICS_STATUS_NOTIFICATION,
+ {
+ status: OCPP16DiagnosticsStatus.Uploading,
+ }
);
});
uploadResponse = await ftpClient.uploadFrom(
uri.pathname + diagnosticsArchive
);
if (uploadResponse.code === 226) {
- await this.chargingStation.ocppRequestService.sendDiagnosticsStatusNotification(
- OCPP16DiagnosticsStatus.Uploaded
+ await this.chargingStation.ocppRequestService.sendMessageHandler(
+ OCPP16RequestCommand.DIAGNOSTICS_STATUS_NOTIFICATION,
+ {
+ status: OCPP16DiagnosticsStatus.Uploaded,
+ }
);
if (ftpClient) {
ftpClient.close();
OCPP16IncomingRequestCommand.GET_DIAGNOSTICS
);
} catch (error) {
- await this.chargingStation.ocppRequestService.sendDiagnosticsStatusNotification(
- OCPP16DiagnosticsStatus.UploadFailed
+ await this.chargingStation.ocppRequestService.sendMessageHandler(
+ OCPP16RequestCommand.DIAGNOSTICS_STATUS_NOTIFICATION,
+ {
+ status: OCPP16DiagnosticsStatus.UploadFailed,
+ }
);
if (ftpClient) {
ftpClient.close();
uri.protocol
} to transfer the diagnostic logs archive`
);
- await this.chargingStation.ocppRequestService.sendDiagnosticsStatusNotification(
- OCPP16DiagnosticsStatus.UploadFailed
+ await this.chargingStation.ocppRequestService.sendMessageHandler(
+ OCPP16RequestCommand.DIAGNOSTICS_STATUS_NOTIFICATION,
+ {
+ status: OCPP16DiagnosticsStatus.UploadFailed,
+ }
);
return Constants.OCPP_RESPONSE_EMPTY;
}