Public Member Functions | Private Member Functions | Private Attributes | List of all members
micros_swarm::AppManager Class Reference

#include <app_manager.h>

Public Member Functions

 AppManager ()
 
 AppManager (int worker_num)
 
void stop ()
 
 ~AppManager ()
 

Private Member Functions

void addRecord (const std::string &name, int worker_id)
 
int allocateWorker ()
 
void decreasePluginUseCount (const std::string &type)
 
int getPluginUseCount (const std::string &type)
 
void insertOrUpdatePluginUseCount (const std::string &type)
 
bool loadService (app_loader::AppLoad::Request &req, app_loader::AppLoad::Response &resp)
 
bool recordExist (const std::string &name)
 
void removeRecord (const std::string &name)
 
bool unloadService (app_loader::AppUnload::Request &req, app_loader::AppUnload::Response &resp)
 

Private Attributes

ros::ServiceServer app_load_srv_
 
pluginlib::ClassLoader< micros_swarm::Applicationapp_loader_
 
ros::ServiceServer app_unload_srv_
 
std::map< std::string, int > apps_record_
 
ros::ServiceClient client_
 
std::vector< uint16_t > load_table_
 
std::map< std::string, int > plugin_use_count_
 
int worker_num_
 
std::vector< Worker * > worker_table_
 

Detailed Description

Definition at line 69 of file app_manager.h.

Constructor & Destructor Documentation

micros_swarm::AppManager::AppManager ( )

Definition at line 101 of file app_manager.cpp.

micros_swarm::AppManager::AppManager ( int  worker_num)

Definition at line 118 of file app_manager.cpp.

micros_swarm::AppManager::~AppManager ( )

Definition at line 180 of file app_manager.cpp.

Member Function Documentation

void micros_swarm::AppManager::addRecord ( const std::string &  name,
int  worker_id 
)
private

Definition at line 193 of file app_manager.cpp.

int micros_swarm::AppManager::allocateWorker ( )
private

Definition at line 203 of file app_manager.cpp.

void micros_swarm::AppManager::decreasePluginUseCount ( const std::string &  type)
private

Definition at line 227 of file app_manager.cpp.

int micros_swarm::AppManager::getPluginUseCount ( const std::string &  type)
private

Definition at line 239 of file app_manager.cpp.

void micros_swarm::AppManager::insertOrUpdatePluginUseCount ( const std::string &  type)
private

Definition at line 215 of file app_manager.cpp.

bool micros_swarm::AppManager::loadService ( app_loader::AppLoad::Request &  req,
app_loader::AppLoad::Response &  resp 
)
private

Definition at line 250 of file app_manager.cpp.

bool micros_swarm::AppManager::recordExist ( const std::string &  name)
private

Definition at line 182 of file app_manager.cpp.

void micros_swarm::AppManager::removeRecord ( const std::string &  name)
private

Definition at line 198 of file app_manager.cpp.

void micros_swarm::AppManager::stop ( )

Definition at line 135 of file app_manager.cpp.

bool micros_swarm::AppManager::unloadService ( app_loader::AppUnload::Request &  req,
app_loader::AppUnload::Response &  resp 
)
private

Definition at line 289 of file app_manager.cpp.

Member Data Documentation

ros::ServiceServer micros_swarm::AppManager::app_load_srv_
private

Definition at line 87 of file app_manager.h.

pluginlib::ClassLoader<micros_swarm::Application> micros_swarm::AppManager::app_loader_
private

Definition at line 86 of file app_manager.h.

ros::ServiceServer micros_swarm::AppManager::app_unload_srv_
private

Definition at line 87 of file app_manager.h.

std::map<std::string, int> micros_swarm::AppManager::apps_record_
private

Definition at line 92 of file app_manager.h.

ros::ServiceClient micros_swarm::AppManager::client_
private

Definition at line 88 of file app_manager.h.

std::vector<uint16_t> micros_swarm::AppManager::load_table_
private

Definition at line 91 of file app_manager.h.

std::map<std::string, int> micros_swarm::AppManager::plugin_use_count_
private

Definition at line 93 of file app_manager.h.

int micros_swarm::AppManager::worker_num_
private

Definition at line 89 of file app_manager.h.

std::vector<Worker*> micros_swarm::AppManager::worker_table_
private

Definition at line 90 of file app_manager.h.


The documentation for this class was generated from the following files:


micros_swarm
Author(s):
autogenerated on Mon Jun 10 2019 14:02:06