Commit | Line | Data |
---|---|---|
66a7748d | 1 | import type { JsonObject } from '../../JsonType.js' |
4c3f6c20 | 2 | import type { OCPP16MeterValue } from './MeterValues.js' |
f738a0e9 | 3 | |
c0560973 | 4 | export enum OCPP16StopTransactionReason { |
9ac86a7e JB |
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', | |
a223d9be | 15 | DE_AUTHORIZED = 'DeAuthorized' |
9ac86a7e JB |
16 | } |
17 | ||
c0560973 | 18 | export enum OCPP16AuthorizationStatus { |
9ac86a7e JB |
19 | ACCEPTED = 'Accepted', |
20 | BLOCKED = 'Blocked', | |
21 | EXPIRED = 'Expired', | |
22 | INVALID = 'Invalid', | |
a223d9be | 23 | CONCURRENT_TX = 'ConcurrentTx' |
9ac86a7e JB |
24 | } |
25 | ||
0ac97927 | 26 | interface IdTagInfo extends JsonObject { |
66a7748d JB |
27 | status: OCPP16AuthorizationStatus |
28 | parentIdTag?: string | |
29 | expiryDate?: Date | |
9ac86a7e JB |
30 | } |
31 | ||
e3822d6f | 32 | export interface OCPP16AuthorizeRequest extends JsonObject { |
66a7748d | 33 | idTag: string |
ef6076c1 | 34 | } |
163547b1 | 35 | |
e3822d6f | 36 | export interface OCPP16AuthorizeResponse extends JsonObject { |
66a7748d | 37 | idTagInfo: IdTagInfo |
ef6076c1 J |
38 | } |
39 | ||
e3822d6f | 40 | export interface OCPP16StartTransactionRequest extends JsonObject { |
66a7748d JB |
41 | connectorId: number |
42 | idTag: string | |
43 | meterStart: number | |
44 | timestamp: Date | |
45 | reservationId?: number | |
f738a0e9 JB |
46 | } |
47 | ||
e3822d6f | 48 | export interface OCPP16StartTransactionResponse extends JsonObject { |
66a7748d JB |
49 | idTagInfo: IdTagInfo |
50 | transactionId: number | |
9ac86a7e JB |
51 | } |
52 | ||
e3822d6f | 53 | export interface OCPP16StopTransactionRequest extends JsonObject { |
66a7748d JB |
54 | idTag?: string |
55 | meterStop: number | |
56 | timestamp: Date | |
57 | transactionId: number | |
58 | reason?: OCPP16StopTransactionReason | |
59 | transactionData?: OCPP16MeterValue[] | |
f738a0e9 JB |
60 | } |
61 | ||
e3822d6f | 62 | export interface OCPP16StopTransactionResponse extends JsonObject { |
66a7748d | 63 | idTagInfo?: IdTagInfo |
9ac86a7e | 64 | } |