X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FMessageChannelUtils.ts;h=749a21ddcac8b767f2732868f3cfdd154dd53444;hb=b8cede3a125c147591da708b8b012254f98ecb07;hp=e87cdbc0b6cbaa4d326cd55e79a10b5a46bc872a;hpb=452a82cadd0f08148f5f3d5e5b78fa6cac9da0a7;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/MessageChannelUtils.ts b/src/charging-station/MessageChannelUtils.ts index e87cdbc0..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() { @@ -53,11 +53,21 @@ export class MessageChannelUtils { return { stationInfo: chargingStation.stationInfo, 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(), + ], + }, + }), }; } }