README.md: fix some default values
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 25 Jan 2023 20:16:23 +0000 (21:16 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 25 Jan 2023 20:16:23 +0000 (21:16 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
README.md
src/charging-station/ChargingStation.ts

index 18cdd32ef6186862bf41db87b5623032b639bedc..59bd5610e5b38a8cb64e024169211bc6831641b1 100644 (file)
--- a/README.md
+++ b/README.md
@@ -104,7 +104,7 @@ But the modifications to test have to be done to the files in the build target d
 | 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_ROBIN"<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 />"type": "ws",<br />"options": {<br />"host": "localhost",<br />"port": 8080<br />}<br />}                                                                                        | {<br />enabled: boolean;<br />type: ApplicationProtocol;<br />options: ServerOptions;<br />authentication: {<br />enabled: boolean;<br />type: AuthenticationType;<br />username: string;<br />password: string;<br />}<br />}      | UI server configuration section                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
+| uiServer                   |                                                  | {<br />"enabled": false,<br />"type": "ws",<br />"options": {<br />"host": "localhost",<br />"port": 8080<br />}<br />}                                                                                       | {<br />enabled: boolean;<br />type: ApplicationProtocol;<br />options: ServerOptions;<br />authentication: {<br />enabled: boolean;<br />type: AuthenticationType;<br />username: string;<br />password: string;<br />}<br />}      | UI 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)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
 
@@ -170,9 +170,9 @@ But the modifications to test have to be done to the files in the build target d
 | meteringPerTransaction             | true/false    | true                                                                                                                                | boolean                                                                                                                                        | enable metering history on a per transaction basis                                                                                                                                                                                  |
 | transactionDataMeterValues         | true/false    | false                                                                                                                               | boolean                                                                                                                                        | enable transaction data MeterValues at stop transaction                                                                                                                                                                             |
 | mainVoltageMeterValues             | true/false    | true                                                                                                                                | boolean                                                                                                                                        | include charging stations main voltage MeterValues on three phased charging stations                                                                                                                                                |
-| phaseLineToLineVoltageMeterValues  | true/false    | true                                                                                                                                | boolean                                                                                                                                        | include charging stations line to line voltage MeterValues on three phased charging stations                                                                                                                                        |
+| phaseLineToLineVoltageMeterValues  | true/false    | false                                                                                                                               | boolean                                                                                                                                        | include charging stations line to line voltage MeterValues on three phased charging stations                                                                                                                                        |
 | customValueLimitationMeterValues   | true/false    | true                                                                                                                                | boolean                                                                                                                                        | enable limitation on custom fluctuated value in MeterValues                                                                                                                                                                         |
-| firmwareUpgrade                    |               | {<br />"reset": true<br />}                                                                                                         | {<br />versionUpgrade: {<br />patternGroup: number;<br />step: number;<br />};<br />reset: boolean;<br />failureStatus: FirmwareStatus;<br />} | Configuration section for simulating firmware upgrade support.                                                                                                                                                                      |
+| firmwareUpgrade                    |               | {<br />"versionUpgrade": {<br />"step": 1<br />},<br />"reset": true<br />}                                                         | {<br />versionUpgrade: {<br />patternGroup: number;<br />step: number;<br />};<br />reset: boolean;<br />failureStatus: FirmwareStatus;<br />} | Configuration section for simulating firmware upgrade support.                                                                                                                                                                      |
 | commandsSupport                    |               | {<br />"incomingCommands": {},<br />"outgoingCommands": {}<br />}                                                                   | {<br /> incomingCommands: Record<IncomingRequestCommand, boolean>;<br />outgoingCommands?: Record<RequestCommand, boolean>;<br />}             | Configuration section for OCPP commands support. Empty section or subsections means all implemented OCPP commands are supported                                                                                                     |
 | messageTriggerSupport              |               | {}                                                                                                                                  | Record<MessageTrigger, boolean>                                                                                                                | Configuration section for OCPP commands trigger support. Empty section means all implemented OCPP trigger commands are supported                                                                                                    |
 | Configuration                      |               |                                                                                                                                     | ChargingStationConfiguration                                                                                                                   | charging stations OCPP parameters configuration section                                                                                                                                                                             |
index 9d69f038ea23dcf64f235e004e19b9b425dbfb8e..5123ce1cab3dc576cd395f25a88db780e482b3ef 100644 (file)
@@ -1677,9 +1677,7 @@ export default class ChargingStation {
 
   private getUseConnectorId0(stationInfo?: ChargingStationInfo): boolean {
     const localStationInfo = stationInfo ?? this.stationInfo;
-    return !Utils.isUndefined(localStationInfo.useConnectorId0)
-      ? localStationInfo.useConnectorId0
-      : true;
+    return localStationInfo?.useConnectorId0 ?? true;
   }
 
   private getNumberOfRunningTransactions(): number {
@@ -1996,9 +1994,7 @@ export default class ChargingStation {
   }
 
   private getReconnectExponentialDelay(): boolean {
-    return !Utils.isUndefined(this.stationInfo.reconnectExponentialDelay)
-      ? this.stationInfo.reconnectExponentialDelay
-      : false;
+    return this.stationInfo?.reconnectExponentialDelay ?? false;
   }
 
   private async reconnect(): Promise<void> {