/// <summary> /// helper function to link module, add it to the list of exe modules /// </summary> /// <param name="module">Module to link</param> public void linkModuleObj(BaseClass_Module module) { if (!coreModules.Contains(module)) { coreModules.Add(module); module_blocked_cycles_list.Add(0); corethreads.Add(new Thread(new ThreadStart(module.MainInit))); corethreads[corethreads.Count - 1].Name = "init_" + coreModules.Count.ToString(); corethreads[corethreads.Count - 1].Priority = ThreadPriority.AboveNormal; corethreads[corethreads.Count - 1].IsBackground = false; corethreads.Add(new Thread(new ThreadStart(module.MainLoop))); corethreads[corethreads.Count - 1].Name = "loop_" + coreModules.Count.ToString(); corethreads[corethreads.Count - 1].Priority = ThreadPriority.Normal; corethreads[corethreads.Count - 1].IsBackground = false; } else { throw new Exception("Execution System - Attempted duplicate module link: " + module.ToString()); } }
public ModuleException(BaseClass_Module modIn, String msgIn, Exception excpIn) : base(msgIn, excpIn) { ModuleLink = modIn; ExeSysLink = modIn.ExeSysLink; }