public IDigitalOutput GetDigitalOutput(uint point) { if (!digitalOutputMap.ContainsKey(point)) { throw new Exception("Digital Output does not exist."); } DigitalOutput ioPoint = ((DigitalOutput)digitalOutputMap[point]); return((IDigitalOutput)ioPoint); }
public DigitalOutput CreateDigitalOutput(string pointName, uint point) { if (digitalOutputMap.ContainsKey(point)) { throw new Exception("The digital IO already exist."); } if (point > digOutCount) { throw new Exception("The assigned point is beyond limit."); } DigitalOutput ioPoint = new DigitalOutput(a3200HC, pointName, nodeID, point); digitalOutputMap.Add(point, ioPoint); return(ioPoint); }