ERC CISST - cisst software

mtsManagerGlobal Class Reference

Inheritance diagram for mtsManagerGlobal:

Inheritance graph
[legend]
Collaboration diagram for mtsManagerGlobal:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 50 of file mtsManagerGlobal.h.

Public Member Functions

Static Public Member Functions

Protected Types

Protected Member Functions

Protected Attributes

Friends

Classes


Member Typedef Documentation

typedef cmnNamedMap<mtsManagerGlobal::ConnectedInterfaceInfo> mtsManagerGlobal::ConnectionMapType [protected]

Connection map: (connected interface name, connected interface information) Map name: a name of component that has these interfaces.

Definition at line 196 of file mtsManagerGlobal.h.

typedef cmnNamedMap<ConnectionMapType> mtsManagerGlobal::ConnectedInterfaceMapType [protected]

Interface map: a map of registered interfaces in a component key=(interface name), value=(connection map) value can be null if an interface does not have any connection.

Definition at line 201 of file mtsManagerGlobal.h.

typedef std::map<std::string, bool> mtsManagerGlobal::InterfaceTypeMapType [protected]

Interface type flag map: a map of registered interfaces in a component key=(interface name), value=(bool) value is false if an interface is an original interface true if an interface is a proxy interface This information is used to determine if an interface should be removed (cleaned up) when a connection is disconnected. See mtsManagerGlobal::Disconnect() for more details.

Definition at line 210 of file mtsManagerGlobal.h.

typedef cmnNamedMap<InterfaceMapType> mtsManagerGlobal::ComponentMapType [protected]

Component map: a map of registered components in a process key=(component name), value=(interface map) value can be null if a component does not have any interface.

Definition at line 225 of file mtsManagerGlobal.h.

typedef cmnNamedMap<ComponentMapType> mtsManagerGlobal::ProcessMapType [protected]

Process map: a map of registered processes (i.e., local component managers) key=(process name), value=(component map) value can be null if a process does not have any component.

Definition at line 230 of file mtsManagerGlobal.h.

typedef std::map<unsigned int, mtsManagerGlobal::ConnectionElement*> mtsManagerGlobal::ConnectionElementMapType [protected]

Connection element map: a map of strings that defines a connection key=(connection id), value=(an instance of ConnectionElement) When a local component manager requests estbalishing a connection, an element is created and added. If a connection is not established before timeout, the element is removed. When a local component manager notifies that a connection is successfully established, the element is marked as connected.

Definition at line 240 of file mtsManagerGlobal.h.


Constructor & Destructor Documentation

mtsManagerGlobal::mtsManagerGlobal (  ) 

Constructor and destructor


Member Function Documentation

bool mtsManagerGlobal::Cleanup ( void   )  [protected]

Clean up the internal variables

ConnectionMapType* mtsManagerGlobal::GetConnectionsOfInterfaceProvidedOrOutput ( const std::string &  serverProcessName,
const std::string &  serverComponentName,
const std::string &  providedInterfaceName,
InterfaceMapType **  interfaceMap 
) [protected]

Get a map containing connection information for a provided interface

ConnectionMapType* mtsManagerGlobal::GetConnectionsOfInterfaceRequiredOrInput ( const std::string &  clientProcessName,
const std::string &  clientComponentName,
const std::string &  requiredInterfaceName,
InterfaceMapType **  interfaceMap 
) [protected]

Get a map containing connection information for a required interface

bool mtsManagerGlobal::AddConnectedInterface ( ConnectionMapType connectionMap,
const std::string &  processName,
const std::string &  componentName,
const std::string &  interfaceName,
const bool  isRemoteConnection = false 
) [protected]

Add this interface to connectionMap as connected interface

bool mtsManagerGlobal::IsAlreadyConnected ( const std::string &  clientProcessName,
const std::string &  clientComponentName,
const std::string &  clientInterfaceRequiredName,
const std::string &  serverProcessName,
const std::string &  serverComponentName,
const std::string &  serverInterfaceProvidedName 
) [protected]

Check if two interfaces are connected

bool mtsManagerGlobal::AddProcess ( const std::string &  processName  )  [virtual]

Register process.

Parameters:
processName Name of process

Implements mtsManagerGlobalInterface.

bool mtsManagerGlobal::FindProcess ( const std::string &  processName  )  const [virtual]

Find process.

Parameters:
processName Name of process

Implements mtsManagerGlobalInterface.

bool mtsManagerGlobal::RemoveProcess ( const std::string &  processName  )  [virtual]

Remove process.

Parameters:
processName Name of process

Implements mtsManagerGlobalInterface.

bool mtsManagerGlobal::AddComponent ( const std::string &  processName,
const std::string &  componentName 
) [virtual]

Register component.

Parameters:
processName Name of process
componentName Name of component

Implements mtsManagerGlobalInterface.

bool mtsManagerGlobal::FindComponent ( const std::string &  processName,
const std::string &  componentName 
) const [virtual]

Find component using process name and component name.

Parameters:
processName Name of process
componentName Name of component

Implements mtsManagerGlobalInterface.

bool mtsManagerGlobal::RemoveComponent ( const std::string &  processName,
const std::string &  componentName 
) [virtual]

Remove component.

Parameters:
processName Name of process
componentName Name of component

Implements mtsManagerGlobalInterface.

bool mtsManagerGlobal::AddInterfaceProvidedOrOutput ( const std::string &  processName,
const std::string &  componentName,
const std::string &  interfaceName,
const bool  isProxyInterface = false 
) [virtual]

Register provided interface. Can be called at run-time.

Parameters:
processName Name of process
componentName Name of component
interfaceName Name of provided interface to be added
isProxyInterface True if interface added is a proxy interface

Implements mtsManagerGlobalInterface.

bool mtsManagerGlobal::AddInterfaceRequiredOrInput ( const std::string &  processName,
const std::string &  componentName,
const std::string &  interfaceName,
const bool  isProxyInterface = false 
) [virtual]

Register required interface. Can be called at run-time.

Parameters:
processName Name of process
componentName Name of component
interfaceName Name of required interface to be added
isProxyInterface True if interface added is a proxy interface

Implements mtsManagerGlobalInterface.

bool mtsManagerGlobal::FindInterfaceProvidedOrOutput ( const std::string &  processName,
const std::string &  componentName,
const std::string &  interfaceName 
) const [virtual]

Find provided interface using process name, component name, and interface name.

Parameters:
processName Name of process
componentName Name of component
interfaceName Name of provided interface

Implements mtsManagerGlobalInterface.

bool mtsManagerGlobal::FindInterfaceRequiredOrInput ( const std::string &  processName,
const std::string &  componentName,
const std::string &  interfaceName 
) const [virtual]

Find required interface using process name, component name, and interface name.

Parameters:
processName Name of process
componentName Name of component
interfaceName Name of required interface

Implements mtsManagerGlobalInterface.

bool mtsManagerGlobal::RemoveInterfaceProvidedOrOutput ( const std::string &  processName,
const std::string &  componentName,
const std::string &  interfaceName 
) [virtual]

Remove provided interface. Can be called at run-time.

Parameters:
processName Name of process
componentName Name of component
interfaceName Name of provided interface to be removed

Implements mtsManagerGlobalInterface.

bool mtsManagerGlobal::RemoveInterfaceRequiredOrInput ( const std::string &  processName,
const std::string &  componentName,
const std::string &  interfaceName 
) [virtual]

Remove required interface. Can be called at run-time.

Parameters:
processName Name of process
componentName Name of component
interfaceName Name of required interface to be removed

Implements mtsManagerGlobalInterface.

int mtsManagerGlobal::Connect ( const std::string &  requestProcessName,
const std::string &  clientProcessName,
const std::string &  clientComponentName,
const std::string &  clientInterfaceRequiredName,
const std::string &  serverProcessName,
const std::string &  serverComponentName,
const std::string &  serverInterfaceProvidedName 
) [virtual]

Connect two interfaces.

Parameters:
requestProcessName Name of process that requests this connection
clientProcessName Name of client process
clientComponentName Name of client component
clientInterfaceRequiredName Name of client's required interface
serverProcessName Name of server process
serverComponentName Name of server component
serverInterfaceProvidedName Name of server's provided interface
Returns:
Connect session id issued by the global component manager. Session id is used to clean up pending connections (which was requested but not yet established) after timeout. -1 if error occurs, zero or positive value if success

Implements mtsManagerGlobalInterface.

bool mtsManagerGlobal::ConnectConfirm ( unsigned int  connectionSessionID  )  [virtual]

Confirm that connection has been successfully established.

Parameters:
connectionSessionID Connection id
Returns:
False if connection id is invalid, true otherwise

Implements mtsManagerGlobalInterface.

bool mtsManagerGlobal::Disconnect ( const std::string &  clientProcessName,
const std::string &  clientComponentName,
const std::string &  clientInterfaceRequiredName,
const std::string &  serverProcessName,
const std::string &  serverComponentName,
const std::string &  serverInterfaceProvidedName 
) [virtual]

Disconnect two interfaces.

Parameters:
clientProcessName Name of client process
clientComponentName Name of client component
clientInterfaceRequiredName Name of required interface
serverProcessName Name of server process
serverComponentName Name of server component
serverInterfaceProvidedName Name of provided interface
Returns:
True if success, false otherwise

Implements mtsManagerGlobalInterface.

void mtsManagerGlobal::GetListOfConnections ( std::vector< mtsDescriptionConnection > &  list  )  const [virtual]

Get a list of all active connections represented by a set of strings

Implements mtsManagerGlobalInterface.

static std::string mtsManagerGlobal::GetName ( void   )  [inline, static]

Return the name of the global component manager (for mtsProxyBaseCommon.h)

Definition at line 385 of file mtsManagerGlobal.h.

std::vector<std::string> mtsManagerGlobal::GetIPAddress ( void   )  const

Return IP address of this machine.

void mtsManagerGlobal::GetNamesOfProcesses ( std::vector< std::string > &  namesOfProcesses  )  const

Get names of all processes

void mtsManagerGlobal::GetNamesOfComponents ( const std::string &  processName,
std::vector< std::string > &  namesOfComponents 
) const

Get names of all components in a process

void mtsManagerGlobal::GetNamesOfInterfacesProvidedOrOutput ( const std::string &  processName,
const std::string &  componentName,
std::vector< std::string > &  namesOfInterfacesProvided 
) const

Get names of all provided interfaces in a component

void mtsManagerGlobal::GetNamesOfInterfacesRequiredOrInput ( const std::string &  processName,
const std::string &  componentName,
std::vector< std::string > &  namesOfInterfacesRequired 
) const

Get names of all required interfaces in a component

mtsManagerLocalInterface* mtsManagerGlobal::GetProcessObject ( const std::string &  processName  ) 

Get a process object (local component manager object)

static const std::string mtsManagerGlobal::GetInterfaceUID ( const std::string &  processName,
const std::string &  componentName,
const std::string &  interfaceName 
) [inline, static]

Generate unique id of an interface as string

Definition at line 484 of file mtsManagerGlobal.h.

static const std::string mtsManagerGlobal::GetComponentProxyName ( const std::string &  processName,
const std::string &  componentName 
) [inline, static]

Generate unique name of a proxy component

Definition at line 491 of file mtsManagerGlobal.h.


Member Data Documentation

mtsManagerLocal* mtsManagerGlobal::LocalManager [protected]

Instance of connected local component manager. Note that the global component manager communicates with the only one instance of mtsManagerLocalInterface regardless of connection type (standalone or network mode)

MJ: (8/20/10) To support a local connection between the global component manager and a local component manager on the same process, this assumption is slightly modified such that the GCM can have two different type of connections -- local and remote connections. When the GCM executes commands, it checks if it has a local connection to the LCM on the same process and, if yes, it sends the command to the local LCM. If not, it delivers the command to a remote LCM as before.

Definition at line 255 of file mtsManagerGlobal.h.

osaMutex mtsManagerGlobal::ConnectionElementMapChange [protected]

Mutex for ConnectionElementMap because several threads possibly access ConnectionElementMap.

Definition at line 260 of file mtsManagerGlobal.h.

unsigned int mtsManagerGlobal::ConnectionID [protected]

Counter to issue a new connection ID

Definition at line 263 of file mtsManagerGlobal.h.

mtsManagerComponentServer* mtsManagerGlobal::ManagerComponentServer [protected]

Typedef to get user id using connection id. User id is set by provided interface's AllocatedResources() (see mtsManagerLocal::GetInterfaceProvidedDescription() for details).

Definition at line 276 of file mtsManagerGlobal.h.


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