Beispiel #1
0
        //static void InspectStatusChange(List<double> TxRange,List<double> mrt93, List<double> mrt70, List<double> mrt96)



        // The following specifies which methods to call when tags are reported or operations are complete.
        // The TagsReported handler method will handle all new incoming tags
        static void OnTagsReported(ImpinjReader sender, TagReport report)
        {
            foreach (Tag tag in report)
            {
                double phaseAngle;
                phaseAngle = tag.PhaseAngleInRadians;

                DataRow row = DataDS.NewRow();
                //给列赋值
                DateTime dt = DateTime.Now;

                row["EPC"]               = tag.Epc.ToString();
                row["Doppler Shift"]     = tag.RfDopplerFrequency.ToString("0.00");
                row["Time"]              = tag.FirstSeenTime.ToString();
                row["Antenna"]           = tag.AntennaPortNumber;
                row["Tx Power"]          = txPowerValue;
                row["Current Frequency"] = tag.ChannelInMhz.ToString();
                row["PeakRSSI"]          = tag.PeakRssiInDbm.ToString();
                row["Phase Angle"]       = phaseAngle;//tag.PhaseAngleInRadians.ToString();
                row["Phase"]             = ((tag.PhaseAngleInRadians) / Math.PI) * 180;


                string EPCStr = tag.Epc.ToString();
                //把有值的列添加到表
                if (EPCStr.Contains("0093"))
                {
                    IncomingTagNumber93 = IncomingTagNumber93 + 1;
                    RSS93.Add(tag.PeakRssiInDbm.ToString());
                }
                else if (EPCStr.Contains("0012"))
                {
                    IncomingTagNumber70 = IncomingTagNumber70 + 1;
                    RSS70.Add(tag.PeakRssiInDbm.ToString());
                }
                else if (EPCStr.Contains("0078"))
                {
                    IncomingTagNumber96 = IncomingTagNumber96 + 1;
                    RSS96.Add(tag.PeakRssiInDbm.ToString());
                }

                else
                {
                }

                DataDS.Rows.Add(row);
                //DSForm.updateTaginfo(row);
                // DSForm.updateTaginfo((int)TagsEPC[tag.Epc.ToString()], (float)(tag.RfDopplerFrequency));
                DSForm.updateTaginfo((int)TagsEPC[tag.Epc.ToString()], (float)(tag.RfDopplerFrequency));//, tag.FirstSeenTime.LocalDateTime

                //DSForm.updateTaginfo((int)TagsEPC[tag.Epc.ToString()], (float)(tag.RfDopplerFrequency),(int)counter);
            }
        }
Beispiel #2
0
        private void btnDS_Click(object sender, EventArgs e)
        {
            DSForm ds = new DSForm();

            ds.ShowDialog();
        }