123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.Timers;
- using Aitex.Core.Common.DeviceData;
- using Aitex.Core.RT.DataCenter;
- using Aitex.Core.RT.Device;
- using Aitex.Core.RT.OperationCenter;
- namespace MECF.Framework.Common.Device.Bases
- {
-
- public abstract class PumpBase: 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 Speed { get; set; }
- public virtual float Temperature { get; set; }
-
- public virtual AITPumpData DeviceData { get; set; }
-
-
-
- protected PumpBase() : base()
- {
- }
- protected PumpBase(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}.Speed", () => Speed);
- DATA.Subscribe($"{Module}.{Name}.Temperature", () => Temperature);
- OP.Subscribe($"{Module}.{Name}.SetPumpOn", (function, args) =>
- {
- SetPumpOnOff(true);
- return true;
- });
- OP.Subscribe($"{Module}.{Name}.SetPumpOff", (function, args) =>
- {
- SetPumpOnOff(false);
- return true;
- });
- OP.Subscribe($"{Module}.{Name}.PumpOn", (function, args) =>
- {
- SetPumpOnOff(true);
- return true;
- });
- OP.Subscribe($"{Module}.{Name}.PumpOff", (function, args) =>
- {
- SetPumpOnOff(false);
- return true;
- });
-
- return true;
- }
- public virtual void SetPumpOnOff(bool isOn) { }
- public virtual void Terminate() { }
- public virtual void Monitor() { }
- public virtual void Reset() { }
- }
- //public abstract class TurboPump : PumpBase
- //{
- //}
- }
|