Ejemplo n.º 1
0
 void simLidarClient_MsgReceived(object sender, MsgReceivedEventArgs <SimMessage <ILidarScan <ILidar2DPoint> > > e)
 {
     if (e.message.RobotID == robotID)
     {
         ScanReceived.Invoke(sender, new ILidarScanEventArgs <ILidarScan <ILidar2DPoint> >(e.message.Message));
     }
 }
Ejemplo n.º 2
0
        private void Device_Input_2(byte[] data)
        {
            byte length       = data[1];
            int  symbology    = (data[2] << 16) | (data[3] << 8) | data[4];
            byte continuation = data[63];

            Buffer.Write(data, 5, length);

            if (continuation == 0)
            {
                var scannedData = Buffer.ToArray();
                Buffer = new MemoryStream();

                SyncCtx.Post((_1) =>
                {
                    ScanReceived?.Invoke(this, new HidScanReceivedEventArgs(scannedData, (HidScannerSymbology)symbology));
                }, null);
            }
        }
Ejemplo n.º 3
0
 void OnScanReceived(object sender, Scanner.DataEventArgs args)
 {
     // Pass the EMDK events to the our new event handler
     ScanReceived?.Invoke(sender, args);
 }
 private void OnScanReceived(object sender, Scanner.DataEventArgs args)
 {
     MainThread.BeginInvokeOnMainThread(() => ScanReceived?.Invoke(sender, args));
 }