X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2Focpp%2F1.6%2FRequests.ts;h=786ea617be0fb38e518003d52ffcacd007ca82af;hb=899cb106c44c0b7a56266b5470a22c0cc773cc44;hp=6b244d043a678e804c852fc6cffdbccac4a21c53;hpb=0ac97927984473fcb11a177f013b0e112638e050;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/ocpp/1.6/Requests.ts b/src/types/ocpp/1.6/Requests.ts index 6b244d04..786ea617 100644 --- a/src/types/ocpp/1.6/Requests.ts +++ b/src/types/ocpp/1.6/Requests.ts @@ -1,13 +1,14 @@ +import type { OCPP16ChargePointErrorCode } from './ChargePointErrorCode'; +import type { OCPP16ChargePointStatus } from './ChargePointStatus'; import type { - EmptyObject, - JsonObject, - OCPP16ChargePointErrorCode, - OCPP16ChargePointStatus, OCPP16ChargingProfile, OCPP16ChargingProfilePurposeType, - OCPP16DiagnosticsStatus, - OCPP16StandardParametersKey, -} from '../../internal'; + OCPP16ChargingRateUnitType, +} from './ChargingProfile'; +import type { OCPP16StandardParametersKey, OCPP16VendorParametersKey } from './Configuration'; +import type { OCPP16DiagnosticsStatus } from './DiagnosticsStatus'; +import type { EmptyObject } from '../../EmptyObject'; +import type { JsonObject } from '../../JsonType'; export enum OCPP16RequestCommand { BOOT_NOTIFICATION = 'BootNotification', @@ -29,6 +30,7 @@ export enum OCPP16IncomingRequestCommand { UNLOCK_CONNECTOR = 'UnlockConnector', GET_CONFIGURATION = 'GetConfiguration', CHANGE_CONFIGURATION = 'ChangeConfiguration', + GET_COMPOSITE_SCHEDULE = 'GetCompositeSchedule', SET_CHARGING_PROFILE = 'SetChargingProfile', CLEAR_CHARGING_PROFILE = 'ClearChargingProfile', REMOTE_START_TRANSACTION = 'RemoteStartTransaction', @@ -65,8 +67,10 @@ export interface OCPP16StatusNotificationRequest extends JsonObject { export type OCPP16ClearCacheRequest = EmptyObject; +type OCPP16ConfigurationKey = string | OCPP16StandardParametersKey | OCPP16VendorParametersKey; + export interface ChangeConfigurationRequest extends JsonObject { - key: string | OCPP16StandardParametersKey; + key: OCPP16ConfigurationKey; value: string; } @@ -85,7 +89,7 @@ export interface UnlockConnectorRequest extends JsonObject { } export interface GetConfigurationRequest extends JsonObject { - key?: (string | OCPP16StandardParametersKey)[]; + key?: OCPP16ConfigurationKey[]; } enum ResetType { @@ -97,14 +101,20 @@ export interface ResetRequest extends JsonObject { type: ResetType; } +export interface OCPP16GetCompositeScheduleRequest extends JsonObject { + connectorId: number; + duration: number; + chargingRateUnit?: OCPP16ChargingRateUnitType; +} + export interface SetChargingProfileRequest extends JsonObject { connectorId: number; csChargingProfiles: OCPP16ChargingProfile; } export enum OCPP16AvailabilityType { - INOPERATIVE = 'Inoperative', - OPERATIVE = 'Operative', + Inoperative = 'Inoperative', + Operative = 'Operative', } export interface ChangeAvailabilityRequest extends JsonObject { @@ -173,3 +183,15 @@ export interface OCPP16DataTransferRequest extends JsonObject { messageId?: string; data?: string; } + +export interface OCPP16ReserveNowRequest { + connectorId: string; + expiryDate: Date; + idTag: string; + parentIdTag?: string; + reservationId: number; +} + +export interface OCPP16CancelReservationRequest { + reservationId: number; +}