| 
					
				 | 
			
			
				@@ -0,0 +1,86 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+using Aitex.Core.RT.Device;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+using Aitex.Core.RT.Log;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+using MECF.Framework.Common.Persistent.Reservoirs;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+using System;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+using System.Collections.Generic;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+using System.Linq;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+using System.Text;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+using System.Threading.Tasks;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+namespace PunkHPX8_RT.Devices.Reservoir
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+{
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public class ReservoirDevice : BaseDevice, IDevice
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        #region 常量
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private const string AUTO = "Auto";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private const string MANUAL = "Manual";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private const string DISABLE = "Disable";
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        #endregion
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        #region 内部变量
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// <summary>
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// Prewet 持久性数值对象
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// </summary>
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        private ReservoirsPersistentValue _persistentValue;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        #endregion
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        #region 属性
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// <summary>
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// 操作模式
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// </summary>
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        public string OperationMode { get { return _persistentValue.OperatingMode; } }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// <summary>
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// 工程模式
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// </summary>
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        public string EngineerMode { get { return _persistentValue.RecipeOperatingMode; } }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// <summary>
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// 是否自动
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// </summary>
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        public bool IsAuto { get { return _persistentValue.OperatingMode == AUTO; } }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        #endregion
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// <summary>
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// 构造函数
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// </summary>
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// <param name="moduleName"></param>
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// <param name="name"></param>
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        public ReservoirDevice(string moduleName) : base(moduleName, moduleName, moduleName, moduleName)
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// <summary>
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// 初始化
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// </summary>
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// <returns></returns>
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        public bool Initialize()
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            InitializeParameter();
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return true;
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// <summary>
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// 初始化参数
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// </summary>
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        public void InitializeParameter()
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _persistentValue = ReservoirsPersistentManager.Instance.GetReservoirsPersistentValue(Module.ToString());
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (_persistentValue == null)
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                LOG.WriteLog(eEvent.ERR_RESERVOIR, Module.ToString(), "Persistent Value Object is not exist");
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// <summary>
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// 监控
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        /// </summary>
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        public void Monitor()
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        public void Reset()
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        public void Terminate()
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        {
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }
 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}
 
			 |