/* Initialisatio */ public void InitializeDaisy(string filename) { /* Link and initialize the daisy subsystem. */ _daisyEngine = new Daisy(); _daisyEngine.ParseFile(filename); _daisyEngine.Initialize(); ///* Initialize attribute list. */ Frame alist = _daisyEngine.ProgramFrame(); if (!alist.Check("description")) { description = "No description"; } description = alist.GetString("description"); ///* Start time */ start_time = _daisyEngine.GetTime(); ///* End time.*/ Frame stop = alist.GetFrame("stop"); int hour = stop.GetInteger("hour"); int year = stop.GetInteger("year"); int month = stop.GetInteger("month"); int mday = stop.GetInteger("mday"); end_time = new DateTime(year, month, mday, hour, 0, 0); columns = _daisyEngine.CountColumns(); Console.WriteLine("Starting simulation."); _daisyEngine.Start(); }
static Daisy GetInitDaisy() { Daisy daisy = new Daisy(); daisy.ParseFile("../../DaisyData/test_check.dai"); if(DLL.daisy_daisy_done(daisy.daisy)) { DLL.daisy_daisy_delete(daisy.daisy); throw new ApplicationException("No daisy"); } daisy.Initialize(); return daisy; }
static Scope GetInitScope() { Daisy daisy = new Daisy(); daisy.ParseFile("../../DaisyData/test_check.dai"); daisy.Initialize(); daisy.Start(); daisy.TickTime(); Assert.Greater(daisy.ScopeSize(), 3); Scope scope = daisy.GetScope(0); return(scope); }
static Frame GetInitFrame() { Daisy daisy = new Daisy(); daisy.ParseFile("../../DaisyData/test_check.dai"); daisy.Initialize(); daisy.Start(); daisy.TickTime(); Frame frame = daisy.ProgramFrame(); return(frame); }
/* Initialisatio */ public void InitializeDaisy(string filename) { /* Link and initialize the daisy subsystem. */ _daisyEngine = new Daisy(); _daisyEngine.ParseFile(filename); _daisyEngine.Initialize(); ///* Initialize attribute list. */ Frame alist = _daisyEngine.ProgramFrame(); if (!alist.Check("description")) description = "No description"; description = alist.GetString("description"); ///* Start time */ start_time = _daisyEngine.GetTime(); ///* End time.*/ Frame stop = alist.GetFrame("stop"); int hour = stop.GetInteger("hour"); int year = stop.GetInteger("year"); int month = stop.GetInteger("month"); int mday = stop.GetInteger("mday"); end_time = new DateTime(year, month, mday, hour, 0, 0); columns = _daisyEngine.CountColumns(); Console.WriteLine("Starting simulation."); _daisyEngine.Start(); }