} from '../../../types/ocpp/1.6/Transaction';
import {
OCPP16BootNotificationRequest,
- OCPP16HeartbeatRequest,
OCPP16RequestCommand,
OCPP16StatusNotificationRequest,
} from '../../../types/ocpp/1.6/Requests';
import {
OCPP16BootNotificationResponse,
- OCPP16HeartbeatResponse,
OCPP16RegistrationStatus,
OCPP16StatusNotificationResponse,
} from '../../../types/ocpp/1.6/Responses';
]);
}
- public async handleResponse(
+ public async responseHandler(
commandName: OCPP16RequestCommand,
- payload: JsonType | string,
+ payload: JsonType,
requestPayload: JsonType
): Promise<void> {
if (
}
}
- private handleResponseHeartbeat(
- payload: OCPP16HeartbeatResponse,
- requestPayload: OCPP16HeartbeatRequest
- ): void {
- logger.debug(
- this.chargingStation.logPrefix() +
- ' Heartbeat response received: %j to Heartbeat request: %j',
- payload,
- requestPayload
- );
- }
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
+ private handleResponseHeartbeat(): void {}
private handleResponseAuthorize(
payload: OCPP16AuthorizeResponse,
requestPayload.meterStart
);
this.chargingStation.getBeginEndMeterValues() &&
- (await this.chargingStation.ocppRequestService.sendMessageHandler<
+ (await this.chargingStation.ocppRequestService.requestHandler<
OCPP16MeterValuesRequest,
OCPP16MeterValuesResponse
>(OCPP16RequestCommand.METER_VALUES, {
meterValue:
this.chargingStation.getConnectorStatus(connectorId).transactionBeginMeterValue,
}));
- await this.chargingStation.ocppRequestService.sendMessageHandler<
+ await this.chargingStation.ocppRequestService.requestHandler<
OCPP16StatusNotificationRequest,
OCPP16StatusNotificationResponse
>(OCPP16RequestCommand.STATUS_NOTIFICATION, {
this.chargingStation.getConnectorStatus(connectorId).status !==
OCPP16ChargePointStatus.AVAILABLE
) {
- await this.chargingStation.ocppRequestService.sendMessageHandler<
+ await this.chargingStation.ocppRequestService.requestHandler<
OCPP16StatusNotificationRequest,
OCPP16StatusNotificationResponse
>(OCPP16RequestCommand.STATUS_NOTIFICATION, {
this.chargingStation.getBeginEndMeterValues() &&
!this.chargingStation.getOcppStrictCompliance() &&
this.chargingStation.getOutOfOrderEndMeterValues() &&
- (await this.chargingStation.ocppRequestService.sendMessageHandler<
+ (await this.chargingStation.ocppRequestService.requestHandler<
OCPP16MeterValuesRequest,
OCPP16MeterValuesResponse
>(OCPP16RequestCommand.METER_VALUES, {
!this.chargingStation.isChargingStationAvailable() ||
!this.chargingStation.isConnectorAvailable(transactionConnectorId)
) {
- await this.chargingStation.ocppRequestService.sendMessageHandler<
+ await this.chargingStation.ocppRequestService.requestHandler<
OCPP16StatusNotificationRequest,
OCPP16StatusNotificationResponse
>(OCPP16RequestCommand.STATUS_NOTIFICATION, {
this.chargingStation.getConnectorStatus(transactionConnectorId).status =
OCPP16ChargePointStatus.UNAVAILABLE;
} else {
- await this.chargingStation.ocppRequestService.sendMessageHandler<
+ await this.chargingStation.ocppRequestService.requestHandler<
OCPP16BootNotificationRequest,
OCPP16BootNotificationResponse
>(OCPP16RequestCommand.STATUS_NOTIFICATION, {
}
}
- private handleResponseStatusNotification(
- payload: OCPP16StatusNotificationRequest,
- requestPayload: OCPP16StatusNotificationResponse
- ): void {
- logger.debug(
- this.chargingStation.logPrefix() +
- ' Status notification response received: %j to StatusNotification request: %j',
- payload,
- requestPayload
- );
- }
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
+ private handleResponseStatusNotification(): void {}
- private handleResponseMeterValues(
- payload: OCPP16MeterValuesRequest,
- requestPayload: OCPP16MeterValuesResponse
- ): void {
- logger.debug(
- this.chargingStation.logPrefix() +
- ' MeterValues response received: %j to MeterValues request: %j',
- payload,
- requestPayload
- );
- }
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
+ private handleResponseMeterValues(): void {}
}