/// <summary> /// Update display forms(TagTableForm, RSSIGraphForm...) once receiving a new tag report from RFID reader /// </summary> /// <param name="tagInfo">an object containing all information of a tag in one tag report</param> public void UpdateDisplayForms(TagInfo tagInfo, bool isSimulation) { if (tagInfo.TotalTagCount == 1) { _firstReportTime = tagInfo.FirstSeenTime; } tagInfo.TimeStamp = tagInfo.FirstSeenTime - _firstReportTime; // Update status strip in MainForm UpdateStatusStrip(tagInfo, isSimulation); // Update Tag Filter in ReaderSettingsFrom if (_readerSettingsForm.Visible) { _readerSettingsForm.UpdateTagFilter(tagInfo); } // Update TagTableForm if (_tagTableForm.Visible) { _tagTableForm.UpdateTagTable(tagInfo); } // Update RSSIGraphForm if (_rssiGraphForm.Visible) { _rssiGraphForm.UpdateRSSIGraph(tagInfo); } // Update PhaseGraphForm if (_phaseGraphForm.Visible) { _phaseGraphForm.UpdatePhaseGraph(tagInfo); } _tagsTable.AddTagInfo(tagInfo); }
/// <summary> /// Update display forms(TagTableForm, RSSIGraphForm...) once receiving a new tag report from RFID reader /// </summary> /// <param name="tagInfo">an object containing all information of a tag in one tag report</param> public void UpdateDisplayForms(TagInfo tagInfo, bool isSimulation) { if (tagInfo.TotalTagCount == 1) { _firstReportTime = tagInfo.FirstSeenTime; } tagInfo.TimeStamp = tagInfo.FirstSeenTime - _firstReportTime; // Update status strip in MainForm UpdateStatusStrip(tagInfo, isSimulation); // Update Tag Filter in ReaderSettingsFrom if (_readerSettingsForm.Visible) { _readerSettingsForm.UpdateTagFilter(tagInfo); } // Update TagTableForm if (_tagTableForm.Visible) { _tagTableForm.UpdateTagTable(tagInfo); } // Update RSSIGraphForm if (_rssiGraphForm.Visible) { _rssiGraphForm.UpdateRSSIGraph(tagInfo); } // Update PhaseGraphForm if (_phaseGraphForm.Visible) { _phaseGraphForm.UpdatePhaseGraph(tagInfo); } _tagsTable.AddTagInfo(tagInfo); /* tagInfoQueue.Enqueue(tagInfo); * if (vitalSignsTiming >= 3) * { * tagInfoQueue.Dequeue(); * } * if (isFinish) * { * tagInfos = tagInfoQueue.ToList<TagInfo>(); * }*/ try { IVitalSignsService vitalSignsService = ServiceManager.getOneVitalSignsService(); long timestamp = (long)tagInfo.TimeStamp; double phase = tagInfo.AcutalPhaseInRadian; int frequency = tagInfo.Frequency; string epc = tagInfo.EPC; vitalSignsService.addTagInfo(timestamp, phase, frequency, epc); if (vitalSignsTiming >= DELAY_TIME_SECOND) { vitalSignsService.removeHead(); } ServiceManager.closeService(vitalSignsService); }catch (Exception ex) { Console.WriteLine(ex.ToString()); } }