X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=ui%2Fweb%2Fsrc%2Ftypes%2FChargingStationType.ts;h=45418353adca329d7836d37db01fd76aebbe24b2;hb=f1c011603cb605e6ecd8fca595c8d3c975540d2d;hp=a3f9931c2387cdcee226dcdddfb3d5d6c27dad4a;hpb=ebbfbf1c01e010d051956867484b74a94237f546;p=e-mobility-charging-stations-simulator.git diff --git a/ui/web/src/types/ChargingStationType.ts b/ui/web/src/types/ChargingStationType.ts index a3f9931c..45418353 100644 --- a/ui/web/src/types/ChargingStationType.ts +++ b/ui/web/src/types/ChargingStationType.ts @@ -1,16 +1,17 @@ import type { JsonObject } from './JsonType'; export type ChargingStationData = { - stationInfo: ChargingStationInfo; started: boolean; + stationInfo: ChargingStationInfo; + connectors: ConnectorStatus[]; + evses: EvseStatus[]; wsState?: | typeof WebSocket.CONNECTING | typeof WebSocket.OPEN | typeof WebSocket.CLOSING | typeof WebSocket.CLOSED; - bootNotificationResponse: BootNotificationResponse; - connectors: ConnectorStatus[]; - automaticTransactionGeneratorStatuses?: Status[]; + bootNotificationResponse?: BootNotificationResponse; + automaticTransactionGenerator?: Status[]; }; export type ChargingStationInfo = { @@ -18,10 +19,10 @@ export type ChargingStationInfo = { chargingStationId?: string; chargePointModel: string; chargePointVendor: string; + firmwareVersionPattern?: string; firmwareVersion?: string; numberOfConnectors?: number | number[]; baseName: string; - infoHash?: string; templateHash?: string; chargeBoxSerialNumber?: string; chargePointSerialNumber?: string; @@ -38,7 +39,7 @@ export type ChargingStationInfo = { ocppStrictCompliance?: boolean; ocppPersistentConfiguration?: boolean; stationInfoPersistentConfiguration?: boolean; - authorizationFile?: string; + idTagsFile?: string; nameSuffix?: string; fixedName?: boolean; iccid?: string; @@ -56,7 +57,7 @@ export type ChargingStationInfo = { reconnectExponentialDelay?: boolean; registrationMaxRetries?: number; enableStatistics?: boolean; - mustAuthorizeAtRemoteStart?: boolean; + remoteAuthorization?: boolean; amperageLimitationOcppKey?: string; amperageLimitationUnit?: AmpereUnits; beginEndMeterValues?: boolean; @@ -67,6 +68,7 @@ export type ChargingStationInfo = { phaseLineToLineVoltageMeterValues?: boolean; customValueLimitationMeterValues?: boolean; commandsSupport?: CommandsSupport; + messageTriggerSupport?: Record; }; export enum OCPP16IncomingRequestCommand { @@ -84,11 +86,10 @@ export enum OCPP16IncomingRequestCommand { TRIGGER_MESSAGE = 'TriggerMessage', } -export type IncomingRequestCommand = OCPP16IncomingRequestCommand; - export const IncomingRequestCommand = { ...OCPP16IncomingRequestCommand, -}; +} as const; +export type IncomingRequestCommand = OCPP16IncomingRequestCommand; export enum OCPP16RequestCommand { BOOT_NOTIFICATION = 'BootNotification', @@ -101,11 +102,10 @@ export enum OCPP16RequestCommand { DIAGNOSTICS_STATUS_NOTIFICATION = 'DiagnosticsStatusNotification', } -export type RequestCommand = OCPP16RequestCommand; - export const RequestCommand = { ...OCPP16RequestCommand, -}; +} as const; +export type RequestCommand = OCPP16RequestCommand; export type BootNotificationResponse = OCPP16BootNotificationResponse; @@ -117,10 +117,24 @@ export enum OCPP16RegistrationStatus { export interface OCPP16BootNotificationResponse extends JsonObject { status: OCPP16RegistrationStatus; - currentTime: string; + currentTime: Date; interval: number; } +export enum OCPP16MessageTrigger { + BootNotification = 'BootNotification', + DiagnosticsStatusNotification = 'DiagnosticsStatusNotification', + FirmwareStatusNotification = 'FirmwareStatusNotification', + Heartbeat = 'Heartbeat', + MeterValues = 'MeterValues', + StatusNotification = 'StatusNotification', +} + +export const MessageTrigger = { + ...OCPP16MessageTrigger, +} as const; +export type MessageTrigger = OCPP16MessageTrigger; + type CommandsSupport = { incomingCommands: Record; outgoingCommands?: Record; @@ -132,7 +146,6 @@ export enum OCPPVersion { } export enum OCPPProtocol { - SOAP = 'soap', JSON = 'json', } @@ -171,6 +184,11 @@ export type ConnectorStatus = { transactionEnergyActiveImportRegisterValue?: number; // In Wh }; +export type EvseStatus = { + availability: AvailabilityType; + connectors?: ConnectorStatus[]; +}; + export type AvailabilityType = OCPP16AvailabilityType; export enum OCPP16AvailabilityType {