From: Jérôme Benoit Date: Tue, 13 Feb 2024 18:06:41 +0000 (+0100) Subject: refactor: align charging station info between simulator and ui X-Git-Tag: v1.2.37~68 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=b0eea37827bbd0d63dd152b2654470995ebc8d29;p=e-mobility-charging-stations-simulator.git refactor: align charging station info between simulator and ui Signed-off-by: Jérôme Benoit --- diff --git a/src/types/ChargingStationInfo.ts b/src/types/ChargingStationInfo.ts index f4447e52..4ebdc150 100644 --- a/src/types/ChargingStationInfo.ts +++ b/src/types/ChargingStationInfo.ts @@ -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' diff --git a/ui/web/src/types/ChargingStationType.ts b/ui/web/src/types/ChargingStationType.ts index d7387b23..8164bce8 100644 --- a/ui/web/src/types/ChargingStationType.ts +++ b/ui/web/src/types/ChargingStationType.ts @@ -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