예제 #1
0
        public bool GetSelectedTag(out CAEN.CAENRFIDTag tag, int tries)
        {
            if (!_readerReady)
            {
                tag = null;
                return(false);
            }
            bool success = false;

            tag = null;
            try
            {
                CAEN.CAENRFIDTag[] tags;
                while (--tries > 0)
                {
                    tags = _source.InventoryTag();
                    if (tags != null)
                    {
                        tag = tags[0];
                        PlatformUtility.MessageBeep(0);
                        success = true;
                        break;
                    }
                }
            }
            catch
            {
                tag = null;
            }
            return(success);
        }
예제 #2
0
 public bool WriteTag(CAEN.CAENRFIDTag tag, MemoryBankType MemType, int nStartAddr, int nLength, byte[] data)
 {
     if (!_readerReady)
     {
         return(false);
     }
     try
     {
         _source.WriteTagData_EPC_C1G2(tag, (short)MemType, (short)nStartAddr, (short)nLength, data);
         return(true);
     }
     catch
     {
         return(false);
     }
 }
예제 #3
0
 public bool ReadTag(CAEN.CAENRFIDTag tag, MemoryBankType MemType, int nStartAddr, int nLength, out byte[] data)
 {
     if (!_readerReady)
     {
         data = null;
         return(false);
     }
     try
     {
         data = _source.ReadTagData_EPC_C1G2(tag, (short)MemType, (short)nStartAddr, (short)nLength);
     }
     catch
     {
         data = null;
         return(false);
     }
     return(true);
 }
        public object SingulateTag()
        {
            CAEN.CAENRFIDTag tag = null;
            try
            {
                CAEN.CAENRFIDTag[] tags;
                tags = _source.InventoryTag();

                if (tags != null)
                {
                    tag = tags[0];
                    return(tag);
                }
                else
                {
                    return(null);
                }
            }
            catch
            {
                return(null);
            }
        }