Ejemplo n.º 1
0
        static void Enable_RoSpec()
        {
            MSG_ERROR_MESSAGE msg_err;
            MSG_ENABLE_ROSPEC msg = new MSG_ENABLE_ROSPEC();

            msg.ROSpecID = 123;
            MSG_ENABLE_ROSPEC_RESPONSE rsp =
                reader.ENABLE_ROSPEC(msg, out msg_err, 2000);

            if (rsp != null)
            {
                // Success
                Console.WriteLine(rsp.ToString());
            }
            else if (msg_err != null)
            {
                // Error
                Console.WriteLine(msg_err.ToString());
            }
            else
            {
                // Timeout
                Console.WriteLine("Timeout Error.");
            }
        }
Ejemplo n.º 2
0
        private void Enable_RoSpec()
        {
            MSG_ENABLE_ROSPEC msg = new MSG_ENABLE_ROSPEC();

            msg.ROSpecID = 123;
            MSG_ENABLE_ROSPEC_RESPONSE rsp = reader.ENABLE_ROSPEC(msg, out msg_err, 3000);

            if (rsp != null)
            {
                textBox2.Text = rsp.ToString();
            }
            else if (msg_err != null)
            {
                textBox2.Text = msg_err.ToString();
            }
            else
            {
                textBox2.Text = "Command time out!";
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// This message is issued by the Client to the Reader. Upon receiving the message,
        /// the Reader moves the ROSpec corresponding to the ROSpecID passed in this message
        /// from the disabled to the inactive state.
        /// </summary>
        public void Enable_RoSpec()
        {
            MSG_ENABLE_ROSPEC msg = new MSG_ENABLE_ROSPEC();

            msg.ROSpecID = 123;

            MSG_ENABLE_ROSPEC_RESPONSE rsp = client.ENABLE_ROSPEC(msg, out msg_err, 3000);

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