Package it.freedomotic.reactions

Examples of it.freedomotic.reactions.Command


    @Override
    protected void createCommands() {
        super.createCommands();

        Command a = new Command();
        a.setName("Set " + getPojo().getName() + " hue to 50%");
        a.setDescription("the light " + getPojo().getName() + " changes its hue");
        a.setReceiver("app.events.sensors.behavior.request.objects");
        a.setProperty("object",
                getPojo().getName());
        a.setProperty("behavior", BEHAVIOR_HUE);
        a.setProperty("value", "50");

        Command b = new Command();
        b.setName("Increase " + getPojo().getName() + " hue");
        b.setDescription("increases " + getPojo().getName() + " hue of one step");
        b.setReceiver("app.events.sensors.behavior.request.objects");
        b.setProperty("object",
                getPojo().getName());
        b.setProperty("behavior", BEHAVIOR_HUE);
        b.setProperty("value", Behavior.VALUE_NEXT);

        Command c = new Command();
        c.setName("Decrease " + getPojo().getName() + " hue");
        c.setDescription("decreases " + getPojo().getName() + " hue of one step");
        c.setReceiver("app.events.sensors.behavior.request.objects");
        c.setProperty("object",
                getPojo().getName());
        c.setProperty("behavior", BEHAVIOR_HUE);
        c.setProperty("value", Behavior.VALUE_PREVIOUS);

        Command d = new Command();
        d.setName("Set its hue to 50%");
        d.setDescription("set its hue to 50%");
        d.setReceiver("app.events.sensors.behavior.request.objects");
        d.setProperty("object", "@event.object.name");
        d.setProperty("behavior", BEHAVIOR_HUE);
        d.setProperty("value", "50");

        Command e = new Command();
        e.setName("Increase its hue");
        e.setDescription("increases its hue of one step");
        e.setReceiver("app.events.sensors.behavior.request.objects");
        e.setProperty("object", "@event.object.name");
        e.setProperty("behavior", BEHAVIOR_HUE);
        e.setProperty("value", Behavior.VALUE_NEXT);

        Command f = new Command();
        f.setName("Decrease its hue");
        f.setDescription("decreases its hue of one step");
        f.setReceiver("app.events.sensors.behavior.request.objects");
        f.setProperty("object", "@event.object.name");
        f.setProperty("behavior", BEHAVIOR_HUE);
        f.setProperty("value", Behavior.VALUE_PREVIOUS);

        Command g = new Command();
        g.setName("Set its hue to the value in the event");
        g.setDescription("set its hue to the value in the event");
        g.setReceiver("app.events.sensors.behavior.request.objects");
        g.setProperty("object", "@event.object.name");
        g.setProperty("behavior", BEHAVIOR_HUE);
        g.setProperty("value", "@event.value");

        Command h = new Command();
        h.setName("Set " + getPojo().getName() + " saturation to 50%");
        h.setDescription("the light " + getPojo().getName() + " changes its saturation");
        h.setReceiver("app.events.sensors.behavior.request.objects");
        h.setProperty("object",
                getPojo().getName());
        h.setProperty("behavior", BEHAVIOR_SATURATION);
        h.setProperty("value", "50");

        Command i = new Command();
        i.setName("Increase " + getPojo().getName() + " saturation");
        i.setDescription("increases " + getPojo().getName() + " saturation of one step");
        i.setReceiver("app.events.sensors.behavior.request.objects");
        i.setProperty("object",
                getPojo().getName());
        i.setProperty("behavior", BEHAVIOR_SATURATION);
        i.setProperty("value", Behavior.VALUE_NEXT);

        Command l = new Command();
        l.setName("Decrease " + getPojo().getName() + " saturation");
        l.setDescription("decreases " + getPojo().getName() + " saturation of one step");
        l.setReceiver("app.events.sensors.behavior.request.objects");
        l.setProperty("object",
                getPojo().getName());
        l.setProperty("behavior", BEHAVIOR_SATURATION);
        l.setProperty("value", Behavior.VALUE_PREVIOUS);

        Command m = new Command();
        m.setName("Set its saturation to 50%");
        m.setDescription("set its saturation to 50%");
        m.setReceiver("app.events.sensors.behavior.request.objects");
        m.setProperty("object", "@event.object.name");
        m.setProperty("behavior", BEHAVIOR_SATURATION);
        m.setProperty("value", "50");

        Command n = new Command();
        n.setName("Increase its saturation");
        n.setDescription("increases its saturation of one step");
        n.setReceiver("app.events.sensors.behavior.request.objects");
        n.setProperty("object", "@event.object.name");
        n.setProperty("behavior", BEHAVIOR_SATURATION);
        n.setProperty("value", Behavior.VALUE_NEXT);

        Command o = new Command();
        o.setName("Decrease its saturation");
        o.setDescription("decreases its saturation of one step");
        o.setReceiver("app.events.sensors.behavior.request.objects");
        o.setProperty("object", "@event.object.name");
        o.setProperty("behavior", BEHAVIOR_SATURATION);
        o.setProperty("value", Behavior.VALUE_PREVIOUS);

        Command p = new Command();
        p.setName("Set its saturation to the value in the event");
        p.setDescription("set its saturation to the value in the event");
        p.setReceiver("app.events.sensors.behavior.request.objects");
        p.setProperty("object", "@event.object.name");
        p.setProperty("behavior", BEHAVIOR_SATURATION);
        p.setProperty("value", "@event.value");

        //effect related commands
        Command q = new Command();
        q.setName(getPojo().getName() + " next Effect");
        q.setDescription("select the " + getPojo().getName() + " next Effect");
        q.setReceiver("app.events.sensors.behavior.request.objects");
        q.setProperty("object", getPojo().getName());
        q.setProperty("behavior", BEHAVIOR_EFFECT);
        q.setProperty("value", "next");

        Command r = new Command();
        r.setName(getPojo().getName() + " previous Effect");
        r.setDescription("select the " + getPojo().getName() + " previous Effect");
        r.setReceiver("app.events.sensors.behavior.request.objects");
        r.setProperty("object", getPojo().getName());
        r.setProperty("behavior", BEHAVIOR_EFFECT);
        r.setProperty("value", "previous");



        CommandPersistence.add(a);
        CommandPersistence.add(b);
View Full Code Here


    @Override
    protected void createCommands() {
        super.createCommands();

        Command a = new Command();
        a.setName("Set " + getPojo().getName() + " position to 50%");
        a.setDescription("the StepperMotor " + getPojo().getName() + " changes its position to 50%");
        a.setReceiver("app.events.sensors.behavior.request.objects");
        a.setProperty("object",
                getPojo().getName());
        a.setProperty("behavior", "position");
        a.setProperty("value", "50");

        Command b = new Command();
        b.setName(getPojo().getName() + " position up");
        b.setDescription("increases " + getPojo().getName() + " position of one step");
        b.setReceiver("app.events.sensors.behavior.request.objects");
        b.setProperty("object",
                getPojo().getName());
        b.setProperty("behavior", "position");
        b.setProperty("value", "next");

        Command c = new Command();
        c.setName(getPojo().getName() + " position down");
        c.setDescription("decreases " + getPojo().getName() + " position of one step");
        c.setReceiver("app.events.sensors.behavior.request.objects");
        c.setProperty("object",
                getPojo().getName());
        c.setProperty("behavior", "position");
        c.setProperty("value", "previous");

        Command d = new Command();
        d.setName("Set its position to 50%");
        d.setDescription("set its position to 50%");
        d.setReceiver("app.events.sensors.behavior.request.objects");
        d.setProperty("object", "@event.object.name");
        d.setProperty("behavior", "position");
        d.setProperty("value", "50");

        Command e = new Command();
        e.setName("Increase its position");
        e.setDescription("increases its position of one step");
        e.setReceiver("app.events.sensors.behavior.request.objects");
        e.setProperty("object", "@event.object.name");
        e.setProperty("behavior", "position");
        e.setProperty("value", "next");

        Command f = new Command();
        f.setName("Decrease its position");
        f.setDescription("decreases its position of one step");
        f.setReceiver("app.events.sensors.behavior.request.objects");
        f.setProperty("object", "@event.object.name");
        f.setProperty("behavior", "position");
        f.setProperty("value", "previous");

        Command g = new Command();
        g.setName("Set its position to the value in the event");
        g.setDescription("set its position to the value in the event");
        g.setReceiver("app.events.sensors.behavior.request.objects");
        g.setProperty("object", "@event.object.name");
        g.setProperty("behavior", "position");
        g.setProperty("value", "@event.value");

        CommandPersistence.add(a);
        CommandPersistence.add(b);
        CommandPersistence.add(c);
        CommandPersistence.add(d);
View Full Code Here

    @Override
    protected void createCommands() {
        super.createCommands();

        Command a = new Command();
        // a.setName(I18n.msg("set_X_brightness_to_50", new Object[]{this.getPojo().getName()}));
        a.setName("Set " + getPojo().getName() + " brightness to 50%");
        a.setDescription("the light " + getPojo().getName() + " changes its brightness");
        a.setReceiver("app.events.sensors.behavior.request.objects");
        a.setProperty("object",
                getPojo().getName());
        a.setProperty("behavior", BEHAVIOR_BRIGHTNESS);
        a.setProperty("value", "50");

        Command b = new Command();
        // b.setName(I18n.msg("increase_X_brightness", new Object[]{this.getPojo().getName()}));
        b.setName("Increase " + getPojo().getName() + " brightness");
        b.setDescription("increases " + getPojo().getName() + " brigthness of one step");
        b.setReceiver("app.events.sensors.behavior.request.objects");
        b.setProperty("object",
                getPojo().getName());
        b.setProperty("behavior", BEHAVIOR_BRIGHTNESS);
        b.setProperty("value", Behavior.VALUE_NEXT);

        Command c = new Command();
        // c.setName(I18n.msg("decrease_X_brightness", new Object[]{this.getPojo().getName()}));
        c.setName("Decrease " + getPojo().getName() + " brightness");
        c.setDescription("decreases " + getPojo().getName() + " brigthness of one step");
        c.setReceiver("app.events.sensors.behavior.request.objects");
        c.setProperty("object",
                getPojo().getName());
        c.setProperty("behavior", BEHAVIOR_BRIGHTNESS);
        c.setProperty("value", Behavior.VALUE_PREVIOUS);

        Command d = new Command();
        // d.setName(I18n.msg("set_its_brightness_to_50"));
        d.setName("Set its brightness to 50%");
        // d.setDescription(I18n.msg("set_its_brightness_to_50"));
        d.setDescription("Set its brightness to 50%");
        d.setReceiver("app.events.sensors.behavior.request.objects");
        d.setProperty("object", "@event.object.name");
        d.setProperty("behavior", BEHAVIOR_BRIGHTNESS);
        d.setProperty("value", "50");

        Command e = new Command();
        // e.setName(I18n.msg("increase_its_brightness"));
        e.setName("Increase its brightness");
        e.setDescription("increases its brigthness of one step");
        e.setReceiver("app.events.sensors.behavior.request.objects");
        e.setProperty("object", "@event.object.name");
        e.setProperty("behavior", BEHAVIOR_BRIGHTNESS);
        e.setProperty("value", Behavior.VALUE_NEXT);

        Command f = new Command();
        // f.setName(I18n.msg("decrease_its_brightness"));
        f.setName("Decrease its brightness");
        f.setDescription("decreases its brigthness of one step");
        f.setReceiver("app.events.sensors.behavior.request.objects");
        f.setProperty("object", "@event.object.name");
        f.setProperty("behavior", BEHAVIOR_BRIGHTNESS);
        f.setProperty("value", Behavior.VALUE_PREVIOUS);

        Command g = new Command();
        // g.setName(I18n.msg("set_brightness_from_event_value"));
        g.setName("Set its brightness to the value in the event");
        g.setDescription("set its brighness to the value in the event");
        g.setReceiver("app.events.sensors.behavior.request.objects");
        g.setProperty("object", "@event.object.name");
        g.setProperty("behavior", BEHAVIOR_BRIGHTNESS);
        g.setProperty("value", "@event.value");

        CommandPersistence.add(a);
        CommandPersistence.add(b);
        CommandPersistence.add(c);
        CommandPersistence.add(d);
View Full Code Here

TOP

Related Classes of it.freedomotic.reactions.Command

Copyright © 2018 www.massapicom. 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.