Homepage Demos Overview Downloads Tutorials Reference
Credits

ViewWMVarsBehavior.h

Go to the documentation of this file.
00001 //-*-c++-*-
00002 #ifndef INCLUDED_ViewWMVarsBehavior_h_
00003 #define INCLUDED_ViewWMVarsBehavior_h_
00004 
00005 #include "Behaviors/BehaviorBase.h"
00006 #include "Behaviors/Controller.h"
00007 #include "Shared/Config.h"
00008 #include <stdio.h>
00009 
00010 //! simply launches the Watchable Memory GUI
00011 class ViewWMVarsBehavior : public BehaviorBase {
00012 public:
00013   //! constructor
00014   ViewWMVarsBehavior() : BehaviorBase() {}
00015 
00016   virtual void DoStart() {
00017     BehaviorBase::DoStart();
00018     // Open the WalkGUI on the desktop
00019     Controller::loadGUI("org.tekkotsu.mon.WatchableMemory","WatchableMemory",config->main.wmmonitor_port);
00020   }
00021 
00022   virtual void DoStop() {
00023     // Close the GUI
00024     Controller::closeGUI("WatchableMemory");
00025     BehaviorBase::DoStop();
00026   }
00027 
00028   virtual std::string getName() const { return "View WMVars"; }
00029   static std::string getClassDescription() {
00030     char tmp[20];
00031     sprintf(tmp,"%d",config->main.wmmonitor_port);
00032     return std::string("Brings up the WatchableMemory GUI on port ")+tmp;
00033   }
00034 };
00035 
00036 /*! @file
00037  * @brief Describes ViewWMVarsBehavior, simply launches the Watchable Memory GUI
00038  * @author ejt (Creator)
00039  * 
00040  * $Author: ejt $
00041  * $Name: tekkotsu-2_0 $
00042  * $Revision: 1.1 $
00043  * $State: Rel $
00044  * $Date: 2003/10/10 00:47:52 $
00045  */
00046 
00047 #endif 

Tekkotsu v2.0
Generated Wed Jan 21 03:20:30 2004 by Doxygen 1.3.4