public FireAlarmMonitor(int port, int maxConnections, Versiport ioPort) { _ioPort = ioPort; ioPort.SetVersiportConfiguration(eVersiportConfiguration.DigitalInput); ioPort.VersiportChange += VersiportOnVersiportChange; _socket = new FireAlarmServerSocket(port, maxConnections); _socket.ClientConnected += SocketOnClientConnected; }
public GenericVersiportDigitalInputDevice(string key, Versiport inputPort, IOPortConfig props) : base(key) { InputStateFeedback = new BoolFeedback(InputStateFeedbackFunc); InputPort = inputPort; InputPort.SetVersiportConfiguration(eVersiportConfiguration.DigitalInput); if (props.DisablePullUpResistor) { InputPort.DisablePullUpResistor = true; } InputPort.VersiportChange += new VersiportEventHandler(InputPort_VersiportChange); Debug.Console(1, this, "Created GenericVersiportDigitalInputDevice on port '{0}'. DisablePullUpResistor: '{1}'", props.PortNumber, InputPort.DisablePullUpResistor); }