コード例 #1
0
        private void CreateData()
        {
            while (_isRunning)
            {
                int count = channelInfo.Count;
                List <ChannelInfos> channels = new List <ChannelInfos>();
                for (int i = 0; i < count; i++)
                {
                    ChannelInfos   ci  = CloneChanelInfo(channelInfo[i]);
                    FiberBreakInfo fbi = CreateDatas.CreateTempData(ref ci);
                    if (fbi.FiberBreakPos != -1)
                    {
                        ci.FiberBreak = CloneFiberBreakInfo(fbi);
                        //  PushCreateDatasFBI(fbi);
                    }
                    //   PushCreateDatasCI(ci);
                    channels.Add(ci);
                }
                EquipInfo ei = new EquipInfo();
                ei = ei.DataConvert(DTSNum, channels, count, SampleInterval, this.SlaveNum);
                dataMange.PushEquipInfo(ei);

                EquipChannelTempInfo ecti = new EquipChannelTempInfo();
                ecti = ecti.DataConvert(DTSNum, channels, count, SampleInterval);
                dataMange.PushEquipChannelTempInfo(ecti);
                Thread.Sleep(1000);
            }
        }
コード例 #2
0
 private void CreateData()
 {
     while (_isRunning)
     {
         int count = channelInfo.Count;
         for (int i = 0; i < count; i++)
         {
             ChannelInfos   ci  = channelInfo[i];
             FiberBreakInfo fbi = CreateDatas.CreateTempData(ref ci);
             if (fbi.FiberBreakPos != -1)
             {
                 PushCreateDatasFBI(fbi);
             }
             PushCreateDatasCI(ci);
             Thread.Sleep(channelInfo[i].MeasureTime * 1000);
         }
     }
 }