Adjusting and cleaning up ZigbeeTest to install Vigilia ZigBee gateway and devices.
[iot2.git] / iotjava / iotrmi / Java / basics / TestClass.java
index 48748d0546c7ba5cac88e3832bef5e1c8195c153..6e9aea4cb56f3473417bfdb9b08cf56eed95bbef 100644 (file)
@@ -40,11 +40,11 @@ public class TestClass implements TestClassInterface {
                System.out.println("Callback called! cblist: " + cblist.size());
                for (CallBackInterfaceWithCallBack cb : cblist) {
                        sum = sum + cb.printInt();
-                       //TestClass tci = new TestClass();
-                       cb.needCallback(this);
                        //cb.needCallback(this);
-                       //cb.needCallback(tci);
-                       System.out.println("Inside the loop!");
+                       TestClass tci = new TestClass();
+                       cb.needCallback(this);
+                       cb.needCallback(tci);
+                       System.out.println("\n\nInside the loop! Sum is now: " + sum + "\n\n");
                }
                System.out.println("Executed callback of callback! Returning value: " + sum + "\n\n");
                return sum;
@@ -323,17 +323,17 @@ public class TestClass implements TestClassInterface {
        // Struct
        public Struct handleStruct(Struct str) {
 
-               System.out.println("Name: " + str.name);
-               System.out.println("Value: " + str.value);
-               System.out.println("Year: " + str.year);
+               //System.out.println("Name: " + str.name);
+               //System.out.println("Value: " + str.value);
+               //System.out.println("Year: " + str.year);
 
 
-               Struct test = new Struct();
-               test.name = "Anonymous";
-               test.value = 1.33f;
-               test.year = 2016;
+               //Struct test = new Struct();
+               //test.name = "Anonymous";
+               //test.value = 1.33f;
+               //test.year = 2016;
 
-               str = test;
+               //str = test;
 
                return str;
        }