Esempio n. 1
0
        public IAnalogInput GetAnalogInput(uint point)
        {
            if (!analogInputMap.ContainsKey(point))
            {
                throw new Exception("Analog Input does not exist.");
            }

            AnalogInput ioPoint = ((AnalogInput)analogInputMap[point]);

            return((IAnalogInput)ioPoint);
        }
Esempio n. 2
0
        public AnalogInput CreateAnalogInput(string pointName, uint point)
        {
            if (analogInputMap.ContainsKey(point))
            {
                throw new Exception("The analog IO already exist.");
            }
            if (point > analogInCount)
            {
                throw new Exception("The assigned point is beyond limit.");
            }

            AnalogInput ioPoint = new AnalogInput(a3200HC, pointName, nodeID, point);

            analogInputMap.Add(point, ioPoint);
            return(ioPoint);
        }