Adding last version of iotruntime and iotinstaller; preparing to extend IoTMaster...
[iot2.git] / iotjava / iotrmi / C++ / IoTRMICall.cpp
1 #include <iostream>
2 #include <string>
3 #include "IoTRMICall.hpp"
4
5 using namespace std;
6
7 int main(int argc, char *argv[])
8 {
9         int port = 5010;
10         const char* address = "localhost";
11         int rev = 0;
12         bool bResult = false;
13
14         int numRet = 3;
15         string retCls[] = { "int", "string", "int" };
16         int param1 = 0;
17         string param2 = "";
18         int param3 = 0;
19         void* retObj[] = { &param1, &param2, &param3 };
20
21         IoTRMICall *rc = new IoTRMICall(port, address, rev, &bResult);
22         char retBytes[] = { 0, 0, 4, -46, 0, 0, 0, 10, 116, 101, 115, 116, 115, 116, 114, 105, 110, 103, 0, 0, 21, 56 };
23         rc->getReturnObjects(retBytes, retCls, numRet, retObj);
24         cout << "Param1: " << param1 << endl;
25         cout << "Param2: " << param2 << endl;
26         cout << "Param3: " << param3 << endl;
27
28         return 0;
29 }