ocra-recipes
Doxygen documentation for the ocra-recipes repository
|
The controller module which launches the controller thread. More...
#include <ClientManager.h>
Classes | |
class | moduleCallback |
A callback function which binds the rpc server port opened in the contoller server module to the controller thread's parsing function. More... | |
Public Member Functions | |
ClientManager (std::shared_ptr< ControllerClient > customClient, bool suppressPerformanceWarnings=false) | |
~ClientManager () | |
bool | configure (yarp::os::ResourceFinder &rf) |
int | launchClient () |
bool | interruptModule () |
bool | close () |
bool | updateModule () |
void | printHelp () |
virtual std::string | getManagerName () |
Protected Member Functions | |
virtual void | customCallbackParser (yarp::os::Bottle &message, yarp::os::Bottle &reply) |
virtual bool | customUpdateModule () |
The controller module which launches the controller thread.
Basically all this does is parse the command line arguments and look for the various config and task set files. It then instantiates a WBI instance (yarpWBI specifically) and a IcubControllerClient instance. It launches these threads and then basically just waits till it gets a kill (ctrl+c) command to close them down. Does a little keeping track of time as well.
Definition at line 48 of file ClientManager.h.
ClientManager::ClientManager | ( | std::shared_ptr< ControllerClient > | customClient, |
bool | suppressPerformanceWarnings = false |
||
) |
Constructor which essentially does nothing.
Definition at line 33 of file ClientManager.cpp.
ClientManager::~ClientManager | ( | ) |
Destructor which essentially does nothing.
Definition at line 44 of file ClientManager.cpp.
bool ClientManager::close | ( | ) |
Closes the module. First shuts down the threads.
Definition at line 73 of file ClientManager.cpp.
bool ClientManager::configure | ( | yarp::os::ResourceFinder & | rf | ) |
Configures the module by parsing the RF contents. Passes to client when done.
rf | A resource finder instance which is initialized from the command line args. |
Definition at line 54 of file ClientManager.cpp.
|
protectedvirtual |
Definition at line 127 of file ClientManager.cpp.
|
protectedvirtual |
Definition at line 131 of file ClientManager.cpp.
|
virtual |
Gets the name of the module. Override this function to set a different name.
Definition at line 49 of file ClientManager.cpp.
bool ClientManager::interruptModule | ( | ) |
Interrupts the module execution and stops the control and wbi threads.
Definition at line 65 of file ClientManager.cpp.
int ClientManager::launchClient | ( | ) |
Simply calls client->start() then runModule()
Definition at line 59 of file ClientManager.cpp.
void ClientManager::printHelp | ( | ) |
Prints all the command line args one could use.
Definition at line 113 of file ClientManager.cpp.
bool ClientManager::updateModule | ( | ) |
Updates the ClientManager. Basically just clocks the thread run() method.
Definition at line 93 of file ClientManager.cpp.