From: Jérôme Benoit Date: Sun, 28 May 2023 16:01:22 +0000 (+0200) Subject: refactor: cleanup UI service method namespace X-Git-Tag: v1.2.15~19 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=7c1395ab4ec7d727ac09c0f0347a8d9fc5e2c8de;p=e-mobility-charging-stations-simulator.git refactor: cleanup UI service method namespace Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/Bootstrap.ts b/src/charging-station/Bootstrap.ts index 677843d2..802a9445 100644 --- a/src/charging-station/Bootstrap.ts +++ b/src/charging-station/Bootstrap.ts @@ -129,7 +129,7 @@ export class Bootstrap extends EventEmitter { public async stop(): Promise { if (isMainThread && this.started === true) { - await this.uiServer?.sendRequestOnBroadcastChannel( + await this.uiServer?.sendInternalRequest( this.uiServer.buildProtocolRequest( Utils.generateUUID(), ProcedureName.STOP_CHARGING_STATION, diff --git a/src/charging-station/ui-server/AbstractUIServer.ts b/src/charging-station/ui-server/AbstractUIServer.ts index c21185fe..36d00e01 100644 --- a/src/charging-station/ui-server/AbstractUIServer.ts +++ b/src/charging-station/ui-server/AbstractUIServer.ts @@ -46,7 +46,7 @@ export abstract class AbstractUIServer { this.chargingStations.clear(); } - public async sendRequestOnBroadcastChannel(request: ProtocolRequest): Promise { + public async sendInternalRequest(request: ProtocolRequest): Promise { const protocolVersion = ProtocolVersion['0.0.1']; this.registerProtocolVersionUIService(protocolVersion); return this.uiServices.get(protocolVersion)?.requestHandler(request);