4baa070f2a8cf6b93c81cbd332344c8de5e2e3b6
[e-mobility-charging-stations-simulator.git] / Requests.ts
1 import { ChargePointErrorCode } from './ChargePointErrorCode';
2 import { ChargePointStatus } from './ChargePointStatus';
3 import { ChargingProfile } from './ChargingProfile';
4 import { StandardParametersKey } from './Configuration';
5
6 export enum RequestCommand {
7 BOOT_NOTIFICATION = 'BootNotification',
8 HEARTBEAT = 'Heartbeat',
9 STATUS_NOTIFICATION = 'StatusNotification',
10 CHANGE_CONFIGURATION = 'ChangeConfiguration',
11 START_TRANSACTION = 'StartTransaction',
12 STOP_TRANSACTION = 'StopTransaction',
13 METERVALUES = 'MeterValues'
14 }
15
16 export enum IncomingRequestCommand {
17 RESET = 'Reset',
18 CLEAR_CACHE = 'ClearCache',
19 UNLOCK_CONNECTOR = 'UnlockConnector',
20 GET_CONFIGURATION = 'GetConfiguration',
21 CHANGE_CONFIGURATION = 'ChangeConfiguration',
22 SET_CHARGING_PROFILE = 'SetChargingProfile',
23 REMOTE_START_TRANSACTION = 'RemoteStartTransaction',
24 REMOTE_STOP_TRANSACTION = 'RemoteStopTransaction'
25 }
26
27 // eslint-disable-next-line @typescript-eslint/no-empty-interface
28 export interface HeartbeatRequest { }
29
30 export interface BootNotificationRequest {
31 chargeBoxSerialNumber?: string;
32 chargePointModel: string;
33 chargePointSerialNumber?: string;
34 chargePointVendor: string;
35 firmwareVersion?: string;
36 iccid?: string;
37 imsi?: string;
38 meterSerialNumber?: string;
39 meterType?: string;
40 }
41
42 export interface StatusNotificationRequest {
43 connectorId: number;
44 errorCode: ChargePointErrorCode;
45 info?: string;
46 status: ChargePointStatus;
47 timestamp?: string;
48 vendorId?: string;
49 vendorErrorCode?: string;
50 }
51
52 export interface ChangeConfigurationRequest {
53 key: string | StandardParametersKey;
54 value: string;
55 }
56
57 export interface RemoteStartTransactionRequest {
58 connectorId: number;
59 idTag: string;
60 chargingProfile?: ChargingProfile;
61 }
62
63 export interface RemoteStopTransactionRequest {
64 transactionId: number;
65 }
66
67 export interface UnlockConnectorRequest {
68 connectorId: number;
69 }
70
71 export interface GetConfigurationRequest {
72 key?: string | StandardParametersKey[];
73 }
74
75 export enum ResetType {
76 HARD = 'Hard',
77 SOFT = 'Soft'
78 }
79
80 export interface ResetRequest {
81 type: ResetType;
82 }
83
84 export interface SetChargingProfileRequest {
85 connectorId: number;
86 csChargingProfiles: ChargingProfile;
87 }