Beispiel #1
0
        /* 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();
        }
Beispiel #2
0
        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();
        }
Beispiel #4
0
 public void ProgramFrame()
 {
     Daisy daisy = GetInitDaisy();
     Frame frame = daisy.ProgramFrame();
     Assert.AreEqual("Simulation for use in tutorial.", frame.GetString ("description"));
 }