X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Futils%2FMessageChannelUtils.ts;h=36f797f5eb88feb3a9f5e0a4b6ea978b660a9f9b;hb=09379a0da5842414aa5835130a101aec11e724d5;hp=212ed5f20124c419fbf3933b6e2855dfcb482a07;hpb=244c1396e337032577839fa13e9191d5e943864f;p=e-mobility-charging-stations-simulator.git diff --git a/src/utils/MessageChannelUtils.ts b/src/utils/MessageChannelUtils.ts index 212ed5f2..36f797f5 100644 --- a/src/utils/MessageChannelUtils.ts +++ b/src/utils/MessageChannelUtils.ts @@ -21,6 +21,15 @@ export const buildAddedMessage = ( } } +export const buildDeletedMessage = ( + chargingStation: ChargingStation +): ChargingStationWorkerMessage => { + return { + event: ChargingStationWorkerMessageEvents.deleted, + data: buildChargingStationDataPayload(chargingStation) + } +} + export const buildStartedMessage = ( chargingStation: ChargingStation ): ChargingStationWorkerMessage => { @@ -68,6 +77,7 @@ export const buildChargingStationDataPayload = ( evses: buildEvsesStatus(chargingStation, OutputFormat.worker), // eslint-disable-next-line @typescript-eslint/no-non-null-assertion ocppConfiguration: chargingStation.ocppConfiguration!, + supervisionUrl: chargingStation.wsConnectionUrl.href, wsState: chargingStation.wsConnection?.readyState, bootNotificationResponse: chargingStation.bootNotificationResponse, ...(chargingStation.automaticTransactionGenerator != null && {