Server.hh
00001 #ifndef SERVER_HH 00002 #define SERVER_HH 00003 00004 #include <string> 00005 #include <vector> 00006 00007 #include <boost/thread.hpp> 00008 00009 #include "transport/TransportTypes.hh" 00010 #include "common/CommonTypes.hh" 00011 #include "physics/PhysicsTypes.hh" 00012 #include "physics/World.hh" 00013 00014 namespace boost 00015 { 00016 class mutex; 00017 } 00018 00019 namespace gazebo 00020 { 00021 class Master; 00022 00023 class Server 00024 { 00025 public: Server(); 00026 public: virtual ~Server(); 00027 00028 public: void LoadPlugin(const std::string &_filename); 00029 public: bool Load(const std::string &filename); 00030 public: void Init(); 00031 public: void Run(); 00032 public: void Stop(); 00033 public: void Fini(); 00034 00035 public: void SetParams( const common::StrStr_M ¶ms ); 00036 00037 public: bool GetInitialized() const; 00038 00039 private: void OnControl( 00040 ConstServerControlPtr &_msg); 00041 00042 private: void ProcessControlMsgs(); 00043 00044 private: bool stop; 00045 00046 private: Master *master; 00047 private: boost::thread *masterThread; 00048 private: std::vector<gazebo::SystemPluginPtr> plugins; 00049 private: transport::NodePtr node; 00050 private: transport::SubscriberPtr serverSub; 00051 private: transport::PublisherPtr worldModPub; 00052 00053 private: boost::mutex *receiveMutex; 00054 private: std::list<msgs::ServerControl> controlMsgs; 00055 }; 00056 } 00057 00058 #endif

1.7.5.1