public CSLSControlRange(VDDeviceWrapper vd) : base(vd) { this.m_level = vd.cslsControlLevel; this.EventId = Global.getEventId(); this.m_alarm_type = AlarmType.TRAFFIC; this.m_class = 136; //csls 主線速率控制 try { // this.m_eventmode = Global.getEventMode(this.m_class); this.m_eventmode = Global.getEventModeBySectionID(this.getSectionId(), this.m_class, ref this.IsLock, ref this.description); } catch { this.m_eventmode = EventMode.DontCare; } }
public JamRange(VDDeviceWrapper vd) : base(vd) { // this.m_eventid = Global.getEventId(); this.m_level = vd.jamLevel; this.EventId = Global.getEventId(); this.m_alarm_type = AlarmType.TRAFFIC; this.m_class = 41; //一般道路壅塞 try { this.m_eventmode = Global.getEventMode(this.m_class); } catch { this.m_eventmode = EventMode.DontCare; } }
// public int CurrentJamDegree = 0; // only for degree 1 and 2 public JamRange12(VDDeviceWrapper vd) : base(vd) { // this.m_eventid = Global.getEventId(); this.m_level = vd.jamLevel; this.EventId = Global.getEventId(); this.m_alarm_type = AlarmType.TRAFFIC; this.m_class = 137; //一般道路1,2 級壅塞 try { // this.m_eventmode = Global.getEventMode(this.m_class); this.m_eventmode = Global.getEventModeBySectionID(this.getSectionId(), this.m_class, ref this.IsLock, ref this.description); } catch { this.m_eventmode = EventMode.DontCare; } }
bool CanTriggerCSLSEvent(VDDeviceWrapper vddev) { int fecthstart, fetchend; if (vddev.direction == "S" || vddev.direction == "E") { fecthstart = vddev.start_mileage - 2000; fetchend = vddev.start_mileage; } else { fecthstart = vddev.start_mileage + 2000; fetchend = vddev.start_mileage; } FetchDeviceData[] fetc_devices = Program.matrix.output_device_fetch_mgr.Fetch(new string[] { "CSLS","MAS" }, vddev.lineid, vddev.direction, fecthstart, fetchend); if (fetc_devices == null || fetc_devices.Length == 0) return false; else return true; }