Esempio n. 1
0
 public void addXtiveTag(rfiddata.XtiveTag tag)
 {
     lock (_lockObject)
     {
         _tagsBuilder.AddTags(tag);
         if (_tagsBuilder.TagsCount >= _tagMaxCount)
         {
             this.sendTags();
         }
     }
 }
Esempio n. 2
0
        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            EPRuntime epRuntime = prefilter.getEPRuntime();

            while (ismonitor)
            {
                if (this.Xtreaderlist.Count > 0)
                {
                    foreach (XtiveReaderInitClass curInitR in Xtreaderlist) //  XReaderInitList是所有已注册的reader
                    {
                        RFIDInterface curR = curInitR.reader;

                        if ((bool)reconnectThread.AlertState[curR.ip] || !curR.Check())
                        {
                            continue;       //检测跳过
                        }

                        bool bResult = curR.LoadTagData(ref xtaglist, ref recordcount);

                        if (recordcount > 0)
                        {
                            for (int i = 0; i < recordcount; i++)
                            {
                                rfiddata.XtiveTag tag = xtaglist[i];
                                epRuntime.SendEvent(tag); //发送事件到预过滤处理引擎
                            }
                        }
                        else
                        {
                            //strResult = "No Tag! \r\n";
                        }
                    }
                }
                Thread.Sleep(this.readFre); //读取数据频率
            }
        }