using System; using System.Diagnostics; 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.RT.Tolerance; using Aitex.Core.Util; using SorterRT.Modules; namespace VirgoRT.Devices.IODevices { public class IoSetConfig : BaseDevice, IDevice { private AOAccessor _aoPressureOffset = null; private DeviceTimer _timer = new DeviceTimer(); public IoSetConfig(string module, XmlElement node, string ioModule = "") { base.Module = module; base.Name = node.GetAttribute("id"); base.Display = node.GetAttribute("display"); base.DeviceID = node.GetAttribute("schematicId"); _aoPressureOffset = ParseAoNode("aoPressureOffset", node, ioModule); } public bool Initialize() { return true; } public void Terminate() { } public void Monitor() { if (_timer.IsTimeout()) { _aoPressureOffset.Value = 0; } } public void Reset() { _timer.Start(5000); _aoPressureOffset.Value = 0; } } }