コード例 #1
0
ファイル: LLRPEndPoint.cs プロジェクト: yangyongjx/Blink
        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);
        }
コード例 #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));
 }
コード例 #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);
 }
コード例 #4
0
ファイル: LLRPClient.cs プロジェクト: ajeck/impinj-reader-app
 public LLRPClient()
 {
     cI = new TCPIPClient();
 }
コード例 #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);
 }
コード例 #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);
 }
コード例 #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;
        }