OCPP16RequestCommand,
StatusNotificationRequest,
} from '../../../types/ocpp/1.6/Requests';
+import { MeterValuesRequest, OCPP16MeterValuesResponse } from '../../../types/ocpp/1.6/MeterValues';
import {
- HeartbeatResponse,
OCPP16BootNotificationResponse,
+ OCPP16HeartbeatResponse,
OCPP16RegistrationStatus,
- StatusNotificationResponse,
+ OCPP16StatusNotificationResponse,
} from '../../../types/ocpp/1.6/Responses';
-import { MeterValuesRequest, MeterValuesResponse } from '../../../types/ocpp/1.6/MeterValues';
import type ChargingStation from '../../ChargingStation';
import { ErrorType } from '../../../types/ocpp/ErrorType';
}
private handleResponseHeartbeat(
- payload: HeartbeatResponse,
+ payload: OCPP16HeartbeatResponse,
requestPayload: HeartbeatRequest
): void {
logger.debug(
requestPayload.meterStart
);
this.chargingStation.getBeginEndMeterValues() &&
- (await this.chargingStation.ocppRequestService.sendMessageHandler(
+ (await this.chargingStation.ocppRequestService.sendMessageHandler<OCPP16MeterValuesResponse>(
OCPP16RequestCommand.METER_VALUES,
{
connectorId,
this.chargingStation.getConnectorStatus(connectorId).transactionBeginMeterValue,
}
));
- await this.chargingStation.ocppRequestService.sendMessageHandler(
+ await this.chargingStation.ocppRequestService.sendMessageHandler<OCPP16StatusNotificationResponse>(
OCPP16RequestCommand.STATUS_NOTIFICATION,
{
connectorId,
this.chargingStation.getConnectorStatus(connectorId).status !==
OCPP16ChargePointStatus.AVAILABLE
) {
- await this.chargingStation.ocppRequestService.sendMessageHandler(
+ await this.chargingStation.ocppRequestService.sendMessageHandler<OCPP16StatusNotificationResponse>(
OCPP16RequestCommand.STATUS_NOTIFICATION,
{
connectorId,
this.chargingStation.getBeginEndMeterValues() &&
!this.chargingStation.getOcppStrictCompliance() &&
this.chargingStation.getOutOfOrderEndMeterValues() &&
- (await this.chargingStation.ocppRequestService.sendMessageHandler(
+ (await this.chargingStation.ocppRequestService.sendMessageHandler<OCPP16MeterValuesResponse>(
OCPP16RequestCommand.METER_VALUES,
{
connectorId: transactionConnectorId,
!this.chargingStation.isChargingStationAvailable() ||
!this.chargingStation.isConnectorAvailable(transactionConnectorId)
) {
- await this.chargingStation.ocppRequestService.sendMessageHandler(
+ await this.chargingStation.ocppRequestService.sendMessageHandler<OCPP16StatusNotificationResponse>(
OCPP16RequestCommand.STATUS_NOTIFICATION,
{
connectorId: transactionConnectorId,
this.chargingStation.getConnectorStatus(transactionConnectorId).status =
OCPP16ChargePointStatus.UNAVAILABLE;
} else {
- await this.chargingStation.ocppRequestService.sendMessageHandler(
+ await this.chargingStation.ocppRequestService.sendMessageHandler<OCPP16BootNotificationResponse>(
OCPP16RequestCommand.STATUS_NOTIFICATION,
{
connectorId: transactionConnectorId,
private handleResponseStatusNotification(
payload: StatusNotificationRequest,
- requestPayload: StatusNotificationResponse
+ requestPayload: OCPP16StatusNotificationResponse
): void {
logger.debug(
this.chargingStation.logPrefix() +
private handleResponseMeterValues(
payload: MeterValuesRequest,
- requestPayload: MeterValuesResponse
+ requestPayload: OCPP16MeterValuesResponse
): void {
logger.debug(
this.chargingStation.logPrefix() +