示例#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
        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);
        }
示例#3
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);
        }
示例#4
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();
        }
示例#5
0
 public void Start()
 {
     Daisy daisy = GetInitDaisy();
     daisy.Start();
 }