コード例 #1
0
        protected override bool StartTest()
        {
            bool retValue            = false;
            var  stimulatingPressure = Pressure.Calculate();

            try
            {
                DeviceManager.Execute(CPARDevice.CreateStaticProgram(PrimaryChannel, StimulusDuration, stimulatingPressure));
                DeviceManager.Execute(SECOND_CUFF ? CPARDevice.CreateStaticProgram(SecondaryChannel, StimulusDuration, stimulatingPressure) :
                                      CPARDevice.CreateEmptyProgram(SecondaryChannel));
                StartDevice(StartStimulation.StopCriterion.STOP_CRITERION_ON_BUTTON);
                Log.Debug("STATIC TS STARTED [Pressure: {0}, Duration: {1}, Both Cuffs: {2}", stimulatingPressure, StimulusDuration, SECOND_CUFF);

                result = new StaticTemporalSummationResult()
                {
                    NominalStimulatingPressure = stimulatingPressure
                };

                initializing = true;
                retValue     = true;
            }
            catch (Exception e)
            {
                Log.Debug(e.Message);
            }

            return(retValue);
        }
コード例 #2
0
 protected override void InitializeChart()
 {
     if (!Focused)
     {
         var stimulatingPressure = Pressure.IsAvailable() ? Pressure.Calculate() : 100;
         Visualizer.Pmax           = 100;
         Visualizer.Tmax           = StimulusDuration + TailDuration;
         Visualizer.Conditioning   = false;
         Visualizer.SecondCuff     = SECOND_CUFF;
         Visualizer.PrimaryChannel = PrimaryChannel + 1;
     }
 }