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

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

singleton manager

File size: 1.1 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 Socket;
28}
29}
30
31class Forwarder : public flair::core::Thread {
32public:
33
34 Forwarder(std::string name,
35 std::string &inputAddress, int inputPort,
36 std::string &outputAddress, int outputPort);
37 ~Forwarder();
38
39private:
40 // reimplement the run of the Thread class
41 void Run();
42
43 flair::core::Socket *inputSocket;
44 std::string inputAddress;
45 int inputPort;
46 char *inputBuffer;
47 const int inputBufferSize = 200;
48
49 flair::core::Socket *outputSocket;
50 std::string outputAddress;
51 int outputPort;
52
53};
54
55#endif // MAVPLANNER_FORWARDER_H
Note: See TracBrowser for help on using the repository browser.