From 5612b691da864fc2822629bbee32ed8008ee6472 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 24 Aug 2022 18:59:36 +0200 Subject: [PATCH] README.md: document missing UI protocol commands MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- README.md | 24 +++++++++++++++++++++++- src/types/UIProtocol.ts | 1 + src/types/WorkerBroadcastChannel.ts | 1 - 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9fb88585..f5964162 100644 --- a/README.md +++ b/README.md @@ -409,7 +409,29 @@ Set the HTTP header _Sec-Websocket-Protocol_ to `ui0.0.1` #### Procedures -##### List Charging stations +##### Start Simulator + +Request: +`ProcedureName`: 'startSimulator' +`PDU`: {} + +Response: +`PDU`: { +`status` +} + +##### Stop Simulator + +Request: +`ProcedureName`: 'stopSimulator' +`PDU`: {} + +Response: +`PDU`: { +`status` +} + +##### List Charging Stations Request: `ProcedureName`: 'listChargingStations' diff --git a/src/types/UIProtocol.ts b/src/types/UIProtocol.ts index 1e6917ae..63bb7ca1 100644 --- a/src/types/UIProtocol.ts +++ b/src/types/UIProtocol.ts @@ -32,6 +32,7 @@ export enum ProcedureName { OPEN_CONNECTION = 'openConnection', CLOSE_CONNECTION = 'closeConnection', } + export interface RequestPayload extends JsonObject { hashId?: string; } diff --git a/src/types/WorkerBroadcastChannel.ts b/src/types/WorkerBroadcastChannel.ts index 2a92f312..0015b717 100644 --- a/src/types/WorkerBroadcastChannel.ts +++ b/src/types/WorkerBroadcastChannel.ts @@ -1,4 +1,3 @@ -import { JsonObject } from './JsonType'; import { RequestPayload, ResponsePayload } from './UIProtocol'; export type BroadcastChannelRequest = [ -- 2.34.1