public void FlushLog() { log.FlushBuffer(); //Junction.log.FlushBuffer(); foreach (Road road in Roads) { road.LeftLane.errorLog.FlushBuffer(); road.RightLane.errorLog.FlushBuffer(); road.log.FlushBuffer(); } }
//-- public Junction(string jncID, IEnumerable <Road> roadList, JunctionModes junctionMode, bool overrideCtrlOnEmergency, byte maxOpenTime, byte roadTurnOverDelay) { JunctionID = jncID; RoadList.Clear(); // create a reset all function CREM.Clear(); foreach (Road r in roadList) { RoadList.Add(r); } JunctionMode = junctionMode; OverrideCtrlOnEmergency = overrideCtrlOnEmergency; MaxOpenTime = maxOpenTime; RoadTurnOverDelay = roadTurnOverDelay; ResetCycle(); TimeLeftForNextActivity = 1; log = new LogModule("CORE\\" + jncID); log.Add(new string[] { "<INIT_CONFIG>", "\tjnc_id = " + jncID, "\tjncMode = " + junctionMode, "\toverride_ctrl_on_emergency = " + overrideCtrlOnEmergency, "\tmax_open_time = " + maxOpenTime, "\troad_turn_over_delay = " + roadTurnOverDelay, "</INIT_CONFIG>" }); log.FlushBuffer(); }