source: flair-src/branches/mavlink/tools/Controller/Mavlink/src/GuiGcs.cpp @ 76

Last change on this file since 76 was 71, checked in by Thomas Fuhrmann, 5 years ago

Add class for MavlinkPlanner?

File size: 1.8 KB
Line 
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
27using namespace std;
28using namespace flair::core;
29using namespace flair::gui;
30
31GuiGcs::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
38GuiGcs::~GuiGcs() {
39
40}
41
42void GuiGcs::MissionInitialize() {
43  cout << "MavPlanner GuiGcs MissionInitialize" << endl;
44  outputSocket->SendMessage("MavPlanner GuiGcs MissionInitialize");
45}
46
47void GuiGcs::MissionStart() {
48  cout << "MavPlanner GuiGcs MissionStart" << endl;
49  outputSocket->SendMessage("MavPlanner GuiGcs MissionStart");
50}
51
52void GuiGcs::MissionStop() {
53  cout << "MavPlanner GuiGcs MissionStop" << endl;
54  outputSocket->SendMessage("MavPlanner GuiGcs MissionStop");
55}
56
57void GuiGcs::MissionKill() {
58  cout << "MavPlanner GuiGcs MissionKill" << endl;
59  outputSocket->SendMessage("MavPlanner GuiGcs MissionKill");
60}
61
62void GuiGcs::WptSend() {
63  cout << "MavPlanner GuiGcs WptSend" << endl;
64}
65
66void GuiGcs::WptClear() {
67  cout << "MavPlanner GuiGcs WptClear" << endl;
68}
69
70void GuiGcs::WptLoopSend() {
71  cout << "MavPlanner GuiGcs WptLoopSend" << endl;
72}
Note: See TracBrowser for help on using the repository browser.