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

Cleanup

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Java/branches/0.7@2605 b32b6428-25c9-4566-ad07-03861ab6144f
parent 2821c3dc
Branches
No related tags found
No related merge requests found
......@@ -8,6 +8,8 @@ import java.util.Properties;
import java.util.logging.Logger;
public class Config {
/* As this API clone the Python one, I decided to reuse the same config file */
private final static Logger LOGGER = Logger.getLogger(Device.class.getName());
private Properties cfg = null;
......
package org.imta.xaal.lib;
import java.io.FileInputStream;
import java.util.Arrays;
import java.util.Properties;
import java.util.UUID;
import com.upokecenter.cbor.CBORObject;
/**
*
......@@ -24,32 +20,9 @@ public class Test {
Lamp l2 = new Lamp("lamp.dimmer", UUID.fromString("6265eb30-8c59-11e9-98b1-b827ebe99202"));
eng.registerDevices(Arrays.asList(l1,l2));
l1.toggle();
eng.start();
}
public static void recursive(CBORObject cbor) {
for (var obj: cbor.getValues()) {
switch (obj.getType()) {
case Map:
System.out.print("Type:" + obj.getType()+"\t\t\t==>");
for (var k: obj.getKeys()) {
System.out.print(k+":" + obj.get(k)+"," );
}
System.out.println();
break;
case Array:
recursive(obj);
break;
default:
System.out.println("Type:" + obj.getType() +"\tTagged:"+ obj.isTagged() + "\t==>"+ obj.toString());
break;
}
}
}
l1.toggle();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment