repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Introduce JSON type and use it for OCPP and internal message structure
[e-mobility-charging-stations-simulator.git]
/
src
/
types
/
ocpp
/
1.6
/
Transaction.ts
diff --git
a/src/types/ocpp/1.6/Transaction.ts
b/src/types/ocpp/1.6/Transaction.ts
index 69aff0e0115b3849bbf9e8b1a8ced5fe6536a8f3..bf2377778bb21e0c6096cb1f33267672f5fe8444 100644
(file)
--- a/
src/types/ocpp/1.6/Transaction.ts
+++ b/
src/types/ocpp/1.6/Transaction.ts
@@
-1,4
+1,5
@@
-import { MeterValue } from './MeterValues';
+import { JsonType } from '../../JsonType';
+import { OCPP16MeterValue } from './MeterValues';
export enum OCPP16StopTransactionReason {
NONE = '',
export enum OCPP16StopTransactionReason {
NONE = '',
@@
-23,21
+24,21
@@
export enum OCPP16AuthorizationStatus {
CONCURRENT_TX = 'ConcurrentTx'
}
CONCURRENT_TX = 'ConcurrentTx'
}
-export interface IdTagInfo {
+export interface IdTagInfo
extends JsonType
{
status: OCPP16AuthorizationStatus;
parentIdTag?: string;
expiryDate?: Date;
}
status: OCPP16AuthorizationStatus;
parentIdTag?: string;
expiryDate?: Date;
}
-export interface AuthorizeRequest {
+export interface AuthorizeRequest
extends JsonType
{
idTag: string;
idTag: string;
-
}
}
-export interface OCPP16AuthorizeResponse {
+
+export interface OCPP16AuthorizeResponse extends JsonType {
idTagInfo: IdTagInfo;
}
idTagInfo: IdTagInfo;
}
-export interface StartTransactionRequest {
+export interface StartTransactionRequest
extends JsonType
{
connectorId: number;
idTag: string;
meterStart: number;
connectorId: number;
idTag: string;
meterStart: number;
@@
-45,20
+46,20
@@
export interface StartTransactionRequest {
timestamp: string;
}
timestamp: string;
}
-export interface OCPP16StartTransactionResponse {
+export interface OCPP16StartTransactionResponse
extends JsonType
{
idTagInfo: IdTagInfo;
transactionId: number;
}
idTagInfo: IdTagInfo;
transactionId: number;
}
-export interface StopTransactionRequest {
+export interface StopTransactionRequest
extends JsonType
{
idTag?: string;
meterStop: number;
timestamp: string;
transactionId: number;
reason?: OCPP16StopTransactionReason;
idTag?: string;
meterStop: number;
timestamp: string;
transactionId: number;
reason?: OCPP16StopTransactionReason;
- transactionData?: MeterValue[];
+ transactionData?:
OCPP16
MeterValue[];
}
}
-export interface OCPP16StopTransactionResponse {
+export interface OCPP16StopTransactionResponse
extends JsonType
{
idTagInfo?: IdTagInfo;
}
idTagInfo?: IdTagInfo;
}