示例#1
0
        private string ReadRFIDID(RFHead hHead)
        {
            serialPort.DiscardInBuffer();

            try
            {
                serialPort.Write(string.Format("RDA{0}00{1}03*\r", (int)hHead + 1, TagData.IDByteNo.ToString("X2")));
                return(TagData.DecodeID(serialPort.ReadTo("*\r")));
            }
            catch
            {
                throw;
            }
        }
示例#2
0
        private string ReadRFIDSN(RFHead hHead)
        {
            serialPort.DiscardInBuffer();
            int startSNByte = 18;

            try
            {
                serialPort.Write(string.Format("RDA{0}00{1}08*\r", (int)hHead + 1, startSNByte.ToString("X2")));
                return(TagData.DecodeID(serialPort.ReadTo("*\r")));
            }
            catch
            {
                throw;
            }
        }