/** * Method: RegCompleteCallback * Access: public * @return: void * Description: Waits for all assets to finish registration before completing startup * 1 = Zone, 2 = interface */ public static void RegCompleteCallback(int type) { if (type == 1) { RegZones++; } else if (type == 2) { RegInterfaces++; } // Update Startup Progress int zlc = ZoneList.Count; int ilc = InterfaceList.Count; int seg = 32768 / (zlc + ilc); startupProgress = (32768 + (seg * (RegZones + RegInterfaces))); // Wait for Zones to finish asset referencing before starting Interface referencing if (RegZones == ZoneList.Count && !ZoneRefComplete) { ZoneRefComplete = true; InitializeInterfaces(); } if (RegZones == ZoneList.Count && RegInterfaces == InterfaceList.Count) { // Start SysInfoServer if (siServer != null) { siServer.startServer(); } // Finish startup progress notification and send Complete event startupProgress = 65535; if (startupCompleteEvent != null) { new CTimer(unused => { startupCompleteEvent(); }, 1000); } startTime.Stop(); ConsoleMessage(String.Format("[STARTUP] Reference building complete. FrameWork startup completed in {0} seconds.", (startTime.ElapsedMilliseconds / 1000))); } }
/** * Method: ConfigureSysInfoServer * Access: public * Description: Start telnet server for SysInfo service */ static public void ConfigureSysInfoServer(ushort _portnum) { // Start SysInfoServer siServer = new SysInfoServer((int)_portnum, 256); siServer.startServer(); }