Exemplo n.º 1
0
        void OnDataReady()
        {
            UT60EPacket package = new UT60EPacket(current_package_time_stamp, buffer);

            buffer.Clear();
            EventArgs e = new UT60EPackageReceivedEventArgs(package);

            foreach (EventHandler event_handler in DataReady.GetInvocationList())
            {
                event_handler.BeginInvoke(this, e, null, null);
            }
        }
Exemplo n.º 2
0
        void OnDataReady(object sender, EventArgs e)
        {
            UT60EPacket package = (e as UT60EPackageReceivedEventArgs).package;
            IUT60EData  data    = package.Parse();

            if (data == null)
            {
                parse_error_count += 1;
            }
            else if (data.Unit == unit)
            {
                data_packages.Add(data);
            }
            else
            {
                data = null;
            }
            DataReady.Invoke(this, new UT60EDataReadyEventArgs(data));
        }
Exemplo n.º 3
0
 public UT60EPackageReceivedEventArgs(UT60EPacket package)
     : base()
 {
     this.package = package;
 }
Exemplo n.º 4
0
 public UT60EDataParser(UT60EPacket package)
 {
     this.package = package;
 }