X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2Focpp%2FResponses.ts;h=43250047ade5952a2d818aa7c8a0c97e5aa271b3;hb=07989fad0a792547969c7a544d0093f4cb6338d3;hp=d7e6db554f68456e79aac01709f4366b6bbaeb64;hpb=f22266fd29f7f11ba883d7f799ef607be05d4232;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/ocpp/Responses.ts b/src/types/ocpp/Responses.ts index d7e6db55..43250047 100644 --- a/src/types/ocpp/Responses.ts +++ b/src/types/ocpp/Responses.ts @@ -1,3 +1,6 @@ +import type ChargingStation from '../../charging-station/ChargingStation'; +import type { JsonType } from '../JsonType'; +import type { OCPP16MeterValuesResponse } from './1.6/MeterValues'; import { OCPP16AvailabilityStatus, OCPP16BootNotificationResponse, @@ -10,12 +13,16 @@ import { OCPP16TriggerMessageStatus, OCPP16UnlockStatus, } from './1.6/Responses'; +import type { ErrorType } from './ErrorType'; +import type { MessageType } from './MessageType'; -import { JsonType } from '../JsonType'; -import { OCPP16MeterValuesResponse } from './1.6/MeterValues'; +export type Response = [MessageType.CALL_RESULT_MESSAGE, string, JsonType]; + +export type ErrorResponse = [MessageType.CALL_ERROR_MESSAGE, string, ErrorType, string, JsonType]; export type ResponseHandler = ( - payload: JsonType | string, + chargingStation: ChargingStation, + payload: JsonType, requestPayload?: JsonType ) => void | Promise;