public static void main(String[] args) throws Exception {
CommunicationHandler comHan = new CommunicationHandler(true);
- int numOfPorts = 4;
+ int numOfPorts = 2;
int[] ports = comHan.getCallbackPorts(numOfPorts);
+ int localport = 5011;
int port = 5010;
//String address = "localhost";
//String address = "192.168.2.191"; // RPi2
//String callbackAddress = "192.168.2.191"; // RPi2
int rev = 0;
- TestClassComplete_Stub tcstub = new TestClassComplete_Stub(port, skeletonAddress, callbackAddress, rev, ports);
+ TestClassComplete_Stub tcstub = new TestClassComplete_Stub(localport, port, skeletonAddress, callbackAddress, rev, ports);
System.out.println("==== CALLBACKS ====");
CallBackInterface cbSingle = new CallBack(2354);
tcstub.registerCallback(cbSingle);
System.out.println("Registered callback!");
- System.out.println("Return value from callback: " + tcstub.callBack());
+ //CallBackInterface cbSingle1 = new CallBack(2356);
+ //tcstub.registerCallback(cbSingle1);
+ System.out.println("Registered callback!");
+
+ 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");
+ //System.out.println("\n\nCalling short one more time value: " + tcstub.getShort((short)1321) + "\n\n");
+ while(true) {}
}
}