refactor: align charging station info between simulator and ui
authorJérôme Benoit <jerome.benoit@sap.com>
Tue, 13 Feb 2024 18:06:41 +0000 (19:06 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Tue, 13 Feb 2024 18:06:41 +0000 (19:06 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/types/ChargingStationInfo.ts
ui/web/src/types/ChargingStationType.ts

index f4447e527ff79de2a70d13ca2a4a2e536b5f08cb..4ebdc150720488c5d37837c4161055d5f52979d6 100644 (file)
@@ -3,10 +3,11 @@ import type { FirmwareStatus } from './ocpp/Requests.js'
 
 export type ChargingStationInfo = Omit<
 ChargingStationTemplate,
-| 'AutomaticTransactionGenerator'
-| 'Configuration'
 | 'Connectors'
 | 'Evses'
+| 'Configuration'
+| 'AutomaticTransactionGenerator'
+| 'numberOfConnectors'
 | 'power'
 | 'powerUnit'
 | 'chargeBoxSerialNumberPrefix'
index d7387b233e39642f19956a7a3ac38bafa45b266f..8164bce83bddcc918aea9bab1beca4afee77fbdf 100644 (file)
@@ -26,6 +26,15 @@ export enum OCPP16FirmwareStatus {
   Installed = 'Installed'
 }
 
+export interface FirmwareUpgrade {
+  versionUpgrade?: {
+    patternGroup?: number
+    step?: number
+  }
+  reset?: boolean
+  failureStatus?: FirmwareStatus
+}
+
 export const FirmwareStatus = {
   ...OCPP16FirmwareStatus
 } as const
@@ -36,32 +45,34 @@ export type ChargingStationInfo = {
   templateIndex: number
   templateName: string
   chargingStationId?: string
-  chargePointModel: string
-  chargePointVendor: string
-  firmwareVersionPattern?: string
-  firmwareVersion?: string
-  firmwareStatus?: FirmwareStatus
-  numberOfConnectors?: number | number[]
-  baseName: string
-  templateHash?: string
   chargeBoxSerialNumber?: string
   chargePointSerialNumber?: string
   meterSerialNumber?: string
   maximumPower?: number // Always in Watt
   maximumAmperage?: number // Always in Ampere
+  firmwareStatus?: FirmwareStatus
+  templateHash?: string
   supervisionUrls?: string | string[]
   supervisionUrlOcppConfiguration?: boolean
   supervisionUrlOcppKey?: string
   supervisionUser?: string
   supervisionPassword?: string
+  autoStart?: boolean
   ocppVersion?: OCPPVersion
   ocppProtocol?: OCPPProtocol
   ocppStrictCompliance?: boolean
   ocppPersistentConfiguration?: boolean
   stationInfoPersistentConfiguration?: boolean
+  automaticTransactionGeneratorPersistentConfiguration?: boolean
   idTagsFile?: string
+  baseName: string
   nameSuffix?: string
   fixedName?: boolean
+  chargePointModel: string
+  chargePointVendor: string
+  firmwareVersionPattern?: string
+  firmwareVersion?: string
+  firmwareUpgrade?: FirmwareUpgrade
   iccid?: string
   imsi?: string
   meterType?: string
@@ -84,6 +95,7 @@ export type ChargingStationInfo = {
   outOfOrderEndMeterValues?: boolean
   meteringPerTransaction?: boolean
   transactionDataMeterValues?: boolean
+  stopTransactionsOnStopped?: boolean
   mainVoltageMeterValues?: boolean
   phaseLineToLineVoltageMeterValues?: boolean
   customValueLimitationMeterValues?: boolean