+ super(ocppResponseService);
+ this.jsonSchemas = new Map<OCPP16RequestCommand, JSONSchemaType<JsonObject>>([
+ [
+ OCPP16RequestCommand.AUTHORIZE,
+ JSON.parse(
+ fs.readFileSync(
+ path.resolve(
+ path.dirname(fileURLToPath(import.meta.url)),
+ '../../../assets/json-schemas/ocpp/1.6/Authorize.json'
+ ),
+ 'utf8'
+ )
+ ) as JSONSchemaType<OCPP16AuthorizeRequest>,
+ ],
+ [
+ OCPP16RequestCommand.BOOT_NOTIFICATION,
+ JSON.parse(
+ fs.readFileSync(
+ path.resolve(
+ path.dirname(fileURLToPath(import.meta.url)),
+ '../../../assets/json-schemas/ocpp/1.6/BootNotification.json'
+ ),
+ 'utf8'
+ )
+ ) as JSONSchemaType<OCPP16BootNotificationRequest>,
+ ],
+ [
+ OCPP16RequestCommand.DIAGNOSTICS_STATUS_NOTIFICATION,
+ JSON.parse(
+ fs.readFileSync(
+ path.resolve(
+ path.dirname(fileURLToPath(import.meta.url)),
+ '../../../assets/json-schemas/ocpp/1.6/DiagnosticsStatusNotification.json'
+ ),
+ 'utf8'
+ )
+ ) as JSONSchemaType<DiagnosticsStatusNotificationRequest>,
+ ],
+ [
+ OCPP16RequestCommand.HEARTBEAT,
+ JSON.parse(
+ fs.readFileSync(
+ path.resolve(
+ path.dirname(fileURLToPath(import.meta.url)),
+ '../../../assets/json-schemas/ocpp/1.6/Heartbeat.json'
+ ),
+ 'utf8'
+ )
+ ) as JSONSchemaType<OCPP16HeartbeatRequest>,
+ ],
+ [
+ OCPP16RequestCommand.METER_VALUES,
+ JSON.parse(
+ fs.readFileSync(
+ path.resolve(
+ path.dirname(fileURLToPath(import.meta.url)),
+ '../../../assets/json-schemas/ocpp/1.6/MeterValues.json'
+ ),
+ 'utf8'
+ )
+ ) as JSONSchemaType<OCPP16MeterValuesRequest>,
+ ],
+ [
+ OCPP16RequestCommand.STATUS_NOTIFICATION,
+ JSON.parse(
+ fs.readFileSync(
+ path.resolve(
+ path.dirname(fileURLToPath(import.meta.url)),
+ '../../../assets/json-schemas/ocpp/1.6/StatusNotification.json'
+ ),
+ 'utf8'
+ )
+ ) as JSONSchemaType<OCPP16StatusNotificationRequest>,
+ ],
+ [
+ OCPP16RequestCommand.START_TRANSACTION,
+ JSON.parse(
+ fs.readFileSync(
+ path.resolve(
+ path.dirname(fileURLToPath(import.meta.url)),
+ '../../../assets/json-schemas/ocpp/1.6/StartTransaction.json'
+ ),
+ 'utf8'
+ )
+ ) as JSONSchemaType<OCPP16StartTransactionRequest>,
+ ],
+ [
+ OCPP16RequestCommand.STOP_TRANSACTION,
+ JSON.parse(
+ fs.readFileSync(
+ path.resolve(
+ path.dirname(fileURLToPath(import.meta.url)),
+ '../../../assets/json-schemas/ocpp/1.6/StopTransaction.json'
+ ),
+ 'utf8'
+ )
+ ) as JSONSchemaType<OCPP16StopTransactionRequest>,
+ ],
+ ]);
+ this.buildRequestPayload.bind(this);
+ this.validatePayload.bind(this);