示例#1
0
 protected override void DoWhenAllDataIsReady()
 {
     LoggedData.Add(Provider.Data);
     //Timestamps.Add(Timestamps.LastOrDefault() + Provider.Interval);
     Timestamps.Add(Provider.RunTime);
     Intervals.Add(Provider.Interval);
 }
示例#2
0
        protected override void DoWhenAllDataIsReady()
        {
            //if (Res.DebuggingSignalFlag)
            //    Log.Debug(_tag, $"DoWhenAll: {LoggedData.Count} data pts.");
            if (AllowDataUpdates) //base.DoWhenAllDataIsReady();
            {
                LoggedData.Add(Provider.Data);
                //Timestamps.Add(Timestamps.LastOrDefault() + Provider.Interval);
                Timestamps.Add(Provider.RunTime + AccumulatedRuntime);
                Intervals.Add(Provider.Interval);
            }
            //if (SessionCTS != null && SessionCTS.IsCancellationRequested)
            //{
            //    if (DeactivationCounter == 0)
            //    {
            //        SessionCTS = null;
            //        DeactivationCounter = 10;
            //        AdditionalPointsSignal.Set();
            //    }
            //    else DeactivationCounter--;
            //}

            if (InitialInterval == TimeSpan.Zero)
            {
                InitialInterval = Provider.Interval;
            }
        }
示例#3
0
 protected override void DoWhenAllDataIsReady()
 {
     LoggedData.Add(new Datapoint <T1, T2>()
     {
         Value1 = (providers[0] as IProvider <T1>).Data, Value2 = (providers[1] as IProvider <T2>).Data
     });
     //if (LoggedData.All(d => d.Magnitude() < 1e-10) && LoggedData.Count > 5) throw new Exception("Caught another zero list of data... WHY???");
     //Timestamps.Add(Timestamps.LastOrDefault() + providers[0].Interval);
     Timestamps.Add(providers[0].RunTime);
     Intervals.Add(providers[0].Interval);
 }
示例#4
0
        public void readLog()
        {
            StreamReader sr       = new StreamReader("LogFile.txt");
            string       readData = String.Empty;

            LoggedData.Clear();
            while (sr.EndOfStream != true)
            {
                readData = sr.ReadLine();
                if (readData != null)
                {
                    LoggedData.Add(readData);
                }
            }

            sr.Close();
        }