1 | // %flair:license{
|
---|
2 | // This file is part of the Flair framework distributed under the
|
---|
3 | // CECILL-C License, Version 1.0.
|
---|
4 | // %flair:license}
|
---|
5 | // created: 2016/09/02
|
---|
6 | // filename: GuiGcs.h
|
---|
7 | //
|
---|
8 | // authors: Thomas Fuhrmann
|
---|
9 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
10 | //
|
---|
11 | // version: $Id: $
|
---|
12 | //
|
---|
13 | // purpose: Implementation of GuiInterface, using sockets
|
---|
14 | //
|
---|
15 | //
|
---|
16 | /*********************************************************************/
|
---|
17 |
|
---|
18 | #include "GuiGcs.h"
|
---|
19 | #include "GuiInterface.h"
|
---|
20 |
|
---|
21 | #include <Socket.h>
|
---|
22 | #include <FrameworkManager.h>
|
---|
23 |
|
---|
24 | //todo remove for tests
|
---|
25 | #include <iostream>
|
---|
26 |
|
---|
27 | using namespace std;
|
---|
28 | using namespace flair::core;
|
---|
29 | using namespace flair::gui;
|
---|
30 |
|
---|
31 | GuiGcs::GuiGcs(const FrameworkManager *parent, string name,
|
---|
32 | std::string &outputAddress, int outputPort):
|
---|
33 | GuiInterface(parent, name) {
|
---|
34 | cout << "MavPlanner GuiGcs constructor" << endl;
|
---|
35 | outputSocket = new Socket((Thread *)this, "output socket", outputAddress + ":" + to_string(outputPort));
|
---|
36 | }
|
---|
37 |
|
---|
38 | GuiGcs::~GuiGcs() {
|
---|
39 |
|
---|
40 | }
|
---|
41 |
|
---|
42 | void GuiGcs::MissionInitialize() {
|
---|
43 | cout << "MavPlanner GuiGcs MissionInitialize" << endl;
|
---|
44 | outputSocket->SendMessage("MavPlanner GuiGcs MissionInitialize");
|
---|
45 | }
|
---|
46 |
|
---|
47 | void GuiGcs::MissionStart() {
|
---|
48 | cout << "MavPlanner GuiGcs MissionStart" << endl;
|
---|
49 | outputSocket->SendMessage("MavPlanner GuiGcs MissionStart");
|
---|
50 | }
|
---|
51 |
|
---|
52 | void GuiGcs::MissionStop() {
|
---|
53 | cout << "MavPlanner GuiGcs MissionStop" << endl;
|
---|
54 | outputSocket->SendMessage("MavPlanner GuiGcs MissionStop");
|
---|
55 | }
|
---|
56 |
|
---|
57 | void GuiGcs::MissionKill() {
|
---|
58 | cout << "MavPlanner GuiGcs MissionKill" << endl;
|
---|
59 | outputSocket->SendMessage("MavPlanner GuiGcs MissionKill");
|
---|
60 | }
|
---|
61 |
|
---|
62 | void GuiGcs::WptSend() {
|
---|
63 | cout << "MavPlanner GuiGcs WptSend" << endl;
|
---|
64 | }
|
---|
65 |
|
---|
66 | void GuiGcs::WptClear() {
|
---|
67 | cout << "MavPlanner GuiGcs WptClear" << endl;
|
---|
68 | }
|
---|
69 |
|
---|
70 | void GuiGcs::WptLoopSend() {
|
---|
71 | cout << "MavPlanner GuiGcs WptLoopSend" << endl;
|
---|
72 | }
|
---|