Commit | Line | Data |
---|---|---|
28f1c574 JB |
1 | import type { |
2 | BootReasonEnumType, | |
6b635033 | 3 | InstallCertificateUseEnumType, |
28f1c574 | 4 | OCPP20ConnectorStatusEnumType, |
69074173 JB |
5 | } from './Common'; |
6 | import type { OCPP20SetVariableDataType } from './Variables'; | |
7 | import type { EmptyObject } from '../../EmptyObject'; | |
8 | import type { JsonObject } from '../../JsonType'; | |
953d6b02 | 9 | |
d270cc87 JB |
10 | export enum OCPP20RequestCommand { |
11 | BOOT_NOTIFICATION = 'BootNotification', | |
12 | HEARTBEAT = 'Heartbeat', | |
6e939d9e | 13 | STATUS_NOTIFICATION = 'StatusNotification', |
d270cc87 JB |
14 | } |
15 | ||
16 | export enum OCPP20IncomingRequestCommand { | |
17 | CLEAR_CACHE = 'ClearCache', | |
81533a20 JB |
18 | REQUEST_START_TRANSACTION = 'RequestStartTransaction', |
19 | REQUEST_STOP_TRANSACTION = 'RequestStopTransaction', | |
d270cc87 JB |
20 | } |
21 | ||
28f1c574 | 22 | type ModemType = { |
d270cc87 JB |
23 | iccid?: string; |
24 | imsi?: string; | |
25 | } & JsonObject; | |
26 | ||
28f1c574 | 27 | type ChargingStationType = { |
d270cc87 JB |
28 | serialNumber?: string; |
29 | model: string; | |
30 | vendorName: string; | |
31 | firmwareVersion?: string; | |
32 | modem?: ModemType; | |
33 | } & JsonObject; | |
34 | ||
35 | export type OCPP20BootNotificationRequest = { | |
36 | reason: BootReasonEnumType; | |
37 | chargingStation: ChargingStationType; | |
38 | } & JsonObject; | |
39 | ||
81533a20 JB |
40 | export type OCPP20HeartbeatRequest = EmptyObject; |
41 | ||
d270cc87 | 42 | export type OCPP20ClearCacheRequest = EmptyObject; |
6e939d9e | 43 | |
6e939d9e JB |
44 | export type OCPP20StatusNotificationRequest = { |
45 | timestamp: Date; | |
46 | connectorStatus: OCPP20ConnectorStatusEnumType; | |
47 | evseId: number; | |
48 | connectorId: number; | |
6415403c | 49 | } & JsonObject; |
28f1c574 JB |
50 | |
51 | export type OCPP20SetVariablesRequest = { | |
52 | setVariableData: OCPP20SetVariableDataType[]; | |
53 | } & JsonObject; | |
6b635033 JB |
54 | |
55 | export type OCPP20InstallCertificateRequest = { | |
56 | certificateType: InstallCertificateUseEnumType; | |
57 | certificate: string; | |
58 | } & JsonObject; |