From: Jérôme Benoit Date: Fri, 9 Sep 2022 05:15:09 +0000 (+0200) Subject: UI Server: refine methods scope X-Git-Tag: v1.1.72~4 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=2a3cf7fc8bbfc899369079cd133c1c659ff0a653;p=e-mobility-charging-stations-simulator.git UI Server: refine methods scope Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ui-server/ui-services/AbstractUIService.ts b/src/charging-station/ui-server/ui-services/AbstractUIService.ts index 2cfd85fa..0db59cca 100644 --- a/src/charging-station/ui-server/ui-services/AbstractUIService.ts +++ b/src/charging-station/ui-server/ui-services/AbstractUIService.ts @@ -127,7 +127,21 @@ export default abstract class AbstractUIService { return this.broadcastChannelRequests.get(uuid) ?? 0; } - protected sendBroadcastChannelRequest( + protected handleProtocolRequest( + uuid: string, + procedureName: ProcedureName, + payload: RequestPayload + ): void { + this.sendBroadcastChannelRequest( + uuid, + AbstractUIService.ProcedureNameToBroadCastChannelProcedureNameMap[ + procedureName + ] as BroadcastChannelProcedureName, + payload + ); + } + + private sendBroadcastChannelRequest( uuid: string, procedureName: BroadcastChannelProcedureName, payload: BroadcastChannelRequestPayload @@ -154,20 +168,6 @@ export default abstract class AbstractUIService { this.broadcastChannelRequests.set(uuid, expectedNumberOfResponses); } - protected handleProtocolRequest( - uuid: string, - procedureName: ProcedureName, - payload: RequestPayload - ): void { - this.sendBroadcastChannelRequest( - uuid, - AbstractUIService.ProcedureNameToBroadCastChannelProcedureNameMap[ - procedureName - ] as BroadcastChannelProcedureName, - payload - ); - } - private handleListChargingStations(): ResponsePayload { return { status: ResponseStatus.SUCCESS,