예제 #1
0
        public Firmware(Program program, Action <TriggerSet> configureAction)
        {
            if (Instance != null)
            {
                throw new InvalidOperationException();
            }
            Instance      = this;
            Program       = program;
            TimingManager = new TimingManager(Program.Runtime);

            var triggerSet = new TriggerSet();

            configureAction(triggerSet);
            _argumentTriggers = triggerSet.Triggers.OfType <ArgumentTrigger>().ToList();
            _triggers         = triggerSet.Triggers.Where(x => !(x is ArgumentTrigger)).ToList();
        }
예제 #2
0
 public Program()
 {
     Runtime.UpdateFrequency = Frequency;
     _firmware = new Firmware(this, Configure);
 }