Apply prettier formating
[e-mobility-charging-stations-simulator.git] / src / types / ChargingStationTemplate.ts
CommitLineData
9ac86a7e 1import ChargingStationConfiguration from './ChargingStationConfiguration';
cd8dd457
JB
2import { ClientOptions } from 'ws';
3import { ClientRequestArgs } from 'http';
057e2042 4import { ConnectorStatus } from './ConnectorStatus';
c0560973
JB
5import { OCPPProtocol } from './ocpp/OCPPProtocol';
6import { OCPPVersion } from './ocpp/OCPPVersion';
9ac86a7e 7
4c2b4904 8export enum CurrentType {
9ac86a7e
JB
9 AC = 'AC',
10 DC = 'DC',
11}
12
a02da55f 13export enum PowerUnits {
9ac86a7e
JB
14 WATT = 'W',
15 KILO_WATT = 'kW',
16}
17
4c2b4904 18export enum Voltage {
84d4e562
JB
19 VOLTAGE_110 = 110,
20 VOLTAGE_230 = 230,
fd0c36fa 21 VOLTAGE_400 = 400,
e7aeea18 22 VOLTAGE_800 = 800,
84d4e562
JB
23}
24
9ac86a7e
JB
25export interface AutomaticTransactionGenerator {
26 enable: boolean;
27 minDuration: number;
28 maxDuration: number;
29 minDelayBetweenTwoTransactions: number;
30 maxDelayBetweenTwoTransactions: number;
31 probabilityOfStart: number;
32 stopAfterHours: number;
5fdab605 33 stopOnConnectionFailure: boolean;
e7aeea18 34 requireAuthorize?: boolean;
9ac86a7e
JB
35}
36
37export default interface ChargingStationTemplate {
2dcfe98e 38 supervisionUrls?: string | string[];
1f5df42a
JB
39 supervisionUrlOcppConfiguration?: boolean;
40 supervisionUrlOcppKey?: string;
15042c5f
JB
41 supervisionUser?: string;
42 supervisionPassword?: string;
c0560973
JB
43 ocppVersion?: OCPPVersion;
44 ocppProtocol?: OCPPProtocol;
672fed6e 45 ocppStrictCompliance?: boolean;
cd8dd457 46 wsOptions?: ClientOptions & ClientRequestArgs;
9ac86a7e
JB
47 authorizationFile?: string;
48 baseName: string;
5fdab605 49 nameSuffix?: string;
a02da55f 50 fixedName?: boolean;
9ac86a7e
JB
51 chargePointModel: string;
52 chargePointVendor: string;
53 chargeBoxSerialNumberPrefix?: string;
54 firmwareVersion?: string;
55 power: number | number[];
56 powerSharedByConnectors?: boolean;
ef16e252 57 powerUnit: PowerUnits;
4c2b4904
JB
58 currentOutType?: CurrentType;
59 voltageOut?: Voltage;
9ac86a7e
JB
60 numberOfPhases?: number;
61 numberOfConnectors?: number | number[];
62 useConnectorId0?: boolean;
63 randomConnectors?: boolean;
64 resetTime?: number;
47e22477 65 autoRegister: boolean;
3574dfd3 66 autoReconnectMaxRetries?: number;
032d6efc 67 reconnectExponentialDelay?: boolean;
6ad94506 68 registrationMaxRetries?: number;
9ac86a7e 69 enableStatistics?: boolean;
a7fc8211 70 mayAuthorizeAtRemoteStart: boolean;
6ed92bc1
JB
71 beginEndMeterValues?: boolean;
72 outOfOrderEndMeterValues?: boolean;
73 meteringPerTransaction?: boolean;
fd0c36fa 74 transactionDataMeterValues?: boolean;
9ccca265 75 mainVoltageMeterValues?: boolean;
6b10669b 76 phaseLineToLineVoltageMeterValues?: boolean;
9ac86a7e
JB
77 Configuration?: ChargingStationConfiguration;
78 AutomaticTransactionGenerator: AutomaticTransactionGenerator;
734d790d 79 Connectors: Record<string, ConnectorStatus>;
9ac86a7e 80}