コード例 #1
0
        public CyclingMeasureMode(ushort startDelay, Flavor.Common.Data.Measure.MeasureMode.Precise cycle, Action <long[][], List <PreciseEditorData>, short?> successfulExit, int iterations, int timeLimit, PreciseEditorData checkerPeak, int checkerIndex, short?initialShift, ushort allowedShift)
            : base((s, e) => {
            var ee = (Flavor.Common.Data.Measure.MeasureMode.Precise.SuccessfulExitEventArgs)e;
            successfulExit(ee.Counts, ee.Points, ee.Shift);
        }) {
            // TODO: checker peak received by index, after sort found by equality again
            //_cycle = new Flavor.Common.Data.Measure.MeasureMode.Precise(min, max, peaks, startDelay, stepDelay, exposition, forwardDelay, backwardDelay, graphUpdater, (ps, peds, shift) => OnSuccessfulExit(new Flavor.Common.Data.Measure.MeasureMode.Precise.SuccessfulExitEventArgs(ps, peds, shift)), initialShift, CheckShift);
            _cycle = cycle;
            _cycle.VoltageStepChangeRequested += Cycle_VoltageStepRequested;
            _cycle.Finalize += Cycle_Finalize;
            _cycle.Disable  += cycle_Disable;

            this.allowedShift = allowedShift;
            stopper           = new MeasureStopper(iterations, timeLimit);
            _checkerIndex     = checkerIndex;
            peak = checkerPeak;
        }
コード例 #2
0
        public CyclingMeasureMode(ushort startDelay, Flavor.Common.Data.Measure.MeasureMode.Precise cycle, Action<long[][], List<PreciseEditorData>, short?> successfulExit, int iterations, int timeLimit, PreciseEditorData checkerPeak, int checkerIndex, short? initialShift, ushort allowedShift)
            : base((s, e) => {
                var ee = (Flavor.Common.Data.Measure.MeasureMode.Precise.SuccessfulExitEventArgs)e;
                successfulExit(ee.Counts, ee.Points, ee.Shift);
            })
        {
            // TODO: checker peak received by index, after sort found by equality again
            //_cycle = new Flavor.Common.Data.Measure.MeasureMode.Precise(min, max, peaks, startDelay, stepDelay, exposition, forwardDelay, backwardDelay, graphUpdater, (ps, peds, shift) => OnSuccessfulExit(new Flavor.Common.Data.Measure.MeasureMode.Precise.SuccessfulExitEventArgs(ps, peds, shift)), initialShift, CheckShift);
            _cycle = cycle;
            _cycle.VoltageStepChangeRequested += Cycle_VoltageStepRequested;
            _cycle.Finalize += Cycle_Finalize;
            _cycle.Disable += cycle_Disable;

            this.allowedShift = allowedShift;
            stopper = new MeasureStopper(iterations, timeLimit);
            _checkerIndex = checkerIndex;
            peak = checkerPeak;
        }
コード例 #3
0
                public Monitor(ushort min, ushort max, List <PreciseEditorData> peaks, ushort startDelay, ushort stepDelay, ushort exposition, ushort forwardDelay, ushort backwardDelay, Action <ushort, PreciseEditorData> graphUpdater, Action <long[][], List <PreciseEditorData>, short?> successfulExit, int iterations, int timeLimit, PreciseEditorData checkerPeak, short?initialShift, ushort allowedShift)
                    : base((s, e) => {
                    var ee = (SuccessfulExitEventArgs)e;
                    successfulExit(ee.Counts, ee.Points, ee.Shift);
                }) {
                    // TODO: checker peak received by index, after sort found by equality again
                    cycle = new Precise(min, max, peaks, startDelay, stepDelay, exposition, forwardDelay, backwardDelay, graphUpdater, (ps, peds, shift) => OnSuccessfulExit(new SuccessfulExitEventArgs(ps, peds, shift)), initialShift, CheckShift);
                    cycle.VoltageStepChangeRequested += Cycle_VoltageStepRequested;
                    cycle.Finalize += Cycle_Finalize;
                    cycle.Disable  += cycle_Disable;

                    this.allowedShift = allowedShift;
                    stopper           = new MeasureStopper(iterations, timeLimit);
                    // redundant data
                    if (initialShift.HasValue && checkerPeak != null)
                    {
                        // TODO: move up to Commander. only index here
                        peak         = checkerPeak;
                        checkerIndex = peaks.FindIndex(peak.Equals);
                    }
                }
コード例 #4
0
ファイル: MeasureMode.cs プロジェクト: deathlust/flavor-ms
                public Monitor(ushort min, ushort max, List<PreciseEditorData> peaks, ushort startDelay, ushort stepDelay, ushort exposition, ushort forwardDelay, ushort backwardDelay, Action<ushort, PreciseEditorData> graphUpdater, Action<long[][], List<PreciseEditorData>, short?> successfulExit, int iterations, int timeLimit, PreciseEditorData checkerPeak, short? initialShift, ushort allowedShift)
                    : base((s, e) => {
                        var ee = (SuccessfulExitEventArgs)e;
                        successfulExit(ee.Counts, ee.Points, ee.Shift);
                    })
                {
                    // TODO: checker peak received by index, after sort found by equality again
                    cycle = new Precise(min, max, peaks, startDelay, stepDelay, exposition, forwardDelay, backwardDelay, graphUpdater, (ps, peds, shift) => OnSuccessfulExit(new SuccessfulExitEventArgs(ps, peds, shift)), initialShift, CheckShift);
                    cycle.VoltageStepChangeRequested += Cycle_VoltageStepRequested;
                    cycle.Finalize += Cycle_Finalize;
                    cycle.Disable += cycle_Disable;

                    this.allowedShift = allowedShift;
                    stopper = new MeasureStopper(iterations, timeLimit);
                    // redundant data
                    if (initialShift.HasValue && checkerPeak != null) {
                        // TODO: move up to Commander. only index here
                        peak = checkerPeak;
                        checkerIndex = peaks.FindIndex(peak.Equals);
                    }
                }