X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FChargingStationTemplate.ts;h=639cf8f7b8f1a54334bbce162bd6953f016ed241;hb=1e080116b0b62d897258a28efa129a9a65bf7d4e;hp=c06468e91f6a00c90018725fa900755aa1da8b99;hpb=2dcfe98ec940932372855643f996b87c27f4b7fa;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/ChargingStationTemplate.ts b/src/types/ChargingStationTemplate.ts index c06468e9..639cf8f7 100644 --- a/src/types/ChargingStationTemplate.ts +++ b/src/types/ChargingStationTemplate.ts @@ -1,4 +1,5 @@ -import ChargingStationConfiguration from './ChargingStationConfiguration'; +import { AutomaticTransactionGeneratorConfiguration } from './AutomaticTransactionGenerator'; +import ChargingStationOcppConfiguration from './ChargingStationOcppConfiguration'; import { ClientOptions } from 'ws'; import { ClientRequestArgs } from 'http'; import { ConnectorStatus } from './ConnectorStatus'; @@ -15,26 +16,24 @@ export enum PowerUnits { KILO_WATT = 'kW', } +export enum AmpereUnits { + MILLI_AMPERE = 'mA', + CENTI_AMPERE = 'cA', + DECI_AMPERE = 'dA', + AMPERE = 'A', +} + export enum Voltage { VOLTAGE_110 = 110, VOLTAGE_230 = 230, VOLTAGE_400 = 400, - VOLTAGE_800 = 800 + VOLTAGE_800 = 800, } -export interface AutomaticTransactionGenerator { - enable: boolean; - minDuration: number; - maxDuration: number; - minDelayBetweenTwoTransactions: number; - maxDelayBetweenTwoTransactions: number; - probabilityOfStart: number; - stopAfterHours: number; - stopOnConnectionFailure: boolean; - requireAuthorize?: boolean -} +export type WsOptions = ClientOptions & ClientRequestArgs; export default interface ChargingStationTemplate { + templateHash?: string; supervisionUrls?: string | string[]; supervisionUrlOcppConfiguration?: boolean; supervisionUrlOcppKey?: string; @@ -42,15 +41,23 @@ export default interface ChargingStationTemplate { supervisionPassword?: string; ocppVersion?: OCPPVersion; ocppProtocol?: OCPPProtocol; - wsOptions?: ClientOptions & ClientRequestArgs; + ocppStrictCompliance?: boolean; + ocppPersistentConfiguration?: boolean; + stationInfoPersistentConfiguration?: boolean; + wsOptions?: WsOptions; authorizationFile?: string; baseName: string; nameSuffix?: string; fixedName?: boolean; chargePointModel: string; chargePointVendor: string; + chargePointSerialNumberPrefix?: string; chargeBoxSerialNumberPrefix?: string; firmwareVersion?: string; + iccid?: string; + imsi?: string; + meterSerialNumberPrefix?: string; + meterType?: string; power: number | number[]; powerSharedByConnectors?: boolean; powerUnit: PowerUnits; @@ -61,19 +68,22 @@ export default interface ChargingStationTemplate { useConnectorId0?: boolean; randomConnectors?: boolean; resetTime?: number; - autoRegister: boolean; + autoRegister?: boolean; autoReconnectMaxRetries?: number; reconnectExponentialDelay?: boolean; registrationMaxRetries?: number; enableStatistics?: boolean; mayAuthorizeAtRemoteStart: boolean; + amperageLimitationOcppKey?: string; + amperageLimitationUnit?: AmpereUnits; beginEndMeterValues?: boolean; outOfOrderEndMeterValues?: boolean; meteringPerTransaction?: boolean; transactionDataMeterValues?: boolean; mainVoltageMeterValues?: boolean; phaseLineToLineVoltageMeterValues?: boolean; - Configuration?: ChargingStationConfiguration; - AutomaticTransactionGenerator: AutomaticTransactionGenerator; + customValueLimitationMeterValues?: boolean; + Configuration?: ChargingStationOcppConfiguration; + AutomaticTransactionGenerator?: AutomaticTransactionGeneratorConfiguration; Connectors: Record; }