ERC CISST - cisst software

mtsManagerLocal Class Reference

Inheritance diagram for mtsManagerLocal:

Inheritance graph
[legend]
Collaboration diagram for mtsManagerLocal:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 71 of file mtsManagerLocal.h.

Public Types

Public Member Functions

Static Public Member Functions

Static Public Attributes

Protected Types

Protected Member Functions

Protected Attributes

Static Protected Attributes

Friends


Member Typedef Documentation

typedef cmnNamedMap<mtsComponent> mtsManagerLocal::ComponentMapType [protected]

Typedef for component map: key is component name, value is component object

Definition at line 121 of file mtsManagerLocal.h.


Member Enumeration Documentation

enum mtsManagerLocal::ConfigurationType

Typedef for local component manager's configuration

Definition at line 88 of file mtsManagerLocal.h.


Constructor & Destructor Documentation

mtsManagerLocal::mtsManagerLocal ( void   )  [protected]

Protected constructor (singleton)

virtual mtsManagerLocal::~mtsManagerLocal (  )  [protected, virtual]

Destructor. Includes OS-specific cleanup.


Member Function Documentation

void mtsManagerLocal::Initialize ( void   )  [protected]

Initialization

bool mtsManagerLocal::AddManagerComponent ( const std::string &  processName,
const bool  isServer = false 
) [protected]

Add an internal manager component.

Parameters:
processName Name of this process (or this LCM)
isServer True to create manager component server, false to create manager component client. Note that this argument should be true only when LCM runs with GCM in the same process.

bool mtsManagerLocal::RegisterInterfaces ( mtsComponent component  )  [protected]

Register all interfaces that a component owns to the global component manager. The GCM uses this information to connect interfaces that are in different processes.

Parameters:
component Component object instance
componentName Name of component

bool mtsManagerLocal::ConnectLocally ( const std::string &  clientComponentName,
const std::string &  clientInterfaceRequiredName,
const std::string &  serverComponentName,
const std::string &  serverInterfaceProvidedName,
const std::string &  clientProcessName = "" 
) [protected]

Connect two local interfaces.

Parameters:
clientComponentName Name of client component
clientInterfaceRequiredName Name of required interface
serverComponentName Name of server component
serverInterfaceProvidedName Name of provided interface
clientProcessName Name of client process (ignored in standalone configuration, used in networked configuration)
Returns:
true if successful, false otherwise
Note:
It is assumed that two components are in the same process.

bool mtsManagerLocal::AddComponent ( mtsComponent component  ) 

Add a component to this local component manager.

Parameters:
component Component instance to be added

bool mtsManagerLocal::WaitForStateAll ( mtsComponentState  desiredState,
double  timeout = 3.0 *cmn_minute 
) const

Wait until all components reach a certain state. If all components have reach the given state within the time alloted, the method returns true.

bool mtsManagerLocal::Connect ( const std::string &  clientComponentName,
const std::string &  clientInterfaceRequiredName,
const std::string &  serverComponentName,
const std::string &  serverInterfaceProvidedName 
)

Connect two local interfaces.

Parameters:
clientComponentName Name of client component
clientInterfaceRequiredName Name of required interface
serverComponentName Name of server component
serverInterfaceProvidedName Name of provided interface
Returns:
True if success, false otherwise
Note:
If connection is established successfully, this information is reported to the global component manager (the local component manager does not keep any connection information).

bool mtsManagerLocal::Disconnect ( const std::string &  clientComponentName,
const std::string &  clientInterfaceRequiredName,
const std::string &  serverComponentName,
const std::string &  serverInterfaceProvidedName 
)

Disconnect two interfaces

static mtsManagerLocal* mtsManagerLocal::GetInstance ( void   )  [static]

Get a singleton object of local component manager

std::vector<std::string> mtsManagerLocal::GetNamesOfComponents ( void   )  const

Enumerate all the names of components added

const osaTimeServer& mtsManagerLocal::GetTimeServer ( void   )  const [inline]

Return a reference to the time server.

Definition at line 481 of file mtsManagerLocal.h.

const std::string mtsManagerLocal::GetProcessName ( const std::string &  CMN_UNUSED(listenerID) = ""  )  const [inline]

Returns name of this local component manager

Definition at line 486 of file mtsManagerLocal.h.

const std::string mtsManagerLocal::GetEndUserName ( void   )  const

Returns end user name to access provided interface's resources

ConfigurationType mtsManagerLocal::GetConfiguration ( void   )  const [inline]

Returns the current configuration of this local component manager

Definition at line 494 of file mtsManagerLocal.h.

void mtsManagerLocal::ToStream ( std::ostream &  outputStream  )  const [virtual]

For debugging. Dumps to stream the maps maintained by the manager.

Reimplemented from cmnGenericObject.

void mtsManagerLocal::ToStreamDot ( std::ostream &  outputStream  )  const

Create a dot file to be used by graphviz to generate a nice graph of connections between tasks/interfaces.


Member Data Documentation

osaTimeServer mtsManagerLocal::TimeServer [protected]

Time server used by all tasks.

Definition at line 125 of file mtsManagerLocal.h.

std::string mtsManagerLocal::ProcessName [protected]

Process name of this local component manager. Should be globally unique across the whole system.

Definition at line 129 of file mtsManagerLocal.h.

const std::string mtsManagerLocal::GlobalComponentManagerIP [protected]

IP address of the global component manager that this LCM connects to

Definition at line 132 of file mtsManagerLocal.h.

std::string mtsManagerLocal::ProcessIP [protected]

IP address of this machine. Internally set by SetIPAddress().

Definition at line 135 of file mtsManagerLocal.h.

std::vector<std::string> mtsManagerLocal::ProcessIPList [protected]

List of all IP addresses detected on this machine

Definition at line 138 of file mtsManagerLocal.h.

osaMutex mtsManagerLocal::ComponentMapChange [protected]

Mutex to use ComponentMap safely

Definition at line 141 of file mtsManagerLocal.h.

osaMutex mtsManagerLocal::ConfigurationChange [static, protected]

Mutex for thread-safe transition of configuration from standalone mode to networked mode

Definition at line 145 of file mtsManagerLocal.h.

mtsManagerGlobalInterface* mtsManagerLocal::ManagerGlobal [protected]

Pointer to the global component manager. Depending on configuration, this can be of two different type of object:

Definition at line 154 of file mtsManagerLocal.h.

struct { ... } mtsManagerLocal::ManagerComponent [protected]

Manager component instances (for direct access)

std::string mtsManagerLocal::ProcessNameOfLCMDefault [static]

Default name of local component manager

Definition at line 440 of file mtsManagerLocal.h.

std::string mtsManagerLocal::ProcessNameOfLCMWithGCM [static]

Name of local component manager running with the global component manager

Definition at line 443 of file mtsManagerLocal.h.


The documentation for this class was generated from the following file:
erc-cisst-devel<at>lists.johnshopkins.edu