return this.sendRequest(ProcedureName.STOP_SIMULATOR, {})
}
+ public async deleteChargingStation(hashId: string): Promise<ResponsePayload> {
+ return this.sendRequest(ProcedureName.DELETE_CHARGING_STATIONS, { hashIds: [hashId] })
+ }
+
public async listChargingStations(): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.LIST_CHARGING_STATIONS, {})
}
})
}
- private openWS(): void {
+ public openWS(): void {
const protocols =
this.configuration.uiServer.authentication?.enabled === true &&
this.configuration.uiServer.authentication?.type === AuthenticationType.PROTOCOL_BASIC_AUTH
payload: RequestPayload
): Promise<ResponsePayload> {
return new Promise<ResponsePayload>((resolve, reject) => {
- if (this.ws.readyState !== WebSocket.OPEN) {
- this.openWS()
- }
if (this.ws.readyState === WebSocket.OPEN) {
const uuid = crypto.randomUUID()
const msg = JSON.stringify([uuid, procedureName, payload])