Skip to content
Snippets Groups Projects
Commit 52103157 authored by jkerdreu's avatar jkerdreu
Browse files

Oups..



git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Java/branches/0.7@2611 b32b6428-25c9-4566-ad07-03861ab6144f
parent 6a3f1583
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,11 @@ build:
clean:
ant clean
run:
jar:
ant jar
java -jar dist/xAAL-Tests.jar
\ No newline at end of file
lamp:jar
java -cp dist/xAAL-Tests.jar org.imta.xaal.tests.TestLamp
dumper:jar
java -cp dist/xAAL-Tests.jar org.imta.xaal.tests.Dumper
\ No newline at end of file
package org.imta.xaal.tests;
import org.imta.xaal.lib.Engine;
import org.imta.xaal.lib.Message;
import org.imta.xaal.lib.Config;
import java.io.IOException;
public class Dumper extends Engine {
public Dumper(Config cfg) throws IOException {
super(cfg);
}
@Override
public void processRxMSG(Message msg) {
msg.dump();
}
public static void main (String[] args) throws IOException {
Dumper dumper = new Dumper(Config.getInstance());
dumper.run();
}
}
package org.imta.xaal.tests;
import java.util.Arrays;
import java.util.UUID;
import org.imta.xaal.lib.Engine;
import org.imta.xaal.lib.Config;
public class TestLamp {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws Exception{
Engine eng = new Engine(Config.getInstance());
Lamp l1 = new Lamp(UUID.fromString("6265eb30-8c59-11e9-98b1-b827ebe99201"));
Lamp l2 = new Lamp(UUID.fromString("6265eb30-8c59-11e9-98b1-b827ebe99202"));
UUID grp = UUID.randomUUID();
l1.setGroupID(grp);
l2.setGroupID(grp);
eng.registerDevices(Arrays.asList(l1,l2));
eng.start();
l1.toggle();
l2.setBrightness(50);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment