Package it.freedom.reactions

Examples of it.freedom.reactions.Command


    @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);
View Full Code Here

TOP

Related Classes of it.freedom.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.