| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 | 
							- using System;
 
- using System.Collections.Generic;
 
- using System.Linq;
 
- using System.Net.Configuration;
 
- using System.Text;
 
- using System.Threading.Tasks;
 
- using System.Xml;
 
- using Aitex.Core.Common.DeviceData;
 
- using Aitex.Core.RT.DataCenter;
 
- using Aitex.Core.RT.Device;
 
- using Aitex.Core.RT.Event;
 
- using Aitex.Core.RT.IOCore;
 
- using Aitex.Core.RT.OperationCenter;
 
- using Aitex.Core.RT.SCCore;
 
- using Aitex.Core.Util;
 
- namespace MECF.Framework.Common.Device.Bases
 
- {
 
-     public abstract class ChillerBase : BaseDevice, IDevice
 
-     {
 
-         public virtual bool IsOn { get; set; }
 
-         public virtual bool IsError { get; set; }
 
-         public virtual bool IsStable { get; set; }
 
-         public virtual bool IsRunning { get; set; }
 
-         public virtual bool IsControl { get; set; }
 
-         
 
-         public virtual float Temperature { get; set; }
 
-         public virtual float CoolantInletTcFeedback { get; set; }
 
-         public virtual float CoolantOutletTcFeedback { get; set; }
 
-         public virtual AITChillerData DeviceData { get; set; }
 
-         protected ChillerBase() : base()
 
-         {
 
-         }
 
-         protected ChillerBase(string module, string name, string display, string id) : base(module, name, display, id)
 
-         {
 
-         }
 
-         public virtual bool Initialize()
 
-         {
 
-             DATA.Subscribe($"{Module}.{Name}.DeviceData", () => DeviceData);
 
-             //DATA.Subscribe($"{Module}.{Name}.IsOn", () => IsOn);
 
-             DATA.Subscribe($"{Module}.{Name}.Temperature", () => Temperature);
 
-             OP.Subscribe($"{Module}.{Name}.SetPowerOnOff", (function, args) =>
 
-             {
 
-                 bool isEnable = Convert.ToBoolean((string)args[0]);
 
-                 SetChillerOnOff(isEnable);
 
-                 return true;
 
-             });
 
-             OP.Subscribe($"{Module}.{Name}.ChillerOn", (function, args) =>
 
-             {
 
-                 SetChillerOnOff(true);
 
-                 return true;
 
-             });
 
-             OP.Subscribe($"{Module}.{Name}.ChillerOff", (function, args) =>
 
-             {
 
-                 SetChillerOnOff(false);
 
-                 return true;
 
-             });
 
-             OP.Subscribe($"{Module}.{Name}.Ramp", (function, args) =>
 
-             {
 
-                 SetChillerTemp((float)Convert.ToDouble((string)args[0]), (float)Convert.ToDouble((string)args[1]));
 
-                 return true;
 
-             });
 
-             return true;
 
-         }
 
-         public virtual void SetChillerOnOff(bool isOn) { }
 
-         public virtual void SetChillerTemp(float value, float offset) { }
 
-         public virtual void Terminate() { }
 
-         public virtual void Monitor() { }
 
-         public virtual void Reset() { }
 
-     }
 
- }
 
 
  |