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