Fawkes API
Fawkes Development Version
robot_memory_thread.h
1
2
/***************************************************************************
3
* robot_memory_thread.h - Robot Memory thread
4
*
5
* Created: Sun May 01 13:39:52 2016
6
* Copyright 2016 Frederik Zwilling
7
* 2017 Tim Niemueller [www.niemueller.de]
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_ROBOT_MEMORY_THREAD_H_
24
#define _PLUGINS_ROBOT_MEMORY_THREAD_H_
25
26
#include "aspect/robot_memory_inifin.h"
27
#include "computables/blackboard_computable.h"
28
#include "computables/transform_computable.h"
29
#include "robot_memory.h"
30
31
#include <aspect/aspect_provider.h>
32
#include <aspect/blackboard.h>
33
#include <aspect/blocked_timing.h>
34
#include <aspect/clock.h>
35
#include <aspect/configurable.h>
36
#include <aspect/logging.h>
37
#include <aspect/tf.h>
38
#include <core/threading/thread.h>
39
#include <plugins/mongodb/aspect/mongodb.h>
40
41
#include <string>
42
43
namespace
fawkes
{
44
class
Mutex;
45
class
RobotMemoryInterface;
46
class
TimeWait;
47
#ifdef USE_TIMETRACKER
48
class
TimeTracker;
49
#endif
50
}
// namespace fawkes
51
52
class
RobotMemoryThread
:
public
fawkes::Thread
,
53
public
fawkes::LoggingAspect
,
54
public
fawkes::ConfigurableAspect
,
55
public
fawkes::ClockAspect
,
56
public
fawkes::MongoDBAspect
,
57
public
fawkes::BlackBoardAspect
,
58
public
fawkes::TransformAspect
,
59
public
fawkes::AspectProviderAspect
60
{
61
public
:
62
RobotMemoryThread
();
63
virtual
~RobotMemoryThread
();
64
65
virtual
void
init
();
66
virtual
void
loop
();
67
virtual
void
finalize
();
68
69
/** Stub to see name in backtrace for easier debugging. @see Thread::run() */
70
protected
:
71
virtual
void
72
run
()
73
{
74
Thread::run();
75
}
76
77
private
:
78
RobotMemory
* robot_memory;
79
fawkes::RobotMemoryIniFin
robot_memory_inifin_;
80
BlackboardComputable
* blackboard_computable;
81
TransformComputable
* transform_computable;
82
83
fawkes::TimeWait
*timewait_;
84
85
#ifdef USE_TIMETRACKER
86
fawkes::TimeTracker
*tt_;
87
unsigned
int
tt_loopcount_;
88
unsigned
int
ttc_msgproc_;
89
unsigned
int
ttc_rmloop_;
90
#endif
91
};
92
93
#endif
fawkes::MongoDBAspect
Definition:
mongodb.h:43
fawkes::RobotMemoryIniFin
Definition:
robot_memory_inifin.h:36
RobotMemoryThread::~RobotMemoryThread
virtual ~RobotMemoryThread()
Destructor.
Definition:
robot_memory_thread.cpp:55
TransformComputable
Definition:
transform_computable.h:33
RobotMemory
Definition:
robot_memory.h:46
fawkes::AspectProviderAspect
Definition:
aspect_provider.h:41
RobotMemoryThread::RobotMemoryThread
RobotMemoryThread()
Constructor for thread.
Definition:
robot_memory_thread.cpp:48
RobotMemoryThread::run
virtual void run()
Stub to see name in backtrace for easier debugging.
Definition:
robot_memory_thread.h:72
BlackboardComputable
Definition:
blackboard_computable.h:37
RobotMemoryThread::finalize
virtual void finalize()
Finalize the thread.
Definition:
robot_memory_thread.cpp:97
RobotMemoryThread::init
virtual void init()
Initialize the thread.
Definition:
robot_memory_thread.cpp:60
RobotMemoryThread::loop
virtual void loop()
Code to execute in the thread.
Definition:
robot_memory_thread.cpp:110
fawkes::BlackBoardAspect
Definition:
blackboard.h:38
fawkes
fawkes::LoggingAspect
Definition:
logging.h:38
fawkes::TransformAspect
Definition:
tf.h:43
fawkes::TimeTracker
Definition:
tracker.h:42
fawkes::Thread
Definition:
thread.h:45
fawkes::TimeWait
Definition:
wait.h:38
fawkes::ConfigurableAspect
Definition:
configurable.h:38
RobotMemoryThread
Definition:
robot_memory_thread.h:52
fawkes::ClockAspect
Definition:
clock.h:40
src
plugins
robot-memory
robot_memory_thread.h
Generated by
1.8.17