type ChargingStationWorkerMessageData,
ChargingStationWorkerMessageEvents,
ConfigurationSection,
- type InternalTemplateStatistics,
ProcedureName,
type SimulatorState,
type Statistics,
type StorageConfiguration,
+ type TemplateStatistics,
type UIServerConfiguration,
type WorkerConfiguration
} from '../types/index.js'
import {
- buildTemplateStatisticsPayload,
Configuration,
Constants,
formatDurationMilliSeconds,
private workerImplementation?: WorkerAbstract<ChargingStationWorkerData>
private readonly uiServer: AbstractUIServer
private storage?: Storage
- private readonly templateStatistics: Map<string, InternalTemplateStatistics>
+ private readonly templateStatistics: Map<string, TemplateStatistics>
private readonly version: string = version
private initializedCounters: boolean
private started: boolean
this.uiServer = UIServerFactory.getUIServerImplementation(
Configuration.getConfigurationSection<UIServerConfiguration>(ConfigurationSection.uiServer)
)
- this.templateStatistics = new Map<string, InternalTemplateStatistics>()
+ this.templateStatistics = new Map<string, TemplateStatistics>()
this.initializedCounters = false
this.initializeCounters()
Configuration.configurationChangeCallback = async () => {
return {
version: this.version,
started: this.started,
- templateStatistics: buildTemplateStatisticsPayload(this.templateStatistics)
+ templateStatistics: this.templateStatistics
}
}