X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcharging-station%2Focpp%2FOCPPRequestService.ts;h=ef1e4749d56151d05eafd7ed438236018d8fcec1;hb=be9b0d5057a74c22b436cca1364ab1d8417144f7;hp=021e09f369edb855d5be7d161e512f073d3504a3;hpb=37a48c48e25d4b4ef360ef0d0f5ce34ac3f4b91b;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ocpp/OCPPRequestService.ts b/src/charging-station/ocpp/OCPPRequestService.ts index 021e09f3..ef1e4749 100644 --- a/src/charging-station/ocpp/OCPPRequestService.ts +++ b/src/charging-station/ocpp/OCPPRequestService.ts @@ -1,8 +1,8 @@ import { IncomingRequestCommand, RequestCommand, + RequestParams, ResponseType, - SendParams, } from '../../types/ocpp/Requests'; import type ChargingStation from '../ChargingStation'; @@ -33,7 +33,7 @@ export default abstract class OCPPRequestService { ) { this.chargingStation = chargingStation; this.ocppResponseService = ocppResponseService; - this.sendMessageHandler.bind(this); + this.requestHandler.bind(this); this.sendResult.bind(this); this.sendError.bind(this); } @@ -92,7 +92,7 @@ export default abstract class OCPPRequestService { messageId: string, messagePayload: JsonType, commandName: RequestCommand, - params: SendParams = { + params: RequestParams = { skipBufferingOnError: false, triggerMessage: false, } @@ -115,7 +115,7 @@ export default abstract class OCPPRequestService { messagePayload: JsonType | OCPPError, messageType: MessageType, commandName?: RequestCommand | IncomingRequestCommand, - params: SendParams = { + params: RequestParams = { skipBufferingOnError: false, triggerMessage: false, } @@ -210,7 +210,7 @@ export default abstract class OCPPRequestService { } // Handle the request's response try { - await self.ocppResponseService.handleResponse( + await self.ocppResponseService.responseHandler( commandName as RequestCommand, payload, requestPayload @@ -335,9 +335,9 @@ export default abstract class OCPPRequestService { } // eslint-disable-next-line @typescript-eslint/no-unused-vars - public abstract sendMessageHandler( + public abstract requestHandler( commandName: RequestCommand, commandParams?: JsonType, - params?: SendParams + params?: RequestParams ): Promise; }