X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcharging-station%2FMessageChannelUtils.ts;h=9bf283d5e9e7330c98fac544e16da12eebfb93f8;hb=8bd02502e5cb44f91964241a5bc93b762ca7557e;hp=4cf037ba28e890dbb82eeae840dcc42bf221dbb5;hpb=fc040c43a050868c037485c658de49576f00fa55;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/MessageChannelUtils.ts b/src/charging-station/MessageChannelUtils.ts index 4cf037ba..9bf283d5 100644 --- a/src/charging-station/MessageChannelUtils.ts +++ b/src/charging-station/MessageChannelUtils.ts @@ -3,7 +3,7 @@ import { ChargingStationWorkerMessage, ChargingStationWorkerMessageEvents, } from '../types/ChargingStationWorker'; -import type Statistics from '../types/Statistics'; +import type { Statistics } from '../types/Statistics'; import type ChargingStation from './ChargingStation'; export class MessageChannelUtils { @@ -51,13 +51,23 @@ export class MessageChannelUtils { chargingStation: ChargingStation ): ChargingStationData { return { - hashId: chargingStation.hashId, stationInfo: chargingStation.stationInfo, - stopped: chargingStation.stopped, + started: chargingStation.started, + wsState: chargingStation?.wsConnection?.readyState, bootNotificationResponse: chargingStation.bootNotificationResponse, - connectors: Array.from(chargingStation.connectors.values()).map( + connectors: [...chargingStation.connectors.values()].map( + // eslint-disable-next-line @typescript-eslint/no-unused-vars ({ transactionSetInterval, ...connectorStatusRest }) => connectorStatusRest ), + ...(chargingStation.automaticTransactionGenerator && { + automaticTransactionGenerator: { + automaticTransactionGenerator: + chargingStation.automaticTransactionGenerator.configuration, + automaticTransactionGeneratorStatuses: [ + ...chargingStation.automaticTransactionGenerator.connectorsStatus.values(), + ], + }, + }), }; } }