Esempio n. 1
0
        public bool Create(string llrp_reader_name, bool server)
        {
            try
            {
                if (server)
                {
                    cI = new TCPIPServer();
                    cI.Open("", LLRP1_TCP_PORT);
                }
                else
                {
                    cI = new TCPIPClient();
                    cI.Open(llrp_reader_name, LLRP1_TCP_PORT);
                }

                cI.OnMessageReceived += new delegateMessageReceived(cI_OnMessageReceived);
                cI.OnClientConnected += new delegateClientConnected(cI_OnClientConnected);
            }
            catch
            {
                return(false);
            }

            return(true);
        }
Esempio n. 2
0
 /// <summary>
 /// Receive data
 /// </summary>
 /// <param name="ci">Communication interface</param>
 /// <param name="buffer">Buffer for receiving data</param>
 /// <returns></returns>
 public static int Receive(CommunicationInterface ci, out byte[] buffer)
 {
     return(ci.Receive(out buffer));
 }
Esempio n. 3
0
 /// <summary>
 /// Send data
 /// </summary>
 /// <param name="ci">Communication interface</param>
 /// <param name="data">Data to be sent, byte array</param>
 public static void Send(CommunicationInterface ci, byte[] data)
 {
     ci.Send(data);
 }
Esempio n. 4
0
 public LLRPClient()
 {
     cI = new TCPIPClient();
 }
Esempio n. 5
0
 /// <summary>
 /// Receive data
 /// </summary>
 /// <param name="ci">Communication interface</param>
 /// <param name="buffer">Buffer for receiving data</param>
 /// <returns></returns>
 public static int Receive(CommunicationInterface ci, out byte[] buffer)
 {
     return ci.Receive(out buffer);
 }
Esempio n. 6
0
 /// <summary>
 /// Send data
 /// </summary>
 /// <param name="ci">Communication interface</param>
 /// <param name="data">Data to be sent, byte array</param>
 public static void Send(CommunicationInterface ci, byte[] data)
 {
     ci.Send(data);
 }
Esempio n. 7
0
        public bool Create(string llrp_reader_name, bool server)
        {
            try
            {
                if (server)
                {
                    cI = new TCPIPServer();
                    cI.Open("", LLRP1_TCP_PORT);
                }
                else
                {
                    cI = new TCPIPClient();
                    cI.Open(llrp_reader_name, LLRP1_TCP_PORT);
                }

                cI.OnMessageReceived += new delegateMessageReceived(cI_OnMessageReceived);
                cI.OnClientConnected += new delegateClientConnected(cI_OnClientConnected);

            }
            catch
            {
                return false;
            }

            return true;
        }