public ChargingStationAlreadyExistsInPool(ChargingPool ChargingPool, ChargingStation_Id ChargingStationId) : base(ChargingPool.Operator, "The given charging station identification '" + ChargingStationId + "' already exists within the given '" + ChargingPool.Id + "' charging pool!") { }
public ChargingStationAlreadyExistsInGroup(ChargingStationGroup ChargingStationGroup, ChargingStation_Id ChargingStationId) : base(ChargingStationGroup.Operator, "The given charging station identification '" + ChargingStationId + "' already exists within the given '" + ChargingStationGroup.Id + "' charging group!") { }
public ChargingStationCouldNotBeCreated(ChargingPool ChargingPool, ChargingStation_Id ChargingStation_Id) : base(ChargingPool.Operator, "The given charging station identification '" + ChargingStation_Id + "' already exists within the given '" + ChargingPool.Id + "' EVS pool!") { }
/// <summary> /// Create a new charging station admin status update. /// </summary> /// <param name="Id">The unique identification of the charging station.</param> /// <param name="OldStatus">The old timestamped admin status of the charging station.</param> /// <param name="NewStatus">The new timestamped admin status of the charging station.</param> public ChargingStationAdminStatusUpdate(ChargingStation_Id Id, Timestamped <ChargingStationAdminStatusTypes> OldStatus, Timestamped <ChargingStationAdminStatusTypes> NewStatus) { this.Id = Id; this.OldStatus = OldStatus; this.NewStatus = NewStatus; }
/// <summary> /// Create a new charging station status. /// </summary> /// <param name="Id">The unique identification of the charging station.</param> /// <param name="Status">The current timestamped status of the charging station.</param> /// <param name="CustomData">An optional dictionary of customer-specific data.</param> public ChargingStationStatus(ChargingStation_Id Id, Timestamped <ChargingStationStatusTypes> Status, IReadOnlyDictionary <String, Object> CustomData = null) : base(CustomData) { this.Id = Id; this.Status = Status; }
/// <summary> /// Create a new charging station admin status. /// </summary> /// <param name="Id">The unique identification of the charging station.</param> /// <param name="StatusSchedule">The timestamped admin status of the charging station.</param> /// <param name="CustomData">An optional dictionary of customer-specific data.</param> public ChargingStationStatusSchedule(ChargingStation_Id Id, StatusSchedule <ChargingStationStatusTypes> StatusSchedule, IReadOnlyDictionary <String, Object> CustomData = null) : base(CustomData) { this.Id = Id; this.StatusSchedule = StatusSchedule; }
public RedirectedChargingStations Add(ChargingStation_Id ChargingStationId, RoamingNetwork_Id RoamingNetwork_From, RoamingNetwork_Id RoamingNetwork_To) { if (!_RedirectedChargingStations.ContainsKey(ChargingStationId)) { _RedirectedChargingStations.Add(ChargingStationId, new Tuple <RoamingNetwork_Id, RoamingNetwork_Id>(RoamingNetwork_From, RoamingNetwork_To)); } return(this); }
/// <summary> /// Create a new EVSE identification /// based on the given charging station identification. /// </summary> /// <param name="ChargingStationId">A charging station identification.</param> /// <param name="AdditionalSuffix">An additional EVSE suffix.</param> public static EVSE_Id CreateEVSEId(this ChargingStation_Id ChargingStationId, String AdditionalSuffix) { var Suffix = ChargingStationId.Suffix; if (Suffix.StartsWith("TATION", StringComparison.Ordinal)) { Suffix = "VSE" + Suffix.Substring(6); } return(EVSE_Id.Parse(ChargingStationId.OperatorId, Suffix + AdditionalSuffix ?? "")); }
/// <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 ?? "")); }
/// <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>(); }
/// <summary> /// Check if the given enumeration of charging stations and their current status /// contains the given pair of charging station identification and status. /// </summary> /// <param name="ChargingStationStatus">An enumeration of charging stations and their current status.</param> /// <param name="Id">An charging station identification.</param> /// <param name="Status">An charging station status.</param> public static Boolean Contains(this IEnumerable <ChargingStationStatus> ChargingStationStatus, ChargingStation_Id Id, ChargingStationStatusType Status) { foreach (var status in ChargingStationStatus) { if (status.Id == Id && status.Status == Status) { return(true); } } return(false); }
/// <summary> /// Create a new charging station status. /// </summary> /// <param name="Id">The unique identification of a charging station.</param> /// <param name="Status">The current status of a charging station.</param> /// <param name="Timestamp">The timestamp of the current status of the charging station.</param> public ChargingStationAdminStatus(ChargingStation_Id Id, ChargingStationAdminStatusType Status, DateTime Timestamp) { #region Initial checks if (Id == null) { throw new ArgumentNullException(nameof(Id), "The given unique identification of a charging station must not be null!"); } #endregion this._Id = Id; this._Status = Status; this._Timestamp = Timestamp; }
/// <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) { }
public Boolean TryGet(ChargingStation_Id ChargingStationId, out Tuple <RoamingNetwork_Id, RoamingNetwork_Id> Redirection) { return(_RedirectedChargingStations.TryGetValue(ChargingStationId, out Redirection)); }
public Boolean Allowed(ChargingStation_Id StationId) => _AllowedMemberIds.Contains(StationId);
/// <summary> /// Check if the given charging station identification is member of this charging station group. /// </summary> /// <param name="ChargingStationId">The unique identification of the charging station.</param> public Boolean ContainsId(ChargingStation_Id ChargingStationId) => _ChargingStations.ContainsKey(ChargingStationId);
/// <summary> /// Check if the given ChargingStation identification is already present within the charging pool. /// </summary> /// <param name="ChargingStationId">The unique identification of the charging station.</param> public Boolean Contains(ChargingStation_Id ChargingStationId) { return(_AllowedChargingStationIds.Contains(ChargingStationId)); }
public EVSEAlreadyExistsInStation(EVSE_Id EVSE_Id, ChargingStation_Id ChargingStation_Id) : base("The given EVSE identification '" + EVSE_Id + "' already exists within the given '" + ChargingStation_Id + "' charging station!") { }
public Boolean Add(ChargingStation_Id ChargingStationId) { return(_AllowedChargingStationIds.Add(ChargingStationId)); }
public ChargingStationAlreadyExistsInGroup(ChargingStation_Id ChargingStation_Id, ChargingStationGroup_Id ChargingGroup_Id) : base("The given charging station identification '" + ChargingStation_Id + "' already exists within the given '" + ChargingGroup_Id + "' charging group!") { }
public static ChargingLocation FromChargingStationId(ChargingStation_Id ChargingStationId) => new ChargingLocation(ChargingStationId: ChargingStationId);
public ChargingStationGroup Add(ChargingStation_Id StationId) { _AllowedMemberIds.Add(StationId); return(this); }
public Boolean Remove(ChargingStation_Id ChargingStationId) { return(_AllowedChargingStationIds.Remove(ChargingStationId)); }