- JSON.parse(
- fs.readFileSync(
- path.resolve(
- path.dirname(fileURLToPath(import.meta.url)),
- '../../../assets/json-schemas/ocpp/2.0/BootNotificationResponse.json'
- ),
- 'utf8'
- )
- ) as JSONSchemaType<OCPP20BootNotificationResponse>,
+ this.parseJsonSchemaFile<OCPP20BootNotificationResponse>(
+ '../../../assets/json-schemas/ocpp/2.0/BootNotificationResponse.json'
+ ),
+ ],
+ [
+ OCPP20RequestCommand.HEARTBEAT,
+ this.parseJsonSchemaFile<OCPP20HeartbeatResponse>(
+ '../../../assets/json-schemas/ocpp/2.0/HeartbeatResponse.json'
+ ),
+ ],
+ [
+ OCPP20RequestCommand.STATUS_NOTIFICATION,
+ this.parseJsonSchemaFile<OCPP20StatusNotificationResponse>(
+ '../../../assets/json-schemas/ocpp/2.0/StatusNotificationResponse.json'
+ ),
+ ],
+ ]);
+ this.jsonIncomingRequestResponseSchemas = new Map([
+ [
+ OCPP20IncomingRequestCommand.CLEAR_CACHE,
+ this.parseJsonSchemaFile<OCPP20ClearCacheResponse>(
+ '../../../assets/json-schemas/ocpp/2.0/ClearCacheResponse.json'
+ ),