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); }
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); } }
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); } }