From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- .../src/XorayaPluginExecutor/XorayaConnector.h | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 Master/Masterarbeit/src/XorayaPluginExecutor/XorayaConnector.h (limited to 'Master/Masterarbeit/src/XorayaPluginExecutor/XorayaConnector.h') diff --git a/Master/Masterarbeit/src/XorayaPluginExecutor/XorayaConnector.h b/Master/Masterarbeit/src/XorayaPluginExecutor/XorayaConnector.h new file mode 100644 index 0000000..b0ac99f --- /dev/null +++ b/Master/Masterarbeit/src/XorayaPluginExecutor/XorayaConnector.h @@ -0,0 +1,51 @@ +/*! + * \file XorayaConnector.h + * \author S. Eisenhauer + * \date 27.10.2011 + * \brief Header of CXorayaConnector + */ +#ifndef XORAYACONNECTOR_H_ +#define XORAYACONNECTOR_H_ + +#include +#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_ */ -- cgit v1.2.3