cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Macros
mtsManagerLocal.h File Reference

Declaration of Local Component ManagerThis class defines the local component manager (LCM) that manages local components and is unique in a process. Since only one instance of LCM should exist in a process, this class is implemented as singleton. To get an instance of LCM, therefore, mtsManagerLocal::GetInstance() should be used (instead of constructor). More...

#include <cisstCommon/cmnNamedMap.h>
#include <cisstCommon/cmnUnits.h>
#include <cisstOSAbstraction/osaThreadBuddy.h>
#include <cisstOSAbstraction/osaMutex.h>
#include <cisstOSAbstraction/osaThread.h>
#include <cisstMultiTask/mtsForwardDeclarations.h>
#include <cisstMultiTask/mtsComponentState.h>
#include <cisstMultiTask/mtsManagerLocalInterface.h>
#include <cisstMultiTask/mtsManagerGlobalInterface.h>
#include <stack>
#include <cisstMultiTask/mtsExport.h>

Go to the source code of this file.

Classes

class  mtsManagerLocal
 

Macros

#define CONNECT_LOCAL(_clientComp, _reqInt, _serverComp, _prvInt)
 
#define CONNECT_REMOTE(_clientProc, _clientComp, _reqInt, _serverProc, _serverComp, _prvInt)
 

Detailed Description

Declaration of Local Component Manager

This class defines the local component manager (LCM) that manages local components and is unique in a process. Since only one instance of LCM should exist in a process, this class is implemented as singleton. To get an instance of LCM, therefore, mtsManagerLocal::GetInstance() should be used (instead of constructor).

The LCM replaces the previous task manager (mtsTaskManager) which was similar to the LCM without networking support. Major differences between the two are:

1) The LCM manages tasks and components as a unified object–component–which is of type mtsComponent and is stored in a single data structure–component map. That is, task map and device map in the previous task manager has been consolidated into the component map.

2) While the previous task manager keeps all information about tasks (devices) and connections, the LCM only keeps information about local components; it does not keep any connection information. All connection information are now managed by the global component manager (GCM) and the LCM requests and retrieves such information as needed.

Note that this class implements mtsManagerLocalInterface class which defines common APIs to communicate with the GCM and is declared as pure virtual. See mtsManagerProxyServer class as another example that implements the interface.

Note
Related classes: mtsManagerLocalInterface, mtsManagerGlobalInterface, mtsManagerGlobal, mtsManagerProxyServer

Macro Definition Documentation

#define CONNECT_LOCAL (   _clientComp,
  _reqInt,
  _serverComp,
  _prvInt 
)
Value:
if (!mtsManagerLocal::GetInstance()->Connect(_clientComp, _reqInt, _serverComp, _prvInt)) {\
CMN_LOG_INIT_ERROR << "Failed to connect: "\
<< _clientComp << ":" << _reqInt << " - "\
<< _serverComp << ":" << _prvInt << std::endl;\
exit(1);\
}
static mtsManagerLocal * GetInstance(void)
#define CMN_LOG_INIT_ERROR
Definition: cmnLogger.h:162
#define CONNECT_REMOTE (   _clientProc,
  _clientComp,
  _reqInt,
  _serverProc,
  _serverComp,
  _prvInt 
)
Value:
if (!mtsManagerLocal::GetInstance()->Connect(_clientProc, _clientComp, _reqInt, _serverProc, _serverComp, _prvInt)) {\
CMN_LOG_INIT_ERROR << "Failed to connect: "\
<< _clientProc << ":" << _clientComp << ":" << _reqInt << " - "\
<< _serverProc << ":" << _serverComp << ":" << _prvInt << std::endl;\
exit(1);\
}
static mtsManagerLocal * GetInstance(void)
#define CMN_LOG_INIT_ERROR
Definition: cmnLogger.h:162