using System; using System.Collections.Generic; using Aitex.Core.RT.IOCore; using Aitex.Core.Util; using MECF.Framework.Common.IOCore; namespace Aitex.Core.RT.IOCore { public class Index where T : class { public T this[string name] { get { return IoManager.Instance.GetIO(name); } } } public static class IO { public static Index DI = new Index(); public static Index DO = new Index(); public static Index AI = new Index(); public static Index AO = new Index(); public static bool CanSetDO(string doName, bool onOff, out string reason) { return IoManager.Instance.CanSetDo(doName, onOff, out reason); } public static List> GetIONameList(string group, IOType ioType) { return IoManager.Instance.GetIONameList(group, ioType); } public static List GetDiList(string source) { return IoManager.Instance.GetDIList(source); } public static List GetDoList(string source) { return IoManager.Instance.GetDOList(source); } public static List GetAiList(string source) { return IoManager.Instance.GetAIList(source); } public static List GetAoList(string source) { return IoManager.Instance.GetAOList(source); } } }