public bool StartVCTest()
        {
            try
            {
                USB      = UsbManager.GetInstance();
                SpDevice = USB.GetDeviceConnected();
            }

            catch (Exception ex)
            {
                string s = ex.Message;
                LogMessage(ex.Message);
                VKApp.mainApp.commtoMCC.SendData(string.Format(CommCommands.SpirostatusFailed, "USB" + ex.Message));
                return(false);
            }


            //  SpDevice.OnFvcFlowVolume += SpDevice_OnFvcFlowVolume;
            //  SpDevice.OnFVCVolumeTime += SpDevice_OnFvcVolumeTime;
            // SpDevice.OnFvcComplete += SpDevice_OnFvcComplete;
            try
            {
                SpDevice.OnVcVentilatoryProfile += SpDevice_OnVcVentilatoryProfile;
                SpDevice.OnVcVolumeTime         += SpDevice_OnVcVolumeTime;
                SpDevice.OnVcComplete           += SpDevice_OnVcComplete;
                SpDevice.StartTest(Test.VC, Turbine.Disposable);
            }
            catch (Exception ex)
            {
                LogMessage(ex.Message);
                VKApp.mainApp.commtoMCC.SendData(string.Format(CommCommands.SpirostatusFailed, "ST" + ex.Message));
            }

            return(true);
        }
 public void StopTest()
 {
     if (SpDevice != null)
     {
         SpDevice.StopTest();
     }
     SpDevice = null;
 }
Beispiel #3
0
        public void StartFVCTest()
        {
            try
            {
                SpDevice = USB.GetDeviceConnected();
            }

            catch (Exception ex)
            {
                string s = ex.Message;
                // MessageBox.Show(ex.Message);
                return;
            }


            SpDevice.OnFvcFlowVolume += SpDevice_OnFvcFlowVolume;
            SpDevice.OnFVCVolumeTime += SpDevice_OnFvcVolumeTime;
            SpDevice.OnFvcComplete   += SpDevice_OnFvcComplete;
            SpDevice.StartTest(Test.FVC, Turbine.Disposable);
        }