Esempio n. 1
0
 public void Log(string msg, LockTagParameter param)
 {
     Log(string.Format("****---------->Msg={0}\r\n LockBank={1}\r\n LockType={2}\r\n AccessPassword={3}\r\n Select:\r\n MemoryBank={4}\r\n Ptr={5}\r\n TagData={6}\r\n<---------****",
                       msg,
                       param.LockBank,
                       param.LockType,
                       ByteFormat.ToHex(param.AccessPassword, "", " "),
                       param.SelectTagParam.MemoryBank,
                       param.SelectTagParam.Ptr,
                       ByteFormat.ToHex(param.SelectTagParam.TagData, "", " ")));
 }
Esempio n. 2
0
 public void Log(string msg, TagParameter w1)
 {
     Log(string.Format("______________________________\r\n{0}:\r\n" +
                       "MemoryBank={1}\r\n" +
                       "Ptr={2}\r\n" +
                       "TagData={3}\r\n" +
                       "-----------------------------------",
                       msg,
                       w1.MemoryBank,
                       w1.Ptr,
                       ByteFormat.ToHex(w1.TagData, "", " ")));
 }
Esempio n. 3
0
 internal void Log(string msg, KillTagParameter param)
 {
     Log(string.Format("****---------->Msg={0}\r\n " +
                       "KillPassword={1}\r\n " +
                       "Select:\r\n " +
                       "MemoryBank={2}\r\n " +
                       "Ptr={3}\r\n " +
                       "TagData={4}\r\n<---------****",
                       msg,
                       ByteFormat.ToHex(param.KillPassword, "", " "),
                       param.SelectTagParam.MemoryBank,
                       param.SelectTagParam.Ptr,
                       ByteFormat.ToHex(param.SelectTagParam.TagData, "", " ")));
 }
Esempio n. 4
0
 public void Log(string msg, RxdTagData tagData)
 {
     Console.WriteLine(msg);
     Log(string.Format("EPC:{0}" +
                       "\r\nTID:{1}" +
                       "\r\nUser:{2}" +
                       "\r\nReserved:{3}" +
                       "\r\nAnetnna:{4}" +
                       "\r\nRSSI:{5}",
                       ByteFormat.ToHex(tagData.EPC, "", " "),
                       ByteFormat.ToHex(tagData.TID, "", " "),
                       ByteFormat.ToHex(tagData.User, "", " "),
                       ByteFormat.ToHex(tagData.Reserved, "", " "),
                       tagData.Antenna,
                       tagData.RSSI));
 }
Esempio n. 5
0
 internal void Log(string msg, WriteTagParameter param)
 {
     try
     {
         Log(string.Format("{0}:\r\n" +
                           "IsLoop={1}\r\n" +
                           "AccessPassword={2}\r\n" +
                           "selectMemoryBank={3}\r\n" +
                           "Ptr={4}\r\n" +
                           "TagData={5}\r\n" +
                           "IsFixedSize={6}\r\n" +
                           "IsReadOnly={7}\r\n" +
                           "IsSynchronized={8}\r\n" +
                           "Length={9}\r\n" +
                           "LongLength={10}\r\n" +
                           "Rank={11}\r\n" +
                           "SyncRoot{12}\r\n",
                           msg,
                           param.IsLoop,
                           ByteFormat.ToHex(param.AccessPassword, "", " "),
                           param.SelectTagParam.MemoryBank,
                           param.SelectTagParam.Ptr,
                           ByteFormat.ToHex(param.SelectTagParam.TagData, "", " "),
                           param.WriteDataAry.IsFixedSize,
                           param.WriteDataAry.IsReadOnly,
                           param.WriteDataAry.IsSynchronized,
                           param.WriteDataAry.Length,
                           param.WriteDataAry.LongLength,
                           param.WriteDataAry.Rank,
                           param.WriteDataAry.SyncRoot));
     }
     catch (Exception e)
     {
         Log("", e);
     }
 }
Esempio n. 6
0
        public void Add(RxdTagData addData)
        {
            lock (new Object())
            {
                string key = null;
                if (IsUniqueByteTID == false)
                {
                    key = ByteFormat.ToHex(addData.EPC, "", " "); //if only keying on EPCID
                }
                else
                {
                    key = string.Format("epc={0}, tid={1}", ByteFormat.ToHex(addData.EPC, "", " "), ByteFormat.ToHex(addData.TID, "", " "));
                }

                UniqueTagCounts = 0;
                TotalTagCounts  = 0;

                if (!EpcIndex.ContainsKey(key))
                {
                    logUtils.Log(string.Format("Add {0}", key));
                    TagReadRecord value = new TagReadRecord(addData);
                    value.SerialNumber = (uint)EpcIndex.Count + 1;
                    value.TimeStamp    = DateTime.Now.ToLocalTime();
                    value.ReadCount    = 1;

                    _tagList.Add(value);
                    EpcIndex.Add(key, value);
                    UpdateTagCount(EpcIndex);
                }
                else
                {
                    EpcIndex[key].Update(addData);
                    UpdateTagCount(EpcIndex);
                }
            }
        }
Esempio n. 7
0
 public void Log(string msg, IReaderMessage e)
 {
     Console.WriteLine(msg);
     Log(string.Format("MessageID:{0}" +
                       "\r\nStatus:{1}" +
                       "\r\nErrorInfo.ErrCode:{2}" +
                       "\r\nErrorInfo.ErrMsg:{3}" +
                       "\r\nReceivedData={4}", e.MessageID, e.Status, e.ErrorInfo.ErrCode, e.ErrorInfo.ErrMsg, ByteFormat.ToHex(e.ReceivedData, "", " ")));
 }