Beispiel #1
0
 /// <summary>
 /// 非同期にNDS/DSCの応答強度を表示するビットマップ配列作成
 /// </summary>
 /// <param name="NDS_NL_temp"></param>
 /// <param name="NDS_L_temp"></param>
 /// <param name="DSC_temp"></param>
 private async void AsyncMakeBMP_Cell(byte[] NDS_NL_temp, byte[] NDS_L_temp, byte[] DSC_temp, byte[] MDC_temp)
 {
     await Task.Run(() =>
     {
         List <int> NDS_NL = CellResponse0.Bind(NDS_NL_temp, 2);
         List <int> NDS_L  = CellResponse0.Bind(NDS_L_temp, 2);
         List <int> DSC    = CellResponse0.Bind(DSC_temp, 3);
         List <int> MDC    = CellResponse0.Bind(MDC_temp, 4);
         NDS_NL_BMP        = CellResponse0.Convert_BMP_NDS_ALL(NDS_NL, 897, Num_RF);
         NDS_L_BMP         = CellResponse0.Convert_BMP_NDS_ALL(NDS_L, 897, Num_RF);
         DSC_BMP           = CellResponse0.Convert_BMP_DSC_ALL(DSC, 713, Num_RF);
         MDC_BMP           = CellResponse0.Convert_BMP_MDC_ALL(MDC, 961, Num_RF);
         DrawFlag_Cell     = true;
     });
 }
Beispiel #2
0
        /// <summary>
        /// Receive Cell Response ボタンのイベントハンドラ
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonReceiveCell_Click(object sender, EventArgs e)
        {
            CellResponse0 = new CellResponse(0);
            CellResponse0.Show();
            //接続状況のチェック
            if (!tcp.Connected)
            {
                MessageBox.Show("サーバーと未接続です");
                return;
            }
            //FPGAへトリガー送信
            sendData.Add(0x05);
            ns.Write(sendData.ToArray(), 0, sendData.Count);
            sendData.Clear();
            //計測開始
            sw.Start();
            //データ受信
            byte[] NDS_NL_temp = Receive_NDS(39, 23, Num_RF);
            byte[] NDS_L_temp  = Receive_NDS(39, 23, Num_RF);
            byte[] DSC_temp    = Receive_DSC(31, 23, Num_RF);
            byte[] MDC_temp    = Receive_MDC(31, 31, Num_RF);

            //配列を結合
            List <int> NDS_NL = CellResponse0.Bind(NDS_NL_temp, 2);
            List <int> NDS_L  = CellResponse0.Bind(NDS_L_temp, 2);
            List <int> DSC    = CellResponse0.Bind(DSC_temp, 3);
            List <int> MDC    = CellResponse0.Bind(MDC_temp, 4);
            //ビットマップ変換
            List <Image> NDS_NL_BMP = CellResponse0.Convert_BMP_NDS_ALL(NDS_NL, 897, Num_RF);
            List <Image> NDS_L_BMP  = CellResponse0.Convert_BMP_NDS_ALL(NDS_L, 897, Num_RF);
            List <Image> DSC_BMP    = CellResponse0.Convert_BMP_DSC_ALL(DSC, 713, Num_RF);
            List <Image> MDC_BMP    = CellResponse0.Convert_BMP_MDC_ALL(MDC, 961, Num_RF);

            //描画処理
            CellResponse0.DrawRefresh(NDS_NL_BMP[0], NDS_L_BMP[0], DSC_BMP[0], MDC_BMP[0]);
            //計測終了
            sw.Stop();
            textBox_FrameRate.Text = (sw.ElapsedMilliseconds).ToString();
            sw.Reset();
        }