Пример #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();
        }
Пример #2
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();
        }
Пример #3
0
 public void CountColumns()
 {
     Daisy daisy = GetInitDaisy();
     uint columns = daisy.CountColumns();
     Assert.AreEqual(2, columns);
 }
Пример #4
0
 /* Test of Daisy daisy */
 public uint CountColumns()
 {
     return(_daisyEngine.CountColumns());
 }