blob: b0ac99f6f1ca6ccfad8e7aed7a068e18ec2c6543 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/*!
* \file XorayaConnector.h
* \author S. Eisenhauer
* \date 27.10.2011
* \brief Header of CXorayaConnector
*/
#ifndef XORAYACONNECTOR_H_
#define XORAYACONNECTOR_H_
#include <boost/asio.hpp>
#include "TcpServer.h"
class CPluginExecutor;
extern boost::asio::io_service g_xIoService;
/// network adaptor on target
class CXorayaConnector
{
public:
/// constructor
/// \param[in] pxExecutor pointer to the main application
/// \param[in] xTcpServer reference to the tcp server object to use
CXorayaConnector(CPluginExecutor* pxExecutor, CTcpServer& xTcpServer);
/*!
* \brief copy constructor
* \param[in] other reference to other object to construct copy from
*/
CXorayaConnector(const CXorayaConnector& other);
/// destructor
virtual ~CXorayaConnector(void);
/// function of the network task. Async IO runs in this thread
void operator()();
/// stop network task
void vStop();
/*!
* \brief upload a logged message to CanEasy
* \param[in] stLogMsg the logged message to upload
*/
void vUploadLogMessage(const tstLogMessage& stLogMsg);
private:
CPluginExecutor* m_pxExecutor;
CTcpServer& m_xTcpServer;
};
#endif /* XORAYACONNECTOR_H_ */
|