Changeset 86 in flair-src for branches/mavlink/tools/Controller/Mavlink/src/Forwarder.cpp
- Timestamp:
- 09/28/16 08:36:04 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/mavlink/tools/Controller/Mavlink/src/Forwarder.cpp
r71 r86 38 38 // cout << "MavPlanner Forwarder output address : " << tmpOutput << endl; 39 39 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; 42 42 43 inputSocket = new Socket((Thread *)this, "input socket", input Address + ":" + to_string(inputPort));43 inputSocket = new Socket((Thread *)this, "input socket", inputPort); 44 44 outputSocket = new Socket((Thread *)this, "output socket", outputAddress + ":" + to_string(outputPort)); 45 45 } … … 55 55 } 56 56 int recvDataSize = 0; 57 char* srcBuffer; 58 size_t srcSize; 57 char inputBuffer[200]; 59 58 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); 65 61 } 66 62 }
Note:
See TracChangeset
for help on using the changeset viewer.