Fawkes API
Fawkes Development Version
exec_thread.h
1
/***************************************************************************
2
* exec_thread.h - Simulate skill execution
3
*
4
* Created: Mon 06 May 2019 08:53:11 CEST 08:53
5
* Copyright 2019 Till Hofmann <hofmann@kbsg.rwth-aachen.de>
6
****************************************************************************/
7
8
/* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2 of the License, or
11
* (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU Library General Public License for more details.
17
*
18
* Read the full text in the LICENSE.GPL file in the doc directory.
19
*/
20
21
#ifndef _PLUGINS_SKILLER_SIMULATOR_EXEC_THREAD_H_
22
#define _PLUGINS_SKILLER_SIMULATOR_EXEC_THREAD_H_
23
24
#include <aspect/blackboard.h>
25
#include <aspect/blocked_timing.h>
26
#include <aspect/clock.h>
27
#include <aspect/configurable.h>
28
#include <aspect/logging.h>
29
#include <core/threading/thread.h>
30
#include <interfaces/SkillerInterface.h>
31
#include <plugins/skiller/skiller_feature.h>
32
33
class
SkillerSimulatorExecutionThread
:
public
fawkes::Thread
,
34
public
fawkes::BlockedTimingAspect
,
35
public
fawkes::LoggingAspect
,
36
public
fawkes::BlackBoardAspect
,
37
public
fawkes::ConfigurableAspect
38
{
39
public
:
40
SkillerSimulatorExecutionThread
();
41
virtual
void
init
();
42
virtual
void
loop
();
43
virtual
void
finalize
();
44
45
protected
:
46
/** Stub to see name in backtrace for easier debugging. @see Thread::run() */
47
virtual
void
48
run
()
49
{
50
Thread::run();
51
}
52
53
private
:
54
fawkes::SkillerInterface
*skiller_if_;
55
double
skill_runtime_;
56
fawkes::Time
skill_starttime_;
57
};
58
59
#endif
/* !_PLUGINS_SKILLER_SIMULATOR_EXEC_THREAD_H_ */
SkillerSimulatorExecutionThread::loop
virtual void loop()
Code to execute in the thread.
Definition:
exec_thread.cpp:50
SkillerSimulatorExecutionThread::run
virtual void run()
Stub to see name in backtrace for easier debugging.
Definition:
exec_thread.h:53
SkillerSimulatorExecutionThread::SkillerSimulatorExecutionThread
SkillerSimulatorExecutionThread()
Constructor.
Definition:
exec_thread.cpp:35
fawkes::BlockedTimingAspect
Definition:
blocked_timing.h:56
SkillerSimulatorExecutionThread
Definition:
exec_thread.h:33
fawkes::BlackBoardAspect
Definition:
blackboard.h:38
fawkes::LoggingAspect
Definition:
logging.h:38
fawkes::SkillerInterface
Definition:
SkillerInterface.h:39
fawkes::Time
Definition:
time.h:98
SkillerSimulatorExecutionThread::finalize
virtual void finalize()
Finalize the thread.
Definition:
exec_thread.cpp:163
fawkes::Thread
Definition:
thread.h:45
fawkes::ConfigurableAspect
Definition:
configurable.h:38
SkillerSimulatorExecutionThread::init
virtual void init()
Initialize the thread.
Definition:
exec_thread.cpp:42
src
plugins
skiller-simulator
exec_thread.h
Generated by
1.8.17