Configuration,
Constants,
DCElectricUtils,
+ buildAddedMessage,
buildChargingStationAutomaticTransactionGeneratorConfiguration,
buildConnectorsStatus,
buildEvsesStatus,
this.idTagsCache = IdTagsCache.getInstance()
this.chargingStationWorkerBroadcastChannel = new ChargingStationWorkerBroadcastChannel(this)
+ this.on(ChargingStationEvents.added, () => {
+ parentPort?.postMessage(buildAddedMessage(this))
+ })
this.on(ChargingStationEvents.started, () => {
parentPort?.postMessage(buildStartedMessage(this))
})
})
this.initialize()
+
+ this.stationInfo?.autoStart === true && this.start()
}
public get hasEvses (): boolean {
}
}
+ public add (): void {
+ this.emit(ChargingStationEvents.added)
+ }
+
public start (): void {
if (!this.started) {
if (!this.starting) {
}
const stationInfo = stationTemplateToStationInfo(stationTemplate)
stationInfo.hashId = getHashId(this.index, stationTemplate)
+ stationInfo.autoStart = stationTemplate.autoStart ?? true
stationInfo.templateName = parse(this.templateFile).name
stationInfo.chargingStationId = getChargingStationId(this.index, stationTemplate)
stationInfo.ocppVersion = stationTemplate.ocppVersion ?? OCPPVersion.VERSION_16
if (stationInfo.templateName == null) {
stationInfo.templateName = parse(this.templateFile).name
}
+ if (stationInfo.autoStart == null) {
+ stationInfo.autoStart = true
+ }
}
}
return stationInfo