コード例 #1
0
ファイル: ThresholdSet.cs プロジェクト: mgcarmueja/MPTCE
        /// <summary>
        /// Copies the contents of the source ThresholdSet into the one invoking the method
        /// It only will work well with two ThresholdSet onjects with the same number of channels
        /// </summary>
        /// <param name="source"></param>
        public void Copy(ThresholdSet source)
        {
            if (source == null) return;

            int i;
            int length = source.avgValues.Length;

            for (i=0;i<length;i++)
            {
                this.avgValues[i] = source.avgValues[i];
                this.maxValues[i] = source.maxValues[i];
                this.minValues[i] = source.minValues[i];
                this.stdDevs[i] = source.stdDevs[i];
                this.variances[i] = source.variances[i];
            }

            this.movementCode = source.movementCode;
        }
コード例 #2
0
ファイル: RecordingConfig.cs プロジェクト: mgcarmueja/MPTCE
 private void Init()
 {
     _schedule = new ObservableCollection<ScheduleItem>();
     _schedule.CollectionChanged += OnCollectionChanged;
     this.PropertyChanged += RecordingConfig_PropertyChanged;
     thresholdSet = new ThresholdSet(nChannels);
 }
コード例 #3
0
ファイル: ThresholdEngine.cs プロジェクト: mgcarmueja/MPTCE
        public override void Init()
        {
            base.Init();
            //_firstRun = true;

            _postProcessingBuffer.Clear();

            _thresholdSet = recordingConfig.thresholdSet;
            _movingWindow = new double[windowLength, recordingConfig.nChannels];
            _movingWindowStart = 0;
            _processingFunction = new ProcessingFunction(GetRMS);

            _dataMonitor = new BlockingCollection<object>();
        }
コード例 #4
0
ファイル: RecordingConfig.cs プロジェクト: mgcarmueja/MPTCE
 /// <summary>
 /// Clears the recording configuration and recursivelly calls the Clear() methods of its list-based attributes
 /// </summary>
 public void Clear()
 {
     this.gain = 0;
     this.maxVoltage = 0;
     this.minVoltage = 0;
     this.nChannels = 0;
     this.repetitions = 0;
     this.sampleFreq = 0;
     this.schedule.Clear();
     this.scheduleActive = false;
     this.scheduleItemnSamples = 0;
     this.scheduleItemTime = 0;
     this.scheduleLength = 0;
     this.scheduleWarmupItems = 0;
     this.thresholdSet = null;
 }