Cleaning up the Makefile for compiler related commands; cleaning up C++ stubs and...
[iot2.git] / benchmarks / Cpp / Lifxtest / LightBulbTest_Stub.cpp
index b2e1623d936dbaa79a2414bdcbdf2c2708c96490..d811274cb1639dd70d01878fc5258c8d5f2e941d 100644 (file)
@@ -3,8 +3,25 @@
 
 using namespace std;
 
+//LightBulbTest_Stub::LightBulbTest_Stub(int _portSend, int _portRecv, const char* _skeletonAddress, int _rev, bool* _bResult) {
 LightBulbTest_Stub::LightBulbTest_Stub(int _portSend, int _portRecv, const char* _skeletonAddress, int _rev, bool* _bResult) {
+
+        int i=0;
+        string file = "LightBulbTest_cpp" + to_string(i) + ".log";
+        while (ifstream(file.c_str())) {
+                i++;
+                file = "LightBulbTest_cpp" + to_string(i) + ".log";
+        }
+        log.open(file);
+       log << "Constructing LightBulbTest_Stub!" << endl;
+       log << "Port send: " << _portSend << endl;
+       log << "Port recv: " << _portRecv << endl;
+       log << "Skeleton addr: " << _skeletonAddress << endl;
+       log << "Rev: " << _rev << endl;
+       log << "Result: " << _bResult << endl;
+
        rmiComm = new IoTRMICommClient(_portSend, _portRecv, _skeletonAddress, _rev, _bResult);
+       log << "Reached 1!" << endl;
        rmiComm->registerStub(objectId, 6, &retValueReceived6);
        rmiComm->registerStub(objectId, 3, &retValueReceived3);
        rmiComm->registerStub(objectId, 8, &retValueReceived8);