示例#1
0
        public ReaderManager.ReaderMode[] Get_Reader_Capability()
        {
            ReaderManager.ReaderMode[] readerModes = null;

            MSG_GET_READER_CAPABILITIES msg = new MSG_GET_READER_CAPABILITIES();

            msg.RequestedData = ENUM_GetReaderCapabilitiesRequestedData.Regulatory_Capabilities;
            MSG_GET_READER_CAPABILITIES_RESPONSE rsp = client.GET_READER_CAPABILITIES(msg, out msg_err, 3000);

            if (rsp != null)
            {
                LLRP.UNION_AirProtocolUHFRFModeTable modulationModes;
                modulationModes = rsp.RegulatoryCapabilities.UHFBandCapabilities.AirProtocolUHFRFModeTable;
                modulationModes[0].ToString();

                PARAM_C1G2UHFRFModeTable modeTable;
                try
                {
                    modeTable   = (PARAM_C1G2UHFRFModeTable)modulationModes[0];
                    readerModes = new ReaderManager.ReaderMode[modeTable.Length];
                    for (int idx = 0; idx < modeTable.C1G2UHFRFModeTableEntry.Length; idx++)
                    {
                        PARAM_C1G2UHFRFModeTableEntry mode = modeTable.C1G2UHFRFModeTableEntry[idx];
                        readerModes[idx] = new ReaderManager.ReaderMode(mode);
                    }
                }catch {};

                // gui.AppendToDebugTextBox(rsp.ToString() + "\n");
                // writeMessage(rsp.ToString(), "Get_Reader_Capability");
            }
            else if (msg_err != null)
            {
                WriteMessage("Get_Reader_Capability " + msg_err.ToString() + "\n");
            }
            else
            {
                WriteMessage("Get_Reader_Capability Command time out!" + "\n");
            }

            return(readerModes);
        }
示例#2
0
        public ReaderManager.ReaderMode[] Get_Reader_Capability()
        {
            ReaderManager.ReaderMode[] readerModes = null;

            MSG_GET_READER_CAPABILITIES msg = new MSG_GET_READER_CAPABILITIES();
            msg.RequestedData = ENUM_GetReaderCapabilitiesRequestedData.Regulatory_Capabilities;
            MSG_GET_READER_CAPABILITIES_RESPONSE rsp = client.GET_READER_CAPABILITIES(msg, out msg_err, 3000);

            if (rsp != null)
            {
                LLRP.UNION_AirProtocolUHFRFModeTable modulationModes;
                modulationModes = rsp.RegulatoryCapabilities.UHFBandCapabilities.AirProtocolUHFRFModeTable;
                modulationModes[0].ToString();

                PARAM_C1G2UHFRFModeTable modeTable;
                try
                {
                    modeTable = (PARAM_C1G2UHFRFModeTable)modulationModes[0];
                    readerModes = new ReaderManager.ReaderMode[modeTable.Length];
                    for (int idx = 0; idx < modeTable.C1G2UHFRFModeTableEntry.Length; idx++)
                    {
                        PARAM_C1G2UHFRFModeTableEntry mode = modeTable.C1G2UHFRFModeTableEntry[idx];
                        readerModes[idx] = new ReaderManager.ReaderMode(mode);
                    }
                }catch{};

                // gui.AppendToDebugTextBox(rsp.ToString() + "\n");
                // writeMessage(rsp.ToString(), "Get_Reader_Capability");
            }
            else if (msg_err != null)
            {
                WriteMessage("Get_Reader_Capability " + msg_err.ToString() + "\n");
            }
            else
                WriteMessage("Get_Reader_Capability Command time out!" + "\n");

            return readerModes;
        }