Package it.freedomotic.events

Examples of it.freedomotic.events.GenericEvent.addProperty()


            ev.addProperty("afterSunrise", Long.toString(toSunrise.getStandardMinutes()));
        }
       
        if (ref.isBefore(sunsetTime)) {
            // prima del tramonto
            ev.addProperty("beforeSunset", Long.toString(toSunset.getStandardMinutes()));
        } else if (ref.isAfter(sunsetTime)) {
            // dopo il tramonto
            ev.addProperty("afterSunset", Long.toString(toSunset.getStandardMinutes()));
        }
        return ev;
View Full Code Here


        if (ref.isBefore(sunsetTime)) {
            // prima del tramonto
            ev.addProperty("beforeSunset", Long.toString(toSunset.getStandardMinutes()));
        } else if (ref.isAfter(sunsetTime)) {
            // dopo il tramonto
            ev.addProperty("afterSunset", Long.toString(toSunset.getStandardMinutes()));
        }
        return ev;
    }

    public void setSunriseTime(DateTime ref) {
View Full Code Here

        if (averageMotionLevel != lastMotionLevel) {
            this.setDescription("Last detected motion level was " + averageMotionLevel + "%");
            if (averageMotionLevel > configuration.getIntProperty("sensibility-threshold", 30)) {
                //here create and send the freedom event
                GenericEvent event = new GenericEvent(this);
                event.addProperty("motion-level", new Integer(averageMotionLevel).toString());
                event.setDestination("app.event.sensor.video.motion");
                notifyEvent(event);
                lastMotionLevel = averageMotionLevel;
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.