Fawkes API
Fawkes Development Version
lookup_thread.h
1
/***************************************************************************
2
* lookup_thread.h - Get skill exec times from db lookups
3
*
4
* Created: Tue 24 Mar 2020 09:40:18 CET 09:40
5
* Copyright 2020 Tarik Viehmann <viehmann@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
#pragma once
22
23
#include "lookup_estimator.h"
24
25
#include <aspect/configurable.h>
26
#include <aspect/logging.h>
27
#include <core/threading/thread.h>
28
#include <execution_time_estimator/aspect/execution_time_estimator.h>
29
#include <plugins/mongodb/aspect/mongodb.h>
30
31
class
ExecutionTimeEstimatorLookupEstimatorThread
:
public
fawkes::Thread
,
32
public
fawkes::LoggingAspect
,
33
public
fawkes::ConfigurableAspect
,
34
public
fawkes::MongoDBAspect
,
35
public
fawkes::ExecutionTimeEstimatorsAspect
36
{
37
public
:
38
ExecutionTimeEstimatorLookupEstimatorThread
();
39
void
init
();
40
void
finalize
();
41
42
private
:
43
constexpr
static
char
cfg_prefix_[] =
"plugins/execution-time-estimator/lookup/"
;
44
std::shared_ptr<fawkes::LookupEstimator> estimator_;
45
};
fawkes::MongoDBAspect
Thread aspect to access MongoDB.
Definition:
mongodb.h:39
fawkes::ExecutionTimeEstimatorsAspect
An aspect to give access to the execution time estimator manager.
Definition:
execution_time_estimator.h:44
ExecutionTimeEstimatorLookupEstimatorThread::finalize
void finalize()
Unregister the estimator.
Definition:
lookup_thread.cpp:47
ExecutionTimeEstimatorLookupEstimatorThread::init
void init()
Register the estimator.
Definition:
lookup_thread.cpp:37
fawkes::LoggingAspect
Thread aspect to log output.
Definition:
logging.h:33
ExecutionTimeEstimatorLookupEstimatorThread::ExecutionTimeEstimatorLookupEstimatorThread
ExecutionTimeEstimatorLookupEstimatorThread()
Constructor.
Definition:
lookup_thread.cpp:30
fawkes::Thread
Thread class encapsulation of pthreads.
Definition:
thread.h:46
fawkes::ConfigurableAspect
Thread aspect to access configuration data.
Definition:
configurable.h:33
ExecutionTimeEstimatorLookupEstimatorThread
Get estimates for skill execution times from samples of a mongodb database.
Definition:
lookup_thread.h:36
src
plugins
execution-time-estimator-lookup
lookup_thread.h
Generated by
1.8.20