source: flair-src/trunk/tools/Controller/Mavlink/src/Forwarder.h@ 110

Last change on this file since 110 was 88, checked in by Sanahuja Guillaume, 8 years ago

m

File size: 1.2 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: Forwarder.h
7//
8// authors: Thomas Fuhrmann
9// Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11// version: $Id: $
12//
13// purpose: Forward input data to output data, using sockets
14//
15//
16/*********************************************************************/
17
18#ifndef MAVPLANNER_FORWARDER_H
19#define MAVPLANNER_FORWARDER_H
20
21#include <string>
22
23#include <Thread.h>
24
25namespace flair {
26namespace core {
27 class FrameworkManager;
28 class Socket;
29}
30}
31
32class Forwarder : public flair::core::Thread {
33public:
34
35 Forwarder(const flair::core::FrameworkManager *parent, std::string name,
36 std::string &inputAddress, int inputPort,
37 std::string &outputAddress, int outputPort);
38 ~Forwarder();
39
40private:
41 // reimplement the run of the Thread class
42 void Run();
43
44 flair::core::Socket *inputSocket;
45 std::string inputAddress;
46 int inputPort;
47 char *inputBuffer;
48 const int inputBufferSize = 200;
49
50 flair::core::Socket *outputSocket;
51 std::string outputAddress;
52 int outputPort;
53
54};
55
56#endif // MAVPLANNER_FORWARDER_H
Note: See TracBrowser for help on using the repository browser.