/// <summary>
        /// Create a new e-mobility station status.
        /// </summary>
        /// <param name="Id">The unique identification of a e-mobility station.</param>
        /// <param name="Status">The current status of a e-mobility station.</param>
        /// <param name="Timestamp">The timestamp of the current status of the e-mobility station.</param>
        public eMobilityStationAdminStatus(eMobilityStation_Id Id,
                                           eMobilityStationAdminStatusType Status,
                                           DateTime Timestamp)

        {
            #region Initial checks

            if (Id == null)
            {
                throw new ArgumentNullException(nameof(Id), "The given unique identification of a e-mobility station must not be null!");
            }

            #endregion

            this.Id        = Id;
            this.Status    = Status;
            this.Timestamp = Timestamp;
        }
Esempio n. 2
0
 /// <summary>
 /// Set the admin status.
 /// </summary>
 /// <param name="NewAdminStatus">A new admin status.</param>
 /// <param name="Timestamp">The timestamp when this change was detected.</param>
 public void SetAdminStatus(eMobilityStationAdminStatusType NewAdminStatus,
                            DateTime Timestamp)
 {
     _AdminStatusSchedule.Insert(NewAdminStatus, Timestamp);
 }
Esempio n. 3
0
 /// <summary>
 /// Set the admin status.
 /// </summary>
 /// <param name="NewAdminStatus">A new timestamped admin status.</param>
 public void SetAdminStatus(eMobilityStationAdminStatusType NewAdminStatus)
 {
     _AdminStatusSchedule.Insert(NewAdminStatus);
 }
Esempio n. 4
0
        /// <summary>
        /// Create a new e-mobility station having the given identification.
        /// </summary>
        /// <param name="Id">The unique identification of the e-mobility station pool.</param>
        /// <param name="MaxAdminStatusListSize">The default size of the admin status list.</param>
        internal eMobilityStation(eMobilityStation_Id Id,
                                  eMobilityProvider Provider,
                                  Action <eMobilityStation> Configurator = null,
                                  RemoteEMobilityStationCreatorDelegate RemoteeMobilityStationCreator = null,
                                  eMobilityStationAdminStatusType AdminStatus = eMobilityStationAdminStatusType.Operational,
                                  UInt16 MaxAdminStatusListSize = DefaultMaxAdminStatusListSize)

            : base(Id)

        {
            #region Initial checks

            if (Provider == null)
            {
                throw new ArgumentNullException(nameof(Provider), "The e-mobility provider must not be null!");
            }

            #endregion

            #region Init data and properties

            this.Provider = Provider;

            this.Name        = new I18NString();
            this.Description = new I18NString();

            this._UserComment            = new I18NString();
            this._ServiceProviderComment = new I18NString();
            //this.GeoLocation                 = new GeoCoordinate();

            this._ParkingSpaces = new List <ParkingSpace>();

            this._PaymentOptions = new ReactiveSet <PaymentOptions>();

            this._AdminStatusSchedule = new StatusSchedule <eMobilityStationAdminStatusType>(MaxAdminStatusListSize);
            this._AdminStatusSchedule.Insert(AdminStatus);

            #endregion

            #region Init events


            #endregion

            #region Link events

            this._AdminStatusSchedule.OnStatusChanged += (Timestamp, EventTrackingId, StatusSchedule, OldStatus, NewStatus)
                                                         => UpdateAdminStatus(Timestamp, EventTrackingId, OldStatus, NewStatus);

            //// eMobilityStation events
            //this.OnEVSEAddition.           OnVoting       += (timestamp, station, evse, vote)      => ChargingPool.EVSEAddition.           SendVoting      (timestamp, station, evse, vote);
            //this.OnEVSEAddition.           OnNotification += (timestamp, station, evse)            => ChargingPool.EVSEAddition.           SendNotification(timestamp, station, evse);

            //this.OnEVSERemoval.            OnVoting       += (timestamp, station, evse, vote)      => ChargingPool.EVSERemoval .           SendVoting      (timestamp, station, evse, vote);
            //this.OnEVSERemoval.            OnNotification += (timestamp, station, evse)            => ChargingPool.EVSERemoval .           SendNotification(timestamp, station, evse);

            //// EVSE events
            //this.SocketOutletAddition.     OnVoting       += (timestamp, evse, outlet, vote)       => ChargingPool.SocketOutletAddition.   SendVoting      (timestamp, evse, outlet, vote);
            //this.SocketOutletAddition.     OnNotification += (timestamp, evse, outlet)             => ChargingPool.SocketOutletAddition.   SendNotification(timestamp, evse, outlet);

            //this.SocketOutletRemoval.      OnVoting       += (timestamp, evse, outlet, vote)       => ChargingPool.SocketOutletRemoval.    SendVoting      (timestamp, evse, outlet, vote);
            //this.SocketOutletRemoval.      OnNotification += (timestamp, evse, outlet)             => ChargingPool.SocketOutletRemoval.    SendNotification(timestamp, evse, outlet);

            #endregion

            this.OnPropertyChanged += UpdateData;

            Configurator?.Invoke(this);

            this.RemoteeMobilityStation = RemoteeMobilityStationCreator?.Invoke(this);
        }