Ejemplo 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);
        }
Ejemplo 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));
 }
Ejemplo 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);
 }
Ejemplo n.º 4
0
 public LLRPClient()
 {
     cI = new TCPIPClient();
 }
Ejemplo 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);
 }
Ejemplo 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);
 }
Ejemplo 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;
        }