Fawkes API
Fawkes Development Version
thread.h
1
2
/***************************************************************************
3
* wm_thread.h - Fawkes TimeTrackerMainLoop Plugin Thread
4
*
5
* Created: Fri Jun 29 11:54:58 2007 (on flight to RoboCup 2007, Atlanta)
6
* Copyright 2006-2007 Tim Niemueller [www.niemueller.de]
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_TTMAINLOOP_THREAD_H_
24
#define _PLUGINS_TTMAINLOOP_THREAD_H_
25
26
#include <aspect/blocked_timing.h>
27
#include <aspect/clock.h>
28
#include <aspect/configurable.h>
29
#include <aspect/logging.h>
30
#include <aspect/mainloop.h>
31
#include <core/threading/thread.h>
32
33
namespace
fawkes
{
34
class
Time;
35
class
TimeTracker;
36
}
// namespace fawkes
37
38
class
TimeTrackerMainLoopThread
:
public
fawkes::Thread
,
39
public
fawkes::LoggingAspect
,
40
public
fawkes::ClockAspect
,
41
public
fawkes::ConfigurableAspect
,
42
public
fawkes::MainLoopAspect
43
{
44
public
:
45
TimeTrackerMainLoopThread
();
46
virtual
~TimeTrackerMainLoopThread
();
47
48
virtual
void
init
();
49
virtual
void
loop
();
50
virtual
void
finalize
();
51
52
/** Stub to see name in backtrace for easier debugging. @see Thread::run() */
53
protected
:
54
virtual
void
55
run
()
56
{
57
Thread::run();
58
}
59
60
private
:
61
float
output_interval_;
62
fawkes::Time
*last_outp_time_;
63
fawkes::Time
*now_;
64
65
fawkes::Time
*loop_start_;
66
fawkes::Time
*loop_end_;
67
68
fawkes::TimeTracker
*tt_;
69
unsigned
int
tt_loopcount_;
70
unsigned
int
ttc_pre_loop_;
71
unsigned
int
ttc_sensor_acquire_;
72
unsigned
int
ttc_sensor_prepare_;
73
unsigned
int
ttc_sensor_process_;
74
unsigned
int
ttc_worldstate_;
75
unsigned
int
ttc_think_;
76
unsigned
int
ttc_skill_;
77
unsigned
int
ttc_act_;
78
unsigned
int
ttc_post_loop_;
79
unsigned
int
ttc_netproc_;
80
unsigned
int
ttc_full_loop_;
81
unsigned
int
ttc_real_loop_;
82
};
83
84
#endif
fawkes::MainLoopAspect
Definition:
mainloop.h:38
TimeTrackerMainLoopThread::init
virtual void init()
Initialize the thread.
Definition:
thread.cpp:47
fawkes
fawkes::LoggingAspect
Definition:
logging.h:36
TimeTrackerMainLoopThread::~TimeTrackerMainLoopThread
virtual ~TimeTrackerMainLoopThread()
Destructor.
Definition:
thread.cpp:42
TimeTrackerMainLoopThread::TimeTrackerMainLoopThread
TimeTrackerMainLoopThread()
Constructor.
Definition:
thread.cpp:36
TimeTrackerMainLoopThread
Definition:
thread.h:37
fawkes::Time
Definition:
time.h:96
fawkes::TimeTracker
Definition:
tracker.h:40
fawkes::Thread
Definition:
thread.h:44
TimeTrackerMainLoopThread::run
virtual void run()
Stub to see name in backtrace for easier debugging.
Definition:
thread.h:54
fawkes::ConfigurableAspect
Definition:
configurable.h:36
TimeTrackerMainLoopThread::loop
virtual void loop()
Code to execute in the thread.
Definition:
thread.cpp:101
fawkes::ClockAspect
Definition:
clock.h:38
TimeTrackerMainLoopThread::finalize
virtual void finalize()
Finalize the thread.
Definition:
thread.cpp:91
src
plugins
ttmainloop
thread.h
Generated by
1.8.16