Commit | Line | Data |
---|---|---|
f738a0e9 JB |
1 | import { MeterValue } from './MeterValues'; |
2 | ||
c0560973 | 3 | export enum OCPP16StopTransactionReason { |
9ac86a7e JB |
4 | NONE = '', |
5 | EMERGENCY_STOP = 'EmergencyStop', | |
6 | EV_DISCONNECTED = 'EVDisconnected', | |
7 | HARD_RESET = 'HardReset', | |
8 | LOCAL = 'Local', | |
9 | OTHER = 'Other', | |
10 | POWER_LOSS = 'PowerLoss', | |
11 | REBOOT = 'Reboot', | |
12 | REMOTE = 'Remote', | |
13 | SOFT_RESET = 'SoftReset', | |
14 | UNLOCK_COMMAND = 'UnlockCommand', | |
15 | DE_AUTHORIZED = 'DeAuthorized' | |
16 | } | |
17 | ||
c0560973 | 18 | export enum OCPP16AuthorizationStatus { |
9ac86a7e JB |
19 | ACCEPTED = 'Accepted', |
20 | BLOCKED = 'Blocked', | |
21 | EXPIRED = 'Expired', | |
22 | INVALID = 'Invalid', | |
6ad94506 | 23 | CONCURRENT_TX = 'ConcurrentTx' |
9ac86a7e JB |
24 | } |
25 | ||
26 | export interface IdTagInfo { | |
c0560973 | 27 | status: OCPP16AuthorizationStatus; |
9ac86a7e JB |
28 | parentIdTag?: string; |
29 | expiryDate?: Date; | |
30 | } | |
31 | ||
ef6076c1 J |
32 | export interface AuthorizeRequest { |
33 | idTag: string; | |
34 | ||
35 | } | |
c0560973 | 36 | export interface OCPP16AuthorizeResponse { |
ef6076c1 J |
37 | idTagInfo: IdTagInfo; |
38 | } | |
39 | ||
f738a0e9 JB |
40 | export interface StartTransactionRequest { |
41 | connectorId: number; | |
42 | idTag: string; | |
43 | meterStart: number; | |
44 | reservationId?: number; | |
45 | timestamp: string; | |
46 | } | |
47 | ||
c0560973 | 48 | export interface OCPP16StartTransactionResponse { |
9ac86a7e JB |
49 | idTagInfo: IdTagInfo; |
50 | transactionId: number; | |
51 | } | |
52 | ||
f738a0e9 JB |
53 | export interface StopTransactionRequest { |
54 | idTag?: string; | |
55 | meterStop: number; | |
56 | timestamp: string; | |
57 | transactionId: number; | |
c0560973 | 58 | reason?: OCPP16StopTransactionReason; |
f738a0e9 JB |
59 | transactionData?: MeterValue[]; |
60 | } | |
61 | ||
c0560973 | 62 | export interface OCPP16StopTransactionResponse { |
9ac86a7e JB |
63 | idTagInfo?: IdTagInfo; |
64 | } |