);
}
- public getEnableStatistics(): boolean | undefined {
- return !Utils.isUndefined(this.stationInfo.enableStatistics)
- ? this.stationInfo.enableStatistics
- : true;
+ public getEnableStatistics(): boolean {
+ return this.stationInfo.enableStatistics ?? false;
}
- public getMustAuthorizeAtRemoteStart(): boolean | undefined {
+ public getMustAuthorizeAtRemoteStart(): boolean {
return this.stationInfo.mustAuthorizeAtRemoteStart ?? true;
}
- public getPayloadSchemaValidation(): boolean | undefined {
+ public getPayloadSchemaValidation(): boolean {
return this.stationInfo.payloadSchemaValidation ?? true;
}
if (this.started === false) {
if (this.starting === false) {
this.starting = true;
- if (this.getEnableStatistics()) {
+ if (this.getEnableStatistics() === true) {
this.performanceStatistics.start();
}
this.openWSConnection();
) {
this.startAutomaticTransactionGenerator();
}
- if (this.getEnableStatistics()) {
+ if (this.getEnableStatistics() === true) {
this.performanceStatistics.restart();
} else {
this.performanceStatistics.stop();
this.stopping = true;
await this.stopMessageSequence(reason);
this.closeWSConnection();
- if (this.getEnableStatistics()) {
+ if (this.getEnableStatistics() === true) {
this.performanceStatistics.stop();
}
this.sharedLRUCache.deleteChargingStationConfiguration(this.configurationFileHash);
// Avoid duplication of connectors related information in RAM
this.stationInfo?.Connectors && delete this.stationInfo.Connectors;
this.configuredSupervisionUrl = this.getConfiguredSupervisionUrl();
- if (this.getEnableStatistics()) {
+ if (this.getEnableStatistics() === true) {
this.performanceStatistics = PerformanceStatistics.getInstance(
this.stationInfo.hashId,
this.stationInfo.chargingStationId,