Bound most called methods in the OCPP stack
[e-mobility-charging-stations-simulator.git] / src / charging-station / ocpp / OCPPRequestService.ts
index 6f4e47be04864463f34b6b89fa65bceae9cf614c..0380e6646402bd801a22ba92ceef19305f01e30b 100644 (file)
@@ -34,11 +34,14 @@ export default abstract class OCPPRequestService {
 
   protected constructor(ocppResponseService: OCPPResponseService) {
     this.ocppResponseService = ocppResponseService;
+    this.ajv = new Ajv();
+    ajvFormats(this.ajv);
     this.requestHandler.bind(this);
     this.sendResponse.bind(this);
     this.sendError.bind(this);
-    this.ajv = new Ajv();
-    ajvFormats(this.ajv);
+    this.internalSendMessage.bind(this);
+    this.buildMessageToSend.bind(this);
+    this.validateRequestPayload.bind(this);
   }
 
   public static getInstance<T extends OCPPRequestService>(