private bool Open() { bool success = (x10interface != null && x10interface.Open()); if (success) { // // set transceived house codes for CM15 X10 RF-->PLC if (x10interface.GetType().Equals(typeof(CM15))) { SetCm15Codes(); } // readerTask = new Thread(new ThreadStart(ReaderThreadLoop)); readerTask.Start(); } return(success); }
private bool _open() { bool success = false; lock (_accesslock) { success = (_x10interface != null && _x10interface.Open()); if (success) { // // set transceived house codes for CM15 X10 RF-->PLC if (_x10interface.GetType().Equals(typeof(CM15))) { _setCM15Codes(); } // treader = new Thread(new ThreadStart(_readerThreadLoop)); twriter = new Thread(new ThreadStart(_writerThreadLoop)); // treader.Start(); twriter.Start(); } } return(success); }