Exemplo n.º 1
0
        public Status_enum AntiCollision(byte ReaderID, List <Antenna_enum> AntList, ref AntiColliResult result)
        {
            byte[] temp = new byte[1] {
                0
            };

            foreach (Antenna_enum ant in AntList)
            {
                temp[0] |= (byte)(1 << (int)ant);
            }

            Package package = new Package(CmdEnum.CMD_ANTI_COLLISION, ReaderID, temp, 0, 1);

            AntiReqFlg = true;
            AntiResult.UidList.Clear();
            if (SendPackage(package))
            {
                //接收
                Status_enum status = WaitResp(package.CMD, ref temp, ref tempbyte, ANTI_COLLISION_TIMEOUT);
                result     = new AntiColliResult(AntiResult);
                AntiReqFlg = false;
                AntiResult.UidList.Clear();
                return(status);
            }
            else
            {
                AntiReqFlg = false;
                return(Status_enum.SERIAL_CLOSED);
            }
        }
Exemplo n.º 2
0
 public AntiColliResult(AntiColliResult tagList)
 {
     foreach (TagReadResult tmp in tagList.UidList)
     {
         this.add(tmp);
     }
 }