Commit | Line | Data |
---|---|---|
d270cc87 JB |
1 | import type { EmptyObject } from '../../EmptyObject'; |
2 | import type { JsonObject } from '../../JsonType'; | |
953d6b02 | 3 | |
d270cc87 JB |
4 | export enum OCPP20RequestCommand { |
5 | BOOT_NOTIFICATION = 'BootNotification', | |
6 | HEARTBEAT = 'Heartbeat', | |
6e939d9e | 7 | STATUS_NOTIFICATION = 'StatusNotification', |
d270cc87 JB |
8 | } |
9 | ||
10 | export enum OCPP20IncomingRequestCommand { | |
11 | CLEAR_CACHE = 'ClearCache', | |
81533a20 JB |
12 | REQUEST_START_TRANSACTION = 'RequestStartTransaction', |
13 | REQUEST_STOP_TRANSACTION = 'RequestStopTransaction', | |
d270cc87 JB |
14 | } |
15 | ||
16 | export enum BootReasonEnumType { | |
17 | ApplicationReset = 'ApplicationReset', | |
18 | FirmwareUpdate = 'FirmwareUpdate', | |
19 | LocalReset = 'LocalReset', | |
20 | PowerUp = 'PowerUp', | |
21 | RemoteReset = 'RemoteReset', | |
22 | ScheduledReset = 'ScheduledReset', | |
23 | Triggered = 'Triggered', | |
24 | Unknown = 'Unknown', | |
25 | Watchdog = 'Watchdog', | |
26 | } | |
27 | ||
28 | export type ModemType = { | |
29 | iccid?: string; | |
30 | imsi?: string; | |
31 | } & JsonObject; | |
32 | ||
33 | export type ChargingStationType = { | |
34 | serialNumber?: string; | |
35 | model: string; | |
36 | vendorName: string; | |
37 | firmwareVersion?: string; | |
38 | modem?: ModemType; | |
39 | } & JsonObject; | |
40 | ||
41 | export type OCPP20BootNotificationRequest = { | |
42 | reason: BootReasonEnumType; | |
43 | chargingStation: ChargingStationType; | |
44 | } & JsonObject; | |
45 | ||
81533a20 JB |
46 | export type OCPP20HeartbeatRequest = EmptyObject; |
47 | ||
d270cc87 | 48 | export type OCPP20ClearCacheRequest = EmptyObject; |
6e939d9e JB |
49 | |
50 | export enum OCPP20ConnectorStatusEnumType { | |
51 | AVAILABLE = 'Available', | |
52 | OCCUPIED = 'Occupied', | |
53 | RESERVED = 'Reserved', | |
54 | UNAVAILABLE = 'Unavailable', | |
55 | FAULTED = 'Faulted', | |
56 | } | |
57 | ||
58 | export type OCPP20StatusNotificationRequest = { | |
59 | timestamp: Date; | |
60 | connectorStatus: OCPP20ConnectorStatusEnumType; | |
61 | evseId: number; | |
62 | connectorId: number; | |
6415403c | 63 | } & JsonObject; |