Ignore:
Timestamp:
09/28/16 08:36:04 (8 years ago)
Author:
Thomas Fuhrmann
Message:

FlairSockets are working and used

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/mavlink/tools/Controller/Mavlink/src/Forwarder.cpp

    r71 r86  
    3838  // cout << "MavPlanner Forwarder output address : " << tmpOutput << endl;
    3939
    40   cout << "input socket : " << inputAddress + ":" + to_string(inputPort) << endl;
    41   cout << "output socket : " << outputAddress + ":" + to_string(outputPort) << endl;
     40  // cout << "input socket : " << inputAddress + ":" + to_string(inputPort) << endl;
     41  // cout << "output socket : " << outputAddress + ":" + to_string(outputPort) << endl;
    4242
    43   inputSocket = new Socket((Thread *)this, "input socket", inputAddress + ":" + to_string(inputPort));
     43  inputSocket = new Socket((Thread *)this, "input socket", inputPort);
    4444  outputSocket = new Socket((Thread *)this, "output socket", outputAddress + ":" + to_string(outputPort));
    4545}
     
    5555  }
    5656  int recvDataSize = 0;
    57   char* srcBuffer;
    58   size_t srcSize;
     57  char inputBuffer[200];
    5958  while (!ToBeStopped()) {
    60     // Thread::SleepMS(2000);
    61     // TIME_NONBLOCK
    62     recvDataSize = inputSocket->RecvMessage(inputBuffer, 200, 5000000000, srcBuffer, &srcSize);
    63     cout << "Forwarder message received, size="<< recvDataSize << endl;
    64         outputSocket->SendMessage(inputBuffer, recvDataSize);
     59    recvDataSize = inputSocket->RecvMessage(inputBuffer, 200, 1000000000);
     60          outputSocket->SendMessage(inputBuffer, recvDataSize);
    6561  }
    6662}
Note: See TracChangeset for help on using the changeset viewer.