void _timer_get2300Tag(object sender, EventArgs e) { __udpServer.Manualstate.WaitOne(); __udpServer.Manualstate.Reset(); string str = __udpServer.sbuilder.ToString(); __udpServer.sbuilder.Remove(0, str.Length); List <TagInfo> taglist = __2300helper.getTagList(); foreach (TagInfo ti in taglist) { this.lblStatus.Text = "检测到标签 " + ti.epc + " " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); this.appendLog(this.lblStatus.Text); this.addTagsToServer(ti.epc); } __2300helper.ParseDataToTag(str); if (str != null && str.Length > 0) { //Debug.WriteLine( // string.Format(". _timer_get2300Tag -> string = {0}" // , str)); } __udpServer.Manualstate.Set(); }
void updServer_evtReceived(string str) { //Debug.WriteLine("UHF => " + str); List <TagInfo> list = rfid_helper.ParseDataToTag(str); if (list.Count > 0) { this.Send(list[0].epc); } }
void updServer_evtReceived(string str) { //Debug.WriteLine("UHF => " + str); List <TagInfo> list = rfid_helper.ParseDataToTag(str); if (list.Count > 0) { if (myCommand != null) { myCommand.Para = list[0].epc; myCommand.IfBroadcast = "true"; } this.invokeCallback(myCommand); } }
void _timer_get2300Tag(object sender, EventArgs e) { __udpServer.Manualstate.WaitOne(); __udpServer.Manualstate.Reset(); string str = __udpServer.sbuilder.ToString(); __udpServer.sbuilder.Remove(0, str.Length); if (this.__reader_info.sendType == ReaderInfo.sendTypeUDP) { byte[] byteData = Encoding.UTF8.GetBytes(str); foreach (EndPoint ep in this.endpoint_list) { clientSocket.BeginSendTo(byteData, 0, byteData.Length, SocketFlags.None, ep, new AsyncCallback(OnSend), null); } string log = "接收到读写器数据"; this.appendLog(log); } else { List <TagInfo> taglist = __2300helper.getTagList(); foreach (TagInfo ti in taglist) { string log = "检测到标签 " + ti.epc; this.appendLog(log); this.addTagsToServer(ti.epc); } __2300helper.ParseDataToTag(str); if (str != null && str.Length > 0) { //Debug.WriteLine( // string.Format(". _timer_get2300Tag -> string = {0}" // , str)); } } __udpServer.Manualstate.Set(); }