Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

ViewWMVarsBehavior.cc

Go to the documentation of this file.
00001 #include "Behaviors/BehaviorBase.h"
00002 #include "Behaviors/Controller.h"
00003 #include "Shared/Config.h"
00004 #include <stdio.h>
00005 
00006 //! simply launches the Watchable Memory GUI, which should connect to the already-running WMMonitorBehavior
00007 class ViewWMVarsBehavior : public BehaviorBase {
00008 public:
00009   //! constructor
00010   ViewWMVarsBehavior() : BehaviorBase("ViewWMVarsBehavior") {}
00011 
00012   virtual void doStart() {
00013     BehaviorBase::doStart();
00014     // Open the WalkGUI on the desktop
00015     Controller::loadGUI("org.tekkotsu.mon.WatchableMemory","WatchableMemory",config->main.wmmonitor_port);
00016   }
00017 
00018   virtual void doStop() {
00019     // Close the GUI
00020     Controller::closeGUI("WatchableMemory");
00021     BehaviorBase::doStop();
00022   }
00023 
00024   static std::string getClassDescription() {
00025     char tmp[20];
00026     sprintf(tmp,"%d",*config->main.wmmonitor_port);
00027     return std::string("Brings up the WatchableMemory GUI on port ")+tmp+std::string(" (connects to WMMonitorBehavior, this just launches the GUI)");
00028   }
00029   virtual std::string getDescription() const { return getClassDescription(); }
00030 };
00031 
00032 REGISTER_BEHAVIOR_MENU_OPT(ViewWMVarsBehavior,"TekkotsuMon",BEH_NONEXCLUSIVE);
00033 
00034 /*! @file
00035  * @brief Defines ViewWMVarsBehavior, simply launches the Watchable Memory GUI, which should connect to the already-running WMMonitorBehavior
00036  * @author ejt (Creator)
00037  */

Tekkotsu v5.1CVS
Generated Mon May 9 04:58:52 2016 by Doxygen 1.6.3