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 <core/threading/thread.h>
27 #include <aspect/blocked_timing.h>
28 #include <aspect/blackboard.h>
29 #include <aspect/logging.h>
30 #include <interfaces/EclipseDebuggerInterface.h>
31 
32 namespace fawkes {
33  class TestInterface;
34 }
35 
36 class EclipseAgentThread;
37 
39 : public fawkes::Thread,
43 {
44  public:
45  AgentControlThread( EclipseAgentThread* eclipse_thread );
46  virtual ~AgentControlThread();
47 
48  virtual void init();
49  virtual bool prepare_finalize_user();
50  virtual void finalize();
51  virtual void loop();
52 
53  private:
54  EclipseAgentThread* m_eclipse_thread;
55 
56  fawkes::TestInterface* m_test_iface;
57  fawkes::EclipseDebuggerInterface* m_debug_iface;
58 };
59 
60 #endif /* __PLUGINS_ECLIPSE_CLP_CONTROL_THREAD_H_ */
61 
virtual void loop()
Code to execute in the thread.
Thread aspect to access to BlackBoard.
Definition: blackboard.h:34
Fawkes library namespace.
virtual ~AgentControlThread()
Destructor.
AgentControlThread(EclipseAgentThread *eclipse_thread)
Constructor.
virtual bool prepare_finalize_user()
Prepare finalization user implementation.
Thread class encapsulation of pthreads.
Definition: thread.h:42
virtual void finalize()
Finalize the thread.
Thread aspect to use blocked timing.
EclipseDebuggerInterface Fawkes BlackBoard Interface.
Thread aspect to log output.
Definition: logging.h:35
virtual void init()
Initialize the thread.
This thread creates an ECLiPSe context in which the ECLiPSe interpreter and the program are loaded...
This thread controls the agent thread by sending signals.
TestInterface Fawkes BlackBoard Interface.
Definition: TestInterface.h:33