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