e2cad6451d1c08959e19fb9d33a6e62e3347cd87
1 import { JsonType
} from
'../../types/JsonType';
2 import { RequestCommand
} from
'../../types/ocpp/Requests';
3 import type ChargingStation from
'../ChargingStation';
5 const moduleName
= 'OCPPResponseService';
7 export default abstract class OCPPResponseService
{
8 private static instance
: OCPPResponseService
| null = null;
10 protected constructor() {
11 // This is intentional
14 public static getInstance
<T
extends OCPPResponseService
>(this: new () => T
): T
{
15 if (!OCPPResponseService
.instance
) {
16 OCPPResponseService
.instance
= new this();
18 return OCPPResponseService
.instance
as T
;
21 public abstract responseHandler(
22 chargingStation
: ChargingStation
,
23 commandName
: RequestCommand
,
25 requestPayload
: JsonType