private void InventoryBufferData()
        {
            Session = Convert.ToByte((int)_readerProfile.InventorySearchMode);
            Qvalue  = Convert.ToByte(4);
            int  TagNum      = 0;
            int  BufferCount = 0;
            byte MaskMem     = 0;

            byte[] MaskAdr = new byte[2];
            byte   MaskLen = 0;

            byte[] MaskData = new byte[100];
            byte   MaskFlag = 0;
            byte   AdrTID   = 0;
            byte   LenTID   = 0;

            AdrTID   = 0;
            LenTID   = 6;
            MaskFlag = 0;
            int cbtime = System.Environment.TickCount;

            TagNum      = 0;
            BufferCount = 0;
            Target      = 0;
            Scantime    = 0x14;
            Qvalue      = 6;
            if (TIDFlag == 0)
            {
                Session = 255;
            }
            else
            {
                Session = 0;
            }
            FastFlag = 1;

            //            fCmdRet = RWDev.Inventory_G2(ref fComAdr, Qvalue, Session, MaskMem, MaskAdr, MaskLen, MaskData, MaskFlag, AdrTID, LenTID, TIDFlag, Target, InAnt, Scantime, FastFlag, EPC, ref Ant, ref Totallen, ref CardNum, frmcomportindex);
            fCmdRet = RWDev.InventoryBuffer_G2(ref fComAdr, Qvalue, Session, MaskMem, MaskAdr, MaskLen, MaskData, MaskFlag, AdrTID, LenTID, TIDFlag, Target, InAnt, Scantime, FastFlag, ref BufferCount, ref TagNum, frmcomportindex);
            int    x_time = System.Environment.TickCount - cbtime;//命令时间
            string strLog = "InventoryBuffer error: " + GetReturnCodeDesc(fCmdRet);

            //WriteLog(lrtxtLog, strLog, 0);
            ///////////设置网络断线重连
            if (fCmdRet == 0)//代表已查找结束,
            {
                IntPtr ptrWnd = IntPtr.Zero;

                total_tagnum = total_tagnum + TagNum;
                int    tagrate = (TagNum * 1000) / x_time;//速度等于张数/时间
                string para    = BufferCount.ToString() + "," + x_time.ToString() + "," + tagrate.ToString() + "," + total_tagnum.ToString();
                // SendMessage(ptrWnd, WM_SENDBUFF, IntPtr.Zero, para);
            }

            else
            {
                MessageBox.Show(strLog);
            }
        }