From: Jérôme Benoit Date: Fri, 24 Nov 2023 08:50:26 +0000 (+0100) Subject: refactor(ui): add firmware status to UI types X-Git-Tag: v1.2.27~21 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=2a5261571579826e71b40f51cb06dd842af19477;p=e-mobility-charging-stations-simulator.git refactor(ui): add firmware status to UI types Signed-off-by: Jérôme Benoit --- diff --git a/ui/web/src/types/ChargingStationType.ts b/ui/web/src/types/ChargingStationType.ts index 45418353..4bd84c5a 100644 --- a/ui/web/src/types/ChargingStationType.ts +++ b/ui/web/src/types/ChargingStationType.ts @@ -14,6 +14,21 @@ export type ChargingStationData = { automaticTransactionGenerator?: Status[]; }; +export enum OCPP16FirmwareStatus { + Downloaded = 'Downloaded', + DownloadFailed = 'DownloadFailed', + Downloading = 'Downloading', + Idle = 'Idle', + InstallationFailed = 'InstallationFailed', + Installing = 'Installing', + Installed = 'Installed', +} + +export const FirmwareStatus = { + ...OCPP16FirmwareStatus, +} as const; +export type FirmwareStatus = OCPP16FirmwareStatus; + export type ChargingStationInfo = { hashId: string; chargingStationId?: string; @@ -21,6 +36,7 @@ export type ChargingStationInfo = { chargePointVendor: string; firmwareVersionPattern?: string; firmwareVersion?: string; + firmwareStatus?: FirmwareStatus; numberOfConnectors?: number | number[]; baseName: string; templateHash?: string; @@ -189,14 +205,11 @@ export type EvseStatus = { connectors?: ConnectorStatus[]; }; -export type AvailabilityType = OCPP16AvailabilityType; - export enum OCPP16AvailabilityType { INOPERATIVE = 'Inoperative', OPERATIVE = 'Operative', } - -export type ChargePointStatus = OCPP16ChargePointStatus; +export type AvailabilityType = OCPP16AvailabilityType; export enum OCPP16ChargePointStatus { AVAILABLE = 'Available', @@ -210,6 +223,7 @@ export enum OCPP16ChargePointStatus { UNAVAILABLE = 'Unavailable', FAULTED = 'Faulted', } +export type ChargePointStatus = OCPP16ChargePointStatus; export type Status = { start?: boolean;