示例#1
0
        // 列出一个读卡器上的全部标签。也就是盘点(inventory)
        List <InventoryInfo> Inventory(Reader reader, byte[] antennas)
        {
            var results = new List <InventoryInfo>();

            foreach (var tag in _tags.GetList())
            {
                Debug.Assert(string.IsNullOrEmpty(tag.ReaderName) == false);
                if (tag.ReaderName == reader.Name)
                {
                    int index = Array.IndexOf <byte>(antennas, (byte)tag.InventoryInfo.AntennaID);

                    if (index == -1)
                    {
                        // Debug.Assert(false);
                        continue;
                    }
                    results.Add(tag.InventoryInfo);
                }
            }

            return(results);
        }