Fawkes API  Fawkes Development Version
worldmodel_plugin.cpp
1 
2 /***************************************************************************
3  * worldmodel_plugin.cpp - Fawkes WorldModel Plugin
4  *
5  * Created: Fri Jun 29 11:47:53 2007 (on flight to RoboCup 2007, Atlanta)
6  * Copyright 2006 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 #include <plugins/worldmodel/worldmodel_plugin.h>
24 #include <plugins/worldmodel/wm_thread.h>
25 #include <plugins/worldmodel/net_thread.h>
26 
27 using namespace fawkes;
28 
29 /** @class WorldModelPlugin plugins/worldmodel/worldmodel_plugin.h
30  * Simple worldmodel plugin.
31  * This plugin facilitates the Fawkes worldmodel, which agglomerates data produced
32  * by low level Fawkes plugins and provides a consistent view of the world to
33  * modules on higher levels.
34  *
35  * @author Tim Niemueller
36  */
37 
38 /** Constructor.
39  * @param config Fawkes configuration
40  */
42  : Plugin(config)
43 {
45  thread_list.push_back(new WorldModelThread(net_thread));
46  thread_list.push_back(net_thread);
47 }
48 
49 PLUGIN_DESCRIPTION("Aggregates data to provide central world model")
50 EXPORT_PLUGIN(WorldModelPlugin)
Plugin interface class.
Definition: plugin.h:33
Simple worldmodel plugin.
Fawkes library namespace.
WorldModelPlugin(fawkes::Configuration *config)
Constructor.
Main thread of worldmodel plugin.
Definition: wm_thread.h:43
ThreadList thread_list
Thread list member.
Definition: plugin.h:53
void push_back(Thread *thread)
Add thread to the end.
Network thread of worldmodel plugin.
Definition: net_thread.h:45
Interface for configuration handling.
Definition: config.h:63