X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2Fui-server%2Fui-services%2FUIService001.ts;h=4be6a2f2b16f1903a78c0941016a65d1ce594eb5;hb=1984f1944eeb7468c2f3adbf03b83fbc98910dff;hp=4740b7d738e2c99829232ba86dcfe9326648c571;hpb=0d2cec7666c01396c8125a752341d5b716d12906;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ui-server/ui-services/UIService001.ts b/src/charging-station/ui-server/ui-services/UIService001.ts index 4740b7d7..4be6a2f2 100644 --- a/src/charging-station/ui-server/ui-services/UIService001.ts +++ b/src/charging-station/ui-server/ui-services/UIService001.ts @@ -43,6 +43,18 @@ export default class UIService001 extends AbstractUIService { ProcedureName.STOP_AUTOMATIC_TRANSACTION_GENERATOR, this.handleStopAutomaticTransactionGenerator.bind(this) as ProtocolRequestHandler ); + this.requestHandlers.set( + ProcedureName.AUTHORIZE, + this.handleAuthorize.bind(this) as ProtocolRequestHandler + ); + this.requestHandlers.set( + ProcedureName.STATUS_NOTIFICATION, + this.handleStatusNotification.bind(this) as ProtocolRequestHandler + ); + this.requestHandlers.set( + ProcedureName.HEARTBEAT, + this.handleHeartbeat.bind(this) as ProtocolRequestHandler + ); } private handleStartChargingStation(uuid: string, payload: RequestPayload): void { @@ -96,4 +108,20 @@ export default class UIService001 extends AbstractUIService { payload ); } + + private handleAuthorize(uuid: string, payload: RequestPayload): void { + this.sendBroadcastChannelRequest(uuid, BroadcastChannelProcedureName.AUTHORIZE, payload); + } + + private handleStatusNotification(uuid: string, payload: RequestPayload): void { + this.sendBroadcastChannelRequest( + uuid, + BroadcastChannelProcedureName.STATUS_NOTIFICATION, + payload + ); + } + + private handleHeartbeat(uuid: string, payload: RequestPayload): void { + this.sendBroadcastChannelRequest(uuid, BroadcastChannelProcedureName.HEARTBEAT, payload); + } }