+ private readonly workerEventAdded = (data: ChargingStationData): void => {
+ this.uiServer.chargingStations.set(data.stationInfo.hashId, data)
+ logger.info(
+ `${this.logPrefix()} ${moduleName}.workerEventAdded: Charging station ${
+ data.stationInfo.chargingStationId
+ } (hashId: ${data.stationInfo.hashId}) added (${
+ this.numberOfAddedChargingStations
+ } added from ${this.numberOfConfiguredChargingStations} configured and ${
+ this.numberOfProvisionedChargingStations
+ } provisioned charging station(s))`
+ )
+ }
+
+ private readonly workerEventDeleted = (data: ChargingStationData): void => {
+ this.uiServer.chargingStations.delete(data.stationInfo.hashId)
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ const templateStatistics = this.templateStatistics.get(data.stationInfo.templateName)!
+ --templateStatistics.added
+ templateStatistics.indexes.delete(data.stationInfo.templateIndex)
+ logger.info(
+ `${this.logPrefix()} ${moduleName}.workerEventDeleted: Charging station ${
+ data.stationInfo.chargingStationId
+ } (hashId: ${data.stationInfo.hashId}) deleted (${
+ this.numberOfAddedChargingStations
+ } added from ${this.numberOfConfiguredChargingStations} configured and ${
+ this.numberOfProvisionedChargingStations
+ } provisioned charging station(s))`
+ )
+ }
+