Apply dependencies update
[e-mobility-charging-stations-simulator.git] / README.md
index 74c40030c2b9f21e11b94c7cbc9e4672d123c0e0..3056f386a616cb8c5c089f404c1528d146c0ddd9 100644 (file)
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@ brew install node@16
 
 ### GNU/Linux:
 
-- [NodeSource](https://github.com/nodesource/distributions) Node.js Binary Distributions for version 16.X
+- [NodeSource](https://github.com/nodesource/distributions) Node.js Binary Distributions for version >= 16.X
 
 ## Installation
 
@@ -49,14 +49,14 @@ Tweak them to your needs by following the section [configuration files syntax](R
 
 To start the program, run: `npm start`.
 
-To start the program with a UI controller, run: `npm start:server`.
+To start the program with a UI controller, run: `npm run start:server`.
 Then, start/stop the simulator by going to `https://<hostname:port>` in a browser. Localhost port will default to 8080. For Cloud Foundry, the port is assigned based on the `process.env.PORT` environment variable.
 
 ## Configuration files syntax
 
 All configuration files are in the JSON standard format.
 
-**Configuration files list**:
+**Configuration files locations**:
 
 - charging stations simulator configuration: [src/assets/config.json](src/assets/config.json);
 - charging station configuration templates: [src/assets/station-templates](src/assets/station-templates);
@@ -81,34 +81,28 @@ The charging stations simulator have an automatic configuration files reload fea
 - charging station configuration templates;
 - charging station authorization RFID tags lists.
 
-But the modifications to test have to be done to the files in the build result directory [dist/assets](dist/assets). Once the modifications are finished, they have to be reported or copied to the matching files in the build source directory [src/assets](src/assets) to ensure they will be taken into account at next build.
+But the modifications to test have to be done to the files in the build target directory [dist/assets](dist/assets). Once the modifications are finished, they have to be reported or copied to the matching files in the build source directory [src/assets](src/assets) to ensure they will be taken into account at next build.
 
 ### Charging stations simulator configuration
 
 **src/assets/config.json**:
 
-| Key                        | Value(s)                                         | Default Value                                                               | Value type                                                                                 | Description                                                                                                                                             |
-| -------------------------- | ------------------------------------------------ | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| supervisionUrls            |                                                  | []                                                                          | string \| string[]                                                                         | string or array of global connection URIs to OCPP-J servers                                                                                             |
-| supervisionUrlDistribution | round-robin/random/sequential                    | round-robin                                                                 | boolean                                                                                    | supervision urls distribution policy to simulated charging stations                                                                                     |
-| workerProcess              | workerSet/staticPool/dynamicPool                 | workerSet                                                                   | string                                                                                     | worker threads process type                                                                                                                             |
-| workerStartDelay           |                                                  | 500                                                                         | integer                                                                                    | milliseconds to wait at worker threads startup (only for workerSet threads process type)                                                                |
-| elementStartDelay          |                                                  | 0                                                                           | integer                                                                                    | milliseconds to wait at charging station startup                                                                                                        |
-| workerPoolMinSize          |                                                  | 4                                                                           | integer                                                                                    | worker threads pool minimum number of threads                                                                                                           |
-| workerPoolMaxSize          |                                                  | 16                                                                          | integer                                                                                    | worker threads pool maximum number of threads                                                                                                           |
-| workerPoolStrategy         | ROUND_ROBIN/LESS_RECENTLY_USED/...               | [poolifier](https://github.com/poolifier/poolifier) default: ROUND_ROBBIN   | string                                                                                     | worker threads pool [poolifier](https://github.com/poolifier/poolifier) worker choice strategy                                                          |
-| chargingStationsPerWorker  |                                                  | 1                                                                           | integer                                                                                    | number of charging stations per worker threads for the `workerSet` process type                                                                         |
-| logStatisticsInterval      |                                                  | 60                                                                          | integer                                                                                    | seconds between charging stations statistics output in the logs                                                                                         |
-| logConsole                 | true/false                                       | false                                                                       | boolean                                                                                    | output logs on the console                                                                                                                              |
-| logFormat                  |                                                  | simple                                                                      | string                                                                                     | winston log format                                                                                                                                      |
-| logRotate                  | true/false                                       | true                                                                        | boolean                                                                                    | enable daily log files rotation                                                                                                                         |
-| logMaxFiles                |                                                  | 7                                                                           | integer                                                                                    | maximum number of log files to keep                                                                                                                     |
-| logLevel                   | emerg/alert/crit/error/warning/notice/info/debug | info                                                                        | string                                                                                     | winston logging level                                                                                                                                   |
-| logFile                    |                                                  | combined.log                                                                | string                                                                                     | log file relative path                                                                                                                                  |
-| logErrorFile               |                                                  | error.log                                                                   | string                                                                                     | error log file relative path                                                                                                                            |
-| uiServer                   |                                                  | { "enabled": true, "options": { "host: "localhost", "port": 8080 } }        | { enabled: boolean; options: ServerOptions; }                                              | UI WebSocket server configuration section                                                                                                               |
-| performanceStorage         |                                                  | { "enabled": false, "type": "jsonfile", "file:///performanceRecords.json" } | { enabled: boolean; type: string; URI: string; } where type can be 'jsonfile' or 'mongodb' | performance storage configuration section                                                                                                               |
-| stationTemplateUrls        |                                                  | {}[]                                                                        | { file: string; numberOfStations: number; }[]                                              | array of charging station configuration templates URIs configuration section (charging station configuration template file name and number of stations) |
+| Key                        | Value(s)                                         | Default Value                                                                                                                                                                                                  | Value type                                                                                                                                                                                                                          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
+| -------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| supervisionUrls            |                                                  | []                                                                                                                                                                                                             | string \| string[]                                                                                                                                                                                                                  | string or array of global connection URIs to OCPP-J servers                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
+| supervisionUrlDistribution | round-robin/random/sequential                    | round-robin                                                                                                                                                                                                    | boolean                                                                                                                                                                                                                             | supervision urls distribution policy to simulated charging stations                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
+| logStatisticsInterval      |                                                  | 60                                                                                                                                                                                                             | integer                                                                                                                                                                                                                             | seconds between charging stations statistics output in the logs                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
+| logConsole                 | true/false                                       | false                                                                                                                                                                                                          | boolean                                                                                                                                                                                                                             | output logs on the console                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
+| logFormat                  |                                                  | simple                                                                                                                                                                                                         | string                                                                                                                                                                                                                              | winston log format                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
+| logRotate                  | true/false                                       | true                                                                                                                                                                                                           | boolean                                                                                                                                                                                                                             | enable daily log files rotation                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
+| logMaxFiles                |                                                  | 7                                                                                                                                                                                                              | integer                                                                                                                                                                                                                             | maximum number of log files to keep                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
+| logLevel                   | emerg/alert/crit/error/warning/notice/info/debug | info                                                                                                                                                                                                           | string                                                                                                                                                                                                                              | winston logging level                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
+| logFile                    |                                                  | combined.log                                                                                                                                                                                                   | string                                                                                                                                                                                                                              | log file relative path                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
+| logErrorFile               |                                                  | error.log                                                                                                                                                                                                      | string                                                                                                                                                                                                                              | error log file relative path                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
+| worker                     |                                                  | {<br />"processType": "workerSet",<br />"startDelay": 500,<br />"elementStartDelay": 0,<br />"elementsPerWorker": 1,<br />"poolMinSize": 4,<br />"poolMaxSize": 16,<br />"poolStrategy": "ROUND_ROBBIN"<br />} | {<br />processType: WorkerProcessType;<br />startDelay: number;<br />elementStartDelay: number;<br />elementsPerWorker: number;<br />poolMinSize: number;<br />poolMaxSize: number;<br />poolStrategy: WorkerChoiceStrategy;<br />} | Worker configuration section:<br />- processType: worker threads process type (workerSet/staticPool/dynamicPool)<br />- startDelay: milliseconds to wait at worker threads startup (only for workerSet threads process type)<br />- elementStartDelay: milliseconds to wait at charging station startup<br />- elementsPerWorker: number of charging stations per worker threads for the `workerSet` process type<br />- poolMinSize: worker threads pool minimum number of threads</br >- poolMaxSize: worker threads pool maximum number of threads<br />- poolStrategy: worker threads pool [poolifier](https://github.com/poolifier/poolifier) worker choice strategy |
+| uiServer                   |                                                  | {<br />"enabled": true,<br />"options": {<br />"host: "localhost",<br />"port": 8080<br />}<br />}                                                                                                             | {<br />enabled: boolean;<br />options: ServerOptions;<br />}                                                                                                                                                                        | UI WebSocket server configuration section                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
+| performanceStorage         |                                                  | {<br />"enabled": false,<br />"type": "jsonfile",<br />"file:///performanceRecords.json"<br />}                                                                                                                | {<br />enabled: boolean;<br />type: string;<br />URI: string;<br />}<br />where type can be 'jsonfile' or 'mongodb'                                                                                                                 | performance storage configuration section                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
+| stationTemplateUrls        |                                                  | {}[]                                                                                                                                                                                                           | {<br />file: string;<br />numberOfStations: number;<br />}[]                                                                                                                                                                        | array of charging station configuration templates URIs configuration section (charging station configuration template file name and number of stations)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
 
 #### Worker process model: