Beispiel #1
0
 /// <summary>
 /// 推送数据
 /// </summary>
 private void PushData()
 {
     while (true)
     {
         if (tsDataQueue.Count > 0)
         {
             lock (tsDataQueue)
             {
                 NetMessage msg = tsDataQueue.Dequeue();
                 if (msg != null)
                 {
                     EventPublisher.PublishTSDataEvent(this, new Model.TSDataEventArgs(msg.Buffer));
                 }
             }
         }
         else if (beamDataQueue.Count > 0)
         {
             lock (beamDataQueue)
             {
                 NetMessage msg = beamDataQueue.Dequeue();
                 if (msg != null)
                 {
                     EventPublisher.PublishBeamDataComeEvent(this, Model.BeamData.ByteToClass(msg.Buffer));
                 }
             }
         }
         else
         {
             Thread.Sleep(50);
         }
     }
 }
Beispiel #2
0
 // 接收波束数据
 private void RecvBeamData(BeamData beamData)
 {
     EventPublisher.PublishBeamDataComeEvent(this, beamData);
 }