Commit | Line | Data |
---|---|---|
c0560973 | 1 | import { ChargingProfilePurposeType, OCPP16ChargingProfile } from './ChargingProfile'; |
edf4bd64 | 2 | |
c12b43d0 | 3 | import { EmptyObject } from '../../EmptyObject'; |
c0560973 JB |
4 | import { OCPP16ChargePointErrorCode } from './ChargePointErrorCode'; |
5 | import { OCPP16ChargePointStatus } from './ChargePointStatus'; | |
47e22477 | 6 | import { OCPP16DiagnosticsStatus } from './DiagnosticsStatus'; |
c0560973 | 7 | import { OCPP16StandardParametersKey } from './Configuration'; |
5bd15d76 | 8 | |
c0560973 | 9 | export enum OCPP16RequestCommand { |
d9f60ba1 JB |
10 | BOOT_NOTIFICATION = 'BootNotification', |
11 | HEARTBEAT = 'Heartbeat', | |
12 | STATUS_NOTIFICATION = 'StatusNotification', | |
13 | CHANGE_CONFIGURATION = 'ChangeConfiguration', | |
ef6076c1 | 14 | AUTHORIZE = 'Authorize', |
d9f60ba1 JB |
15 | START_TRANSACTION = 'StartTransaction', |
16 | STOP_TRANSACTION = 'StopTransaction', | |
47e22477 | 17 | METER_VALUES = 'MeterValues', |
802cfa13 | 18 | DIAGNOSTICS_STATUS_NOTIFICATION = 'DiagnosticsStatusNotification' |
d9f60ba1 JB |
19 | } |
20 | ||
c0560973 | 21 | export enum OCPP16IncomingRequestCommand { |
d9f60ba1 JB |
22 | RESET = 'Reset', |
23 | CLEAR_CACHE = 'ClearCache', | |
4dff73b0 | 24 | CHANGE_AVAILABILITY = 'ChangeAvailability', |
d9f60ba1 JB |
25 | UNLOCK_CONNECTOR = 'UnlockConnector', |
26 | GET_CONFIGURATION = 'GetConfiguration', | |
27 | CHANGE_CONFIGURATION = 'ChangeConfiguration', | |
28 | SET_CHARGING_PROFILE = 'SetChargingProfile', | |
edf4bd64 | 29 | CLEAR_CHARGING_PROFILE = 'ClearChargingProfile', |
d9f60ba1 | 30 | REMOTE_START_TRANSACTION = 'RemoteStartTransaction', |
47e22477 | 31 | REMOTE_STOP_TRANSACTION = 'RemoteStopTransaction', |
802cfa13 JB |
32 | GET_DIAGNOSTICS = 'GetDiagnostics', |
33 | TRIGGER_MESSAGE = 'TriggerMessage' | |
d9f60ba1 JB |
34 | } |
35 | ||
c12b43d0 | 36 | export type HeartbeatRequest = EmptyObject; |
f738a0e9 | 37 | |
c0560973 | 38 | export interface OCPP16BootNotificationRequest { |
f738a0e9 JB |
39 | chargeBoxSerialNumber?: string; |
40 | chargePointModel: string; | |
41 | chargePointSerialNumber?: string; | |
42 | chargePointVendor: string; | |
43 | firmwareVersion?: string; | |
44 | iccid?: string; | |
45 | imsi?: string; | |
46 | meterSerialNumber?: string; | |
47 | meterType?: string; | |
48 | } | |
49 | ||
50 | export interface StatusNotificationRequest { | |
51 | connectorId: number; | |
c0560973 | 52 | errorCode: OCPP16ChargePointErrorCode; |
f738a0e9 | 53 | info?: string; |
c0560973 | 54 | status: OCPP16ChargePointStatus; |
f738a0e9 JB |
55 | timestamp?: string; |
56 | vendorId?: string; | |
57 | vendorErrorCode?: string; | |
58 | } | |
59 | ||
60 | export interface ChangeConfigurationRequest { | |
c0560973 | 61 | key: string | OCPP16StandardParametersKey; |
f738a0e9 JB |
62 | value: string; |
63 | } | |
64 | ||
65 | export interface RemoteStartTransactionRequest { | |
66 | connectorId: number; | |
67 | idTag: string; | |
c0560973 | 68 | chargingProfile?: OCPP16ChargingProfile; |
f738a0e9 JB |
69 | } |
70 | ||
71 | export interface RemoteStopTransactionRequest { | |
72 | transactionId: number; | |
73 | } | |
74 | ||
75 | export interface UnlockConnectorRequest { | |
76 | connectorId: number; | |
77 | } | |
78 | ||
79 | export interface GetConfigurationRequest { | |
c0560973 | 80 | key?: string | OCPP16StandardParametersKey[]; |
f738a0e9 JB |
81 | } |
82 | ||
83 | export enum ResetType { | |
84 | HARD = 'Hard', | |
85 | SOFT = 'Soft' | |
86 | } | |
87 | ||
88 | export interface ResetRequest { | |
89 | type: ResetType; | |
63b48f77 | 90 | } |
8c476a1f JB |
91 | |
92 | export interface SetChargingProfileRequest { | |
93 | connectorId: number; | |
c0560973 | 94 | csChargingProfiles: OCPP16ChargingProfile; |
8c476a1f | 95 | } |
4dff73b0 | 96 | |
c0560973 | 97 | export enum OCPP16AvailabilityType { |
4dff73b0 JB |
98 | INOPERATIVE = 'Inoperative', |
99 | OPERATIVE = 'Operative' | |
100 | } | |
101 | ||
102 | export interface ChangeAvailabilityRequest { | |
103 | connectorId: number; | |
c0560973 | 104 | type: OCPP16AvailabilityType; |
4dff73b0 | 105 | } |
edf4bd64 JB |
106 | |
107 | export interface ClearChargingProfileRequest { | |
108 | id?: number; | |
109 | connectorId?: number; | |
110 | chargingProfilePurpose?: ChargingProfilePurposeType; | |
111 | stackLevel?: number; | |
112 | } | |
47e22477 JB |
113 | |
114 | export interface GetDiagnosticsRequest { | |
115 | location: string; | |
116 | retries?: number; | |
117 | retryInterval?: number; | |
118 | startTime?: Date; | |
119 | stopTime?: Date; | |
120 | } | |
121 | ||
122 | export interface DiagnosticsStatusNotificationRequest { | |
123 | status: OCPP16DiagnosticsStatus | |
124 | } | |
802cfa13 JB |
125 | |
126 | export enum MessageTrigger { | |
127 | BootNotification = 'BootNotification', | |
128 | DiagnosticsStatusNotification = 'DiagnosticsStatusNotification', | |
129 | FirmwareStatusNotification = 'FirmwareStatusNotification', | |
130 | Heartbeat = 'Heartbeat', | |
131 | MeterValues = 'MeterValues', | |
132 | StatusNotification = 'StatusNotification' | |
133 | } | |
134 | ||
135 | export interface OCPP16TriggerMessageRequest { | |
136 | requestedMessage: MessageTrigger; | |
137 | connectorId?: number | |
138 | } |