Ejemplo n.º 1
0
        public void BeginParseReport(byte[] data)
        {
            IncomingReport report = IncomingReport.Create(this, data);

            if (!checkForAckHeader(report))
            {
                if (isOpCodeHeader(report))
                {
                    ThreadPool.QueueUserWorkItem(delegate
                    {
                        if (ParentDevice == null)
                        {
                            return;
                        }

                        Log.WriteLine("Running thread: " + this.GetType().Name + ", data opcode: " + report[1].ToString("X"));
                        processReport(report);
                    });
                }
            }
        }