Beispiel #1
0
        public IAnalogOutput GetAnalogOutput(uint point)
        {
            if (!analogOutputMap.ContainsKey(point))
            {
                throw new Exception("Analog Output does not exist.");
            }

            AnalogOutput ioPoint = ((AnalogOutput)analogOutputMap[point]);

            return((IAnalogOutput)ioPoint);
        }
Beispiel #2
0
        public AnalogOutput CreateAnalogOutput(string pointName, uint point)
        {
            if (analogOutputMap.ContainsKey(point))
            {
                throw new Exception("The analog IO already exist.");
            }
            if (point > analogOutCount)
            {
                throw new Exception("The assigned point is beyond limit.");
            }

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

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