private void GetSignalOverlapData(DateTime startDate, DateTime endDate, bool showVolume, int binSize) { DateTime redLightTimeStamp = DateTime.MinValue; List <int> li = new List <int> { 62, 63, 64 }; MOE.Common.Models.Repositories.IControllerEventLogRepository controllerRepository = MOE.Common.Models.Repositories.ControllerEventLogRepositoryFactory.Create(); var cycleEvents = controllerRepository.GetEventsByEventCodesParam(Approach.SignalID, startDate, endDate, li, Approach.ProtectedPhaseNumber); plans = new RLMPlanCollection(cycleEvents, startDate, endDate, this.SRLVSeconds, Approach); if (plans.PlanList.Count == 0) { Plans.AddItem(new RLMPlan(startDate, endDate, 0, cycleEvents, this.SRLVSeconds, Approach)); } }
/// <summary> /// Gets the data for the green yellow and red lines as well as the /// detector events for overlap phases /// </summary> /// <param name="startDate"></param> /// <param name="endDate"></param> /// <param name="signalId"></param> /// <param name="eventData1"></param> /// <param name="region"></param> /// <param name="detChannel"></param> private void GetSignalOverlapData(DateTime startDate, DateTime endDate, bool showVolume, int binSize) { MOE.Common.Models.Repositories.IControllerEventLogRepository celRepository = MOE.Common.Models.Repositories.ControllerEventLogRepositoryFactory.Create(); this.cycleEvents = celRepository.GetEventsByEventCodesParam(approach.SignalID, startDate, endDate, new List <int>() { 61, 63, 64 }, approach.ProtectedPhaseNumber); this.preemptEvents = celRepository.GetSignalEventsByEventCodes(approach.SignalID, startDate, endDate, new List <int>() { 102 }); this.detectorEvents = new List <Models.Controller_Event_Log>(); foreach (Models.Detector d in approach.Detectors) { this.detectorEvents.AddRange(celRepository.GetEventsByEventCodesParam(approach.SignalID, startDate, endDate, new List <int> { 81 }, d.DetChannel)); } plans = new PlanCollection(cycleEvents, detectorEvents, startDate, endDate, approach, preemptEvents); if (plans.PlanList.Count == 0) { Plans.AddItem(new Plan(startDate, endDate, 0, cycleEvents, detectorEvents, preemptEvents, approach)); } if (showVolume) { SetVolume(detectorEvents, startDate, endDate, binSize); } }