Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

Aibo3DControllerBehavior.h

Go to the documentation of this file.
00001 //-*-c++-*-
00002 #ifndef INCLUDED_Aibo3DControllerBehavior_h_
00003 #define INCLUDED_Aibo3DControllerBehavior_h_
00004 
00005 #include <iostream>
00006 #include "Wireless/Wireless.h"
00007 #include "Behaviors/BehaviorBase.h"
00008 #include "Motion/MotionManager.h"
00009 #include "Motion/RemoteControllerMC.h"
00010 #include "Events/EventRouter.h"
00011 #include "Events/EventBase.h"
00012 #include "Shared/RobotInfo.h"
00013 #include "Behaviors/Controller.h"
00014 #include "Shared/WorldState.h"
00015 #include "Shared/Config.h"
00016 
00017 //! Listens to aibo3d control commands coming in from the command port.
00018 class Aibo3DControllerBehavior : public BehaviorBase {
00019  private:
00020   Aibo3DControllerBehavior(const Aibo3DControllerBehavior&); //!< don't call
00021   Aibo3DControllerBehavior operator=(const Aibo3DControllerBehavior&); //!< don't call
00022   //! if true, indicates we launched the WorldState serializer, so we should stop it again if we stop
00023   bool launchedSerializer;
00024   
00025  public:
00026   //! constructor
00027   Aibo3DControllerBehavior() : BehaviorBase("Aibo3DControllerBehavior"),launchedSerializer(false) { }
00028   //! destructor
00029   virtual ~Aibo3DControllerBehavior() { }
00030 
00031   virtual void doStart();
00032   virtual void doStop();
00033   
00034   //! returns string corresponding to the Java GUI which should be launched
00035   virtual std::string getGUIType() const { return "org.tekkotsu.aibo3d.Aibo3D"; }
00036   //! returns port number the Java GUI should connect to
00037   virtual unsigned int getPort() const { return config->main.wsjoints_port; }
00038 
00039   static std::string getClassDescription() { 
00040     return "Launches a WorldStateSerializer and asks gui to load Aibo3D GUI";
00041     //char tmp[20];
00042     //sprintf(tmp,"%d",config->main.aibo3d_port);
00043     //return std::string("Listens to aibo3d control commands coming in from port ")+tmp;
00044   }
00045   virtual std::string getDescription() const { return getClassDescription(); }
00046 };
00047 
00048 /*! @file
00049  * @brief Defines Aibo3DControllerBehavior, which listens to commands from the Aibo3D gui and shows current state
00050  * @author alokl (Creator)
00051  */
00052 
00053 #endif 

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