// eslint-disable-next-line @typescript-eslint/no-misused-promises
this.heartbeatSetInterval = setInterval(async (): Promise<void> => {
await this.ocppRequestService.requestHandler<HeartbeatRequest, HeartbeatResponse>(
+ this,
RequestCommand.HEARTBEAT
);
}, this.getHeartbeatInterval());
interval
);
await this.ocppRequestService.requestHandler<MeterValuesRequest, MeterValuesResponse>(
+ this,
RequestCommand.METER_VALUES,
{
connectorId,
await this.ocppRequestService.requestHandler<
StatusNotificationRequest,
StatusNotificationResponse
- >(RequestCommand.STATUS_NOTIFICATION, {
+ >(this, RequestCommand.STATUS_NOTIFICATION, {
connectorId,
status: ChargePointStatus.UNAVAILABLE,
errorCode: ChargePointErrorCode.NO_ERROR,
switch (this.getOcppVersion()) {
case OCPPVersion.VERSION_16:
this.ocppIncomingRequestService =
- OCPP16IncomingRequestService.getInstance<OCPP16IncomingRequestService>(this);
+ OCPP16IncomingRequestService.getInstance<OCPP16IncomingRequestService>();
this.ocppRequestService = OCPP16RequestService.getInstance<OCPP16RequestService>(
- this,
- OCPP16ResponseService.getInstance<OCPP16ResponseService>(this)
+ OCPP16ResponseService.getInstance<OCPP16ResponseService>()
);
break;
default:
BootNotificationRequest,
BootNotificationResponse
>(
+ this,
RequestCommand.BOOT_NOTIFICATION,
{
chargePointModel: this.bootNotificationRequest.chargePointModel,
);
// Process the message
await this.ocppIncomingRequestService.incomingRequestHandler(
+ this,
messageId,
commandName,
commandPayload
// Send error
messageType === MessageType.CALL_MESSAGE &&
(await this.ocppRequestService.sendError(
+ this,
messageId,
error as OCPPError,
commandName ?? requestCommandName ?? null
BootNotificationRequest,
BootNotificationResponse
>(
+ this,
RequestCommand.BOOT_NOTIFICATION,
{
chargePointModel: this.bootNotificationRequest.chargePointModel,
await this.ocppRequestService.requestHandler<
StatusNotificationRequest,
StatusNotificationResponse
- >(RequestCommand.STATUS_NOTIFICATION, {
+ >(this, RequestCommand.STATUS_NOTIFICATION, {
connectorId,
status: this.getConnectorStatus(connectorId).bootStatus,
errorCode: ChargePointErrorCode.NO_ERROR,
await this.ocppRequestService.requestHandler<
StatusNotificationRequest,
StatusNotificationResponse
- >(RequestCommand.STATUS_NOTIFICATION, {
+ >(this, RequestCommand.STATUS_NOTIFICATION, {
connectorId,
status: this.getConnectorStatus(connectorId).bootStatus,
errorCode: ChargePointErrorCode.NO_ERROR,
await this.ocppRequestService.requestHandler<
StatusNotificationRequest,
StatusNotificationResponse
- >(RequestCommand.STATUS_NOTIFICATION, {
+ >(this, RequestCommand.STATUS_NOTIFICATION, {
connectorId,
status: this.getConnectorStatus(connectorId).status,
errorCode: ChargePointErrorCode.NO_ERROR,
await this.ocppRequestService.requestHandler<
StatusNotificationRequest,
StatusNotificationResponse
- >(RequestCommand.STATUS_NOTIFICATION, {
+ >(this, RequestCommand.STATUS_NOTIFICATION, {
connectorId,
status: ChargePointStatus.AVAILABLE,
errorCode: ChargePointErrorCode.NO_ERROR,
this.getEnergyActiveImportRegisterByTransactionId(transactionId)
);
await this.ocppRequestService.requestHandler<MeterValuesRequest, MeterValuesResponse>(
+ this,
RequestCommand.METER_VALUES,
{
connectorId,
await this.ocppRequestService.requestHandler<
StopTransactionRequest,
StopTransactionResponse
- >(RequestCommand.STOP_TRANSACTION, {
+ >(this, RequestCommand.STOP_TRANSACTION, {
transactionId,
meterStop: this.getEnergyActiveImportRegisterByTransactionId(transactionId),
idTag: this.getTransactionIdTag(transactionId),