コード例 #1
0
 private void tT()
 {
     if (InvokeRequired)
     {
         Invoke(new MethodInvoker(tT));
     }
     else
     {
         if (this.Text == "Radar Client")
         {
             this.Text = "Radar Client +";
         }
         else
         {
             this.Text = "Radar Client";
         }
         byte[] data;
         if (RadarRequest.SendMRM_SCAN_INFO(out data, _radar.Scans[scanIndex]))
         {
             _async.Send(data);
         }
         if ((++scanIndex) >= _radar.Scans.Count)
         {
             scanIndex = 0;
         }
     }
 }
コード例 #2
0
 private void radar_ScanReceived(object sender, MRM_SCAN_INFO ts)
 {
     byte[] b;
     if (RadarRequest.SendMRM_SCAN_INFO(out b, ts))
     {
         _async.Send(b);
     }
     //string s = "Scan " + m.MessageID.ToString() + " of length " + m.ScanData.Count.ToString() + " was received";
     //_async.Send(Encoding.Default.GetBytes(s));
     try
     {
         if (wr != null)
         {
             wr.Write(System.DateTime.Now.Ticks + ", MrmFullScanInfo, " + ts.MessageID + ", " + ts.SourceID + ", " + ts.Timestamp + ", ");
             wr.Write(ts.Reserved1 + ", " + ts.Reserved2 + ", " + ts.Reserved3 + ", " + ts.Reserved4 + ", " + ts.ScanStartPS + ", " + ts.ScanStopPS + ", " + ts.ScanStepBins + ", ");
             wr.Write("1, " + ts.AntennaID + ", " + ts.Reserved5 + ", " + ts.NumberOfSamplesTotal);
             foreach (int az in ts.ScanData)
             {
                 wr.Write(", " + az);
             }
             wr.Write('\n');
         }
     }
     catch (ObjectDisposedException e)
     {
         System.Diagnostics.Debug.WriteLine(e);
     }
 }