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