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