2 OCPP16AvailabilityType
,
3 OCPP16BootNotificationRequest
,
4 OCPP16HeartbeatRequest
,
5 OCPP16IncomingRequestCommand
,
7 OCPP16StatusNotificationRequest
,
8 } from
'./1.6/Requests';
10 import type ChargingStation from
'../../charging-station/ChargingStation';
11 import { JsonType
} from
'../JsonType';
12 import { MessageType
} from
'./MessageType';
13 import { OCPP16DiagnosticsStatus
} from
'./1.6/DiagnosticsStatus';
14 import { OCPP16MeterValuesRequest
} from
'./1.6/MeterValues';
15 import OCPPError from
'../../exception/OCPPError';
17 export type OutgoingRequest
= [MessageType
.CALL_MESSAGE
, string, RequestCommand
, JsonType
];
19 export type IncomingRequest
= [MessageType
.CALL_MESSAGE
, string, IncomingRequestCommand
, JsonType
];
21 export type CachedRequest
= [
22 (payload
: JsonType
, requestPayload
: JsonType
) => void,
23 (error
: OCPPError
, requestStatistic
?: boolean) => void,
24 RequestCommand
| IncomingRequestCommand
,
28 export type IncomingRequestHandler
= (
29 chargingStation
: ChargingStation
,
30 commandPayload
: JsonType
31 ) => JsonType
| Promise
<JsonType
>;
33 export type ResponseType
= JsonType
| OCPPError
;
35 export interface RequestParams
{
36 skipBufferingOnError
?: boolean;
37 triggerMessage
?: boolean;
40 export type BootNotificationRequest
= OCPP16BootNotificationRequest
;
42 export type HeartbeatRequest
= OCPP16HeartbeatRequest
;
44 export type StatusNotificationRequest
= OCPP16StatusNotificationRequest
;
46 export type MeterValuesRequest
= OCPP16MeterValuesRequest
;
48 export type AvailabilityType
= OCPP16AvailabilityType
;
50 export const AvailabilityType
= {
51 ...OCPP16AvailabilityType
,
54 export type RequestCommand
= OCPP16RequestCommand
;
56 export const RequestCommand
= {
57 ...OCPP16RequestCommand
,
60 export type IncomingRequestCommand
= OCPP16IncomingRequestCommand
;
62 export const IncomingRequestCommand
= {
63 ...OCPP16IncomingRequestCommand
,
66 export type DiagnosticsStatus
= OCPP16DiagnosticsStatus
;
68 export const DiagnosticsStatus
= {
69 ...OCPP16DiagnosticsStatus
,