Package it.freedomotic.events

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


        //reconstruct freedomotic object address
        String address = board.getIpAddress() + ":" + board.getPort() + ":" + id + ":" + slot;
        LOG.info("Sending Souliss protocol read event for object address '" + address + "'");
        //building the event ProtocolRead
        ProtocolRead event = new ProtocolRead(this, "souliss", address);
        event.addProperty("souliss.typical", typical);
        event.addProperty("souliss.val", val);
        switch (Integer.parseInt(typical)) {
            case 11:
                if (val.equals("0")) {
                    event.addProperty("isOn", "false");
View Full Code Here


        String address = board.getIpAddress() + ":" + board.getPort() + ":" + id + ":" + slot;
        LOG.info("Sending Souliss protocol read event for object address '" + address + "'");
        //building the event ProtocolRead
        ProtocolRead event = new ProtocolRead(this, "souliss", address);
        event.addProperty("souliss.typical", typical);
        event.addProperty("souliss.val", val);
        switch (Integer.parseInt(typical)) {
            case 11:
                if (val.equals("0")) {
                    event.addProperty("isOn", "false");
                } else {
View Full Code Here

        event.addProperty("souliss.typical", typical);
        event.addProperty("souliss.val", val);
        switch (Integer.parseInt(typical)) {
            case 11:
                if (val.equals("0")) {
                    event.addProperty("isOn", "false");
                } else {
                    event.addProperty("isOn", "true");
                }
                break;
        }
View Full Code Here

        switch (Integer.parseInt(typical)) {
            case 11:
                if (val.equals("0")) {
                    event.addProperty("isOn", "false");
                } else {
                    event.addProperty("isOn", "true");
                }
                break;
        }
        //publish the event on the messaging bus
        this.notifyEvent(event);
View Full Code Here

        //Freedomotic.logger.severe("Sending Arduino WeatherShield protocol read event for board '" + address + "'");
        String values[] = parametersValue.split(board.getDelimiter());
        //building the event
        ProtocolRead event = new ProtocolRead(this, "ArduinoWeatherShield", address); //IP:PORT
        //adding some optional information to the event
        event.addProperty("boardIP", board.getIpAddress());
        event.addProperty("boardPort", new Integer(board.getPort()).toString());
        event.addProperty("sensor.temperature", values[0]);
        event.addProperty("sensor.pressure", values[1]);
        event.addProperty("sensor.humidity", values[2]);
        //publish the event on the messaging bus
View Full Code Here

        String values[] = parametersValue.split(board.getDelimiter());
        //building the event
        ProtocolRead event = new ProtocolRead(this, "ArduinoWeatherShield", address); //IP:PORT
        //adding some optional information to the event
        event.addProperty("boardIP", board.getIpAddress());
        event.addProperty("boardPort", new Integer(board.getPort()).toString());
        event.addProperty("sensor.temperature", values[0]);
        event.addProperty("sensor.pressure", values[1]);
        event.addProperty("sensor.humidity", values[2]);
        //publish the event on the messaging bus
        this.notifyEvent(event);
View Full Code Here

        //building the event
        ProtocolRead event = new ProtocolRead(this, "ArduinoWeatherShield", address); //IP:PORT
        //adding some optional information to the event
        event.addProperty("boardIP", board.getIpAddress());
        event.addProperty("boardPort", new Integer(board.getPort()).toString());
        event.addProperty("sensor.temperature", values[0]);
        event.addProperty("sensor.pressure", values[1]);
        event.addProperty("sensor.humidity", values[2]);
        //publish the event on the messaging bus
        this.notifyEvent(event);
    }
View Full Code Here

        ProtocolRead event = new ProtocolRead(this, "ArduinoWeatherShield", address); //IP:PORT
        //adding some optional information to the event
        event.addProperty("boardIP", board.getIpAddress());
        event.addProperty("boardPort", new Integer(board.getPort()).toString());
        event.addProperty("sensor.temperature", values[0]);
        event.addProperty("sensor.pressure", values[1]);
        event.addProperty("sensor.humidity", values[2]);
        //publish the event on the messaging bus
        this.notifyEvent(event);
    }
View Full Code Here

        //adding some optional information to the event
        event.addProperty("boardIP", board.getIpAddress());
        event.addProperty("boardPort", new Integer(board.getPort()).toString());
        event.addProperty("sensor.temperature", values[0]);
        event.addProperty("sensor.pressure", values[1]);
        event.addProperty("sensor.humidity", values[2]);
        //publish the event on the messaging bus
        this.notifyEvent(event);
    }

    @Override
View Full Code Here

        //LOG.severe("k8055 address " + address);
        //add a property that defines the status readed from hardware
        //event.addProperty("relay.number", new Integer(relayLine).toString());
        if (typeLine.equals("ID")) {
            if (status.equals("0")) {
                event.addProperty("isOn", "false");
            } else {
                event.addProperty("isOn", "true");
            }
        } else if (typeLine.equals("IA")) {
            if (status.equals("0")) {
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.