| Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
#include <StartupBehavior.h>
Inheritance diagram for StartupBehavior:

This is done by assigning an instance of StartupBehavior to the global startupBehavior variable. Note that there's nothing special about the type of this class, it's just another BehaviorBase - startupBehavior could be any behavior. If you want some other behavior to run automatically at startup, simply remove StartupBehavior from the project and assign an instance of your own class to startupBehavior instead.
By default, this behavior is similar in idea to the init process in unix/linux.
Definition at line 24 of file StartupBehavior.h.
Inherited | |
| virtual void | DoStart () |
| By default, merely adds to the reference counter (through AddReference()) you should still call this from your overriding methods. | |
| virtual void | DoStop () |
By default, subtracts from the reference counter, and deletes if zero you should still call this when you override this call this at the end of your DoStop(), not beginning (it might delete this ). | |
| virtual void | processEvent (const EventBase &) |
| virtual std::string | getName () const |
| Identifies the behavior in menus and such. | |
| std::string | getClassDescription () |
| Gives a short description of what this class of behaviors does... you should override this (but don't have to). | |
Public Member Functions | |
| StartupBehavior () | |
| Constructor. | |
| virtual | ~StartupBehavior () |
| Destructor. | |
Protected Member Functions | |
| virtual ControlBase * | SetupMenus () |
| Initializes the Controller menu structure - calls each of the other Setup functions in turn. | |
| virtual ControlBase * | SetupModeSwitch () |
| sets up Mode Switch menu | |
| virtual ControlBase * | SetupBackgroundBehaviors () |
| sets up Background Behaviors menu | |
| virtual ControlBase * | SetupTekkotsuMon () |
| sets up TekkotsuMon menu | |
| virtual ControlBase * | SetupStatusReports () |
| sets up Status Reports menu | |
| virtual ControlBase * | SetupFileAccess () |
| sets up File Access menu | |
| virtual ControlBase * | SetupWalkEdit () |
| sets up Walk Editing menus (contributed by PGSS 2003 team project - see StartupBehavior_SetupWalkEdit.cc ) | |
| virtual void | startSubMenu () |
| future calls to addItem() will be placed under the most recently added item | |
| virtual void | addItem (ControlBase *control) |
| inserts a control at the end of the menu | |
| virtual ControlBase * | endSubMenu () |
| closes out a submenu so that future calls to addItem() will be added to the enclosing menu, returns the menu being closed out | |
Protected Attributes | |
| std::vector< BehaviorBase * > | spawned |
| Behaviors spawned from DoStart, so they can automatically be stopped on DoStop. | |
| std::stack< ControlBase * > | setup |
| only used during setup - easier than passing it around all the functions | |
| MotionManager::MC_ID | stop_id |
| the main EmergencyStopMC | |
| MotionManager::MC_ID | pid_id |
| used to fade in the PIDs up to full strength (from initial zero) This is so the joints don't jerk on startup. | |
|
|
Constructor.
Definition at line 26 of file StartupBehavior.cc. References ReferenceCounter::AddReference(). |
Here is the call graph for this function:

|
|
Destructor.
Definition at line 34 of file StartupBehavior.cc. |
|
|
inserts a control at the end of the menu
Definition at line 147 of file StartupBehavior.cc. References setup. |
|
|
By default, merely adds to the reference counter (through AddReference()) you should still call this from your overriding methods.
Reimplemented from BehaviorBase. Definition at line 36 of file StartupBehavior.cc. References BatteryCheckControl::activate(), MotionManager::addMotion(), EventRouter::addTimer(), Controller::console_callback(), BatteryCheckControl::deactivate(), Controller::DoStart(), BehaviorBase::DoStart(), erouter, ERS210Info::FrameTime, MotionManager::invalid_MC_ID, MotionManager::kEmergencyPriority, motman, ERS210Info::NumFrames, pid_id, SoundManager::PlayFile(), Controller::setEStopID(), Wireless::setReceiver(), Controller::setRoot(), SetupMenus(), sndman, sout, spawned, stop_id, and wireless. |
Here is the call graph for this function:

|
|
By default, subtracts from the reference counter, and deletes if zero you should still call this when you override this call this at the end of your DoStop(), not beginning (it might
Reimplemented from BehaviorBase. Definition at line 76 of file StartupBehavior.cc. References BehaviorBase::DoStop(), motman, MotionManager::removeMotion(), spawned, and stop_id. |
Here is the call graph for this function:

|
|
closes out a submenu so that future calls to addItem() will be added to the enclosing menu, returns the menu being closed out
Definition at line 152 of file StartupBehavior.cc. References setup. |
|
|
Gives a short description of what this class of behaviors does... you should override this (but don't have to).
Reimplemented from BehaviorBase. Definition at line 36 of file StartupBehavior.h. |
|
|
Identifies the behavior in menus and such.
Implements BehaviorBase. Definition at line 35 of file StartupBehavior.h. |
|
|
Uses a few timer events at the beginning to fade in the PID values, and closes the mouth too Reimplemented from BehaviorBase. Definition at line 84 of file StartupBehavior.cc. References erouter, WorldState::ERS210Mask, get_time(), MotionManager::invalid_MC_ID, ERS210Info::MaxRange, motman, ERS210Info::outputRanges, pid_id, MotionManager::removeMotion(), EventRouter::removeTimer(), WorldState::robotDesign, state, and stop_id. |
Here is the call graph for this function:

|
|
sets up Background Behaviors menu
Definition at line 19 of file StartupBehavior_SetupBackgroundBehaviors.cc. References addItem(), endSubMenu(), WorldState::ERS220Mask, WorldState::robotDesign, startSubMenu(), and state. |
Here is the call graph for this function:

|
|
sets up File Access menu
Definition at line 12 of file StartupBehavior_SetupFileAccess.cc. References addItem(), endSubMenu(), startSubMenu(), and stop_id. |
Here is the call graph for this function:

|
|
Initializes the Controller menu structure - calls each of the other Setup functions in turn. Also adds Shutdown and Help items at the end Definition at line 112 of file StartupBehavior.cc. References addItem(), endSubMenu(), setup, SetupBackgroundBehaviors(), SetupFileAccess(), SetupModeSwitch(), SetupStatusReports(), SetupTekkotsuMon(), SetupWalkEdit(), and startSubMenu(). |
Here is the call graph for this function:

|
|
sets up Mode Switch menu
Definition at line 18 of file StartupBehavior_SetupModeSwitch.cc. References addItem(), endSubMenu(), and startSubMenu(). |
Here is the call graph for this function:

|
|
sets up Status Reports menu
Definition at line 11 of file StartupBehavior_SetupStatusReports.cc. References addItem(), FreeMemReportControl::DoStart(), endSubMenu(), and startSubMenu(). |
Here is the call graph for this function:

|
|
sets up TekkotsuMon menu
Definition at line 14 of file StartupBehavior_SetupTekkotsuMon.cc. References addItem(), endSubMenu(), startSubMenu(), and stop_id. |
Here is the call graph for this function:

|
|
sets up Walk Editing menus (contributed by PGSS 2003 team project - see StartupBehavior_SetupWalkEdit.cc )
Definition at line 29 of file StartupBehavior_SetupWalkEdit.cc. References addItem(), endSubMenu(), WalkMC::getSlowMo(), WalkControllerBehavior::getWalkMC(), WalkMC::getWP(), and startSubMenu(). |
Here is the call graph for this function:

|
|
future calls to addItem() will be placed under the most recently added item
Definition at line 142 of file StartupBehavior.cc. References setup. |
|
|
used to fade in the PIDs up to full strength (from initial zero) This is so the joints don't jerk on startup.
Definition at line 57 of file StartupBehavior.h. |
|
|
only used during setup - easier than passing it around all the functions
Definition at line 55 of file StartupBehavior.h. |
|
|
Behaviors spawned from DoStart, so they can automatically be stopped on DoStop.
Definition at line 54 of file StartupBehavior.h. |
|
|
the main EmergencyStopMC
Definition at line 56 of file StartupBehavior.h. |
|
Tekkotsu v1.5 |
Generated Fri Oct 10 15:57:51 2003 by Doxygen 1.3.4 |