示例#1
0
        /// <summary>
        /// Start to sweep PLC data
        /// </summary>
        /// <param name="Channel"></param>
        /// <returns></returns>
        public Task StartSweepThroughPLC()
        {
            PLC.ClearTestedData();
            testTime = DateTime.Now;

#if !FAKE_ME
            return(SweepAsync((lambda, list) =>
            {
                this.PLC.AddTestedData(lambda, list);
            }));
#else
            FakeDataGenerator.ReadRawData("fakedata.csv", out List <Point> data1, out List <Point> data2, out List <Point> data3, out List <Point> data4);
            this.PLC.Channels[0].InsertionLoss.AddRange(data1);
            this.PLC.Channels[1].InsertionLoss.AddRange(data2);
            this.PLC.Channels[2].InsertionLoss.AddRange(data3);
            this.PLC.Channels[3].InsertionLoss.AddRange(data4);


            return(Task.Run(() => { }));
#endif
        }