Add chargePointSerialNumberPrefix support to CS template
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 13 Mar 2022 21:08:46 +0000 (22:08 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 13 Mar 2022 21:08:46 +0000 (22:08 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
README.md
src/charging-station/ChargingStation.ts
src/types/ChargingStationInfo.ts
src/types/ChargingStationTemplate.ts

index 7afb56f5b84432172351372458305d45b6354d9f..9324571564aa9ff4d9faf0ea963ace282687d336 100644 (file)
--- a/README.md
+++ b/README.md
@@ -102,7 +102,8 @@ But the modifications to test have to be done to the files in the build result d
 | fixedName                         | true/false | false           | boolean                           | use the baseName as the charging stations unique name                                                                                 |
 | chargePointModel                  |            | ''              | string                            | charging stations model                                                                                                               |
 | chargePointVendor                 |            | ''              | string                            | charging stations vendor                                                                                                              |
-| chargeBoxSerialNumberPrefix       |            | ''              | string                            | charging stations serial number prefix                                                                                                |
+| chargePointSerialNumberPrefix     |            | ''              | string                            | charge point serial number prefix                                                                                                     |
+| chargeBoxSerialNumberPrefix       |            | ''              | string                            | charge box serial number prefix (deprecated in OCPP 1.6)                                                                              |
 | firmwareVersion                   |            | ''              | string                            | charging stations firmware version                                                                                                    |
 | power                             |            |                 | float \| float[]                  | charging stations maximum power value(s)                                                                                              |
 | powerSharedByConnectors           | true/false | false           | boolean                           | charging stations power shared by its connectors                                                                                      |
index 90b788a68b83235e599c843139ef79406a610bb9..d9840987864e1129806a98a36db735b087b3ab5c 100644 (file)
@@ -834,6 +834,9 @@ export default class ChargingStation {
       ...(!Utils.isUndefined(this.stationInfo.chargeBoxSerialNumberPrefix) && {
         chargeBoxSerialNumber: this.stationInfo.chargeBoxSerialNumberPrefix,
       }),
+      ...(!Utils.isUndefined(this.stationInfo.chargePointSerialNumberPrefix) && {
+        chargePointSerialNumber: this.stationInfo.chargePointSerialNumberPrefix,
+      }),
       ...(!Utils.isUndefined(this.stationInfo.firmwareVersion) && {
         firmwareVersion: this.stationInfo.firmwareVersion,
       }),
index 732bf00ade5863a1bcb27fff38b1f7e60709b004..28895067edf6adb954291fc097d90b872098b3aa 100644 (file)
@@ -3,6 +3,7 @@ import ChargingStationTemplate from './ChargingStationTemplate';
 export default interface ChargingStationInfo extends ChargingStationTemplate {
   chargingStationId?: string;
   chargeBoxSerialNumber?: string;
+  chargePointSerialNumber?: string;
   maxPower?: number; // Always in Watt
   powerDivider?: number;
 }
index ee7df49a0ab2e7220c540c6b04edee3cee965199..d61ce81f977124325c2d8d46a0174a0a17263a54 100644 (file)
@@ -51,6 +51,7 @@ export default interface ChargingStationTemplate {
   fixedName?: boolean;
   chargePointModel: string;
   chargePointVendor: string;
+  chargePointSerialNumberPrefix?: string;
   chargeBoxSerialNumberPrefix?: string;
   firmwareVersion?: string;
   iccid?: string;