Example #1
0
    // Update is called once per frame
    void Update()
    {
        //旧型spatialmap送信システム

        /*if (spatialMaps.Count > 0)
         * {
         *  var mapData = spatialMaps.Dequeue();
         *  surfaceObserver.LoadMesh(mapData);
         * }*/
        if (positionPackages.Count > 0)
        {
            var rPosition = positionPackages.Dequeue();
            StartCoroutine("SendIntensity", rPosition);
        }
        if (spatialMeshs.Count > 0)
        {
            var spatialMesh = spatialMeshs.Dequeue();
            surfaceObserver.LoadEachMesh(spatialMesh);
        }
        if (deleteDatas.Count > 0)
        {
            var deleteData = deleteDatas.Dequeue();
            intensityManager.DeleteIntensity(deleteData);
            //シェアリング相手にもデータ消去申請
            string json = transferData.SerializeJson <DeleteData>(deleteData);
            tServer.SendAllClient(json);
            logPanelManager.Writelog("Intensitiy ID " + deleteData.intensityID + " is deleted.");
        }
        if (logQueue.Count > 0)
        {
            var log = logQueue.Dequeue();
            logPanelManager.Writelog(log);
        }
    }
    /// <summary>
    /// バイナリデータセーブ
    /// </summary>    
    public async void SaveBinaryData()
    {
        try
        {
            await Task.Run(() => Save());
            logPanelManager.Writelog("Save data");
        }
        catch(Exception e)
        {
            logPanelManager.Writelog(e.Message);
        }

    }
Example #3
0
    bool onServer = false;//サーバーの受付を開始したかどうか

    // Start is called before the first frame update
    void Start()
    {
        logPanelManager  = UIManager.GetComponent <LogPanelManager>();
        settingManager   = UIManager.GetComponent <SettingManager>();
        intensityManager = gameObject.GetComponent <IntensityManager>();
        surfaceObserver  = gameObject.GetComponent <Holo2FileSurfaceObserver>();

        //Asioスタート
        string instLog = asiocsharpdll.PrepareAsio(MeasurementParameter.AsioDriverName, MeasurementParameter.Fs, MeasurementParameter.SampleNum);

        logPanelManager.Writelog(instLog);
    }
Example #4
0
 // Update is called once per frame
 void Update()
 {
     if (logQueue.Count > 0)
     {
         var log = logQueue.Dequeue();
         logPanelManager.Writelog(log);
     }
     if (intensityLogs.Count > 0)
     {
         var log = intensityLogs.Dequeue();
         logPanelManager.WriteConsole(log.num, log.sendPos, log.intensity);
     }
 }
Example #5
0
 // Update is called once per frame
 void Update()
 {
     if (positionPackages.Count > 0)
     {
         var rPosition = positionPackages.Dequeue();
         tIntensityManager.MicPosReceived(rPosition);
     }
     if (deleteDatas.Count > 0)
     {
         var deleteData = deleteDatas.Dequeue();
         tIntensityManager.DeleteIntensity(deleteData);
         //シェアリング相手にもデータ消去申請
         string json = transferData.SerializeJson <DeleteData>(deleteData);
         tServer.SendAllClient(json);
         logPanelManager.Writelog("Intensitiy ID " + deleteData.intensityID + " is deleted.");
     }
     if (logQueue.Count > 0)
     {
         var log = logQueue.Dequeue();
         logPanelManager.Writelog(log);
     }
 }
Example #6
0
    bool onServer = false; //サーバーの受付を開始したかどうか

    // Start is called before the first frame update
    void Start()
    {
        logPanelManager   = UIManager.GetComponent <LogPanelManager>();
        settingManager    = UIManager.GetComponent <SettingManager>();
        tIntensityManager = gameObject.GetComponent <TransientIntensityManager>();

        //出力音源読み込み
        double[] oSignal = ReadSignal();
        //Asioスタート
        string instLog = asiocsharpdll.TransientPrepareAsio(MeasurementParameter.AsioDriverName, MeasurementParameter.Fs, MeasurementParameter.SampleNum, oSignal.Length, oSignal);;

        logPanelManager.Writelog(instLog);
    }
    /// <summary>
    /// MeasurementParameterに入力データ(計測条件)をセット
    /// 計測シーンのMeasurementStartにて呼び出される
    /// </summary>
    public void InitParam()
    {
        //周波数バンド
        CalcFreq();
        logPanelManager.Writelog("MinFreq:" + MeasurementParameter.FreqMin);
        logPanelManager.Writelog("MaxFreq:" + MeasurementParameter.FreqMax);

        //気体密度
        MeasurementParameter.Temp = float.Parse(inTemp.text);
        MeasurementParameter.Atm  = float.Parse(inAtm.text);
        CalculateAtmDensity(MeasurementParameter.Atm, MeasurementParameter.Temp);
        logPanelManager.Writelog("Temp:" + MeasurementParameter.Temp + ",Atom:" + MeasurementParameter.Atm);
        logPanelManager.Writelog("atmDensity:" + MeasurementParameter.AtmDensity);

        //オブジェクト間間隔
        MeasurementParameter.ObjInterval = float.Parse(inOInterval.text);
        //インテンシティのレベルレンジ
        MeasurementParameter.MinIntensity = float.Parse(in_minIntensity.text);
        MeasurementParameter.MaxIntensity = float.Parse(in_maxIntensity.text);

        //保存先のパス
        MeasurementParameter.SaveDir = inSaveDir.text;
        logPanelManager.Writelog("interval:" + MeasurementParameter.ObjInterval);
        logPanelManager.Writelog("Intensity range is" + MeasurementParameter.MinIntensity + "~" + MeasurementParameter.MaxIntensity);
        logPanelManager.Writelog("save directory is" + MeasurementParameter.SaveDir);
    }