Package it.freedomotic.events

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


        //building the event
        ProtocolRead event = new ProtocolRead(this, "phwswethv2", address); //IP:PORT:RELAYLINE
        // relay lines - status=0 -> off; status=1 -> on
        if (tag.equalsIgnoreCase(board.getLedTag())) {
            if (status.equals("0")) {
                event.addProperty("isOn", "false");
            } else {
                event.addProperty("isOn", "true");
                //if autoconfiguration is true create an object if not already exists
                if (board.getAutoConfiguration().equalsIgnoreCase("true")) {
                    event.addProperty("object.class", board.getObjectClass());
View Full Code Here


        // relay lines - status=0 -> off; status=1 -> on
        if (tag.equalsIgnoreCase(board.getLedTag())) {
            if (status.equals("0")) {
                event.addProperty("isOn", "false");
            } else {
                event.addProperty("isOn", "true");
                //if autoconfiguration is true create an object if not already exists
                if (board.getAutoConfiguration().equalsIgnoreCase("true")) {
                    event.addProperty("object.class", board.getObjectClass());
                    event.addProperty("object.name", address);
                }
View Full Code Here

                event.addProperty("isOn", "false");
            } else {
                event.addProperty("isOn", "true");
                //if autoconfiguration is true create an object if not already exists
                if (board.getAutoConfiguration().equalsIgnoreCase("true")) {
                    event.addProperty("object.class", board.getObjectClass());
                    event.addProperty("object.name", address);
                }
            }
        } else // digital inputs status = up -> off/open; status = dn -> on/closed
        if (tag.equalsIgnoreCase(board.getDigitalInputTag())) {
View Full Code Here

            } else {
                event.addProperty("isOn", "true");
                //if autoconfiguration is true create an object if not already exists
                if (board.getAutoConfiguration().equalsIgnoreCase("true")) {
                    event.addProperty("object.class", board.getObjectClass());
                    event.addProperty("object.name", address);
                }
            }
        } else // digital inputs status = up -> off/open; status = dn -> on/closed
        if (tag.equalsIgnoreCase(board.getDigitalInputTag())) {
            if (status.equalsIgnoreCase("up")) {
View Full Code Here

                }
            }
        } else // digital inputs status = up -> off/open; status = dn -> on/closed
        if (tag.equalsIgnoreCase(board.getDigitalInputTag())) {
            if (status.equalsIgnoreCase("up")) {
                event.addProperty("isOn", "false");
                event.addProperty("isOpen", "true");
            } else {
                event.addProperty("isOn", "true");
                event.addProperty("isOpen", "false");
            }
View Full Code Here

            }
        } else // digital inputs status = up -> off/open; status = dn -> on/closed
        if (tag.equalsIgnoreCase(board.getDigitalInputTag())) {
            if (status.equalsIgnoreCase("up")) {
                event.addProperty("isOn", "false");
                event.addProperty("isOpen", "true");
            } else {
                event.addProperty("isOn", "true");
                event.addProperty("isOpen", "false");
            }
View Full Code Here

        if (tag.equalsIgnoreCase(board.getDigitalInputTag())) {
            if (status.equalsIgnoreCase("up")) {
                event.addProperty("isOn", "false");
                event.addProperty("isOpen", "true");
            } else {
                event.addProperty("isOn", "true");
                event.addProperty("isOpen", "false");
            }

        } else {
            // analog inputs status = 0 -> off; status > 0 -> on
View Full Code Here

            if (status.equalsIgnoreCase("up")) {
                event.addProperty("isOn", "false");
                event.addProperty("isOpen", "true");
            } else {
                event.addProperty("isOn", "true");
                event.addProperty("isOpen", "false");
            }

        } else {
            // analog inputs status = 0 -> off; status > 0 -> on
            if (tag.equalsIgnoreCase(board.getAnalogInputTag())) {
View Full Code Here

        } else {
            // analog inputs status = 0 -> off; status > 0 -> on
            if (tag.equalsIgnoreCase(board.getAnalogInputTag())) {
                if (status.equalsIgnoreCase("0")) {
                    event.addProperty("isOn", "false");
                } else {
                    event.addProperty("isOn", "true");
                }
                event.addProperty("analog.input.value", status);
            }
View Full Code Here

            // analog inputs status = 0 -> off; status > 0 -> on
            if (tag.equalsIgnoreCase(board.getAnalogInputTag())) {
                if (status.equalsIgnoreCase("0")) {
                    event.addProperty("isOn", "false");
                } else {
                    event.addProperty("isOn", "true");
                }
                event.addProperty("analog.input.value", status);
            }

        }
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.