Esempio n. 1
0
        private string GetFreqString(byte btFreq)
        {
            ReaderSetting m_curSetting = new ReaderSetting();
            string        strFreq      = string.Empty;

            if (m_curSetting.btRegion == 4)
            {
                float  nExtraFrequency = btFreq * m_curSetting.btUserDefineFrequencyInterval * 10;
                float  nstartFrequency = ((float)m_curSetting.nUserDefineStartFrequency) / 1000;
                float  nStart          = nstartFrequency + nExtraFrequency / 1000;
                string strTemp         = nStart.ToString("0.000");
                return(strTemp);
            }
            else
            {
                if (btFreq < 0x07)
                {
                    float nStart = 865.00f + Convert.ToInt32(btFreq) * 0.5f;

                    string strTemp = nStart.ToString("0.00");

                    return(strTemp);
                }
                else
                {
                    float nStart = 902.00f + (Convert.ToInt32(btFreq) - 7) * 0.5f;

                    string strTemp = nStart.ToString("0.00");

                    return(strTemp);
                }
            }
        }
Esempio n. 2
0
 public InventoryProcessor()
 {
     this.reader                        = new Reader.ReaderMethod();
     this.m_curSetting                  = new ReaderSetting();
     this.m_curInventoryBuffer          = new InventoryBuffer();
     this.m_curOperateTagBuffer         = new OperateTagBuffer();
     this.m_curOperateTagISO18000Buffer = new OperateTagISO18000Buffer();
 }
Esempio n. 3
0
        private void ProcessSetWorkAntenna(Reader.MessageTran msgTran)
        {
            ReaderSetting m_curSetting  = new ReaderSetting();
            int           intCurrentAnt = 0;

            intCurrentAnt = m_curSetting.btWorkAntenna + 1;
            string strCmd = "Successfully set working antenna, current working antenna : Ant " + intCurrentAnt.ToString();

            string strErrorCode = string.Empty;

            if (msgTran.AryData.Length == 1)
            {
                if (msgTran.AryData[0] == 0x10)
                {
                    m_curSetting.btReadId = msgTran.ReadId;
                    Console.WriteLine(strCmd, 0);

                    //校验是否盘存操作
                    if (m_bInventory)
                    {
                        RunLoopInventroy();
                    }
                    return;
                }
                else
                {
                    strErrorCode = CCommondMethod.FormatErrorCode(msgTran.AryData[0]);
                }
            }
            else
            {
                strErrorCode = "Unknown error";
            }

            string strLog = strCmd + "failed , due to: " + strErrorCode;

            Console.WriteLine(strLog);

            if (m_bInventory)
            {
                m_curInventoryBuffer.nCommond       = 1;
                m_curInventoryBuffer.dtEndInventory = DateTime.Now;
                RunLoopInventroy();
            }
        }
Esempio n. 4
0
 void refreshSetting(ReaderSetting readerSetting)
 {
     Console.WriteLine("Version:" + readerSetting.btMajor + "." + readerSetting.btMinor);
 }
Esempio n. 5
0
 void refreshSetting(ReaderSetting readerSetting)
 {
     logger.Info("Version:" + readerSetting.btMajor + "." + readerSetting.btMinor);
 }