Refine UI protocol documentation
[e-mobility-charging-stations-simulator.git] / src / types / ChargingStationTemplate.ts
CommitLineData
6c1761d4 1import type { ClientRequestArgs } from 'http';
8114d10e 2
6c1761d4 3import type { ClientOptions } from 'ws';
8114d10e 4
6c1761d4
JB
5import type { AutomaticTransactionGeneratorConfiguration } from './AutomaticTransactionGenerator';
6import type ChargingStationOcppConfiguration from './ChargingStationOcppConfiguration';
7import type { ConnectorStatus } from './ConnectorStatus';
8import type { OCPPProtocol } from './ocpp/OCPPProtocol';
9import type { OCPPVersion } from './ocpp/OCPPVersion';
10import type { IncomingRequestCommand, RequestCommand } from './ocpp/Requests';
9ac86a7e 11
4c2b4904 12export enum CurrentType {
9ac86a7e
JB
13 AC = 'AC',
14 DC = 'DC',
15}
16
a02da55f 17export enum PowerUnits {
9ac86a7e
JB
18 WATT = 'W',
19 KILO_WATT = 'kW',
20}
21
cc6e8ab5
JB
22export enum AmpereUnits {
23 MILLI_AMPERE = 'mA',
24 CENTI_AMPERE = 'cA',
25 DECI_AMPERE = 'dA',
26 AMPERE = 'A',
27}
28
4c2b4904 29export enum Voltage {
84d4e562
JB
30 VOLTAGE_110 = 110,
31 VOLTAGE_230 = 230,
fd0c36fa 32 VOLTAGE_400 = 400,
e7aeea18 33 VOLTAGE_800 = 800,
84d4e562
JB
34}
35
2484ac1e
JB
36export type WsOptions = ClientOptions & ClientRequestArgs;
37
65554cc3
JB
38interface CommandsSupport {
39 incomingCommands: Record<IncomingRequestCommand, boolean>;
40 outgoingCommands?: Record<RequestCommand, boolean>;
41}
42
9ac86a7e 43export default interface ChargingStationTemplate {
f765beaa 44 templateHash?: string;
2dcfe98e 45 supervisionUrls?: string | string[];
1f5df42a
JB
46 supervisionUrlOcppConfiguration?: boolean;
47 supervisionUrlOcppKey?: string;
15042c5f
JB
48 supervisionUser?: string;
49 supervisionPassword?: string;
c0560973
JB
50 ocppVersion?: OCPPVersion;
51 ocppProtocol?: OCPPProtocol;
672fed6e 52 ocppStrictCompliance?: boolean;
e8e865ea 53 ocppPersistentConfiguration?: boolean;
ccb1d6e9 54 stationInfoPersistentConfiguration?: boolean;
2484ac1e 55 wsOptions?: WsOptions;
9ac86a7e
JB
56 authorizationFile?: string;
57 baseName: string;
5fdab605 58 nameSuffix?: string;
a02da55f 59 fixedName?: boolean;
9ac86a7e
JB
60 chargePointModel: string;
61 chargePointVendor: string;
43bb4cd9 62 chargePointSerialNumberPrefix?: string;
9ac86a7e
JB
63 chargeBoxSerialNumberPrefix?: string;
64 firmwareVersion?: string;
3f94cab5
JB
65 iccid?: string;
66 imsi?: string;
0b7c34ba 67 meterSerialNumberPrefix?: string;
3f94cab5 68 meterType?: string;
9ac86a7e
JB
69 power: number | number[];
70 powerSharedByConnectors?: boolean;
ef16e252 71 powerUnit: PowerUnits;
4c2b4904
JB
72 currentOutType?: CurrentType;
73 voltageOut?: Voltage;
9ac86a7e
JB
74 numberOfPhases?: number;
75 numberOfConnectors?: number | number[];
76 useConnectorId0?: boolean;
77 randomConnectors?: boolean;
78 resetTime?: number;
7c72977b 79 autoRegister?: boolean;
3574dfd3 80 autoReconnectMaxRetries?: number;
032d6efc 81 reconnectExponentialDelay?: boolean;
6ad94506 82 registrationMaxRetries?: number;
9ac86a7e 83 enableStatistics?: boolean;
03ebf4c1 84 mustAuthorizeAtRemoteStart?: boolean;
e3018bc4 85 payloadSchemaValidation?: boolean;
cc6e8ab5
JB
86 amperageLimitationOcppKey?: string;
87 amperageLimitationUnit?: AmpereUnits;
6ed92bc1
JB
88 beginEndMeterValues?: boolean;
89 outOfOrderEndMeterValues?: boolean;
90 meteringPerTransaction?: boolean;
fd0c36fa 91 transactionDataMeterValues?: boolean;
9ccca265 92 mainVoltageMeterValues?: boolean;
6b10669b 93 phaseLineToLineVoltageMeterValues?: boolean;
7bc31f9c 94 customValueLimitationMeterValues?: boolean;
65554cc3 95 commandsSupport?: CommandsSupport;
2484ac1e 96 Configuration?: ChargingStationOcppConfiguration;
fa7bccf4 97 AutomaticTransactionGenerator?: AutomaticTransactionGeneratorConfiguration;
734d790d 98 Connectors: Record<string, ConnectorStatus>;
9ac86a7e 99}