ff17749a4534761c87bfa437d54c2b038a3881b7
[e-mobility-charging-stations-simulator.git] / src / types / ChargingStationTemplate.ts
1 import ChargingStationOcppConfiguration from './ChargingStationOcppConfiguration';
2 import { ClientOptions } from 'ws';
3 import { ClientRequestArgs } from 'http';
4 import { ConnectorStatus } from './ConnectorStatus';
5 import { OCPPProtocol } from './ocpp/OCPPProtocol';
6 import { OCPPVersion } from './ocpp/OCPPVersion';
7
8 export enum CurrentType {
9 AC = 'AC',
10 DC = 'DC',
11 }
12
13 export enum PowerUnits {
14 WATT = 'W',
15 KILO_WATT = 'kW',
16 }
17
18 export enum AmpereUnits {
19 MILLI_AMPERE = 'mA',
20 CENTI_AMPERE = 'cA',
21 DECI_AMPERE = 'dA',
22 AMPERE = 'A',
23 }
24
25 export enum Voltage {
26 VOLTAGE_110 = 110,
27 VOLTAGE_230 = 230,
28 VOLTAGE_400 = 400,
29 VOLTAGE_800 = 800,
30 }
31
32 export interface AutomaticTransactionGenerator {
33 enable: boolean;
34 minDuration: number;
35 maxDuration: number;
36 minDelayBetweenTwoTransactions: number;
37 maxDelayBetweenTwoTransactions: number;
38 probabilityOfStart: number;
39 stopAfterHours: number;
40 stopOnConnectionFailure: boolean;
41 requireAuthorize?: boolean;
42 }
43
44 export type WsOptions = ClientOptions & ClientRequestArgs;
45
46 export default interface ChargingStationTemplate {
47 supervisionUrls?: string | string[];
48 supervisionUrlOcppConfiguration?: boolean;
49 supervisionUrlOcppKey?: string;
50 supervisionUser?: string;
51 supervisionPassword?: string;
52 ocppVersion?: OCPPVersion;
53 ocppProtocol?: OCPPProtocol;
54 ocppStrictCompliance?: boolean;
55 ocppPersistentConfiguration?: boolean;
56 wsOptions?: WsOptions;
57 authorizationFile?: string;
58 baseName: string;
59 nameSuffix?: string;
60 fixedName?: boolean;
61 chargePointModel: string;
62 chargePointVendor: string;
63 chargePointSerialNumberPrefix?: string;
64 chargeBoxSerialNumberPrefix?: string;
65 firmwareVersion?: string;
66 iccid?: string;
67 imsi?: string;
68 meterSerialNumber?: string;
69 meterType?: string;
70 power: number | number[];
71 powerSharedByConnectors?: boolean;
72 powerUnit: PowerUnits;
73 currentOutType?: CurrentType;
74 voltageOut?: Voltage;
75 numberOfPhases?: number;
76 numberOfConnectors?: number | number[];
77 useConnectorId0?: boolean;
78 randomConnectors?: boolean;
79 resetTime?: number;
80 autoRegister: boolean;
81 autoReconnectMaxRetries?: number;
82 reconnectExponentialDelay?: boolean;
83 registrationMaxRetries?: number;
84 enableStatistics?: boolean;
85 mayAuthorizeAtRemoteStart: boolean;
86 amperageLimitationOcppKey?: string;
87 amperageLimitationUnit?: AmpereUnits;
88 beginEndMeterValues?: boolean;
89 outOfOrderEndMeterValues?: boolean;
90 meteringPerTransaction?: boolean;
91 transactionDataMeterValues?: boolean;
92 mainVoltageMeterValues?: boolean;
93 phaseLineToLineVoltageMeterValues?: boolean;
94 Configuration?: ChargingStationOcppConfiguration;
95 AutomaticTransactionGenerator: AutomaticTransactionGenerator;
96 Connectors: Record<string, ConnectorStatus>;
97 }