1 import type ChargingStation from
'../ChargingStation';
2 import { JsonType
} from
'../../types/JsonType';
3 import { RequestCommand
} from
'../../types/ocpp/Requests';
5 export default abstract class OCPPResponseService
{
6 private static instance
: OCPPResponseService
| null = null;
8 protected constructor() {
12 public static getInstance
<T
extends OCPPResponseService
>(this: new () => T
): T
{
13 if (!OCPPResponseService
.instance
) {
14 OCPPResponseService
.instance
= new this();
16 return OCPPResponseService
.instance
as T
;
19 public abstract responseHandler(
20 chargingStation
: ChargingStation
,
21 commandName
: RequestCommand
,
23 requestPayload
: JsonType