Add amperage limitation support via vendor specific OCPP key
[e-mobility-charging-stations-simulator.git] / src / types / ChargingStationTemplate.ts
CommitLineData
2484ac1e 1import ChargingStationOcppConfiguration from './ChargingStationOcppConfiguration';
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
cc6e8ab5
JB
18export enum AmpereUnits {
19 MILLI_AMPERE = 'mA',
20 CENTI_AMPERE = 'cA',
21 DECI_AMPERE = 'dA',
22 AMPERE = 'A',
23}
24
4c2b4904 25export enum Voltage {
84d4e562
JB
26 VOLTAGE_110 = 110,
27 VOLTAGE_230 = 230,
fd0c36fa 28 VOLTAGE_400 = 400,
e7aeea18 29 VOLTAGE_800 = 800,
84d4e562
JB
30}
31
9ac86a7e
JB
32export interface AutomaticTransactionGenerator {
33 enable: boolean;
34 minDuration: number;
35 maxDuration: number;
36 minDelayBetweenTwoTransactions: number;
37 maxDelayBetweenTwoTransactions: number;
38 probabilityOfStart: number;
39 stopAfterHours: number;
5fdab605 40 stopOnConnectionFailure: boolean;
e7aeea18 41 requireAuthorize?: boolean;
9ac86a7e
JB
42}
43
2484ac1e
JB
44export type WsOptions = ClientOptions & ClientRequestArgs;
45
9ac86a7e 46export default interface ChargingStationTemplate {
2484ac1e 47 hash?: string;
2dcfe98e 48 supervisionUrls?: string | string[];
1f5df42a
JB
49 supervisionUrlOcppConfiguration?: boolean;
50 supervisionUrlOcppKey?: string;
15042c5f
JB
51 supervisionUser?: string;
52 supervisionPassword?: string;
c0560973
JB
53 ocppVersion?: OCPPVersion;
54 ocppProtocol?: OCPPProtocol;
672fed6e 55 ocppStrictCompliance?: boolean;
e8e865ea 56 ocppPersistentConfiguration?: boolean;
2484ac1e 57 wsOptions?: WsOptions;
9ac86a7e
JB
58 authorizationFile?: string;
59 baseName: string;
5fdab605 60 nameSuffix?: string;
a02da55f 61 fixedName?: boolean;
9ac86a7e
JB
62 chargePointModel: string;
63 chargePointVendor: string;
43bb4cd9 64 chargePointSerialNumberPrefix?: string;
9ac86a7e
JB
65 chargeBoxSerialNumberPrefix?: string;
66 firmwareVersion?: string;
3f94cab5
JB
67 iccid?: string;
68 imsi?: string;
69 meterSerialNumber?: string;
70 meterType?: string;
9ac86a7e
JB
71 power: number | number[];
72 powerSharedByConnectors?: boolean;
ef16e252 73 powerUnit: PowerUnits;
4c2b4904
JB
74 currentOutType?: CurrentType;
75 voltageOut?: Voltage;
9ac86a7e
JB
76 numberOfPhases?: number;
77 numberOfConnectors?: number | number[];
78 useConnectorId0?: boolean;
79 randomConnectors?: boolean;
80 resetTime?: number;
47e22477 81 autoRegister: boolean;
3574dfd3 82 autoReconnectMaxRetries?: number;
032d6efc 83 reconnectExponentialDelay?: boolean;
6ad94506 84 registrationMaxRetries?: number;
9ac86a7e 85 enableStatistics?: boolean;
a7fc8211 86 mayAuthorizeAtRemoteStart: boolean;
cc6e8ab5
JB
87 amperageLimitationOcppKey?: string;
88 amperageLimitationUnit?: AmpereUnits;
6ed92bc1
JB
89 beginEndMeterValues?: boolean;
90 outOfOrderEndMeterValues?: boolean;
91 meteringPerTransaction?: boolean;
fd0c36fa 92 transactionDataMeterValues?: boolean;
9ccca265 93 mainVoltageMeterValues?: boolean;
6b10669b 94 phaseLineToLineVoltageMeterValues?: boolean;
2484ac1e 95 Configuration?: ChargingStationOcppConfiguration;
9ac86a7e 96 AutomaticTransactionGenerator: AutomaticTransactionGenerator;
734d790d 97 Connectors: Record<string, ConnectorStatus>;
9ac86a7e 98}