Commit | Line | Data |
---|---|---|
8114d10e JB |
1 | import { ClientRequestArgs } from 'http'; |
2 | ||
3 | import { ClientOptions } from 'ws'; | |
4 | ||
fa7bccf4 | 5 | import { AutomaticTransactionGeneratorConfiguration } from './AutomaticTransactionGenerator'; |
2484ac1e | 6 | import ChargingStationOcppConfiguration from './ChargingStationOcppConfiguration'; |
057e2042 | 7 | import { ConnectorStatus } from './ConnectorStatus'; |
c0560973 JB |
8 | import { OCPPProtocol } from './ocpp/OCPPProtocol'; |
9 | import { OCPPVersion } from './ocpp/OCPPVersion'; | |
65554cc3 | 10 | import { IncomingRequestCommand, RequestCommand } from './ocpp/Requests'; |
9ac86a7e | 11 | |
4c2b4904 | 12 | export enum CurrentType { |
9ac86a7e JB |
13 | AC = 'AC', |
14 | DC = 'DC', | |
15 | } | |
16 | ||
a02da55f | 17 | export enum PowerUnits { |
9ac86a7e JB |
18 | WATT = 'W', |
19 | KILO_WATT = 'kW', | |
20 | } | |
21 | ||
cc6e8ab5 JB |
22 | export enum AmpereUnits { |
23 | MILLI_AMPERE = 'mA', | |
24 | CENTI_AMPERE = 'cA', | |
25 | DECI_AMPERE = 'dA', | |
26 | AMPERE = 'A', | |
27 | } | |
28 | ||
4c2b4904 | 29 | export 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 |
36 | export type WsOptions = ClientOptions & ClientRequestArgs; |
37 | ||
65554cc3 JB |
38 | interface CommandsSupport { |
39 | incomingCommands: Record<IncomingRequestCommand, boolean>; | |
40 | outgoingCommands?: Record<RequestCommand, boolean>; | |
41 | } | |
42 | ||
9ac86a7e | 43 | export 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; |
a7fc8211 | 84 | mayAuthorizeAtRemoteStart: boolean; |
cc6e8ab5 JB |
85 | amperageLimitationOcppKey?: string; |
86 | amperageLimitationUnit?: AmpereUnits; | |
6ed92bc1 JB |
87 | beginEndMeterValues?: boolean; |
88 | outOfOrderEndMeterValues?: boolean; | |
89 | meteringPerTransaction?: boolean; | |
fd0c36fa | 90 | transactionDataMeterValues?: boolean; |
9ccca265 | 91 | mainVoltageMeterValues?: boolean; |
6b10669b | 92 | phaseLineToLineVoltageMeterValues?: boolean; |
7bc31f9c | 93 | customValueLimitationMeterValues?: boolean; |
65554cc3 | 94 | commandsSupport?: CommandsSupport; |
2484ac1e | 95 | Configuration?: ChargingStationOcppConfiguration; |
fa7bccf4 | 96 | AutomaticTransactionGenerator?: AutomaticTransactionGeneratorConfiguration; |
734d790d | 97 | Connectors: Record<string, ConnectorStatus>; |
9ac86a7e | 98 | } |