Cleaning up drivers/Cpp, Cpp/Lifxtest, virtuals, and iotrmi/C++ (revisiting the C...
[iot2.git] / iotjava / iotrmi / C++ / IoTRMICommServer.hpp
index 1af6438695356e2bd869bb312baa224ef84a0f85..3dd20749da1d79135ba4bcae22b7a86cf79fb3a3 100644 (file)
@@ -71,17 +71,13 @@ IoTRMICommServer::~IoTRMICommServer() {
 
 void IoTRMICommServer::waitForConnectionOnServerRecv() {
 
-       cout << "Wait on connection ServerRecv!" << endl;
        rmiServerRecv->connect();
-       cout << "Connected on connection ServerRecv!" << endl;
 }
 
 
 void IoTRMICommServer::waitForConnectionOnServerSend() {
 
-       cout << "Wait on connection ServerSend!" << endl;
        rmiServerSend->connect();
-       cout << "Connected on connection ServerSend!" << endl;
 }
 
 
@@ -89,13 +85,11 @@ void IoTRMICommServer::waitForPackets(IoTRMICommServer* rmiComm) {
 
        char* packetBytes = NULL;
        int packetLen = 0;
-       //cout << "Starting waitForPacketsOnServer()" << endl;
        while(true) {
                fflush(NULL);
                packetBytes = rmiComm->rmiServerRecv->receiveBytes(packetBytes, &packetLen);
                fflush(NULL);
                if (packetBytes != NULL) { // If there is method bytes
-                       //IoTRMIUtil::printBytes(packetBytes, packetLen, false);
                        int packetType = IoTRMIComm::getPacketType(packetBytes);
                        if (packetType == IoTRMIUtil::METHOD_TYPE) {
                                rmiComm->methodQueue.enqueue(packetBytes, packetLen);
@@ -103,7 +97,7 @@ void IoTRMICommServer::waitForPackets(IoTRMICommServer* rmiComm) {
                                rmiComm->returnQueue.enqueue(packetBytes, packetLen);
                        } else {
                                // TODO: We need to log error message when we come to running this using IoTSlave
-                               // TODO: Beware that using "cout" in the process will kill it (as IoTSlave is loaded in Sentinel)
+                               // TODO: Beware that using "cout" in the process will kill it (as IoTSlave is loaded at runtime)
                                cerr << "IoTRMICommServer: Packet type is unknown: " << packetType << endl;
                                exit(1);
                        }
@@ -139,7 +133,6 @@ void IoTRMICommServer::sendReturnObj(void* retObj, string type, char* methodByte
        IoTRMIUtil::getObjectBytes(retObjBytes, retObj, type.c_str());
        memcpy(retAllObjBytes + headerLen, retObjBytes, retLen);
        fflush(NULL);
-       IoTRMIUtil::printBytes(retAllObjBytes, headerLen+retLen, false);
        rmiServerSend->sendBytes(retAllObjBytes, headerLen+retLen);
        fflush(NULL);
 }