23 #ifndef APP_MANAGER_H_ 24 #define APP_MANAGER_H_ 29 #include <boost/bind.hpp> 30 #include <boost/thread.hpp> 31 #include <boost/function.hpp> 32 #include <boost/shared_ptr.hpp> 33 #include <boost/noncopyable.hpp> 40 #include "app_loader/AppLoad.h" 41 #include "app_loader/AppUnload.h" 42 #include "app_loader/RTDestroy.h" 58 void removeApp(
const std::string& app_name);
60 AppInstance* getAppInstance(
const std::string& app_name);
66 std::vector<AppInstance*>
apps_;
77 bool recordExist(
const std::string& name);
78 void addRecord(
const std::string& name,
int worker_id);
79 void removeRecord(
const std::string& name);
81 void insertOrUpdatePluginUseCount(
const std::string& type);
82 void decreasePluginUseCount(
const std::string& type);
83 int getPluginUseCount(
const std::string& type);
84 bool loadService(app_loader::AppLoad::Request &req, app_loader::AppLoad::Response &resp);
85 bool unloadService(app_loader::AppUnload::Request &req, app_loader::AppUnload::Response &resp);
ros::ServiceClient client_
std::vector< Worker * > worker_table_
pluginlib::ClassLoader< micros_swarm::Application > app_loader_
std::vector< AppInstance * > apps_
std::map< std::string, int > apps_record_
std::vector< uint16_t > load_table_
boost::shared_ptr< Application > app_ptr_
ros::ServiceServer app_unload_srv_
std::map< std::string, int > plugin_use_count_