예제 #1
0
파일: Can.cs 프로젝트: Wufus/NewWaveSanya
        static public void StartDeviceListMonitor()
        {
            IVciDeviceManager deviceManager = null;
            IVciDeviceList    deviceList    = null;

            deviceManager = VciServer.Instance().DeviceManager;
            deviceList    = deviceManager.GetDeviceList();
            ARE_Devices   = new AutoResetEvent(true);       //true запустит метод сразу
            deviceList.AssignEvent(ARE_Devices);

            ARE_Thread = new Thread(ARE_Thread_Devices);
            ARE_Thread.Start();
        }
예제 #2
0
        private CanManager()
        {
            _connectionEvent = new AutoResetEvent(true);

            using (IVciDeviceManager deviceManager = VciServer.Instance().DeviceManager)
            {
                _deviceList = deviceManager.GetDeviceList();
                _deviceList.AssignEvent(_connectionEvent);
            }

            Thread t = new Thread(ConnectionThread);

            t.IsBackground = true;
            t.Start();
        }