22 #ifndef _PLUGINS_OPENPRS_OPENPRS_THREAD_H_
23 #define _PLUGINS_OPENPRS_OPENPRS_THREAD_H_
25 #include <aspect/aspect_provider.h>
26 #include <aspect/blackboard.h>
27 #include <aspect/blocked_timing.h>
28 #include <aspect/clock.h>
29 #include <aspect/configurable.h>
30 #include <aspect/logging.h>
31 #include <core/threading/thread.h>
32 #include <plugins/openprs/aspect/openprs_inifin.h>
33 #include <plugins/openprs/aspect/openprs_manager_inifin.h>
35 #include <boost/asio.hpp>
42 class OpenPRSServerProxy;
43 class OpenPRSMessagePasserProxy;
71 const std::list<fawkes::AspectIniFin *> inifin_list();
73 void check_deadline(boost::asio::deadline_timer &deadline, boost::asio::ip::tcp::socket &socket);
77 std::string cfg_mp_bin_;
78 std::string cfg_mp_host_;
79 unsigned int cfg_mp_port_;
80 std::string cfg_mp_port_s_;
81 bool cfg_mp_use_proxy_;
82 unsigned int cfg_mp_proxy_port_;
84 std::string cfg_server_bin_;
85 std::string cfg_server_host_;
86 unsigned int cfg_server_port_;
87 std::string cfg_server_port_s_;
88 unsigned int cfg_server_proxy_port_;
89 float cfg_server_timeout_;
90 float cfg_kernel_timeout_;
102 boost::asio::io_service io_service_;
103 std::thread io_service_thread_;
104 boost::asio::ip::tcp::socket server_socket_;
105 boost::asio::deadline_timer deadline_;
OpenPRS environment thread.
virtual void loop()
Code to execute in the thread.
OpenPRSThread()
Constructor.
virtual ~OpenPRSThread()
Destructor.
virtual void init()
Initialize the thread.
virtual void finalize()
Finalize the thread.
virtual void run()
Stub to see name in backtrace for easier debugging.
Thread aspect provide a new aspect.
Thread aspect to access to BlackBoard.
Thread aspect to use blocked timing.
Thread aspect that allows to obtain the current time from the clock.
Thread aspect to access configuration data.
Thread aspect to log output.
OpenPRSAspect initializer/finalizer.
OpenPRSManagerAspect initializer/finalizer.
Proxy for the OpenPRS server communication.
Sub-process execution with stdin/stdout/stderr redirection.
Thread class encapsulation of pthreads.
Fawkes library namespace.