X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FChargingStationTemplate.ts;h=7807837573fac8aed4fcbef66dcd73a9023cb180;hb=974efe6c9928aabb0d9356c19342d0fa432f3cc1;hp=3945e8925f94ebbafd9ce5435b10b12466649e45;hpb=c60ed4b8646f72758a27b62003e51568d3966d29;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/ChargingStationTemplate.ts b/src/types/ChargingStationTemplate.ts index 3945e892..78078375 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,12 +41,30 @@ export enum Voltage { export type WsOptions = ClientOptions & ClientRequestArgs; -type CommandsSupport = { +export interface FirmwareUpgrade { + versionUpgrade?: { + patternGroup?: number; + step?: number; + }; + reset?: boolean; + failureStatus?: FirmwareStatus; +} + +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; @@ -52,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; @@ -61,14 +86,16 @@ export type ChargingStationTemplate = { chargePointVendor: string; chargePointSerialNumberPrefix?: string; chargeBoxSerialNumberPrefix?: string; + firmwareVersionPattern?: string; firmwareVersion?: string; + firmwareUpgrade?: FirmwareUpgrade; iccid?: string; imsi?: string; meterSerialNumberPrefix?: string; meterType?: string; - power: number | number[]; + power?: number | number[]; + powerUnit?: PowerUnits; powerSharedByConnectors?: boolean; - powerUnit: PowerUnits; currentOutType?: CurrentType; voltageOut?: Voltage; numberOfPhases?: number; @@ -82,6 +109,7 @@ export type ChargingStationTemplate = { registrationMaxRetries?: number; enableStatistics?: boolean; mustAuthorizeAtRemoteStart?: boolean; + /** @deprecated Replaced by ocppStrictCompliance */ payloadSchemaValidation?: boolean; amperageLimitationOcppKey?: string; amperageLimitationUnit?: AmpereUnits; @@ -96,5 +124,7 @@ export type ChargingStationTemplate = { messageTriggerSupport?: Record; Configuration?: ChargingStationOcppConfiguration; AutomaticTransactionGenerator?: AutomaticTransactionGeneratorConfiguration; - Connectors: Record; -}; + Evses?: Record; + Connectors?: Record; + x509Certificates?: Record; +}