export default class ChargingStation {
private _index: number;
- private _stationTemplateFile;
+ private _stationTemplateFile: string;
private _stationInfo;
private _bootNotificationMessage;
private _connectors;
private _configuration;
- private _connectorsConfigurationHash;
+ private _connectorsConfigurationHash: string;
private _supervisionUrl;
private _wsConnectionUrl;
- private _wsConnection;
+ private _wsConnection: WebSocket;
private _isSocketRestart;
- private _autoReconnectRetryCount;
- private _autoReconnectMaxRetries;
- private _autoReconnectTimeout;
+ private _autoReconnectRetryCount: number;
+ private _autoReconnectMaxRetries: number;
+ private _autoReconnectTimeout: number;
private _requests;
private _messageQueue;
private _automaticTransactionGeneration: AutomaticTransactionGenerator;
private _authorizedTags: string[];
- private _heartbeatInterval;
+ private _heartbeatInterval: number;
private _heartbeatSetInterval;
private _statistics: Statistics;
private _performanceObserver: PerformanceObserver;
}
}
- async _stopMessageSequence(reason = '') {
+ async _stopMessageSequence(reason = ''): Promise<void> {
// Stop heartbeat
this._stopHeartbeat();
// Stop the ATG
return Configuration.configuration;
}
- static getStatisticsDisplayInterval() {
+ static getStatisticsDisplayInterval(): number {
// Read conf
return Utils.objectHasOwnProperty(Configuration.getConfig(), 'statisticsDisplayInterval') ? Configuration.getConfig().statisticsDisplayInterval : 60;
}
- static getAutoReconnectTimeout() {
+ static getAutoReconnectTimeout(): number {
// Read conf
return Utils.objectHasOwnProperty(Configuration.getConfig(), 'autoReconnectTimeout') ? Configuration.getConfig().autoReconnectTimeout : 10;
}
- static getAutoReconnectMaxRetries() {
+ static getAutoReconnectMaxRetries(): number {
// Read conf
return Utils.objectHasOwnProperty(Configuration.getConfig(), 'autoReconnectMaxRetries') ? Configuration.getConfig().autoReconnectMaxRetries : -1;
}
- static getStationTemplateURLs() {
+ static getStationTemplateURLs(): any[] {
// Read conf
return Configuration.getConfig().stationTemplateURLs;
}
- static useWorkerPool() {
+ static useWorkerPool(): boolean {
return Configuration.getConfig().useWorkerPool;
}
- static getWorkerPoolSize() {
+ static getWorkerPoolSize(): number {
return Configuration.getConfig().workerPoolSize;
}
- static getConsoleLog() {
+ static getConsoleLog(): boolean {
return Utils.objectHasOwnProperty(Configuration.getConfig(), 'consoleLog') ? Configuration.getConfig().consoleLog : false;
}
- static getLogFormat() {
+ static getLogFormat(): string {
return Utils.objectHasOwnProperty(Configuration.getConfig(), 'logFormat') ? Configuration.getConfig().logFormat : 'simple';
}
- static getLogLevel() {
+ static getLogLevel(): string {
return Utils.objectHasOwnProperty(Configuration.getConfig(), 'logLevel') ? Configuration.getConfig().logLevel : 'info';
}
- static getLogFile() {
+ static getLogFile(): string {
return Utils.objectHasOwnProperty(Configuration.getConfig(), 'logFile') ? Configuration.getConfig().logFile : 'combined.log';
}
- static getErrorFile() {
+ static getErrorFile(): string {
return Utils.objectHasOwnProperty(Configuration.getConfig(), 'errorFile') ? Configuration.getConfig().errorFile : 'error.log';
}
- static getSupervisionURLs() {
+ static getSupervisionURLs(): string {
// Read conf
return Configuration.getConfig().supervisionURLs;
}
- static getDistributeStationToTenantEqually() {
+ static getDistributeStationToTenantEqually(): boolean {
return Utils.objectHasOwnProperty(Configuration.getConfig(), 'distributeStationToTenantEqually') ? Configuration.getConfig().distributeStationToTenantEqually : true;
}
}