示例#1
0
        public void Update(object sender, UpdateEventArgs e)
        {
            if (e.NewEvents != null)
            {
                double temp   = (double)e.NewEvents[0].Get("temperature");
                string motion = (string)e.NewEvents[0].Get("isStill");

                if (i >= 0 && i <= 3)
                {
                    i++;
                    frm.CEPAlarm(temp, motion);
                }
                else if (i > 5 && i <= 10)
                {
                    i++;
                }
                else
                {
                    i = 0;
                }
            }
        }
示例#2
0
        public void Update(EventBean[] newEvents, EventBean[] oldEvents)
        {
            if (newEvents != null)
            {
                //output the total number and objects
                double temp   = (double)newEvents[0].Get("temperature");
                string motion = (string)newEvents[0].Get("isStill");

                if (i >= 0 && i <= 3)
                {
                    i++;
                    frm.CEPAlarm(temp, motion);
                }
                else if (i > 5 && i <= 10)
                {
                    i++;
                }
                else
                {
                    i = 0;
                }
            }
        }