Example #1
0
        public ChargingPoolAlreadyExists(ChargingStationOperator ChargingStationOperator,
                                         ChargingPool_Id ChargingPoolId)

            : base(ChargingStationOperator.RoamingNetwork,
                   "The given charging pool identification '" + ChargingPoolId + "' already exists within the given '" + ChargingStationOperator.Id + "' charging station operator!")

        {
        }
        /// <summary>
        /// Create a new charging pool admin status update.
        /// </summary>
        /// <param name="Id">The unique identification of the charging pool.</param>
        /// <param name="OldStatus">The old timestamped admin status of the charging pool.</param>
        /// <param name="NewStatus">The new timestamped admin status of the charging pool.</param>
        public ChargingPoolAdminStatusUpdate(ChargingPool_Id Id,
                                             Timestamped <ChargingPoolAdminStatusTypes> OldStatus,
                                             Timestamped <ChargingPoolAdminStatusTypes> NewStatus)

        {
            this.Id        = Id;
            this.OldStatus = OldStatus;
            this.NewStatus = NewStatus;
        }
        /// <summary>
        /// Create a new charging pool status.
        /// </summary>
        /// <param name="Id">The unique identification of the charging pool.</param>
        /// <param name="StatusSchedule">The timestamped admin status of the charging pool.</param>
        /// <param name="CustomData">An optional dictionary of customer-specific data.</param>
        public ChargingPoolStatusSchedule(ChargingPool_Id Id,
                                          StatusSchedule <ChargingPoolStatusTypes> StatusSchedule,
                                          IReadOnlyDictionary <String, Object> CustomData = null)

            : base(CustomData)

        {
            this.Id             = Id;
            this.StatusSchedule = StatusSchedule;
        }
Example #4
0
        /// <summary>
        /// Create a new charging pool status.
        /// </summary>
        /// <param name="Id">The unique identification of the charging pool.</param>
        /// <param name="Status">The current status of the charging pool.</param>
        /// <param name="CustomData">An optional dictionary of customer-specific data.</param>
        public ChargingPoolStatus(ChargingPool_Id Id,
                                  Timestamped <ChargingPoolStatusTypes> Status,
                                  IReadOnlyDictionary <String, Object> CustomData = null)

            : base(CustomData)

        {
            this.Id     = Id;
            this.Status = Status;
        }
Example #5
0
        public RedirectedChargingPools Add(ChargingPool_Id ChargingPoolId,
                                           RoamingNetwork_Id RoamingNetwork_From,
                                           RoamingNetwork_Id RoamingNetwork_To)
        {
            if (!_RedirectedChargingPools.ContainsKey(ChargingPoolId))
            {
                _RedirectedChargingPools.Add(ChargingPoolId, new Tuple <RoamingNetwork_Id, RoamingNetwork_Id>(RoamingNetwork_From, RoamingNetwork_To));
            }

            return(this);
        }
Example #6
0
        /// <summary>
        /// Create a new charging station identification based
        /// on the given charging pool identification.
        /// </summary>
        /// <param name="ChargingPoolId">A charging pool identification.</param>
        /// <param name="AdditionalSuffix">An additional EVSE suffix.</param>
        public static ChargingStation_Id CreateStationId(this ChargingPool_Id ChargingPoolId,
                                                         String AdditionalSuffix)
        {
            var Suffix = ChargingPoolId.Suffix;

            if (Suffix.StartsWith("OOL", StringComparison.Ordinal))
            {
                Suffix = "TATION" + Suffix.Substring(3);
            }

            return(ChargingStation_Id.Parse(ChargingPoolId.OperatorId, Suffix + AdditionalSuffix ?? ""));
        }
Example #7
0
        /// <summary>
        /// Create a charging reservation.
        /// </summary>
        public ChargingReservation(ChargingReservation_Id ReservationId,
                                   DateTime Timestamp,
                                   DateTime StartTime,
                                   TimeSpan Duration,
                                   DateTime EndTime,
                                   TimeSpan ConsumedReservationTime,
                                   ChargingReservationLevel ReservationLevel,

                                   EVSP_Id ProviderId = null,
                                   eMA_Id eMAId       = null,

                                   RoamingNetwork RoamingNetwork        = null,
                                   ChargingPool_Id ChargingPoolId       = null,
                                   ChargingStation_Id ChargingStationId = null,
                                   EVSE_Id EVSEId = null,
                                   ChargingProduct_Id ChargingProductId = null,

                                   IEnumerable <Auth_Token> AuthTokens = null,
                                   IEnumerable <eMA_Id> eMAIds         = null,
                                   IEnumerable <UInt32> PINs           = null)

        {
            #region Initial checks

            if (ReservationId == null)
            {
                throw new ArgumentNullException(nameof(ReservationId), "The given charging reservation identification must not be null!");
            }

            #endregion

            this._ReservationId           = ReservationId;
            this._Timestamp               = Timestamp.ToUniversalTime();
            this._StartTime               = StartTime.ToUniversalTime();
            this._Duration                = Duration;
            this._EndTime                 = StartTime.ToUniversalTime() + Duration;
            this._ConsumedReservationTime = ConsumedReservationTime;
            this._ReservationLevel        = ReservationLevel;

            this._ProviderId = ProviderId;
            this._eMAId      = eMAId;

            this._RoamingNetwork    = RoamingNetwork;
            this._ChargingPoolId    = ChargingPoolId;
            this._ChargingStationId = ChargingStationId;
            this._EVSEId            = EVSEId;
            this._ChargingProductId = ChargingProductId;

            this._AuthTokens = AuthTokens != null ? new HashSet <Auth_Token>(AuthTokens) : new HashSet <Auth_Token>();
            this._eMAIds     = eMAIds != null ? new HashSet <eMA_Id>    (eMAIds)     : new HashSet <eMA_Id>();
            this._PINs       = PINs != null ? new HashSet <UInt32>    (PINs)       : new HashSet <UInt32>();
        }
Example #8
0
        /// <summary>
        /// Create a charging reservation.
        /// </summary>
        public ChargingReservation(DateTime Timestamp,
                                   DateTime StartTime,
                                   TimeSpan Duration,
                                   DateTime EndTime,
                                   ChargingReservationLevel ReservationLevel,

                                   EVSP_Id ProviderId = null,
                                   eMA_Id eMAId       = null,

                                   RoamingNetwork RoamingNetwork        = null,
                                   ChargingPool_Id ChargingPoolId       = null,
                                   ChargingStation_Id ChargingStationId = null,
                                   EVSE_Id EVSEId = null,
                                   ChargingProduct_Id ChargingProductId = null,

                                   IEnumerable <Auth_Token> AuthTokens = null,
                                   IEnumerable <eMA_Id> eMAIds         = null,
                                   IEnumerable <UInt32> PINs           = null)

            : this(ChargingReservation_Id.New,
                   Timestamp,
                   StartTime,
                   Duration,
                   EndTime,
                   TimeSpan.FromSeconds(0),
                   ReservationLevel,

                   ProviderId,
                   eMAId,

                   RoamingNetwork,
                   ChargingPoolId,
                   ChargingStationId,
                   EVSEId,
                   ChargingProductId,

                   AuthTokens,
                   eMAIds,
                   PINs)

        {
        }
Example #9
0
 public static ChargingLocation FromChargingPoolId(ChargingPool_Id ChargingPoolId)
 => new ChargingLocation(ChargingPoolId: ChargingPoolId);
 public ChargingPoolAlreadyExists(ChargingPool_Id ChargingPool_Id,
                                  EVSEOperator_Id EVSEOperator_Id)
     : base("The given charging pool identification '" + ChargingPool_Id + "' already exists within the given '" + EVSEOperator_Id + "' EVSE operator!")
 {
 }
Example #11
0
 public Boolean TryGet(ChargingPool_Id ChargingPoolId, out Tuple <RoamingNetwork_Id, RoamingNetwork_Id> Redirection)
 {
     return(_RedirectedChargingPools.TryGetValue(ChargingPoolId, out Redirection));
 }
 public ChargingStationCouldNotBeCreated(ChargingStation_Id ChargingStation_Id,
                                         ChargingPool_Id ChargingPool_Id)
     : base("The given charging station identification '" + ChargingStation_Id + "' already exists within the given '" + ChargingPool_Id + "' EVS pool!")
 {
 }
 public ChargingStationAlreadyExistsInPool(ChargingStation_Id ChargingStationId,
                                           ChargingPool_Id ChargingPoolId)
     : base("The given charging station identification '" + ChargingStationId + "' already exists within the given '" + ChargingPoolId + "' charging pool!")
 {
 }