RDK2::RAgent::ModuleManager Class Reference

#include <modulemanager.h>

Collaboration diagram for RDK2::RAgent::ModuleManager:

Collaboration graph
[legend]

Detailed Description

Definition at line 40 of file modulemanager.h.


Public Member Functions

 ModuleManager (Repository *repository, bool isRConsole=false)
 Constructor.
bool instantiateModules (const ModuleConfigVector &)
 Instantiates all modules.
bool instantiateAdditionalModule (const ModuleConfig &cm, bool alsoStart=true)
 Instantiates an additional (i.e. after global initialization) module; this will also init and start the module.
bool initAllModules ()
 Calls init*() of every module.
void startAllModules ()
 Instantiates a thread for each module exec().
ModuleConfigVector getModuleConfigs ()
 Creates the module configurations.
void endAllModules ()
 Signal something to the module (requestEnd()) and wait for each exec() to exit.
void cleanupAllModules ()
 Calls cleanup() of each module.
bool requestExitForModule (cstr instanceName)
bool deleteModule (cstr instanceName)
 Ends, calls cleanup and removes the module.

Data Fields

PosixMutex moduleListMutex
list< Module * > modules

Constructor & Destructor Documentation

RDK2::RAgent::ModuleManager::ModuleManager ( Repository repository,
bool  isRConsole = false 
)

Constructor.

Definition at line 35 of file modulemanager.cpp.


Member Function Documentation

bool RDK2::RAgent::ModuleManager::instantiateModules ( const ModuleConfigVector ml  ) 

Instantiates all modules.

Definition at line 38 of file modulemanager.cpp.

References RDK2::Containers::Vector< RType >::begin(), and RDK2::Containers::Vector< RType >::end().

Here is the call graph for this function:

bool RDK2::RAgent::ModuleManager::instantiateAdditionalModule ( const ModuleConfig cm,
bool  alsoStart = true 
)

Instantiates an additional (i.e. after global initialization) module; this will also init and start the module.

Definition at line 89 of file modulemanager.cpp.

References RDK2::RAgent::Module::init(), RDK2::RAgent::Module::initInterfaceProperties(), RDK2::RAgent::Module::initWithModuleConfig(), RDK_ERROR_STREAM, and RDK2::RAgent::Module::start().

Here is the call graph for this function:

bool RDK2::RAgent::ModuleManager::initAllModules (  ) 

Calls init*() of every module.

Definition at line 124 of file modulemanager.cpp.

References DOUT, HERE, PosixConstructs::PosixMutex::lock(), moduleListMutex, modules, RDK_ERROR_STREAM, RDK_INFO_STREAM, and PosixConstructs::PosixMutex::unlock().

Here is the call graph for this function:

void RDK2::RAgent::ModuleManager::startAllModules (  ) 

Instantiates a thread for each module exec().

Definition at line 143 of file modulemanager.cpp.

References DOUT, HERE, PosixConstructs::PosixMutex::lock(), moduleListMutex, modules, RDK_INFO_STREAM, and PosixConstructs::PosixMutex::unlock().

Here is the call graph for this function:

ModuleConfigVector RDK2::RAgent::ModuleManager::getModuleConfigs (  ) 

Creates the module configurations.

Definition at line 155 of file modulemanager.cpp.

References HERE, PosixConstructs::PosixMutex::lock(), moduleListMutex, modules, RDK2::Containers::Vector< RType >::push_back(), and PosixConstructs::PosixMutex::unlock().

Here is the call graph for this function:

void RDK2::RAgent::ModuleManager::endAllModules (  ) 

Signal something to the module (requestEnd()) and wait for each exec() to exit.

Definition at line 207 of file modulemanager.cpp.

References DOUT, HERE, PosixConstructs::PosixMutex::lock(), moduleListMutex, modules, and PosixConstructs::PosixMutex::unlock().

Here is the call graph for this function:

void RDK2::RAgent::ModuleManager::cleanupAllModules (  ) 

Calls cleanup() of each module.

Definition at line 225 of file modulemanager.cpp.

References DOUT, HERE, PosixConstructs::PosixMutex::lock(), moduleListMutex, modules, and PosixConstructs::PosixMutex::unlock().

Here is the call graph for this function:

bool RDK2::RAgent::ModuleManager::requestExitForModule ( cstr  instanceName  ) 

Definition at line 166 of file modulemanager.cpp.

References DOUT, and modules.

bool RDK2::RAgent::ModuleManager::deleteModule ( cstr  instanceName  ) 

Ends, calls cleanup and removes the module.

Definition at line 179 of file modulemanager.cpp.

References DOUT, modules, and RDK_ERROR_PRINTF.


Field Documentation


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

Generated on Tue Mar 3 15:06:00 2009 for OpenRDK by  doxygen 1.5.6