X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2Focpp%2F2.0%2FRequests.ts;h=1b99c2727fb86928055cfc3beff4335733a79265;hb=b8efd65b4afd9229385af677e3e2a829f3280712;hp=00826ab2204f34f93cdd6ca91e7cce9343104257;hpb=d270cc878c61c42098557a0e03cc1620f74112de;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 00826ab2..1b99c272 100644 --- a/src/types/ocpp/2.0/Requests.ts +++ b/src/types/ocpp/2.0/Requests.ts @@ -1,33 +1,30 @@ +import type { + BootReasonEnumType, + InstallCertificateUseEnumType, + OCPP20ConnectorStatusEnumType, +} from './Common'; +import type { OCPP20SetVariableDataType } from './Variables'; import type { EmptyObject } from '../../EmptyObject'; import type { JsonObject } from '../../JsonType'; 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', } -export enum BootReasonEnumType { - ApplicationReset = 'ApplicationReset', - FirmwareUpdate = 'FirmwareUpdate', - LocalReset = 'LocalReset', - PowerUp = 'PowerUp', - RemoteReset = 'RemoteReset', - ScheduledReset = 'ScheduledReset', - Triggered = 'Triggered', - Unknown = 'Unknown', - Watchdog = 'Watchdog', -} - -export type ModemType = { +type ModemType = { iccid?: string; imsi?: string; } & JsonObject; -export type ChargingStationType = { +type ChargingStationType = { serialNumber?: string; model: string; vendorName: string; @@ -40,4 +37,22 @@ export type OCPP20BootNotificationRequest = { 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;