| 1 | import ChargingStationOcppConfiguration from './ChargingStationOcppConfiguration'; |
| 2 | import { ClientOptions } from 'ws'; |
| 3 | import { ClientRequestArgs } from 'http'; |
| 4 | import { ConnectorStatus } from './ConnectorStatus'; |
| 5 | import { OCPPProtocol } from './ocpp/OCPPProtocol'; |
| 6 | import { OCPPVersion } from './ocpp/OCPPVersion'; |
| 7 | |
| 8 | export enum CurrentType { |
| 9 | AC = 'AC', |
| 10 | DC = 'DC', |
| 11 | } |
| 12 | |
| 13 | export enum PowerUnits { |
| 14 | WATT = 'W', |
| 15 | KILO_WATT = 'kW', |
| 16 | } |
| 17 | |
| 18 | export enum AmpereUnits { |
| 19 | MILLI_AMPERE = 'mA', |
| 20 | CENTI_AMPERE = 'cA', |
| 21 | DECI_AMPERE = 'dA', |
| 22 | AMPERE = 'A', |
| 23 | } |
| 24 | |
| 25 | export enum Voltage { |
| 26 | VOLTAGE_110 = 110, |
| 27 | VOLTAGE_230 = 230, |
| 28 | VOLTAGE_400 = 400, |
| 29 | VOLTAGE_800 = 800, |
| 30 | } |
| 31 | |
| 32 | export interface AutomaticTransactionGenerator { |
| 33 | enable: boolean; |
| 34 | minDuration: number; |
| 35 | maxDuration: number; |
| 36 | minDelayBetweenTwoTransactions: number; |
| 37 | maxDelayBetweenTwoTransactions: number; |
| 38 | probabilityOfStart: number; |
| 39 | stopAfterHours: number; |
| 40 | stopOnConnectionFailure: boolean; |
| 41 | requireAuthorize?: boolean; |
| 42 | } |
| 43 | |
| 44 | export type WsOptions = ClientOptions & ClientRequestArgs; |
| 45 | |
| 46 | export default interface ChargingStationTemplate { |
| 47 | hash?: string; |
| 48 | supervisionUrls?: string | string[]; |
| 49 | supervisionUrlOcppConfiguration?: boolean; |
| 50 | supervisionUrlOcppKey?: string; |
| 51 | supervisionUser?: string; |
| 52 | supervisionPassword?: string; |
| 53 | ocppVersion?: OCPPVersion; |
| 54 | ocppProtocol?: OCPPProtocol; |
| 55 | ocppStrictCompliance?: boolean; |
| 56 | ocppPersistentConfiguration?: boolean; |
| 57 | wsOptions?: WsOptions; |
| 58 | authorizationFile?: string; |
| 59 | baseName: string; |
| 60 | nameSuffix?: string; |
| 61 | fixedName?: boolean; |
| 62 | chargePointModel: string; |
| 63 | chargePointVendor: string; |
| 64 | chargePointSerialNumberPrefix?: string; |
| 65 | chargeBoxSerialNumberPrefix?: string; |
| 66 | firmwareVersion?: string; |
| 67 | iccid?: string; |
| 68 | imsi?: string; |
| 69 | meterSerialNumber?: string; |
| 70 | meterType?: string; |
| 71 | power: number | number[]; |
| 72 | powerSharedByConnectors?: boolean; |
| 73 | powerUnit: PowerUnits; |
| 74 | currentOutType?: CurrentType; |
| 75 | voltageOut?: Voltage; |
| 76 | numberOfPhases?: number; |
| 77 | numberOfConnectors?: number | number[]; |
| 78 | useConnectorId0?: boolean; |
| 79 | randomConnectors?: boolean; |
| 80 | resetTime?: number; |
| 81 | autoRegister: boolean; |
| 82 | autoReconnectMaxRetries?: number; |
| 83 | reconnectExponentialDelay?: boolean; |
| 84 | registrationMaxRetries?: number; |
| 85 | enableStatistics?: boolean; |
| 86 | mayAuthorizeAtRemoteStart: boolean; |
| 87 | amperageLimitationOcppKey?: string; |
| 88 | amperageLimitationUnit?: AmpereUnits; |
| 89 | beginEndMeterValues?: boolean; |
| 90 | outOfOrderEndMeterValues?: boolean; |
| 91 | meteringPerTransaction?: boolean; |
| 92 | transactionDataMeterValues?: boolean; |
| 93 | mainVoltageMeterValues?: boolean; |
| 94 | phaseLineToLineVoltageMeterValues?: boolean; |
| 95 | Configuration?: ChargingStationOcppConfiguration; |
| 96 | AutomaticTransactionGenerator: AutomaticTransactionGenerator; |
| 97 | Connectors: Record<string, ConnectorStatus>; |
| 98 | } |