1 import type { JsonObject
} from
'./JsonType';
7 export enum ApplicationProtocol
{
12 export enum ProtocolVersion
{
16 export type ProtocolRequest
= [string, ProcedureName
, RequestPayload
];
17 export type ProtocolResponse
= [string, ResponsePayload
];
19 export type ProtocolRequestHandler
= (
20 payload
: RequestPayload
,
21 ) => ResponsePayload
| Promise
<ResponsePayload
>;
23 export enum ProcedureName
{
24 START_SIMULATOR
= 'startSimulator',
25 STOP_SIMULATOR
= 'stopSimulator',
26 LIST_CHARGING_STATIONS
= 'listChargingStations',
27 START_CHARGING_STATION
= 'startChargingStation',
28 STOP_CHARGING_STATION
= 'stopChargingStation',
29 OPEN_CONNECTION
= 'openConnection',
30 CLOSE_CONNECTION
= 'closeConnection',
31 START_AUTOMATIC_TRANSACTION_GENERATOR
= 'startAutomaticTransactionGenerator',
32 STOP_AUTOMATIC_TRANSACTION_GENERATOR
= 'stopAutomaticTransactionGenerator',
33 START_TRANSACTION
= 'startTransaction',
34 STOP_TRANSACTION
= 'stopTransaction',
37 export interface RequestPayload
extends JsonObject
{
39 connectorIds
?: number[];
42 export enum ResponseStatus
{
47 export interface ResponsePayload
extends JsonObject
{
48 status: ResponseStatus
;