X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcharging-station%2Focpp%2FOCPPIncomingRequestService.ts;h=41c0e49bc844ab0c7073a1d254ad38cb50c9ba55;hb=27f08ad31f3e69c0681005edc6e9fec49d0450c2;hp=ddffa657f2a131df81b11058b786807eea15e0fd;hpb=d211c7d74dc8af67e741f2802594074e8f6fb99f;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ocpp/OCPPIncomingRequestService.ts b/src/charging-station/ocpp/OCPPIncomingRequestService.ts index ddffa657..41c0e49b 100644 --- a/src/charging-station/ocpp/OCPPIncomingRequestService.ts +++ b/src/charging-station/ocpp/OCPPIncomingRequestService.ts @@ -17,21 +17,20 @@ import { ChargingStationUtils } from '../ChargingStationUtils'; const moduleName = 'OCPPIncomingRequestService'; -export default abstract class OCPPIncomingRequestService { +export default abstract class OCPPIncomingRequestService extends AsyncResource { private static instance: OCPPIncomingRequestService | null = null; - protected asyncResource: AsyncResource; private readonly version: OCPPVersion; private readonly ajv: Ajv; protected abstract jsonSchemas: Map>; protected constructor(version: OCPPVersion) { + super(moduleName); this.version = version; this.ajv = new Ajv({ keywords: ['javaType'], multipleOfPrecision: 2, }); ajvFormats(this.ajv); - this.asyncResource = new AsyncResource(moduleName); this.incomingRequestHandler.bind(this); this.validateIncomingRequestPayload.bind(this); }