logger.info(startTransactionLogMsg)
// Start transaction
startResponse = await this.chargingStation.ocppRequestService.requestHandler<
- StartTransactionRequest,
+ Partial<StartTransactionRequest>,
StartTransactionResponse
>(this.chargingStation, RequestCommand.START_TRANSACTION, {
connectorId,
logger.info(startTransactionLogMsg)
// Start transaction
startResponse = await this.chargingStation.ocppRequestService.requestHandler<
- StartTransactionRequest,
+ Partial<StartTransactionRequest>,
StartTransactionResponse
>(this.chargingStation, RequestCommand.START_TRANSACTION, {
connectorId,
}
logger.info(`${this.logPrefix(connectorId)} start transaction without an idTag`)
startResponse = await this.chargingStation.ocppRequestService.requestHandler<
- StartTransactionRequest,
+ Partial<StartTransactionRequest>,
StartTransactionResponse
>(this.chargingStation, RequestCommand.START_TRANSACTION, { connectorId })
this.handleStartTransactionResponse(connectorId, startResponse)
)
}
return await this.ocppRequestService.requestHandler<
- StopTransactionRequest,
+ Partial<StopTransactionRequest>,
StopTransactionResponse
>(this, RequestCommand.STOP_TRANSACTION, {
transactionId,
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
chargingStation.getConnectorStatus(connectorId)!.transactionRemoteStarted = true
chargingStation.ocppRequestService
- .requestHandler<OCPP16StartTransactionRequest, OCPP16StartTransactionResponse>(
+ .requestHandler<Partial<OCPP16StartTransactionRequest>, OCPP16StartTransactionResponse>(
chargingStation,
OCPP16RequestCommand.START_TRANSACTION,
{
.requestHandler<OCPP16BootNotificationRequest, OCPP16BootNotificationResponse>(
chargingStation,
OCPP16RequestCommand.BOOT_NOTIFICATION,
- chargingStation.bootNotificationRequest,
+ chargingStation.bootNotificationRequest as OCPP16BootNotificationRequest,
{ skipBufferingOnError: true, triggerMessage: true }
)
.then(response => {
{
connectorId,
errorCode: OCPP16ChargePointErrorCode.NO_ERROR,
- status: chargingStation.getConnectorStatus(connectorId)?.status
+ status: chargingStation.getConnectorStatus(connectorId)
+ ?.status as OCPP16ChargePointStatus
},
{
triggerMessage: true
{
connectorId: id,
errorCode: OCPP16ChargePointErrorCode.NO_ERROR,
- status: connectorStatus.status
+ status: connectorStatus.status as OCPP16ChargePointStatus
},
{
triggerMessage: true
{
connectorId: id,
errorCode: OCPP16ChargePointErrorCode.NO_ERROR,
- status: connectorStatus.status
+ status: connectorStatus.status as OCPP16ChargePointStatus
},
{
triggerMessage: true
])
}
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
public abstract requestHandler<ReqType extends JsonType, ResType extends JsonType>(
chargingStation: ChargingStation,
commandName: RequestCommand,