Package it.freedomotic.events

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


            if (output.contains(command)) {
                String behavior = command;
                String value = output.substring(6 - numChars, 6);
                event = new ProtocolRead(this, "pioneer-kuro", "pioneer-kuro");
                event.addProperty("hardware-behavior", behavior);
                event.addProperty(eventPropertyName, value);
                this.notifyEvent(event);
                return OK;
            } else if (output.contains("ERR") || output.contains("XXX")) {
                return ERR;
            }
View Full Code Here


        }
        System.out.println(Float.parseFloat(readValue));
        //building the event
        ProtocolRead event = new ProtocolRead(this, "zway", board.getAlias() + delimiter + deviceAddress + delimiter + deviceInstance + delimiter + objectType);
        //adding some optional information to the event
        event.addProperty("read.value", String.valueOf(Float.parseFloat(readValue)));
        event.addProperty("object.type", objectType);
        //publishes the event on the messaging bus
        this.notifyEvent(event);

        connection.disconnect();
View Full Code Here

        System.out.println(Float.parseFloat(readValue));
        //building the event
        ProtocolRead event = new ProtocolRead(this, "zway", board.getAlias() + delimiter + deviceAddress + delimiter + deviceInstance + delimiter + objectType);
        //adding some optional information to the event
        event.addProperty("read.value", String.valueOf(Float.parseFloat(readValue)));
        event.addProperty("object.type", objectType);
        //publishes the event on the messaging bus
        this.notifyEvent(event);

        connection.disconnect();
View Full Code Here

            String address = board.getIpAddress() + ":" + sensorID;
            LOG.info("Sending HWg-STE protocol read event for object address '" + address + "'");
            //building the event
            ProtocolRead event = new ProtocolRead(this, "hwgste", address);
            //adding some optional information to the event
            event.addProperty("object.class", objectClass);
            event.addProperty("object.name", address);
            event.addProperty("sensor.unit", unit);
            event.addProperty("sensor.value", sensorValue.toString());
            event.addProperty("sensor.name", sensorName);
            event.addProperty("sensor.state", state);
View Full Code Here

            LOG.info("Sending HWg-STE protocol read event for object address '" + address + "'");
            //building the event
            ProtocolRead event = new ProtocolRead(this, "hwgste", address);
            //adding some optional information to the event
            event.addProperty("object.class", objectClass);
            event.addProperty("object.name", address);
            event.addProperty("sensor.unit", unit);
            event.addProperty("sensor.value", sensorValue.toString());
            event.addProperty("sensor.name", sensorName);
            event.addProperty("sensor.state", state);
            //publish the event on the messaging bus
View Full Code Here

            //building the event
            ProtocolRead event = new ProtocolRead(this, "hwgste", address);
            //adding some optional information to the event
            event.addProperty("object.class", objectClass);
            event.addProperty("object.name", address);
            event.addProperty("sensor.unit", unit);
            event.addProperty("sensor.value", sensorValue.toString());
            event.addProperty("sensor.name", sensorName);
            event.addProperty("sensor.state", state);
            //publish the event on the messaging bus
            this.notifyEvent(event);
View Full Code Here

            ProtocolRead event = new ProtocolRead(this, "hwgste", address);
            //adding some optional information to the event
            event.addProperty("object.class", objectClass);
            event.addProperty("object.name", address);
            event.addProperty("sensor.unit", unit);
            event.addProperty("sensor.value", sensorValue.toString());
            event.addProperty("sensor.name", sensorName);
            event.addProperty("sensor.state", state);
            //publish the event on the messaging bus
            this.notifyEvent(event);
        }
View Full Code Here

            //adding some optional information to the event
            event.addProperty("object.class", objectClass);
            event.addProperty("object.name", address);
            event.addProperty("sensor.unit", unit);
            event.addProperty("sensor.value", sensorValue.toString());
            event.addProperty("sensor.name", sensorName);
            event.addProperty("sensor.state", state);
            //publish the event on the messaging bus
            this.notifyEvent(event);
        }
    }
View Full Code Here

            event.addProperty("object.class", objectClass);
            event.addProperty("object.name", address);
            event.addProperty("sensor.unit", unit);
            event.addProperty("sensor.value", sensorValue.toString());
            event.addProperty("sensor.name", sensorName);
            event.addProperty("sensor.state", state);
            //publish the event on the messaging bus
            this.notifyEvent(event);
        }
    }
View Full Code Here

                if (frameParts[2].equalsIgnoreCase("1")) {
                    String level = frameParts[3];
                    String speed = frameParts[4];
                    messageDescription = "Luminous intensity change";
                    if (level != null) {
                        event.addProperty("level", level);
                    }
                    if (speed != null) {
                        event.addProperty("speed", speed);
                    }
                }
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.