X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2Focpp%2F2.0%2FOCPP20RequestService.ts;h=c9c4b17b24d6060e7ac102e9ab70664f97c2d13a;hb=a9671b9e315a2807c2659fdda962203229d35c0a;hp=03921891105e745103479904b0b87dbd1bd03c7a;hpb=1feac591544c625c56086abe1f14dbdc706280fb;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ocpp/2.0/OCPP20RequestService.ts b/src/charging-station/ocpp/2.0/OCPP20RequestService.ts index 03921891..c9c4b17b 100644 --- a/src/charging-station/ocpp/2.0/OCPP20RequestService.ts +++ b/src/charging-station/ocpp/2.0/OCPP20RequestService.ts @@ -2,8 +2,6 @@ import type { ValidateFunction } from 'ajv' -import { OCPP20Constants } from './OCPP20Constants.js' -import { OCPP20ServiceUtils } from './OCPP20ServiceUtils.js' import type { ChargingStation } from '../../../charging-station/index.js' import { OCPPError } from '../../../exception/index.js' import { @@ -20,6 +18,8 @@ import { import { generateUUID } from '../../../utils/index.js' import { OCPPRequestService } from '../OCPPRequestService.js' import type { OCPPResponseService } from '../OCPPResponseService.js' +import { OCPP20Constants } from './OCPP20Constants.js' +import { OCPP20ServiceUtils } from './OCPP20ServiceUtils.js' const moduleName = 'OCPP20RequestService' @@ -75,11 +75,12 @@ export class OCPP20RequestService extends OCPPRequestService { public async requestHandler( chargingStation: ChargingStation, commandName: OCPP20RequestCommand, - commandParams?: JsonType, + commandParams?: RequestType, params?: RequestParams ): Promise { // FIXME?: add sanity checks on charging station availability, connector availability, connector status, etc. if (OCPP20ServiceUtils.isRequestCommandSupported(chargingStation, commandName)) { + // TODO: post request actions hook return (await this.sendMessage( chargingStation, generateUUID(),