9ed48049a52cb70915cf8c1955f914d42a236453
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / 1.6 / Requests.ts
1 import { ChargingProfilePurposeType, OCPP16ChargingProfile } from './ChargingProfile';
2
3 import { OCPP16ChargePointErrorCode } from './ChargePointErrorCode';
4 import { OCPP16ChargePointStatus } from './ChargePointStatus';
5 import { OCPP16StandardParametersKey } from './Configuration';
6
7 export enum OCPP16RequestCommand {
8 BOOT_NOTIFICATION = 'BootNotification',
9 HEARTBEAT = 'Heartbeat',
10 STATUS_NOTIFICATION = 'StatusNotification',
11 CHANGE_CONFIGURATION = 'ChangeConfiguration',
12 AUTHORIZE = 'Authorize',
13 START_TRANSACTION = 'StartTransaction',
14 STOP_TRANSACTION = 'StopTransaction',
15 METER_VALUES = 'MeterValues'
16 }
17
18 export enum OCPP16IncomingRequestCommand {
19 RESET = 'Reset',
20 CLEAR_CACHE = 'ClearCache',
21 CHANGE_AVAILABILITY = 'ChangeAvailability',
22 UNLOCK_CONNECTOR = 'UnlockConnector',
23 GET_CONFIGURATION = 'GetConfiguration',
24 CHANGE_CONFIGURATION = 'ChangeConfiguration',
25 SET_CHARGING_PROFILE = 'SetChargingProfile',
26 CLEAR_CHARGING_PROFILE = 'ClearChargingProfile',
27 REMOTE_START_TRANSACTION = 'RemoteStartTransaction',
28 REMOTE_STOP_TRANSACTION = 'RemoteStopTransaction'
29 }
30
31 // eslint-disable-next-line @typescript-eslint/no-empty-interface
32 export interface HeartbeatRequest { }
33
34 export interface OCPP16BootNotificationRequest {
35 chargeBoxSerialNumber?: string;
36 chargePointModel: string;
37 chargePointSerialNumber?: string;
38 chargePointVendor: string;
39 firmwareVersion?: string;
40 iccid?: string;
41 imsi?: string;
42 meterSerialNumber?: string;
43 meterType?: string;
44 }
45
46 export interface StatusNotificationRequest {
47 connectorId: number;
48 errorCode: OCPP16ChargePointErrorCode;
49 info?: string;
50 status: OCPP16ChargePointStatus;
51 timestamp?: string;
52 vendorId?: string;
53 vendorErrorCode?: string;
54 }
55
56 export interface ChangeConfigurationRequest {
57 key: string | OCPP16StandardParametersKey;
58 value: string;
59 }
60
61 export interface RemoteStartTransactionRequest {
62 connectorId: number;
63 idTag: string;
64 chargingProfile?: OCPP16ChargingProfile;
65 }
66
67 export interface RemoteStopTransactionRequest {
68 transactionId: number;
69 }
70
71 export interface UnlockConnectorRequest {
72 connectorId: number;
73 }
74
75 export interface GetConfigurationRequest {
76 key?: string | OCPP16StandardParametersKey[];
77 }
78
79 export enum ResetType {
80 HARD = 'Hard',
81 SOFT = 'Soft'
82 }
83
84 export interface ResetRequest {
85 type: ResetType;
86 }
87
88 export interface SetChargingProfileRequest {
89 connectorId: number;
90 csChargingProfiles: OCPP16ChargingProfile;
91 }
92
93 export enum OCPP16AvailabilityType {
94 INOPERATIVE = 'Inoperative',
95 OPERATIVE = 'Operative'
96 }
97
98 export interface ChangeAvailabilityRequest {
99 connectorId: number;
100 type: OCPP16AvailabilityType;
101 }
102
103 export interface ClearChargingProfileRequest {
104 id?: number;
105 connectorId?: number;
106 chargingProfilePurpose?: ChargingProfilePurposeType;
107 stackLevel?: number;
108 }