worldmodel_plugin.cpp

00001 
00002 /***************************************************************************
00003  *  worldmodel_plugin.cpp - Fawkes WorldModel Plugin
00004  *
00005  *  Created: Fri Jun 29 11:47:53 2007 (on flight to RoboCup 2007, Atlanta)
00006  *  Copyright  2006  Tim Niemueller [www.niemueller.de]
00007  *
00008  ****************************************************************************/
00009 
00010 /*  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version.
00014  *
00015  *  This program is distributed in the hope that it will be useful,
00016  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  *  GNU Library General Public License for more details.
00019  *
00020  *  Read the full text in the LICENSE.GPL file in the doc directory.
00021  */
00022 
00023 #include <plugins/worldmodel/worldmodel_plugin.h>
00024 #include <plugins/worldmodel/wm_thread.h>
00025 #include <plugins/worldmodel/net_thread.h>
00026 
00027 using namespace fawkes;
00028 
00029 /** @class WorldModelPlugin plugins/worldmodel/worldmodel_plugin.h
00030  * Simple worldmodel plugin.
00031  * This plugin facilitates the Fawkes worldmodel, which agglomerates data produced
00032  * by low level Fawkes plugins and provides a consistent view of the world to
00033  * modules on higher levels.
00034  *
00035  * @author Tim Niemueller
00036  */
00037 
00038 /** Constructor.
00039  * @param config Fawkes configuration
00040  */
00041 WorldModelPlugin::WorldModelPlugin(Configuration *config)
00042   : Plugin(config)
00043 {
00044   WorldModelNetworkThread* net_thread = new WorldModelNetworkThread();
00045   thread_list.push_back(new WorldModelThread(net_thread));
00046   thread_list.push_back(net_thread);
00047 }
00048 
00049 PLUGIN_DESCRIPTION("Aggregates data to provide central world model")
00050 EXPORT_PLUGIN(WorldModelPlugin)