Adjusting and cleaning up ZigbeeTest to install Vigilia ZigBee gateway and devices.
[iot2.git] / iotjava / iotrmi / Java / basics / TestClassCallbacks_Stub.java
index 1220e3f3d005a82721a03f2d001e4c3f5c26ef41..082e95f894895fe5a8faedbec8f5abfeca6bb339 100644 (file)
@@ -30,14 +30,43 @@ public class TestClassCallbacks_Stub {
                CallBackInterface cbSingle = new CallBack(2354);
                tcstub.registerCallback(cbSingle);
                System.out.println("Registered callback!");
-               CallBackInterface cbSingle1 = new CallBack(2356);
-               tcstub.registerCallback(cbSingle1);
-               System.out.println("Registered callback!");
+//             CallBackInterface cbSingle1 = new CallBack(2356);
+//             tcstub.registerCallback(cbSingle1);
+//             System.out.println("Registered callback!");
 //             CallBackInterface cbSingle2 = new CallBack(2360);
 //             tcstub.registerCallback(cbSingle2);
 //             System.out.println("Registered callback!");
+               /*CallBackInterface cb1 = new CallBack(23);
+               CallBackInterface cb2 = new CallBack(33);
+               CallBackInterface cb3 = new CallBack(43);
+               CallBackInterface[] cb = { cb1, cb2, cb3 };
+               tcstub.registerCallbackArray(cb);
+               List<CallBackInterface> cblist = new ArrayList<CallBackInterface>();
+               CallBackInterface cb4 = new CallBack(53); cblist.add(cb4);
+               CallBackInterface cb5 = new CallBack(63); cblist.add(cb5);
+               CallBackInterface cb6 = new CallBack(73); cblist.add(cb6);
+               tcstub.registerCallbackList(cblist);*/
+               /*Enum[] enArr = { Enum.APPLE, Enum.ORANGE, Enum.APPLE, Enum.GRAPE };
+               List<Enum> enArr2 = new ArrayList(Arrays.asList(enArr));
+               List<Enum> resArr2 = tcstub.handleEnumList(enArr2);
+               System.out.println("Enum members: " + resArr2.toString());*/
+               Struct str = new Struct();
+               str.name = "Rahmadi";
+               str.value = 0.123f;
+               str.year = 2016;
+               Struct str2 = new Struct();
+               str2.name = "Trimananda";
+               str2.value = 0.124f;
+               str2.year = 2017;
+               Struct[] arrStr = { str, str2 };
+               Struct[] arrRet = tcstub.handleStructArray(arrStr);
+               for(Struct st : arrRet) {
+                       System.out.println("Name: " + st.name);
+                       System.out.println("Value: " + st.value);
+                       System.out.println("Year: " + st.year);
+               }
 
-               System.out.println("Return value from callback 1: " + tcstub.callBack() + "\n\n");
+//             System.out.println("Return value from callback 1: " + tcstub.callBack() + "\n\n");
 //             System.out.println("\n\nCalling short one more time value: " + tcstub.getShort((short)4576) + "\n\n");
 //             System.out.println("Return value from callback 2: " + tcstub.callBack() + "\n\n");
 //             System.out.println("\n\nCalling short one more time value: " + tcstub.getShort((short)1233) + "\n\n");