public PacketListener() { _baseLink = new BaseLink("COM4"); _parser = new Parser(); _baseLink.PacketReceived += _parser.HandleData; _parser.EventReceived += OnEvent; _parser.SliceReceived += OnSlice; }
public void Connect(string comPort) { _baseLink = new BaseLink(comPort); _parser = new Parser(); _baseLink.PacketReceived += _parser.HandleData; _worker = new Thread(_baseLink.StartReading); _worker.Start(); }