Ejemplo n.º 1
0
        void test_generate()
        {
            List <LEU>    leulist = new List <LEU>();
            List <BEACON> blist   = new List <BEACON>();
            BMVFGen       bmvf    = new BMVFGen(false, ref blist, ref leulist);

            sydb.clear();
            Debug.Assert(false == bmvf.Generate(".//output"));//lack load data, so generate return false

            Prepare.ReloadGlobalSydb(".//input//BMVF_FromZJ.xml");
            BFGen bf = new BFGen(".//input//BMVF_FromZJ.csv", "", "", false, false);

            MethodHelper.InvokePrivateMethod <BFGen>(bf, "Init");

            Debug.Assert(true == bmvf.Generate(".//output"));  // generate BMVF file.
            Debug.Assert(true == File.Exists(".//output//BMV//block_mode_variants_file.xml"));
        }
Ejemplo n.º 2
0
        private void Generate()
        {
            try
            {
                beaconList.Clear();
                leuList.Clear();
                SyDB.GetInstance().clear();

                if (false == clearOutputDir())
                {
                    return;
                }
                //log is updating
                {
                    IDataGen.toolVer = this.Text;
                    GENERIC_SYSTEM_PARAMETERS sydb = FileLoader.Load <GENERIC_SYSTEM_PARAMETERS>(this.textBoxSyDB.Text);
                    SyDB.GetInstance().LoadData(sydb);

                    IDataGen.sydbFile = this.textBoxSyDB.Text;//todo will delete
                }

                {
                    IDataGen gen         = null;
                    string   compilepath = currentRunDir + "\\compiler\\CompilerBaliseV4000\\main\\compile.exe";
                    gen = new BFGen(this.textBoxLayout.Text, this.textBoxBoundaryBeacon.Text, compilepath, this.radioButtoniTC.Checked, this.checkBoxGenBin.Checked);
                    ((BFGen)gen).genPro += new BFGen.GenProess(GenProess);
                    if (false == gen.Generate(this.textBoxOutput.Text))
                    {
                        return;
                    }
                }

                {
                    IDataGen gen = null;
                    gen = new BMVFGen(this.radioButtoniTC.Checked && this.Upstream_path_considered.Checked,
                                      ref beaconList,
                                      ref leuList,
                                      this.textBox_UpstreamFile.Text);

                    if (false == gen.Generate(this.textBoxOutput.Text))
                    {
                        return;
                    }
                }

                {
                    IDataGen gen = null;
                    gen = new LEURFGen(ref beaconList, ref leuList);
                    if (false == gen.Generate(this.textBoxOutput.Text))
                    {
                        return;
                    }
                }

                {
                    IDataGen gen       = null;
                    string   LEURFFile = this.textBoxOutput.Text + "\\LEU\\LEU_Result_Filtered_Values.xml";

                    gen = new LEUXmlGen(leuList, LEURFFile, currentRunDir, this.radioButtoniTC.Checked, this.checkBoxGenBin.Checked);
                    ((LEUXmlGen)gen).genPro += new LEUXmlGen.GenProess(GenProess);
                    if (false == gen.Generate(this.textBoxOutput.Text))
                    {
                        return;
                    }
                }
            }
            finally
            {
                IsBusy = false;
            }
        }