public static void main(String[] args) throws Exception {
- Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, -1);
- t1.rebuild();
// Bulb 1
byte[] bulbMacAdd1 = new byte[8];
System.out.println("Starting System");
int counter = 0;
+
+ Table t1 = new Table("http://dc-6.calit2.uci.edu/test.iotcloud/", "reallysecret", 321, -1);
+ try {
+
+ t1.rebuild();
+ } catch (Error e) {
+
+ e.printStackTrace();
+ for (int i = 0; i < 3; i++) {
+ bulbs.get(i).setColor(0, 100, 100);
+ }
+
+
+
+ while (true) {
+ for (int i = 0; i < 3; i++) {
+ bulbs.get(i).turnOff();
+ }
+ Thread.sleep(1000);
+
+ for (int i = 0; i < 3; i++) {
+ bulbs.get(i).turnOn();
+ }
+ Thread.sleep(1000);
+ }
+ }
+
+
+
+
+
while (true) {
try {
t1.commitTransaction();
-
-
-
+
+
+
for (int i = 0; i < 3; i++) {
IoTString testValA1 = t1.getCommitted(keys.get(i));