Exemplo n.º 1
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);
Exemplo n.º 2
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;
        }
Exemplo n.º 3
0
        public static String AsText(this ResetTypes ResetType)
        {
            switch (ResetType)
            {
            case ResetTypes.Hard:
                return("Hard");

            case ResetTypes.Soft:
                return("Soft");


            default:
                return("unknown");
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Create a new reset request.
        /// </summary>
        /// <param name="ChargeBoxId">The charge box identification.</param>
        /// <param name="ResetType">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 ResetType,

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

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

        {
            this.ResetType = ResetType;
        }
Exemplo n.º 5
0
        private void RestoreSettings(ResetTypes settingType)
        {
            // WARNING: Do not reset FeedbackSettings, as it is used to store entries that have to be consistent over time
            switch (settingType)
            {
            case ResetTypes.GeneralSettings:
                _settings.ResetSettings <UploadSettings>();
                _settings.ResetSettings <ExportSettings>();
                break;

            case ResetTypes.UserProfileSettings:
                _settings.ResetSettings <UserProfileSettings>();
                break;

            case ResetTypes.AnonymizationSettings:
                _settings.ResetSettings <AnonymizationSettings>();
                break;

            case ResetTypes.ModelStoreSettings:
                _settings.ResetSettings <ModelStoreSettings>();
                break;
            }
        }
Exemplo n.º 6
0
		/// <summary>
		/// Reset the GXProperty.
		/// </summary>
        public void Reset(ResetTypes type)
        {
			switch (type)
			{
				case ResetTypes.Values:
					this.SetValue(this.DefaultValue, false, PropertyStates.ValueChangedByUser);
					break;
				case ResetTypes.Errors:
					this.Status &= ~PropertyStates.Error;
					break;
				default:
					break;
			}
        }
Exemplo n.º 7
0
		/// <summary>
		/// Reset all child GXDevices.
		/// </summary>
        public void Reset(ResetTypes type)
        {
            foreach (GXDevice it in this.m_Devices)
            {
                it.Reset(type);
            }
        }
Exemplo n.º 8
0
		/// <summary>
		/// Reset all the child GXDevices.
		/// </summary>
        public void Reset(ResetTypes type)
        {
            this.DeviceGroups.Reset(type);
        }
Exemplo n.º 9
0
 /// <summary>
 /// Reset child GXProperties.
 /// </summary>
 public void Reset(ResetTypes type)
 {
     switch (type)
     {
         case ResetTypes.Values:
             foreach (GXProperty prop in this.Properties)
             {
                 prop.Reset(ResetTypes.Values);
             }
             break;
         case ResetTypes.Errors:
             foreach (GXProperty prop in this.Properties)
             {
                 prop.Reset(ResetTypes.Errors);
             }
             break;
         default:
             break;
     }
 }
Exemplo n.º 10
0
 /// <summary>
 /// Create an OCPP ResetRequest XML/SOAP request.
 /// </summary>
 /// <param name="Type">The type of reset that the charge point should perform.</param>
 public ResetRequest(ResetTypes Type)
 {
     this.Type = Type;
 }
Exemplo n.º 11
0
		/// <summary>
		/// Reset the GXTable.
		/// </summary>
        public void Reset(ResetTypes type)
        {

        }
Exemplo n.º 12
0
		/// <summary>
		/// Reset all child components.
		/// </summary>
		public void Reset(ResetTypes type)
		{
			switch (type)
			{
				case ResetTypes.Values:
					foreach (GXCategory cat in this.Categories)
					{
						cat.Reset(ResetTypes.Values);
					}
					break;
				case ResetTypes.Transaction:
					//TODO:
					break;
				case ResetTypes.Errors:
					this.Status &= ~DeviceStates.Error;
					foreach (GXCategory cat in this.Categories)
					{
						cat.Reset(ResetTypes.Values);
					}
					break;
				default:
					break;
			}
		}