X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FChargingStationTemplate.ts;h=7807837573fac8aed4fcbef66dcd73a9023cb180;hb=974efe6c9928aabb0d9356c19342d0fa432f3cc1;hp=aa9a1b7a200f9a32be746236f5b6f0c3d495cda9;hpb=dada83ec9f4fb9426070147b43615d494ae86fcc;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/ChargingStationTemplate.ts b/src/types/ChargingStationTemplate.ts index aa9a1b7a..78078375 100644 --- a/src/types/ChargingStationTemplate.ts +++ b/src/types/ChargingStationTemplate.ts @@ -2,17 +2,18 @@ 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 { - AutomaticTransactionGeneratorConfiguration, - ChargingStationOcppConfiguration, - ConnectorStatus, FirmwareStatus, IncomingRequestCommand, MessageTrigger, - OCPPProtocol, - OCPPVersion, RequestCommand, -} from './internal'; +} from './ocpp/Requests'; export enum CurrentType { AC = 'AC', @@ -40,21 +41,30 @@ export enum Voltage { export type WsOptions = ClientOptions & ClientRequestArgs; -export type FirmwareUpgrade = { +export interface FirmwareUpgrade { versionUpgrade?: { patternGroup?: number; step?: number; }; reset?: 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; @@ -66,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; @@ -82,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; @@ -98,6 +109,7 @@ export type ChargingStationTemplate = { registrationMaxRetries?: number; enableStatistics?: boolean; mustAuthorizeAtRemoteStart?: boolean; + /** @deprecated Replaced by ocppStrictCompliance */ payloadSchemaValidation?: boolean; amperageLimitationOcppKey?: string; amperageLimitationUnit?: AmpereUnits; @@ -112,5 +124,7 @@ export type ChargingStationTemplate = { messageTriggerSupport?: Record; Configuration?: ChargingStationOcppConfiguration; AutomaticTransactionGenerator?: AutomaticTransactionGeneratorConfiguration; - Connectors: Record; -}; + Evses?: Record; + Connectors?: Record; + x509Certificates?: Record; +}