YARP
Yet Another Robot Platform
yarp::manager::Manager Class Reference

Class Manager. More...

#include <yarp/manager/manager.h>

+ Inheritance diagram for yarp::manager::Manager:

Public Member Functions

 Manager (bool withWatchDog=false)
 Class Manager. More...
 
 Manager (const char *szModPath, const char *szAppPath, const char *szResPath, bool withWatchDog=false)
 
 ~Manager () override
 
bool addApplication (const char *szFileName, char **szAppName_=nullptr, bool modifyName=false)
 
bool addApplications (const char *szPath)
 
bool addModule (const char *szFileName)
 
bool addModules (const char *szPath)
 
bool addResource (const char *szFileName)
 
bool addResources (const char *szPath)
 
bool removeApplication (const char *szFileName, const char *szAppName)
 
bool removeModule (const char *szModName)
 
bool removeResource (const char *szResName)
 
bool loadApplication (const char *szAppName)
 
bool saveApplication (const char *szAppName, const char *fileName=nullptr)
 
bool updateExecutable (unsigned int id, const char *szparam, const char *szhost, const char *szstdio, const char *szworkdir, const char *szenv)
 
bool updateConnection (unsigned int id, const char *from, const char *to, const char *carrier)
 
NodegetNode (std::string appName)
 
bool run ()
 
bool run (unsigned int id, bool async=false)
 
bool stop ()
 
bool stop (unsigned int id, bool async=false)
 
bool kill ()
 
bool kill (unsigned int id, bool async=false)
 
bool connect ()
 
bool connect (unsigned int id)
 
bool disconnect ()
 
bool disconnect (unsigned int id)
 
bool rmconnect (unsigned int id)
 
bool rmconnect ()
 
bool running ()
 
bool running (unsigned int id)
 
bool suspended ()
 
bool suspended (unsigned int id)
 
bool connected ()
 
bool connected (unsigned int id)
 
bool checkDependency ()
 
bool exist (unsigned int id)
 
bool existPortFrom (unsigned int id)
 
bool existPortTo (unsigned int id)
 
bool attachStdout (unsigned int id)
 
bool detachStdout (unsigned int id)
 
bool updateResources ()
 
bool updateResource (const char *szName)
 
bool waitingModuleRun (unsigned int id)
 
bool waitingModuleStop (unsigned int id)
 
bool waitingModuleKill (unsigned int id)
 
bool loadBalance ()
 
void setDefaultBroker (const char *szBroker)
 
const char * defaultBroker ()
 
ExecutablePContainergetExecutables ()
 
ExecutablegetExecutableById (size_t id)
 
bool switchBroker (size_t id)
 
CnnContainergetConnections ()
 
ResourcePContainergetResources ()
 
const char * getApplicationName ()
 
void enableRestrictedMode ()
 
void disableRestrictedMode ()
 
void enableAutoConnect ()
 
void disableAutoConnect ()
 
void enableAutoDependency ()
 
void disableAutoDependency ()
 
void enableWatchDog ()
 
void disableWatchod ()
 
bool exportDependencyGraph (const char *szFileName)
 
KnowledgeBasegetKnowledgeBase ()
 
ErrorLoggergetLogger ()
 
- Public Member Functions inherited from yarp::manager::MEvent
 MEvent ()
 
virtual ~MEvent ()=default
 
virtual void onCnnReleased (void *which)
 

Protected Member Functions

void onExecutableStart (void *which) override
 
void onExecutableStop (void *which) override
 
void onExecutableDied (void *which) override
 
void onExecutableFailed (void *which) override
 
void onCnnStablished (void *which) override
 
void onCnnFailed (void *which) override
 
void onError (void *which) override
 
void onExecutableStdout (void *which, const char *msg) override
 

Detailed Description

Class Manager.

Definition at line 24 of file manager.h.

Constructor & Destructor Documentation

◆ Manager() [1/2]

Manager::Manager ( bool  withWatchDog = false)

Class Manager.

Definition at line 42 of file manager.cpp.

◆ Manager() [2/2]

Manager::Manager ( const char *  szModPath,
const char *  szAppPath,
const char *  szResPath,
bool  withWatchDog = false 
)

Definition at line 54 of file manager.cpp.

◆ ~Manager()

Manager::~Manager ( )
override

Definition at line 84 of file manager.cpp.

Member Function Documentation

◆ addApplication()

bool Manager::addApplication ( const char *  szFileName,
char **  szAppName_ = nullptr,
bool  modifyName = false 
)

Definition at line 91 of file manager.cpp.

◆ addApplications()

bool Manager::addApplications ( const char *  szPath)

Definition at line 108 of file manager.cpp.

◆ addModule()

bool Manager::addModule ( const char *  szFileName)

Definition at line 124 of file manager.cpp.

◆ addModules()

bool Manager::addModules ( const char *  szPath)

Definition at line 136 of file manager.cpp.

◆ addResource()

bool Manager::addResource ( const char *  szFileName)

Definition at line 148 of file manager.cpp.

◆ addResources()

bool Manager::addResources ( const char *  szPath)

Definition at line 161 of file manager.cpp.

◆ attachStdout()

bool Manager::attachStdout ( unsigned int  id)

Definition at line 1247 of file manager.cpp.

◆ checkDependency()

bool Manager::checkDependency ( )

checking for port resources availability TODO:later it should change to use proper broker for resource checking. up to now, we use only yraprun for checking port resources

Definition at line 722 of file manager.cpp.

◆ connect() [1/2]

bool Manager::connect ( )

Definition at line 1018 of file manager.cpp.

◆ connect() [2/2]

bool Manager::connect ( unsigned int  id)

Definition at line 990 of file manager.cpp.

◆ connected() [1/2]

bool Manager::connected ( )

Definition at line 1132 of file manager.cpp.

◆ connected() [2/2]

bool Manager::connected ( unsigned int  id)

Definition at line 1116 of file manager.cpp.

◆ defaultBroker()

const char* yarp::manager::Manager::defaultBroker ( )
inline

Definition at line 85 of file manager.h.

◆ detachStdout()

bool Manager::detachStdout ( unsigned int  id)

Definition at line 1269 of file manager.cpp.

◆ disableAutoConnect()

void yarp::manager::Manager::disableAutoConnect ( )
inline

Definition at line 98 of file manager.h.

◆ disableAutoDependency()

void yarp::manager::Manager::disableAutoDependency ( )
inline

Definition at line 100 of file manager.h.

◆ disableRestrictedMode()

void yarp::manager::Manager::disableRestrictedMode ( )
inline

Definition at line 96 of file manager.h.

◆ disableWatchod()

void yarp::manager::Manager::disableWatchod ( )
inline

Definition at line 102 of file manager.h.

◆ disconnect() [1/2]

bool Manager::disconnect ( )

Definition at line 1068 of file manager.cpp.

◆ disconnect() [2/2]

bool Manager::disconnect ( unsigned int  id)

Definition at line 1045 of file manager.cpp.

◆ enableAutoConnect()

void yarp::manager::Manager::enableAutoConnect ( )
inline

Definition at line 97 of file manager.h.

◆ enableAutoDependency()

void yarp::manager::Manager::enableAutoDependency ( )
inline

Definition at line 99 of file manager.h.

◆ enableRestrictedMode()

void yarp::manager::Manager::enableRestrictedMode ( )
inline

Definition at line 95 of file manager.h.

◆ enableWatchDog()

void yarp::manager::Manager::enableWatchDog ( )
inline

Definition at line 101 of file manager.h.

◆ exist()

bool Manager::exist ( unsigned int  id)

Definition at line 469 of file manager.cpp.

◆ existPortFrom()

bool Manager::existPortFrom ( unsigned int  id)

Definition at line 694 of file manager.cpp.

◆ existPortTo()

bool Manager::existPortTo ( unsigned int  id)

Definition at line 708 of file manager.cpp.

◆ exportDependencyGraph()

bool yarp::manager::Manager::exportDependencyGraph ( const char *  szFileName)
inline

Definition at line 103 of file manager.h.

◆ getApplicationName()

const char* yarp::manager::Manager::getApplicationName ( )
inline

Definition at line 91 of file manager.h.

◆ getConnections()

CnnContainer& yarp::manager::Manager::getConnections ( )
inline

Definition at line 89 of file manager.h.

◆ getExecutableById()

Executable * Manager::getExecutableById ( size_t  id)

Definition at line 268 of file manager.cpp.

◆ getExecutables()

ExecutablePContainer& yarp::manager::Manager::getExecutables ( )
inline

Definition at line 86 of file manager.h.

◆ getKnowledgeBase()

KnowledgeBase* yarp::manager::Manager::getKnowledgeBase ( )
inline

Definition at line 107 of file manager.h.

◆ getLogger()

ErrorLogger* yarp::manager::Manager::getLogger ( )
inline

Definition at line 108 of file manager.h.

◆ getNode()

Node * Manager::getNode ( std::string  appName)

Definition at line 463 of file manager.cpp.

◆ getResources()

ResourcePContainer& yarp::manager::Manager::getResources ( )
inline

Definition at line 90 of file manager.h.

◆ kill() [1/2]

bool Manager::kill ( )

Definition at line 941 of file manager.cpp.

◆ kill() [2/2]

bool Manager::kill ( unsigned int  id,
bool  async = false 
)

Definition at line 919 of file manager.cpp.

◆ loadApplication()

bool Manager::loadApplication ( const char *  szAppName)

Definition at line 226 of file manager.cpp.

◆ loadBalance()

bool Manager::loadBalance ( )

Definition at line 261 of file manager.cpp.

◆ onCnnFailed()

void Manager::onCnnFailed ( void *  which)
overrideprotectedvirtual

Reimplemented from yarp::manager::MEvent.

Definition at line 1296 of file manager.cpp.

◆ onCnnStablished()

void Manager::onCnnStablished ( void *  which)
overrideprotectedvirtual

Reimplemented from yarp::manager::MEvent.

Definition at line 1292 of file manager.cpp.

◆ onError()

void Manager::onError ( void *  which)
overrideprotectedvirtual

Reimplemented from yarp::manager::MEvent.

Definition at line 1297 of file manager.cpp.

◆ onExecutableDied()

void Manager::onExecutableDied ( void *  which)
overrideprotectedvirtual

Reimplemented from yarp::manager::MEvent.

Definition at line 1293 of file manager.cpp.

◆ onExecutableFailed()

void Manager::onExecutableFailed ( void *  which)
overrideprotectedvirtual

Reimplemented from yarp::manager::MEvent.

Definition at line 1294 of file manager.cpp.

◆ onExecutableStart()

void Manager::onExecutableStart ( void *  which)
overrideprotectedvirtual

Reimplemented from yarp::manager::MEvent.

Definition at line 1290 of file manager.cpp.

◆ onExecutableStdout()

void Manager::onExecutableStdout ( void *  which,
const char *  msg 
)
overrideprotectedvirtual

Reimplemented from yarp::manager::MEvent.

Definition at line 1295 of file manager.cpp.

◆ onExecutableStop()

void Manager::onExecutableStop ( void *  which)
overrideprotectedvirtual

Reimplemented from yarp::manager::MEvent.

Definition at line 1291 of file manager.cpp.

◆ removeApplication()

bool Manager::removeApplication ( const char *  szFileName,
const char *  szAppName 
)

Definition at line 173 of file manager.cpp.

◆ removeModule()

bool Manager::removeModule ( const char *  szModName)

Definition at line 190 of file manager.cpp.

◆ removeResource()

bool Manager::removeResource ( const char *  szResName)

Definition at line 207 of file manager.cpp.

◆ rmconnect() [1/2]

bool Manager::rmconnect ( )

Definition at line 1103 of file manager.cpp.

◆ rmconnect() [2/2]

bool Manager::rmconnect ( unsigned int  id)

Definition at line 1084 of file manager.cpp.

◆ run() [1/2]

bool Manager::run ( )

Definition at line 783 of file manager.cpp.

◆ run() [2/2]

bool Manager::run ( unsigned int  id,
bool  async = false 
)

Definition at line 747 of file manager.cpp.

◆ running() [1/2]

bool yarp::manager::Manager::running ( )
inline

Definition at line 65 of file manager.h.

◆ running() [2/2]

bool Manager::running ( unsigned int  id)

Definition at line 1189 of file manager.cpp.

◆ saveApplication()

bool Manager::saveApplication ( const char *  szAppName,
const char *  fileName = nullptr 
)

Definition at line 251 of file manager.cpp.

◆ setDefaultBroker()

void yarp::manager::Manager::setDefaultBroker ( const char *  szBroker)
inline

Definition at line 84 of file manager.h.

◆ stop() [1/2]

bool Manager::stop ( )

Definition at line 883 of file manager.cpp.

◆ stop() [2/2]

bool Manager::stop ( unsigned int  id,
bool  async = false 
)

Definition at line 859 of file manager.cpp.

◆ suspended() [1/2]

bool yarp::manager::Manager::suspended ( )
inline

Definition at line 67 of file manager.h.

◆ suspended() [2/2]

bool Manager::suspended ( unsigned int  id)

Definition at line 1219 of file manager.cpp.

◆ switchBroker()

bool Manager::switchBroker ( size_t  id)

Definition at line 280 of file manager.cpp.

◆ updateConnection()

bool Manager::updateConnection ( unsigned int  id,
const char *  from,
const char *  to,
const char *  carrier 
)

Definition at line 436 of file manager.cpp.

◆ updateExecutable()

bool Manager::updateExecutable ( unsigned int  id,
const char *  szparam,
const char *  szhost,
const char *  szstdio,
const char *  szworkdir,
const char *  szenv 
)

Definition at line 410 of file manager.cpp.

◆ updateResource()

bool Manager::updateResource ( const char *  szName)

Definition at line 582 of file manager.cpp.

◆ updateResources()

bool Manager::updateResources ( )

Definition at line 531 of file manager.cpp.

◆ waitingModuleKill()

bool Manager::waitingModuleKill ( unsigned int  id)

Definition at line 677 of file manager.cpp.

◆ waitingModuleRun()

bool Manager::waitingModuleRun ( unsigned int  id)

Definition at line 645 of file manager.cpp.

◆ waitingModuleStop()

bool Manager::waitingModuleStop ( unsigned int  id)

Definition at line 662 of file manager.cpp.


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