Пример #1
0
        public WeatherRange(DeviceBaseWrapper dev,AlarmType alarm_type)
            : base(dev)
        {
            this.m_alarm_type = alarm_type;
            switch (m_alarm_type)
            {
                case AlarmType.RD:
                    this.m_class = 47;
                    break;
                case AlarmType.VI:
                    this.m_class = 45;
                    break;
                case AlarmType.WD:
                    this.m_class = 46;
                    break;
                case AlarmType.LS:
                    this.m_class = 50;
                    break;

                case AlarmType.BS:
                    this.m_class = 51;

                    break;
            }

               // this.m_eventmode = Global.getEventMode(this.m_class);
            this.m_eventmode = Global.getEventModeBySectionID(this.getSectionId(), this.m_class, ref this.IsLock, ref this.description);

            try
            {
                this.EventId = Global.getEventId();
            }
            catch
            {
                this.m_eventmode = EventMode.DontCare;
            }
        }
Пример #2
0
 public virtual bool IsInRange(DeviceBaseWrapper dev)
 {
     return dev.mile_m>= StartMile && dev.mile_m < EndMile;
 }
Пример #3
0
        public override bool IsInRange(DeviceBaseWrapper dev)
        {
            if (dev == null)
               return false;

               VDDeviceWrapper vddev = dev as VDDeviceWrapper;

               return vddev.start_mileage >= StartMile && vddev.end_mileage < EndMile;
        }
Пример #4
0
 public Range(DeviceBaseWrapper dev)
     : base()
 {
     this.devlist.Add(dev);
 }