Ignore:
Timestamp:
Sep 28, 2016, 8:36:04 AM (5 years ago)
Author:
Thomas Fuhrmann
Message:

FlairSockets? are working and used

File:
1 edited

Legend:

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

    r85 r86  
    3535        cout << "MavPlanner GuiFlair constructor" << endl;
    3636
    37         // outputSocket = new Socket((Thread *)this, "output socket", "127.0.0.1:5036");
     37        outputSocket = new Socket((Thread *)this, "output socket", "127.0.0.1:5036");
    3838
    3939        // outputSocket = new Socket(parent, "output socket", "127.255.255.255:9001", true);
    40         outputSocket = new Socket(parent, "output socket", 9001);
     40        inputSocket = new Socket((Thread *)this, "input socket", 9001);
    4141}
    4242
     
    4949
    5050        int received = 0;
    51         char receiveFrameBuffer[50];
     51        char receiveFrameBuffer[200];
    5252
    5353        std::string message_to_send("Test of sending a message");
     
    5757
    5858        do {
    59                 received=outputSocket->RecvMessage(receiveFrameBuffer,50, TIME_NONBLOCK);
     59                // cout << "." << endl;
     60                received=inputSocket->RecvMessage(receiveFrameBuffer,200, TIME_NONBLOCK);
     61                // cout << "." << endl;
    6062                if (received > 0) {
    61                    cout << "MavPlanner GuiFlair MissionStart data received !!!" << endl;
     63                   cout << "MavPlanner GuiFlair MissionStart data received : " << receiveFrameBuffer << endl;
     64                   outputSocket->SendMessage(receiveFrameBuffer, received);
    6265                }
    63         } while (received == 0);
     66        } while (received != 0);
    6467}
    6568
Note: See TracChangeset for help on using the changeset viewer.