X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2Focpp%2F2.0%2FRequests.ts;h=d584c8289ad88db7e3d79ad56b95610062b15f99;hb=e8044a69a745aab08dfeea0bd9ec9dd7fe84cdd7;hp=04c6c91da2733dbfab51270bed5acb03b56440ca;hpb=953d6b028e82d6997897802afefbb4ce0d225dee;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/ocpp/2.0/Requests.ts b/src/types/ocpp/2.0/Requests.ts index 04c6c91d..d584c828 100644 --- a/src/types/ocpp/2.0/Requests.ts +++ b/src/types/ocpp/2.0/Requests.ts @@ -1,3 +1,58 @@ -export enum OCPP20RequestCommand {} +import type { + BootReasonEnumType, + EmptyObject, + InstallCertificateUseEnumType, + JsonObject, + OCPP20ConnectorStatusEnumType, + OCPP20SetVariableDataType, +} from '../../internal'; -export enum OCPP20IncomingRequestCommand {} +export enum OCPP20RequestCommand { + BOOT_NOTIFICATION = 'BootNotification', + HEARTBEAT = 'Heartbeat', + STATUS_NOTIFICATION = 'StatusNotification', +} + +export enum OCPP20IncomingRequestCommand { + CLEAR_CACHE = 'ClearCache', + REQUEST_START_TRANSACTION = 'RequestStartTransaction', + REQUEST_STOP_TRANSACTION = 'RequestStopTransaction', +} + +type ModemType = { + iccid?: string; + imsi?: string; +} & JsonObject; + +type ChargingStationType = { + serialNumber?: string; + model: string; + vendorName: string; + firmwareVersion?: string; + modem?: ModemType; +} & JsonObject; + +export type OCPP20BootNotificationRequest = { + reason: BootReasonEnumType; + chargingStation: ChargingStationType; +} & JsonObject; + +export type OCPP20HeartbeatRequest = EmptyObject; + +export type OCPP20ClearCacheRequest = EmptyObject; + +export type OCPP20StatusNotificationRequest = { + timestamp: Date; + connectorStatus: OCPP20ConnectorStatusEnumType; + evseId: number; + connectorId: number; +} & JsonObject; + +export type OCPP20SetVariablesRequest = { + setVariableData: OCPP20SetVariableDataType[]; +} & JsonObject; + +export type OCPP20InstallCertificateRequest = { + certificateType: InstallCertificateUseEnumType; + certificate: string; +} & JsonObject;