Fawkes API  Fawkes Development Version
control_thread.h
1 
2 /***************************************************************************
3  * control_thread.h - Fawkes ECLiPSe Control Thread
4  *
5  * Created: Wed Jul 15 15:05:57 2009
6  * Copyright 2009 Daniel Beck
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Library General Public License for more details.
19  *
20  * Read the full text in the LICENSE.GPL file in the doc directory.
21  */
22 
23 #ifndef _PLUGINS_ECLIPSE_CLP_CONTROL_THREAD_H_
24 #define _PLUGINS_ECLIPSE_CLP_CONTROL_THREAD_H_
25 
26 #include <aspect/blackboard.h>
27 #include <aspect/blocked_timing.h>
28 #include <aspect/configurable.h>
29 #include <aspect/logging.h>
30 #include <core/threading/thread.h>
31 #include <interfaces/EclipseDebuggerInterface.h>
32 #include <interfaces/ExitSimulationInterface.h>
33 
34 namespace fawkes {
35 class TestInterface;
36 }
37 
38 class EclipseAgentThread;
39 
40 class AgentControlThread : public fawkes::Thread,
45 {
46 public:
47  AgentControlThread(EclipseAgentThread *eclipse_thread);
48  virtual ~AgentControlThread();
49 
50  virtual void init();
51  virtual bool prepare_finalize_user();
52  virtual void finalize();
53  virtual void loop();
54 
55 private:
56  EclipseAgentThread *m_eclipse_thread;
57 
58  fawkes::TestInterface * m_test_iface;
59  fawkes::ExitSimulationInterface * m_exit_iface;
60  fawkes::EclipseDebuggerInterface *m_debug_iface;
61 
62  bool allow_shutdown_;
63  std::string fawkes_path_;
64  std::string simulation_shutdown_script_;
65 };
66 
67 #endif /* PLUGINS_ECLIPSE_CLP_CONTROL_THREAD_H__ */
AgentControlThread::AgentControlThread
AgentControlThread(EclipseAgentThread *eclipse_thread)
Constructor.
Definition: control_thread.cpp:43
fawkes::ExitSimulationInterface
Definition: ExitSimulationInterface.h:37
AgentControlThread::prepare_finalize_user
virtual bool prepare_finalize_user()
Prepare finalization user implementation.
Definition: control_thread.cpp:95
AgentControlThread::finalize
virtual void finalize()
Finalize the thread.
Definition: control_thread.cpp:103
AgentControlThread::~AgentControlThread
virtual ~AgentControlThread()
Destructor.
Definition: control_thread.cpp:51
fawkes::BlockedTimingAspect
Definition: blocked_timing.h:54
EclipseAgentThread
Definition: eclipse_thread.h:40
AgentControlThread::loop
virtual void loop()
Code to execute in the thread.
Definition: control_thread.cpp:114
fawkes::BlackBoardAspect
Definition: blackboard.h:36
fawkes
fawkes::LoggingAspect
Definition: logging.h:36
fawkes::EclipseDebuggerInterface
Definition: EclipseDebuggerInterface.h:37
AgentControlThread
Definition: control_thread.h:39
AgentControlThread::init
virtual void init()
Initialize the thread.
Definition: control_thread.cpp:56
fawkes::Thread
Definition: thread.h:44
fawkes::ConfigurableAspect
Definition: configurable.h:36
fawkes::TestInterface
Definition: TestInterface.h:37