예제 #1
0
 private void btnStop_Click(object sender, EventArgs e)
 {
     if (cicdDevicve != null)
     {
         cicdDevicve.Stop();
         cicdDevicve = null;
     }
     chkMonitorCicd.Checked = false;
     btnStart.Enabled       = true;
 }
예제 #2
0
        private void StartCICD()
        {
            log.Debug("Starting CICD");

            if (cicdDevicve != null)
            {
                if (cicdDevicve.IsRunnign())
                {
                    cicdDevicve.Stop();
                    log.Debug("Stoping already running CICD");
                }
            }

            cicdDevicve = new CICDDevice(new Uri(Properties.Settings.Default.CICCDUrl), this);

            try
            {
                if (chkUseFile.Checked)
                {
                    log.Debug("Starting CICD - Software FE");
                    cicdDevicve.Start((float)numSampleFrequency.Value, (float)numCenterFreq.Value, (float)numUsefulBw.Value, (float)numGain.Value,
                                      (int)numSno.Value, "",
                                      new Uri(Properties.Settings.Default.CICDtoMedCICUri1), new Uri(Properties.Settings.Default.CICDtoMedCICUri2),
                                      txtInputFilename.Text, (CICD.InputType)cmbInputType.SelectedIndex, (CICD.SubType)cmbInputSubType.SelectedIndex);
                }
                else
                {
                    log.Debug("Starting CICD - Hardware FE");
                    cicdDevicve.Start((float)numSampleFrequency.Value, (float)numCenterFreq.Value, (float)numUsefulBw.Value, (float)numGain.Value,
                                      1, "", new Uri(Properties.Settings.Default.CICDtoMedCICUri1), new Uri(Properties.Settings.Default.CICDtoMedCICUri2));
                }
            }
            catch (Exception ex)
            {
                log.Error("Failed to start CICD", ex);
            }
        }