From: Jérôme Benoit Date: Wed, 21 Oct 2020 12:30:13 +0000 (+0200) Subject: Avoid information duplication for connectors X-Git-Tag: v1.0.1-0~252 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d4a73fb7eb90ca646f0da5b597ccf527f0cbd3d5;p=e-mobility-charging-stations-simulator.git Avoid information duplication for connectors Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.js b/src/charging-station/ChargingStation.js index d5b1a692..dc484cf9 100644 --- a/src/charging-station/ChargingStation.js +++ b/src/charging-station/ChargingStation.js @@ -95,6 +95,8 @@ class ChargingStation { this._connectors[index] = connectorsConfig[randConnectorID]; } } + // Avoid duplication of connectors related information + delete this._stationInfo.Connectors; // Initialize transaction attributes on connectors for (const connector in this._connectors) { if (!this._connectors[connector].transactionStarted) { @@ -168,10 +170,6 @@ class ChargingStation { return powerDivider; } - _getConnectorFromTemplate(number) { - return this._stationInfo.Connectors[number]; - } - _getConnector(number) { return this._connectors[number]; } diff --git a/src/index.js b/src/index.js index b87c4253..fa6ef1bf 100644 --- a/src/index.js +++ b/src/index.js @@ -31,6 +31,8 @@ class Bootstrap { } if (numStationsTotal === 0) { console.log('No charging station template enabled in configuration, exiting'); + } else { + console.log('Charging station simulator started with ' + numStationsTotal + ' charging stations'); } } catch (error) { // eslint-disable-next-line no-console