Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Modules/MotionControl/MotionControlSelector.h

Go to the documentation of this file.
00001 /**
00002 * @file MotionControlSelector.h
00003 *
00004 * Declaration of class MotionControlSelector
00005 *
00006 * @author Martin Lötzsch
00007 */
00008 
00009 #ifndef __MotionControlSelector_h_
00010 #define __MotionControlSelector_h_
00011 
00012 #include "Tools/Module/ModuleSelector.h"
00013 #include "GT2004MotionControl.h"
00014 #include "DebugMotionControl.h"
00015 
00016 /**
00017 * @class MotionControlSelector
00018 * 
00019 * A module selector for motion control modules
00020 *
00021 * @author Martin Lötzsch
00022 */
00023 class MotionControlSelector : public ModuleSelector, public MotionControlInterfaces
00024 {
00025 public:
00026 /**
00027 * Constructor.
00028 * @param handler The module handler of the process.
00029 * @param interfaces The paramters of the MotionControl module.
00030   */
00031   MotionControlSelector(ModuleHandler &handler, const MotionControlInterfaces& interfaces) 
00032     : ModuleSelector(SolutionRequest::motionControl),
00033     MotionControlInterfaces(interfaces),
00034     moduleHandler(handler)
00035   {
00036     handler.setModuleSelector(SolutionRequest::motionControl,this);
00037   }
00038   
00039   /** 
00040   * Is called on start and when the selected solution changes
00041   * to create a specific solution.
00042   * @param id The id of the solution to create
00043   * @return The created solution or 0
00044   */
00045   Module* createSolution(SolutionRequest::ModuleSolutionID id)
00046   {
00047     switch (id)
00048     {
00049     case SolutionRequest::gt2004MotionControl:
00050       return new GT2004MotionControl(moduleHandler,*this);
00051     case SolutionRequest::debugMotionControl:
00052       return new DebugMotionControl(*this);
00053     default:
00054       return 0;
00055     }
00056   }
00057   
00058   /** 
00059   * A reference to the ModuleHandler of the process, needed to create 
00060   * the submodules of DefaultMotionControl
00061   */
00062   ModuleHandler& moduleHandler;
00063 };  
00064 
00065 #endif //__MotionControlSelector_h_
00066 
00067 /*
00068 * Change log:
00069 *
00070 * $Log: MotionControlSelector.h,v $
00071 * Revision 1.2  2004/07/10 00:13:51  spranger
00072 * renaming for coderelease and preparations for gt2005
00073 *
00074 * Revision 1.1.1.1  2004/05/22 17:20:37  cvsadm
00075 * created new repository GT2004_WM
00076 *
00077 * Revision 1.3  2004/03/08 01:39:03  roefer
00078 * Interfaces should be const
00079 *
00080 * Revision 1.2  2004/01/21 14:31:58  loetzsch
00081 * Module Selectors create only the selected solution.
00082 * When the solution changes, the old solution is erased and the new
00083 * one ist created using createSolution(..)
00084 *
00085 * Revision 1.1  2003/10/06 14:10:13  cvsadm
00086 * Created GT2004 (M.J.)
00087 *
00088 * Revision 1.1.1.1  2003/07/02 09:40:24  cvsadm
00089 * created new repository for the competitions in Padova from the 
00090 * tamara CVS (Tuesday 2:00 pm)
00091 *
00092 * removed unused solutions
00093 *
00094 * Revision 1.2  2002/09/11 00:06:58  loetzsch
00095 * continued change of module/solution mechanisms
00096 *
00097 * Revision 1.1  2002/09/10 15:36:15  cvsadm
00098 * Created new project GT2003 (M.L.)
00099 * - Cleaned up the /Src/DataTypes directory
00100 * - Removed challenge related source code
00101 * - Removed processing of incoming audio data
00102 * - Renamed AcousticMessage to SoundRequest
00103 *
00104 * Revision 1.4  2002/08/30 13:38:00  dueffert
00105 * removed unused includes
00106 *
00107 * Revision 1.3  2002/07/23 13:33:42  loetzsch
00108 * new streaming classes
00109 *
00110 * removed many #include statements
00111 *
00112 * Revision 1.2  2002/05/14 12:39:04  dueffert
00113 * corrected some documentation mistakes
00114 *
00115 * Revision 1.1.1.1  2002/05/10 12:40:15  cvsadm
00116 * Moved GT2002 Project from ute to tamara.
00117 *
00118 * Revision 1.5  2002/03/12 14:13:00  jhoffman
00119 * no message
00120 *
00121 * Revision 1.4  2002/02/12 16:34:49  risler
00122 * finished MofTester
00123 *
00124 * Revision 1.3  2002/02/08 20:00:01  risler
00125 * added DebugMotionControl
00126 *
00127 * Revision 1.2  2002/02/08 17:48:57  risler
00128 * SensorData to MotionControl
00129 *
00130 * Revision 1.1  2002/02/05 03:51:37  loetzsch
00131 * added a few new module selectors
00132 *
00133 */

Generated on Thu Sep 23 19:57:31 2004 for GT2004 by doxygen 1.3.6