#include <ModuleSelector.h>
Inheritance diagram for ModuleSelector:


Public Member Functions | |
| ModuleSelector (SolutionRequest::ModuleID id) | |
| Constructor. | |
| ~ModuleSelector () | |
| Destructor. | |
| virtual Module * | createSolution (SolutionRequest::ModuleSolutionID id)=0 |
| Is called on start and when the selected solution changes to create a specific solution. | |
| void | init () |
| Creates the default solution. | |
| virtual void | selectSolution (SolutionRequest::ModuleSolutionID id) |
| Selects a module. | |
| SolutionRequest::ModuleSolutionID | getSelectedSolution () const |
| Returns the index of the selected solution. | |
| virtual void | execute () |
| Executes the selected module. | |
| virtual bool | handleMessage (InMessage &message) |
| Called from a MessageQueue to distribute messages. | |
Public Attributes | |
| unsigned int | frameCounter |
| RunTime. | |
| double | averageRunTime |
| RunTime. | |
| unsigned long | maxRunTime |
| RunTime. | |
| unsigned long | minRunTime |
| RunTime. | |
Protected Attributes | |
| SolutionRequest::ModuleSolutionID | selectedSolutionID |
| The id of the selected solution. | |
| SolutionRequest::ModuleID | moduleID |
| The id of the module, needed only for error messages. | |
| Module * | selectedSolution |
| The selected solution. | |
Module selectors allow to switch between different solutions for a modules.
Martin Lötzsch
Definition at line 25 of file ModuleSelector.h.
|
|
Constructor.
Definition at line 14 of file ModuleSelector.cpp. References SolutionRequest::getDefaultSolution(), and selectedSolutionID. |
Here is the call graph for this function:

|
|
Destructor.
Definition at line 21 of file ModuleSelector.cpp. References selectedSolution. |
|
|
Is called on start and when the selected solution changes to create a specific solution.
Implemented in BallLocatorSelector, BehaviorControlSelector, CollisionDetectorSelector, ColorTableModSelector, GetupEngineSelector, GTCamSelector, HeadControlSelector, ImageProcessorSelector, LEDControlSelector, MotionControlSelector, ObstaclesLocatorSelector, PlayersLocatorSelector, RobotStateDetectorSelector, SelfLocatorSelector, SensorBehaviorControlSelector, SensorDataProcessorSelector, SoundControlSelector, TeamBallLocatorSelector, and WalkingEngineSelector. Referenced by init(). |
|
|
Creates the default solution. This can not be done in the constructor, as the derived selector class is not created yet. Definition at line 71 of file ModuleSelector.cpp. References createSolution(), idText, moduleID, OUTPUT, selectedSolution, and selectedSolutionID. Referenced by selectSolution(), and ModuleHandler::setModuleSelector(). |
Here is the call graph for this function:

|
|
Selects a module.
Definition at line 26 of file ModuleSelector.cpp. References ASSERT, init(), selectedSolution, selectedSolutionID, and solutionRequestMaxNumOfSolutions. Referenced by ModuleHandler::selectSolution(). |
Here is the call graph for this function:

|
|
Returns the index of the selected solution.
Definition at line 40 of file ModuleSelector.cpp. References selectedSolutionID. Referenced by ModuleHandler::getSelectedSolution(), and ModuleHandler::selectSolution(). |
|
|
Executes the selected module.
Definition at line 45 of file ModuleSelector.cpp. References averageRunTime, Module::execute(), frameCounter, SystemCall::getCurrentSystemTime(), SystemCall::getTimeSince(), maxRunTime, minRunTime, and selectedSolution. Referenced by Motion::main(), and Cognition::main(). |
Here is the call graph for this function:

|
|
Called from a MessageQueue to distribute messages. Use message.getMessageID to decide if the message is relavant for the MesssageHandler derivate.
Implements MessageHandler. Reimplemented in WalkingEngineSelector. Definition at line 63 of file ModuleSelector.cpp. References Module::handleMessage(), and selectedSolution. Referenced by ModuleHandler::handleMessage(), Motion::handleMessage(), and Cognition::handleMessage(). |
Here is the call graph for this function:

|
|
The id of the selected solution.
Definition at line 29 of file ModuleSelector.h. Referenced by getSelectedSolution(), init(), ModuleSelector(), and selectSolution(). |
|
|
RunTime.
Definition at line 78 of file ModuleSelector.h. Referenced by execute(). |
|
|
RunTime.
Definition at line 80 of file ModuleSelector.h. Referenced by execute(). |
|
|
RunTime.
Definition at line 82 of file ModuleSelector.h. Referenced by execute(). |
|
|
RunTime.
Definition at line 84 of file ModuleSelector.h. Referenced by execute(). |
|
|
The id of the module, needed only for error messages.
Definition at line 90 of file ModuleSelector.h. Referenced by init(). |
|
|
The selected solution.
Definition at line 93 of file ModuleSelector.h. Referenced by execute(), handleMessage(), init(), selectSolution(), and ~ModuleSelector(). |
1.3.6