Exemplo n.º 1
0
        public void setDevice(ModuleCommand.command cmd, Action<ModuleCommand.command> callback)
        {
            myCallBack = callback;
            myCommand = cmd;

            rfid_helper = new TDJ_RFIDHelper();

            //打开UDP端口,等待数据传入
            this.updServer = UDPServer.getUDPServer(Program.UHF_UDP_Port);
            updServer.evtReceived += new OnReceiveString(updServer_evtReceived);
            updServer.startUDPListening();

            Debug.WriteLine(string.Format("*****  UHFDevice onListening... "));
        }
Exemplo n.º 2
0
        public UHFService(WebSocketServiceManager _manager, IWebSocketConnection socket)
        {
            services.register_service("uhf", this);
            this.ID = socket.ConnectionInfo.Id.ToString();
            this._manager = _manager;
            this._websocket = socket;
            this._context = socket.ConnectionInfo;

            rfid_helper = new TDJ_RFIDHelper();

            //��UDP�˿ڣ��ȴ����ݴ���
            this.updServer = UDPServer.getUDPServer(Program.UHF_UDP_Port);
            updServer.evtReceived += new OnReceiveString(updServer_evtReceived);
            updServer.startUDPListening();
        }