README.md: section name refinement
[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 Voltage {
19 VOLTAGE_110 = 110,
20 VOLTAGE_230 = 230,
21 VOLTAGE_400 = 400,
22 VOLTAGE_800 = 800,
23 }
24
25 export interface AutomaticTransactionGenerator {
26 enable: boolean;
27 minDuration: number;
28 maxDuration: number;
29 minDelayBetweenTwoTransactions: number;
30 maxDelayBetweenTwoTransactions: number;
31 probabilityOfStart: number;
32 stopAfterHours: number;
33 stopOnConnectionFailure: boolean;
34 requireAuthorize?: boolean;
35 }
36
37 export type WsOptions = ClientOptions & ClientRequestArgs;
38
39 export default interface ChargingStationTemplate {
40 hash?: string;
41 supervisionUrls?: string | string[];
42 supervisionUrlOcppConfiguration?: boolean;
43 supervisionUrlOcppKey?: string;
44 supervisionUser?: string;
45 supervisionPassword?: string;
46 ocppVersion?: OCPPVersion;
47 ocppProtocol?: OCPPProtocol;
48 ocppStrictCompliance?: boolean;
49 ocppPersistentConfiguration?: boolean;
50 wsOptions?: WsOptions;
51 authorizationFile?: string;
52 baseName: string;
53 nameSuffix?: string;
54 fixedName?: boolean;
55 chargePointModel: string;
56 chargePointVendor: string;
57 chargePointSerialNumberPrefix?: string;
58 chargeBoxSerialNumberPrefix?: string;
59 firmwareVersion?: string;
60 iccid?: string;
61 imsi?: string;
62 meterSerialNumber?: string;
63 meterType?: string;
64 power: number | number[];
65 powerSharedByConnectors?: boolean;
66 powerUnit: PowerUnits;
67 currentOutType?: CurrentType;
68 voltageOut?: Voltage;
69 numberOfPhases?: number;
70 numberOfConnectors?: number | number[];
71 useConnectorId0?: boolean;
72 randomConnectors?: boolean;
73 resetTime?: number;
74 autoRegister: boolean;
75 autoReconnectMaxRetries?: number;
76 reconnectExponentialDelay?: boolean;
77 registrationMaxRetries?: number;
78 enableStatistics?: boolean;
79 mayAuthorizeAtRemoteStart: boolean;
80 beginEndMeterValues?: boolean;
81 outOfOrderEndMeterValues?: boolean;
82 meteringPerTransaction?: boolean;
83 transactionDataMeterValues?: boolean;
84 mainVoltageMeterValues?: boolean;
85 phaseLineToLineVoltageMeterValues?: boolean;
86 Configuration?: ChargingStationOcppConfiguration;
87 AutomaticTransactionGenerator: AutomaticTransactionGenerator;
88 Connectors: Record<string, ConnectorStatus>;
89 }