1 import java.util.Arrays;
2 import iotruntime.master.CommunicationHandler;
4 public class TestClass_Stub {
6 public static void main(String[] args) throws Exception {
8 CommunicationHandler comHan = new CommunicationHandler(true);
10 int[] ports = comHan.getCallbackPorts(numOfPorts);
13 String address = "localhost";
14 //String address = "128.195.136.170"; // dc-9.calit2.uci.edu
17 System.out.println("Allocated ports: " + Arrays.toString(ports));
19 TestClassComplete_Stub tcstub = new TestClassComplete_Stub(port, address, rev, ports);
20 System.out.println("Return value: " + tcstub.getByte((byte)68));
21 System.out.println("Return value: " + tcstub.getShort((short)1234));
22 System.out.println("Return value: " + tcstub.getLong(12345678l));
23 System.out.println("Return value: " + tcstub.getFloat(12.345f));
24 System.out.println("Return value: " + tcstub.getDouble(12345.678));
25 System.out.println("Return value: " + tcstub.getBoolean(true));
26 System.out.println("Return value: " + tcstub.getChar('c'));
28 System.out.println("Return value: " + tcstub.getA());
29 System.out.println("Return value: " + tcstub.setAndGetA(123));
30 System.out.println("Return value: " + tcstub.setACAndGetA("string", 123));
31 System.out.println("Return value: " + tcstub.sumArray(new String[] { "123", "456", "987" }));