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