Exemple #1
0
        /// <summary>
        /// Create a new GetDiagnostics request.
        /// </summary>
        /// <param name="ChargeBoxId">The charge box identification.</param>
        /// <param name="Location">The URI where the diagnostics file shall be uploaded to.</param>
        /// <param name="StartTime">The timestamp of the oldest logging information to include in the diagnostics.</param>
        /// <param name="StopTime">The timestamp of the latest logging information to include in the diagnostics.</param>
        /// <param name="Retries">The optional number of retries of a charge point for trying to upload the diagnostics before giving up. If this field is not present, it is left to the charge point to decide how many times it wants to retry.</param>
        /// <param name="RetryInterval">The interval after which a retry may be attempted. If this field is not present, it is left to charge point to decide how long to wait between attempts.</param>
        ///
        /// <param name="RequestId">An optional request identification.</param>
        /// <param name="RequestTimestamp">An optional request timestamp.</param>
        public GetDiagnosticsRequest(ChargeBox_Id ChargeBoxId,
                                     String Location,
                                     DateTime?StartTime     = null,
                                     DateTime?StopTime      = null,
                                     Byte?Retries           = null,
                                     TimeSpan?RetryInterval = null,

                                     Request_Id?RequestId             = null,
                                     DateTime?RequestTimestamp        = null,
                                     EventTracking_Id EventTrackingId = null)

            : base(ChargeBoxId,
                   "GetDiagnostics",
                   RequestId,
                   EventTrackingId,
                   RequestTimestamp)

        {
            #region Initial checks

            Location = Location?.Trim();

            if (Location.IsNullOrEmpty())
            {
                throw new ArgumentNullException(nameof(Location), "The given location must not be null or empty!");
            }

            #endregion

            this.Location      = Location;
            this.StartTime     = StartTime;
            this.StopTime      = StopTime;
            this.Retries       = Retries;
            this.RetryInterval = RetryInterval;
        }
        /// <summary>
        /// Create a new UpdateFirmware request.
        /// </summary>
        /// <param name="ChargeBoxId">The charge box identification.</param>
        /// <param name="Location">The URI where to download the firmware.</param>
        /// <param name="RetrieveDate">The timestamp after which the charge point must retrieve the firmware.</param>
        /// <param name="Retries">The optional number of retries of a charge point for trying to download the firmware before giving up. If this field is not present, it is left to the charge point to decide how many times it wants to retry.</param>
        /// <param name="RetryInterval">The interval after which a retry may be attempted. If this field is not present, it is left to charge point to decide how long to wait between attempts.</param>
        ///
        /// <param name="RequestId">An optional request identification.</param>
        /// <param name="RequestTimestamp">An optional request timestamp.</param>
        public UpdateFirmwareRequest(ChargeBox_Id ChargeBoxId,
                                     String Location,
                                     DateTime RetrieveDate,
                                     Byte?Retries           = null,
                                     TimeSpan?RetryInterval = null,

                                     Request_Id?RequestId      = null,
                                     DateTime?RequestTimestamp = null)

            : base(ChargeBoxId,
                   "UpdateFirmware",
                   RequestId,
                   RequestTimestamp)

        {
            #region Initial checks

            Location = Location?.Trim();

            if (Location.IsNullOrEmpty())
            {
                throw new ArgumentNullException(nameof(Location), "The given location must not be null or empty!");
            }

            #endregion

            this.Location      = Location;
            this.RetrieveDate  = RetrieveDate;
            this.Retries       = Retries;
            this.RetryInterval = RetryInterval;
        }
        /// <summary>
        /// Create a new StartTransaction request.
        /// </summary>
        /// <param name="ChargeBoxId">The charge box identification.</param>
        /// <param name="TransactionId">The transaction identification copied from the start transaction response.</param>
        /// <param name="Timestamp">The timestamp of the end of the charging transaction.</param>
        /// <param name="MeterStop">The energy meter value in Wh for the connector at end of the charging transaction.</param>
        /// <param name="IdTag">An optional identifier which requested to stop the charging.</param>
        /// <param name="Reason">An optional reason why the transaction had been stopped.</param>
        /// <param name="TransactionData">Optional transaction usage details relevant for billing purposes.</param>
        ///
        /// <param name="RequestId">An optional request identification.</param>
        /// <param name="RequestTimestamp">An optional request timestamp.</param>
        public StopTransactionRequest(ChargeBox_Id ChargeBoxId,
                                      Transaction_Id TransactionId,
                                      DateTime Timestamp,
                                      UInt64 MeterStop,
                                      IdToken?IdTag  = null,
                                      Reasons?Reason = null,
                                      IEnumerable <MeterValue> TransactionData = null,

                                      Request_Id?RequestId             = null,
                                      DateTime?RequestTimestamp        = null,
                                      EventTracking_Id EventTrackingId = null)

            : base(ChargeBoxId,
                   "StopTransaction",
                   RequestId,
                   EventTrackingId,
                   RequestTimestamp)

        {
            this.TransactionId   = TransactionId;
            this.Timestamp       = Timestamp;
            this.MeterStop       = MeterStop;
            this.IdTag           = IdTag ?? new IdToken?();
            this.Reason          = Reason ?? new Reasons?();
            this.TransactionData = TransactionData ?? new MeterValue[0];
        }
Exemple #4
0
        /// <summary>
        /// Create new 'reserve now' command command.
        /// </summary>
        /// <param name="Token">Token for how to reserve this charge point (and specific EVSE).</param>
        /// <param name="ExpiryDate">The timestamp when this reservation ends.</param>
        /// <param name="ReservationId">Reservation identification. If the receiver (typically a charge point operator) already has a reservation that matches this reservation identification for that location it will replace the reservation.</param>
        /// <param name="LocationId">Location identification of the location (belonging to the CPO this request is send to) for which to reserve an EVSE.</param>
        /// <param name="ResponseURL">URL that the CommandResult POST should be sent to. This URL might contain an unique identification to be able to distinguish between 'reserve now' command requests.</param>
        ///
        /// <param name="EVSEUId">Optional EVSE identification of the EVSE of this location if a specific EVSE has to be reserved.</param>
        /// <param name="AuthorizationReference">Optional reference to the authorization given by the eMSP, when given, this reference will be provided in the relevant session and/or CDR.</param>
        ///
        /// <param name="RequestId">An optional request identification.</param>
        /// <param name="CorrelationId">An optional request correlation identification.</param>
        public ReserveNowCommand(Token Token,
                                 DateTime ExpiryDate,
                                 Reservation_Id ReservationId,
                                 Location_Id LocationId,
                                 URL ResponseURL,

                                 EVSE_UId?EVSEUId = null,
                                 AuthorizationReference?AuthorizationReference = null,

                                 Request_Id?RequestId         = null,
                                 Correlation_Id?CorrelationId = null)

            : base(ResponseURL,
                   RequestId,
                   CorrelationId)

        {
            this.Token         = Token;
            this.ExpiryDate    = ExpiryDate;
            this.ReservationId = ReservationId;
            this.LocationId    = LocationId;

            this.EVSEUId = EVSEUId;
            this.AuthorizationReference = AuthorizationReference;
        }
Exemple #5
0
        public OCPIResponse(OCPIRequest Request,

                            Int32 StatusCode,
                            String StatusMessage,
                            String AdditionalInformation = null,
                            DateTime?Timestamp           = null,

                            HTTPResponse HTTPResponse    = null,
                            Request_Id?RequestId         = null,
                            Correlation_Id?CorrelationId = null,
                            Party_Id?FromPartyId         = null,
                            CountryCode?FromCountryCode  = null,
                            Party_Id?ToPartyId           = null,
                            CountryCode?ToCountryCode    = null)

        {
            this.Request = Request;

            this.StatusCode            = StatusCode;
            this.StatusMessage         = StatusMessage;
            this.AdditionalInformation = AdditionalInformation;
            this.Timestamp             = Timestamp ?? DateTime.UtcNow;

            this.HTTPResponse    = HTTPResponse;
            this.RequestId       = RequestId;
            this.CorrelationId   = CorrelationId;
            this.FromPartyId     = FromPartyId;
            this.FromCountryCode = FromCountryCode;
            this.ToPartyId       = ToPartyId;
            this.ToCountryCode   = ToCountryCode;
        }
Exemple #6
0
        /// <summary>
        /// Create a new StatusNotification request.
        /// </summary>
        /// <param name="ChargeBoxId">The charge box identification.</param>
        /// <param name="ConnectorId">The connector identification at the charge point.</param>
        /// <param name="Status">The current status of the charge point.</param>
        /// <param name="ErrorCode">The error code reported by the charge point.</param>
        ///
        /// <param name="Info">Additional free format information related to the error.</param>
        /// <param name="StatusTimestamp">The time for which the status is reported.</param>
        /// <param name="VendorId">This identifies the vendor-specific implementation.</param>
        /// <param name="VendorErrorCode">A vendor-specific error code.</param>
        ///
        /// <param name="RequestId">An optional request identification.</param>
        /// <param name="RequestTimestamp">An optional request timestamp.</param>
        public StatusNotificationRequest(ChargeBox_Id ChargeBoxId,
                                         Connector_Id ConnectorId,
                                         ChargePointStatus Status,
                                         ChargePointErrorCodes ErrorCode,

                                         String Info = null,
                                         DateTime?StatusTimestamp = null,
                                         String VendorId          = null,
                                         String VendorErrorCode   = null,

                                         Request_Id?RequestId             = null,
                                         DateTime?RequestTimestamp        = null,
                                         EventTracking_Id EventTrackingId = null)

            : base(ChargeBoxId,
                   "StatusNotification",
                   RequestId,
                   EventTrackingId,
                   RequestTimestamp)

        {
            this.ConnectorId = ConnectorId;
            this.Status      = Status;
            this.ErrorCode   = ErrorCode;

            this.Info            = Info?.Trim();             // max  50
            this.StatusTimestamp = StatusTimestamp;
            this.VendorId        = VendorId?.Trim();         // max 255
            this.VendorErrorCode = VendorErrorCode?.Trim();  // max  50
        }
Exemple #7
0
        /// <summary>
        /// Create a new MeterValues request.
        /// </summary>
        /// <param name="ChargeBoxId">The charge box identification.</param>
        /// <param name="ConnectorId">The connector identification at the charge point.</param>
        /// <param name="MeterValues">The sampled meter values with timestamps.</param>
        /// <param name="TransactionId">The charging transaction to which the given meter value samples are related to.</param>
        ///
        /// <param name="RequestId">An optional request identification.</param>
        /// <param name="RequestTimestamp">An optional request timestamp.</param>
        public MeterValuesRequest(ChargeBox_Id ChargeBoxId,
                                  Connector_Id ConnectorId,
                                  IEnumerable <MeterValue> MeterValues,
                                  Transaction_Id?TransactionId = null,

                                  Request_Id?RequestId             = null,
                                  DateTime?RequestTimestamp        = null,
                                  EventTracking_Id EventTrackingId = null)

            : base(ChargeBoxId,
                   "MeterValues",
                   RequestId,
                   EventTrackingId,
                   RequestTimestamp)

        {
            if (!MeterValues.SafeAny())
            {
                throw new ArgumentNullException(nameof(MeterValues), "The given MeterValues must not be null or empty!");
            }

            this.ConnectorId   = ConnectorId;
            this.TransactionId = TransactionId;
            this.MeterValues   = MeterValues;
        }
Exemple #8
0
 /// <summary>
 /// Create a new abstract OCPI command.
 /// </summary>
 /// <param name="ResponseURL">The response URL.</param>
 /// <param name="RequestId">An optional request identification.</param>
 /// <param name="CorrelationId">An optional request correlation identification.</param>
 public AOCPICommand(URL ResponseURL,
                     Request_Id?RequestId         = null,
                     Correlation_Id?CorrelationId = null)
 {
     this.ResponseURL   = ResponseURL;
     this.RequestId     = RequestId ?? Request_Id.Random();
     this.CorrelationId = CorrelationId ?? Correlation_Id.Random();
 }
Exemple #9
0
        public static Task <ClearCacheResponse> ClearCache(this ICentralSystemClient ICentralSystemClient,
                                                           ChargeBox_Id ChargeBoxId,
                                                           Request_Id?RequestId      = null,
                                                           DateTime?RequestTimestamp = null,
                                                           TimeSpan?Timeout          = null)

        => ICentralSystemClient.ClearCache(new ClearCacheRequest(ChargeBoxId,
                                                                 RequestId,
                                                                 RequestTimestamp),
                                           Timeout);
Exemple #10
0
        public static Task <GetLocalListVersionResponse> GetLocalListVersion(this ICentralSystemClient ICentralSystemClient,
                                                                             ChargeBox_Id ChargeBoxId,
                                                                             Request_Id?RequestId      = null,
                                                                             DateTime?RequestTimestamp = null,
                                                                             TimeSpan?Timeout          = null)

        => ICentralSystemClient.GetLocalListVersion(new GetLocalListVersionRequest(ChargeBoxId,
                                                                                   RequestId,
                                                                                   RequestTimestamp),
                                                    Timeout);
Exemple #11
0
        /// <summary>
        /// Create a new Heartbeat request.
        /// </summary>
        /// <param name="ChargeBoxId">The charge box identification.</param>
        ///
        /// <param name="RequestId">An optional request identification.</param>
        /// <param name="RequestTimestamp">An optional request timestamp.</param>
        public HeartbeatRequest(ChargeBox_Id ChargeBoxId,
                                Request_Id?RequestId      = null,
                                DateTime?RequestTimestamp = null)

            : base(ChargeBoxId,
                   "Heartbeat",
                   RequestId,
                   RequestTimestamp)

        {
        }
        /// <summary>
        /// Create a new GetLocalListVersion request.
        /// </summary>
        /// <param name="ChargeBoxId">The charge box identification.</param>
        /// <param name="RequestId">An optional request identification.</param>
        /// <param name="RequestTimestamp">An optional request timestamp.</param>
        public GetLocalListVersionRequest(ChargeBox_Id ChargeBoxId,
                                          Request_Id?RequestId      = null,
                                          DateTime?RequestTimestamp = null)

            : base(ChargeBoxId,
                   "GetLocalListVersion",
                   RequestId,
                   RequestTimestamp)

        {
        }
Exemple #13
0
        /// <summary>
        /// Create a new ClearCache request.
        /// </summary>
        /// <param name="ChargeBoxId">The charge box identification.</param>
        /// <param name="RequestId">An optional request identification.</param>
        /// <param name="RequestTimestamp">An optional request timestamp.</param>
        public ClearCacheRequest(ChargeBox_Id ChargeBoxId,
                                 Request_Id?RequestId      = null,
                                 DateTime?RequestTimestamp = null)

            : base(ChargeBoxId,
                   "ClearCache",
                   RequestId,
                   RequestTimestamp)

        {
        }
Exemple #14
0
 /// <summary>
 /// Create a new generic request message.
 /// </summary>
 /// <param name="ChargeBoxId">The charge box identification.</param>
 /// <param name="WebSocketAction">WebSocket Action.</param>
 /// <param name="RequestId">An optional request identification.</param>
 /// <param name="RequestTimestamp">An optional request timestamp.</param>
 /// <param name="RequestTimeout">The timeout of this request.</param>
 public ARequest(ChargeBox_Id ChargeBoxId,
                 String WebSocketAction,
                 Request_Id?RequestId      = null,
                 DateTime?RequestTimestamp = null,
                 TimeSpan?RequestTimeout   = null)
 {
     this.ChargeBoxId      = ChargeBoxId;
     this.WebSocketAction  = WebSocketAction;
     this.RequestId        = RequestId ?? Request_Id.Random();
     this.RequestTimestamp = RequestTimestamp ?? DateTime.UtcNow;
     this.RequestTimeout   = RequestTimeout;
 }
Exemple #15
0
        /// <summary>
        /// Create a new Authorize request.
        /// </summary>
        /// <param name="ChargeBoxId">The charge box identification.</param>
        /// <param name="IdTag">The identifier that needs to be authorized.</param>
        ///
        /// <param name="RequestId">An optional request identification.</param>
        /// <param name="RequestTimestamp">An optional request timestamp.</param>
        public AuthorizeRequest(ChargeBox_Id ChargeBoxId,
                                IdToken IdTag,
                                Request_Id?RequestId      = null,
                                DateTime?RequestTimestamp = null)

            : base(ChargeBoxId,
                   "Authorize",
                   RequestId,
                   RequestTimestamp)

        {
            this.IdTag = IdTag;
        }
Exemple #16
0
        public static Task <UnlockConnectorResponse> UnlockConnector(this ICentralSystemClient ICentralSystemClient,
                                                                     ChargeBox_Id ChargeBoxId,
                                                                     Connector_Id ConnectorId,

                                                                     Request_Id?RequestId      = null,
                                                                     DateTime?RequestTimestamp = null,
                                                                     TimeSpan?Timeout          = null)

        => ICentralSystemClient.UnlockConnector(new UnlockConnectorRequest(ChargeBoxId,
                                                                           ConnectorId,
                                                                           RequestId,
                                                                           RequestTimestamp),
                                                Timeout);
Exemple #17
0
        public static Task <CancelReservationResponse> CancelReservation(this ICentralSystemClient ICentralSystemClient,
                                                                         ChargeBox_Id ChargeBoxId,
                                                                         Reservation_Id ReservationId,

                                                                         Request_Id?RequestId      = null,
                                                                         DateTime?RequestTimestamp = null,
                                                                         TimeSpan?Timeout          = null)

        => ICentralSystemClient.CancelReservation(new CancelReservationRequest(ChargeBoxId,
                                                                               ReservationId,
                                                                               RequestId,
                                                                               RequestTimestamp),
                                                  Timeout);
Exemple #18
0
        /// <summary>
        /// Create new 'stop session' command command.
        /// </summary>
        /// <param name="SessionId">Session identification of the charging session that is requested to be stopped.</param>
        /// <param name="ResponseURL">URL that the CommandResult POST should be sent to. This URL might contain an unique identification to be able to distinguish between 'stop session' command requests.</param>
        ///
        /// <param name="RequestId">An optional request identification.</param>
        /// <param name="CorrelationId">An optional request correlation identification.</param>
        public StopSessionCommand(Session_Id SessionId,
                                  URL ResponseURL,

                                  Request_Id?RequestId         = null,
                                  Correlation_Id?CorrelationId = null)

            : base(ResponseURL,
                   RequestId,
                   CorrelationId)

        {
            this.SessionId = SessionId;
        }
Exemple #19
0
        public static Task <RemoteStopTransactionResponse> RemoteStopTransaction(this ICentralSystemClient ICentralSystemClient,
                                                                                 ChargeBox_Id ChargeBoxId,
                                                                                 Transaction_Id TransactionId,

                                                                                 Request_Id?RequestId      = null,
                                                                                 DateTime?RequestTimestamp = null,
                                                                                 TimeSpan?Timeout          = null)

        => ICentralSystemClient.RemoteStopTransaction(new RemoteStopTransactionRequest(ChargeBoxId,
                                                                                       TransactionId,
                                                                                       RequestId,
                                                                                       RequestTimestamp),
                                                      Timeout);
        /// <summary>
        /// Create new 'set charging profile' command command.
        /// </summary>
        /// <param name="ChargingProfile">Session identification of the charging session that is requested to be stopped.</param>
        /// <param name="ResponseURL">URL that the CommandResult POST should be sent to. This URL might contain an unique identification to be able to distinguish between 'set charging profile' command requests.</param>
        ///
        /// <param name="RequestId">An optional request identification.</param>
        /// <param name="CorrelationId">An optional request correlation identification.</param>
        public SetChargingProfileCommand(ChargingProfile ChargingProfile,
                                         URL ResponseURL,

                                         Request_Id?RequestId         = null,
                                         Correlation_Id?CorrelationId = null)

            : base(ResponseURL,
                   RequestId,
                   CorrelationId)

        {
            this.ChargingProfile = ChargingProfile;
        }
        /// <summary>
        /// Create new 'cancel reservation' command command.
        /// </summary>
        /// <param name="ReservationId">Reservation identification unique for this reservation.</param>
        /// <param name="ResponseURL">URL that the CommandResult POST should be sent to. This URL might contain an unique identification to be able to distinguish between 'cancel reservation' command requests.</param>
        ///
        /// <param name="RequestId">An optional request identification.</param>
        /// <param name="CorrelationId">An optional request correlation identification.</param>
        public CancelReservationCommand(Reservation_Id ReservationId,
                                        URL ResponseURL,

                                        Request_Id?RequestId         = null,
                                        Correlation_Id?CorrelationId = null)

            : base(ResponseURL,
                   RequestId,
                   CorrelationId)

        {
            this.ReservationId = ReservationId;
        }
Exemple #22
0
        public static Task <ResetResponse> Reset(this ICentralSystemClient ICentralSystemClient,
                                                 ChargeBox_Id ChargeBoxId,
                                                 ResetTypes ResetType,

                                                 Request_Id?RequestId      = null,
                                                 DateTime?RequestTimestamp = null,
                                                 TimeSpan?Timeout          = null)

        => ICentralSystemClient.Reset(new ResetRequest(ChargeBoxId,
                                                       ResetType,
                                                       RequestId,
                                                       RequestTimestamp),
                                      Timeout);
        /// <summary>
        /// Create a new UnlockConnector request.
        /// </summary>
        /// <param name="ChargeBoxId">The charge box identification.</param>
        /// <param name="ConnectorId">The identifier of the connector to be unlocked.</param>
        ///
        /// <param name="RequestId">An optional request identification.</param>
        /// <param name="RequestTimestamp">An optional request timestamp.</param>
        public UnlockConnectorRequest(ChargeBox_Id ChargeBoxId,
                                      Connector_Id ConnectorId,

                                      Request_Id?RequestId      = null,
                                      DateTime?RequestTimestamp = null)

            : base(ChargeBoxId,
                   "UnlockConnector",
                   RequestId,
                   RequestTimestamp)

        {
            this.ConnectorId = ConnectorId;
        }
Exemple #24
0
        /// <summary>
        /// Create a new FirmwareStatusNotification request.
        /// </summary>
        /// <param name="ChargeBoxId">The charge box identification.</param>
        /// <param name="Status">The status of the diagnostics upload.</param>
        ///
        /// <param name="RequestId">An optional request identification.</param>
        /// <param name="RequestTimestamp">An optional request timestamp.</param>
        public FirmwareStatusNotificationRequest(ChargeBox_Id ChargeBoxId,
                                                 FirmwareStatus Status,

                                                 Request_Id?RequestId      = null,
                                                 DateTime?RequestTimestamp = null)

            : base(ChargeBoxId,
                   "FirmwareStatusNotification",
                   RequestId,
                   RequestTimestamp)

        {
            this.Status = Status;
        }
Exemple #25
0
        /// <summary>
        /// Create a new RemoteStopTransaction request.
        /// </summary>
        /// <param name="ChargeBoxId">The charge box identification.</param>
        /// <param name="TransactionId">The identification of the transaction which the charge point is requested to stop.</param>
        ///
        /// <param name="RequestId">An optional request identification.</param>
        /// <param name="RequestTimestamp">An optional request timestamp.</param>
        public RemoteStopTransactionRequest(ChargeBox_Id ChargeBoxId,
                                            Transaction_Id TransactionId,

                                            Request_Id?RequestId      = null,
                                            DateTime?RequestTimestamp = null)

            : base(ChargeBoxId,
                   "RemoteStopTransaction",
                   RequestId,
                   RequestTimestamp)

        {
            this.TransactionId = TransactionId;
        }
Exemple #26
0
        /// <summary>
        /// Create a new DiagnosticsStatusNotification request.
        /// </summary>
        /// <param name="ChargeBoxId">The charge box identification.</param>
        /// <param name="Status">The status of the diagnostics upload.</param>
        ///
        /// <param name="RequestId">An optional request identification.</param>
        /// <param name="RequestTimestamp">An optional request timestamp.</param>
        public DiagnosticsStatusNotificationRequest(ChargeBox_Id ChargeBoxId,
                                                    DiagnosticsStatus Status,

                                                    Request_Id?RequestId      = null,
                                                    DateTime?RequestTimestamp = null)

            : base(ChargeBoxId,
                   "DiagnosticsStatusNotification",
                   RequestId,
                   RequestTimestamp)

        {
            this.Status = Status;
        }
 /// <summary>
 /// Create a new generic request message.
 /// </summary>
 /// <param name="ChargeBoxId">The charge box identification.</param>
 /// <param name="WebSocketAction">WebSocket Action.</param>
 /// <param name="RequestId">An optional request identification.</param>
 /// <param name="RequestTimestamp">An optional request timestamp.</param>
 /// <param name="RequestTimeout">The timeout of this request.</param>
 public ARequest(ChargeBox_Id ChargeBoxId,
                 String WebSocketAction,
                 Request_Id?RequestId             = null,
                 EventTracking_Id EventTrackingId = null,
                 DateTime?RequestTimestamp        = null,
                 TimeSpan?RequestTimeout          = null)
 {
     this.ChargeBoxId      = ChargeBoxId;
     this.WebSocketAction  = WebSocketAction;
     this.RequestId        = RequestId ?? Request_Id.Random();
     this.EventTrackingId  = EventTrackingId ?? EventTracking_Id.New;
     this.RequestTimestamp = RequestTimestamp ?? Timestamp.Now;
     this.RequestTimeout   = RequestTimeout;
 }
Exemple #28
0
        /// <summary>
        /// Create a CancelReservation request.
        /// </summary>
        /// <param name="ChargeBoxId">The charge box identification.</param>
        /// <param name="ReservationId">The unique identification of this reservation.</param>
        ///
        /// <param name="RequestId">An optional request identification.</param>
        /// <param name="RequestTimestamp">An optional request timestamp.</param>
        public CancelReservationRequest(ChargeBox_Id ChargeBoxId,
                                        Reservation_Id ReservationId,

                                        Request_Id?RequestId      = null,
                                        DateTime?RequestTimestamp = null)

            : base(ChargeBoxId,
                   "CancelReservation",
                   RequestId,
                   RequestTimestamp)

        {
            this.ReservationId = ReservationId;
        }
Exemple #29
0
        /// <summary>
        /// Create a new reset request.
        /// </summary>
        /// <param name="ChargeBoxId">The charge box identification.</param>
        /// <param name="Type">The type of reset that the charge point should perform.</param>
        ///
        /// <param name="RequestId">An optional request identification.</param>
        /// <param name="RequestTimestamp">An optional request timestamp.</param>
        public ResetRequest(ChargeBox_Id ChargeBoxId,
                            ResetTypes Type,

                            Request_Id?RequestId      = null,
                            DateTime?RequestTimestamp = null)

            : base(ChargeBoxId,
                   "Reset",
                   RequestId,
                   RequestTimestamp)

        {
            this.Type = Type;
        }
Exemple #30
0
        public static Task <ChangeConfigurationResponse> ChangeConfiguration(this ICentralSystemClient ICentralSystemClient,
                                                                             ChargeBox_Id ChargeBoxId,
                                                                             String Key,
                                                                             String Value,

                                                                             Request_Id?RequestId      = null,
                                                                             DateTime?RequestTimestamp = null,
                                                                             TimeSpan?Timeout          = null)

        => ICentralSystemClient.ChangeConfiguration(new ChangeConfigurationRequest(ChargeBoxId,
                                                                                   Key,
                                                                                   Value,
                                                                                   RequestId,
                                                                                   RequestTimestamp),
                                                    Timeout);