X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FMessageChannelUtils.ts;h=749a21ddcac8b767f2732868f3cfdd154dd53444;hb=b8cede3a125c147591da708b8b012254f98ecb07;hp=11eea6e66d28b79ccf3fab437725b50bd2d696da;hpb=51c83d6f833f27f9990c17fc380ab5ee618894b1;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/MessageChannelUtils.ts b/src/charging-station/MessageChannelUtils.ts index 11eea6e6..749a21dd 100644 --- a/src/charging-station/MessageChannelUtils.ts +++ b/src/charging-station/MessageChannelUtils.ts @@ -1,10 +1,10 @@ +import type { ChargingStation } from './internal'; import { - ChargingStationData, - ChargingStationWorkerMessage, + type ChargingStationData, + type ChargingStationWorkerMessage, ChargingStationWorkerMessageEvents, -} from '../types/ChargingStationWorker'; -import type Statistics from '../types/Statistics'; -import type ChargingStation from './ChargingStation'; + type Statistics, +} from '../types'; export class MessageChannelUtils { private constructor() { @@ -52,12 +52,22 @@ export class MessageChannelUtils { ): ChargingStationData { return { stationInfo: chargingStation.stationInfo, - stopped: chargingStation.stopped, + started: chargingStation.started, + wsState: chargingStation?.wsConnection?.readyState, bootNotificationResponse: chargingStation.bootNotificationResponse, 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(), + ], + }, + }), }; } }