/// <summary> /// 条件を変更して再計算 /// </summary> public async void UpdateData() { settingManager.InitParam4Repro(); SettingSender ud_setting = new SettingSender("NewSetting", MeasurementParameter.colormapID, MeasurementParameter.MaxIntensity, MeasurementParameter.MinIntensity, MeasurementParameter.objSize); How2Measure measureType = new How2Measure(nowMeasurementType, MeasurementParameter.i_block); tServer.SendAllClient(transferData.SerializeJson <How2Measure>(measureType)); //更新データをHololensに送信 string json = transferData.SerializeJson <SettingSender>(ud_setting); tServer.SendAllClient(json); UpdateSTFTParam(); //再計算を実行 if (nowAlogrithm == AlgorithmPattern.CrossSpectrum) { ReCalcDataPackage recalcIntensity = await Task.Run(() => AsyncReCalc()); string json2 = transferData.SerializeJson <ReCalcDataPackage>(recalcIntensity); tServer.SendAllClient(json2); logQueue.Enqueue("Update data"); } else { ReCalcTransientDataPackage recalcTransIntensity = await Task.Run(() => AsyncReCalcTrans()); string json2 = transferData.SerializeJson <ReCalcTransientDataPackage>(recalcTransIntensity); tServer.SendAllClient(json2); logQueue.Enqueue("Update data"); } }
/// <summary> /// 接続OKイベント /// </summary> /// <param name="e"></param> void tServer_OnConnected(EventArgs e, string log) { Debug.Log("Clientと接続完了"); logQueue.Enqueue(log + " is connected."); How2Measure measureType = new How2Measure(MeasurementType.Transient, MeasurementParameter.i_block); tServer.SendAllClient(transferData.SerializeJson <How2Measure>(measureType)); }
/// <summary> /// 接続OKイベント /// </summary> /// <param name="e"></param> void tServer_OnConnected(EventArgs e, string log) { Debug.Log("Clientと接続完了"); logQueue.Enqueue(log + " is connected."); How2Measure measureType = new How2Measure(MeasurementType.Standard, MeasurementParameter.i_block); tServer.SendAllClient(transferData.SerializeJson <How2Measure>(measureType)); //共有された方のアプリケーションでもsettingパラメータを共有 var holoSetting = new SettingSender("ForSharing", MeasurementParameter.colormapID, MeasurementParameter.MaxIntensity, MeasurementParameter.MinIntensity, MeasurementParameter.objSize); tServer.SendAllClient(transferData.SerializeJson <SettingSender>(holoSetting)); }
/// <summary> /// 接続OKイベント /// </summary> /// <param name="e"></param> void tServer_OnConnected(EventArgs e, string log) { Debug.Log("Clientと接続完了"); logQueue.Enqueue(log + " is connected."); How2Measure measureType = new How2Measure(nowMeasurementType, MeasurementParameter.i_block); tServer.SendAllClient(transferData.SerializeJson <How2Measure>(measureType)); SettingSender ud_setting = new SettingSender("NewSetting", MeasurementParameter.colormapID, MeasurementParameter.MaxIntensity, MeasurementParameter.MinIntensity, MeasurementParameter.objSize); //更新データをHololensに送信 string json = transferData.SerializeJson <SettingSender>(ud_setting); tServer.SendAllClient(json); }