- OCPP16ServiceUtils.parseJsonSchemaFile<OCPP16FirmwareStatusNotificationRequest>(
- 'assets/json-schemas/ocpp/1.6/FirmwareStatusNotification.json',
- moduleName,
- 'constructor'
- ),
- ],
- [
- OCPP16RequestCommand.RESERVE_NOW,
- OCPP16ServiceUtils.parseJsonSchemaFile<OCPP16ReserveNowRequest>(
- 'assets/json-schemas/ocpp/1.6/ReserveNow.json',
- moduleName,
- 'constructor'
- ),
- ],
- [
- OCPP16RequestCommand.CANCEL_RESERVATION,
- OCPP16ServiceUtils.parseJsonSchemaFile<OCPP16CancelReservationRequest>(
- 'assets/json-schemas/ocpp/1.6/CancelReservation.json',
- moduleName,
- 'constructor'
- ),
- ],
- ]);
- this.buildRequestPayload = this.buildRequestPayload.bind(this) as <Request extends JsonType>(
- chargingStation: ChargingStation,
- commandName: OCPP16RequestCommand,
- commandParams?: JsonType
- ) => Request;
+ this.ajv
+ .compile(
+ OCPP16ServiceUtils.parseJsonSchemaFile<OCPP16FirmwareStatusNotificationRequest>(
+ 'assets/json-schemas/ocpp/1.6/FirmwareStatusNotification.json',
+ moduleName,
+ 'constructor'
+ )
+ )
+ .bind(this)
+ ]
+ ])
+ this.buildRequestPayload = this.buildRequestPayload.bind(this)