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, which should connect to the already-running WMMonitorBehavior
00011 class ViewWMVarsBehavior : public BehaviorBase {
00012 public:
00013   //! constructor
00014   ViewWMVarsBehavior() : BehaviorBase("ViewWMVarsBehavior") {}
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   static std::string getClassDescription() {
00029     char tmp[20];
00030     sprintf(tmp,"%d",config->main.wmmonitor_port);
00031     return std::string("Brings up the WatchableMemory GUI on port ")+tmp+std::string(" (connects to WMMonitorBehavior, this just launches the GUI)");
00032   }
00033   virtual std::string getDescription() const { return getClassDescription(); }
00034 };
00035 
00036 /*! @file
00037  * @brief Defines ViewWMVarsBehavior, simply launches the Watchable Memory GUI, which should connect to the already-running WMMonitorBehavior
00038  * @author ejt (Creator)
00039  * 
00040  * $Author: ejt $
00041  * $Name: tekkotsu-2_2_1 $
00042  * $Revision: 1.3 $
00043  * $State: Exp $
00044  * $Date: 2004/11/11 01:45:36 $
00045  */
00046 
00047 #endif 

Tekkotsu v2.2.1
Generated Tue Nov 23 16:36:40 2004 by Doxygen 1.3.9.1