1 #ifndef _ROOMSMART_STUB_HPP__
2 #define _ROOMSMART_STUB_HPP__
5 #include "RoomSmart.hpp"
9 class RoomSmart_Stub : public RoomSmart
14 string callbackAddress;
17 const static int objectId = 0;
24 RoomSmart_Stub(int _port, const char* _skeletonAddress, string _callbackAddress, int _rev, bool* _bResult, vector<int> _ports) {
25 callbackAddress = _callbackAddress;
28 log.open("RoomSmart_Stub_cpp.log");
29 log << "Port: " << _port << endl;
30 log << "Skeleton address: " << _skeletonAddress << endl;
31 log << "Callback address: " << callbackAddress << endl;
32 log << "Rev: " << _rev << endl;
33 log << "bResult: " << *_bResult << endl;
34 log << "Ports: " << _ports[0] << endl;
35 rmiCall = new IoTRMICall(_port, _skeletonAddress, _rev, _bResult);
36 log << "Established connection with skeleton!" << endl;
40 if (rmiCall != NULL) {
47 log << "Calling getRoomID() in stub!" << endl;
49 string retType = "int";
51 string paramCls[] = { };
52 void* paramObj[] = { };
54 void* retObj = &retVal;
55 log << "About to remote call!" << endl;
56 rmiCall->remoteCall(objectId, methodId, retType, paramCls, paramObj, numParam, retObj);
57 log << "Remote call performed!" << endl;