X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FChargingStationTemplate.ts;h=68c20597c4edf2cbf8f5db99fe61ab6e3d970ea2;hb=6ebeab4b8404e5a9d69b3dcdff47b9087b2058f0;hp=cd92616c11063cb4060013081ce8ffd45e974bc2;hpb=b25b86842dc61b2a95f672dcf38992f7d63d6ec3;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/ChargingStationTemplate.ts b/src/types/ChargingStationTemplate.ts index cd92616c..68c20597 100644 --- a/src/types/ChargingStationTemplate.ts +++ b/src/types/ChargingStationTemplate.ts @@ -1,13 +1,19 @@ -import type { ClientRequestArgs } from 'http'; +import type { ClientRequestArgs } from 'node:http'; import type { ClientOptions } from 'ws'; import type { AutomaticTransactionGeneratorConfiguration } from './AutomaticTransactionGenerator'; import type { ChargingStationOcppConfiguration } from './ChargingStationOcppConfiguration'; import type { ConnectorStatus } from './ConnectorStatus'; +import type { EvseTemplate } from './Evse'; import type { OCPPProtocol } from './ocpp/OCPPProtocol'; import type { OCPPVersion } from './ocpp/OCPPVersion'; -import type { IncomingRequestCommand, MessageTrigger, RequestCommand } from './ocpp/Requests'; +import type { + FirmwareStatus, + IncomingRequestCommand, + MessageTrigger, + RequestCommand, +} from './ocpp/Requests'; export enum CurrentType { AC = 'AC', @@ -35,22 +41,30 @@ export enum Voltage { export type WsOptions = ClientOptions & ClientRequestArgs; -type FirmwareUpgrade = { - versionUpgrade: { - patternGroup?: number | number[]; - to?: string; +export interface FirmwareUpgrade { + versionUpgrade?: { + patternGroup?: number; + step?: number; }; reset?: boolean; - resetDelay?: number; - checkIntegrity?: boolean; -}; + failureStatus?: FirmwareStatus; +} -type CommandsSupport = { +interface CommandsSupport { incomingCommands: Record; outgoingCommands?: Record; -}; +} -export type ChargingStationTemplate = { +enum x509CertificateType { + V2GRootCertificate = 'V2GRootCertificate', + MORootCertificate = 'MORootCertificate', + CSMSRootCertificate = 'CSMSRootCertificate', + ManufacturerRootCertificate = 'ManufacturerRootCertificate', + ChargingStationCertificate = 'ChargingStationCertificate', + V2GCertificate = 'V2GCertificate', +} + +export interface ChargingStationTemplate { templateHash?: string; supervisionUrls?: string | string[]; supervisionUrlOcppConfiguration?: boolean; @@ -62,8 +76,9 @@ export type ChargingStationTemplate = { ocppStrictCompliance?: boolean; ocppPersistentConfiguration?: boolean; stationInfoPersistentConfiguration?: boolean; + automaticTransactionGeneratorPersistentConfiguration?: boolean; wsOptions?: WsOptions; - authorizationFile?: string; + idTagsFile?: string; baseName: string; nameSuffix?: string; fixedName?: boolean; @@ -78,9 +93,9 @@ export type ChargingStationTemplate = { imsi?: string; meterSerialNumberPrefix?: string; meterType?: string; - power: number | number[]; + power?: number | number[]; + powerUnit?: PowerUnits; powerSharedByConnectors?: boolean; - powerUnit: PowerUnits; currentOutType?: CurrentType; voltageOut?: Voltage; numberOfPhases?: number; @@ -93,7 +108,10 @@ export type ChargingStationTemplate = { reconnectExponentialDelay?: boolean; registrationMaxRetries?: number; enableStatistics?: boolean; + remoteAuthorization?: boolean; + /** @deprecated Replaced by remoteAuthorization */ mustAuthorizeAtRemoteStart?: boolean; + /** @deprecated Replaced by ocppStrictCompliance */ payloadSchemaValidation?: boolean; amperageLimitationOcppKey?: string; amperageLimitationUnit?: AmpereUnits; @@ -108,5 +126,7 @@ export type ChargingStationTemplate = { messageTriggerSupport?: Record; Configuration?: ChargingStationOcppConfiguration; AutomaticTransactionGenerator?: AutomaticTransactionGeneratorConfiguration; - Connectors: Record; -}; + Evses?: Record; + Connectors?: Record; + x509Certificates?: Record; +}