From: Jérôme Benoit Date: Sat, 10 Feb 2024 01:00:20 +0000 (+0100) Subject: feat: allow to override event more template tunables at addChargingStations UI X-Git-Tag: v1.2.36~15 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=43e04bb7f074bf293ea06b4b7b0b842a826fe211;p=e-mobility-charging-stations-simulator.git feat: allow to override event more template tunables at addChargingStations UI command Signed-off-by: Jérôme Benoit --- diff --git a/README.md b/README.md index dab75e45..3ee86b24 100644 --- a/README.md +++ b/README.md @@ -575,7 +575,9 @@ Set the Websocket header _Sec-Websocket-Protocol_ to `ui0.0.1`. `options?`: { `persistentConfiguration?`: boolean, `autoStart?`: boolean, - `autoRegister?`: boolean + `autoRegister?`: boolean, + `enableStatistics?`: boolean, + `ocppStrictCompliance?`: boolean } } diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index a57f3eaa..c9c8208a 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -1283,6 +1283,12 @@ export class ChargingStation extends EventEmitter { if (options?.autoRegister != null) { this.stationInfo.autoRegister = options.autoRegister } + if (options?.enableStatistics != null) { + this.stationInfo.enableStatistics = options.enableStatistics + } + if (options?.ocppStrictCompliance != null) { + this.stationInfo.ocppStrictCompliance = options.ocppStrictCompliance + } if ( this.stationInfo.firmwareStatus === FirmwareStatus.Installing && isNotEmptyString(this.stationInfo.firmwareVersion) && diff --git a/src/types/ChargingStationWorker.ts b/src/types/ChargingStationWorker.ts index 346537cb..e6e34a89 100644 --- a/src/types/ChargingStationWorker.ts +++ b/src/types/ChargingStationWorker.ts @@ -15,6 +15,8 @@ export interface ChargingStationOptions extends JsonObject { persistentConfiguration?: boolean autoStart?: boolean autoRegister?: boolean + enableStatistics?: boolean + ocppStrictCompliance?: boolean } export interface ChargingStationWorkerData extends WorkerData {