X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FMessageChannelUtils.ts;h=446ecfbbdef0b0ee2371e57b8a0668459e165024;hb=269de5835f83c14f7432c0049a6606a55e1b556e;hp=749a21ddcac8b767f2732868f3cfdd154dd53444;hpb=2896e06dc8d72adf7150b23c941079f622f6f37c;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/MessageChannelUtils.ts b/src/charging-station/MessageChannelUtils.ts index 749a21dd..446ecfbb 100644 --- a/src/charging-station/MessageChannelUtils.ts +++ b/src/charging-station/MessageChannelUtils.ts @@ -15,7 +15,7 @@ export class MessageChannelUtils { chargingStation: ChargingStation ): ChargingStationWorkerMessage { return { - id: ChargingStationWorkerMessageEvents.STARTED, + id: ChargingStationWorkerMessageEvents.started, data: MessageChannelUtils.buildChargingStationDataPayload(chargingStation), }; } @@ -24,7 +24,7 @@ export class MessageChannelUtils { chargingStation: ChargingStation ): ChargingStationWorkerMessage { return { - id: ChargingStationWorkerMessageEvents.STOPPED, + id: ChargingStationWorkerMessageEvents.stopped, data: MessageChannelUtils.buildChargingStationDataPayload(chargingStation), }; } @@ -33,7 +33,7 @@ export class MessageChannelUtils { chargingStation: ChargingStation ): ChargingStationWorkerMessage { return { - id: ChargingStationWorkerMessageEvents.UPDATED, + id: ChargingStationWorkerMessageEvents.updated, data: MessageChannelUtils.buildChargingStationDataPayload(chargingStation), }; } @@ -42,7 +42,7 @@ export class MessageChannelUtils { statistics: Statistics ): ChargingStationWorkerMessage { return { - id: ChargingStationWorkerMessageEvents.PERFORMANCE_STATISTICS, + id: ChargingStationWorkerMessageEvents.performanceStatistics, data: statistics, }; } @@ -51,14 +51,15 @@ export class MessageChannelUtils { chargingStation: ChargingStation ): ChargingStationData { return { - stationInfo: chargingStation.stationInfo, started: chargingStation.started, - wsState: chargingStation?.wsConnection?.readyState, - bootNotificationResponse: chargingStation.bootNotificationResponse, + stationInfo: chargingStation.stationInfo, connectors: [...chargingStation.connectors.values()].map( // eslint-disable-next-line @typescript-eslint/no-unused-vars ({ transactionSetInterval, ...connectorStatusRest }) => connectorStatusRest ), + ocppConfiguration: chargingStation.ocppConfiguration, + wsState: chargingStation?.wsConnection?.readyState, + bootNotificationResponse: chargingStation.bootNotificationResponse, ...(chargingStation.automaticTransactionGenerator && { automaticTransactionGenerator: { automaticTransactionGenerator: