コード例 #1
0
ファイル: MainFrm.cs プロジェクト: agnes-yang/RealTimeChart
        private void Get_Reader_Config()
        {
            MSG_GET_READER_CONFIG msg = new MSG_GET_READER_CONFIG();

            msg.RequestedData = ENUM_GetReaderConfigRequestedData.All;

            //msg.AntennaID = 1;
            //msg.GPIPortNum = 0;
            MSG_GET_READER_CONFIG_RESPONSE rsp = reader.GET_READER_CONFIG(msg, out msg_err, 12000);

            if (rsp != null && rsp.Custom.Count > 0)
            {
                Type type = rsp.Custom[0].GetType();
                if (type == typeof(PARAM_ImpinjSubRegulatoryRegion))
                {
                    ENUM_ImpinjRegulatoryRegion region = ((PARAM_ImpinjSubRegulatoryRegion)(rsp.Custom[0])).RegulatoryRegion;
                }
            }

            if (rsp != null)
            {
                textBox2.Text = rsp.ToString();
            }
            else if (msg_err != null)
            {
                textBox2.Text = msg_err.ToString();
            }
            else
            {
                textBox2.Text = "Command time out!";
            }
        }
コード例 #2
0
        private void Get_Reader_Config()
        {
            MSG_GET_READER_CONFIG msg = new MSG_GET_READER_CONFIG();

            msg.AntennaID  = 1;
            msg.GPIPortNum = 0;
            MSG_GET_READER_CONFIG_RESPONSE rsp = reader.GET_READER_CONFIG(msg, out msg_err, 3000);

            //rsp.
            if (rsp != null)
            {
                textBox2.Text = rsp.ToString();
            }
            else if (msg_err != null)
            {
                textBox2.Text = msg_err.ToString();
            }
            else
            {
                textBox2.Text = "Command time out!";
            }
        }
コード例 #3
0
ファイル: RFIDReader.cs プロジェクト: yangyongjx/Blink
        //////////////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////////////////////



        #region Reader Config

        public void Get_Reader_Config()
        {
            MSG_GET_READER_CONFIG msg = new MSG_GET_READER_CONFIG();

            msg.AntennaID  = 1;
            msg.GPIPortNum = 0;
            MSG_GET_READER_CONFIG_RESPONSE rsp = client.GET_READER_CONFIG(msg, out msg_err, 3000);

            if (rsp != null)
            {
                //textBox2.Text = rsp.ToString() + "\n";
                WriteMessage(rsp.ToString(), "Get_Reader_Config");
            }
            else if (msg_err != null)
            {
                WriteMessage("Get_Reader_Config " + msg_err.ToString() + "\n");
            }
            else
            {
                WriteMessage("Get_Reader_Config Command time out!" + "\n");
            }
        }