- Timestamp:
- Sep 23, 2016, 3:34:40 PM (8 years ago)
- Location:
- branches/mavlink/tools/Controller/Mavlink/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/mavlink/tools/Controller/Mavlink/src/GuiFlair.cpp
r84 r85 20 20 #include "GuiInterface.h" 21 21 22 #include <FrameworkManager.h> 23 #include <Socket.h> 24 22 25 //todo remove for tests 23 26 #include <iostream> … … 30 33 GuiFlair::GuiFlair(const FrameworkManager *parent, string name): 31 34 GuiInterface(parent, name) { 32 cout << "MavPlanner GuiFlair constructor" << endl; 35 cout << "MavPlanner GuiFlair constructor" << endl; 36 37 // outputSocket = new Socket((Thread *)this, "output socket", "127.0.0.1:5036"); 38 39 // outputSocket = new Socket(parent, "output socket", "127.255.255.255:9001", true); 40 outputSocket = new Socket(parent, "output socket", 9001); 33 41 } 34 42 … … 39 47 void GuiFlair::MissionStart() { 40 48 cout << "MavPlanner GuiFlair MissionStart" << endl; 49 50 int received = 0; 51 char receiveFrameBuffer[50]; 52 53 std::string message_to_send("Test of sending a message"); 54 55 //fonctionne en récéption si on prend un broadcast pour la création du socket 56 // outputSocket->SendMessage(message_to_send); 57 58 do { 59 received=outputSocket->RecvMessage(receiveFrameBuffer,50, TIME_NONBLOCK); 60 if (received > 0) { 61 cout << "MavPlanner GuiFlair MissionStart data received !!!" << endl; 62 } 63 } while (received == 0); 41 64 } 42 65 -
branches/mavlink/tools/Controller/Mavlink/src/GuiFlair.h
r84 r85 27 27 namespace core { 28 28 class FrameworkManager; 29 class Socket; 29 30 } 30 31 } … … 42 43 virtual void MissionPause(); 43 44 virtual void MissionSend(); 45 46 private: 47 flair::core::Socket *outputSocket; 48 std::string outputAddress; 49 int outputPort; 44 50 }; 45 51 -
branches/mavlink/tools/Controller/Mavlink/src/GuiInterface.cpp
r84 r85 101 101 102 102 //TODO IP & PORT from config.h file 103 sendSocket = new Socket((Thread *)this, "send socket", "127.0.0.1:5000");103 // sendSocket = new Socket((Thread *)this, "send socket", "127.0.0.1:5000"); 104 104 } 105 105
Note:
See TracChangeset
for help on using the changeset viewer.