コード例 #1
0
        private void CompileLines(IStimulus stimulus)
        {
            lines = new List <Line>();
            var analyser = new TimeAnalyser();

            stimulus.Visit(analyser);
            analyser.TimePoints.Sort();
            time = analyser.TimePoints.Distinct().ToArray();

            for (int n = 0; n < time.Length - 1; ++n)
            {
                lines.Add(new Line()
                {
                    Time   = time[n],
                    Value  = stimulus.GetValue(time[n]),
                    Slope  = stimulus.GetSlope(time[n]),
                    Length = time[n + 1] - time[n],
                    Count  = CPARDevice.TimeToCount(time[n + 1] - time[n])
                });
            }
        }
コード例 #2
0
 public PressureChannel(byte channel, CPARDevice device)
 {
     _channel = channel;
     _device  = device;
 }