ParaView
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
vtkProcessModule Class Reference

process initialization and management core for ParaView processes. vtkProcessModule is the process initialization and session management core for ParaView processes. More...

#include <vtkProcessModule.h>

Inheritance diagram for vtkProcessModule:
Inheritance graph
[legend]
Collaboration diagram for vtkProcessModule:
Collaboration graph
[legend]

List of all members.

Public Types

enum  ProcessTypes {
  PROCESS_CLIENT, PROCESS_SERVER, PROCESS_DATA_SERVER, PROCESS_RENDER_SERVER,
  PROCESS_BATCH, PROCESS_INVALID = -1
}
enum  ServerFlags {
  DATA_SERVER = 0x01, DATA_SERVER_ROOT = 0x02, RENDER_SERVER = 0x04, RENDER_SERVER_ROOT = 0x08,
  SERVERS = DATA_SERVER | RENDER_SERVER, CLIENT = 0x10, CLIENT_AND_SERVERS = DATA_SERVER | CLIENT | RENDER_SERVER
}

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void UpdateProcessType (ProcessTypes newType, bool dontKnowWhatImDoing=true)
vtkIdType RegisterSession (vtkSession *)
vtkSessionGetSession (vtkIdType)
vtkIdType GetSessionID (vtkSession *)
vtkSessionIteratorNewSessionIterator ()
vtkSessionGetActiveSession ()
vtkSessionGetSession ()
vtkMultiProcessControllerGetGlobalController ()
int GetNumberOfLocalPartitions ()
int GetPartitionId ()
bool UnRegisterSession (vtkIdType sessionID)
bool UnRegisterSession (vtkSession *session)
virtual bool GetMultipleSessionsSupport ()
virtual void SetMultipleSessionsSupport (bool)
virtual void MultipleSessionsSupportOn ()
virtual void MultipleSessionsSupportOff ()
virtual vtkPVOptionsGetOptions ()
void SetOptions (vtkPVOptions *op)
virtual vtkNetworkAccessManagerGetNetworkAccessManager ()
void SetNetworkAccessManager (vtkNetworkAccessManager *)
virtual bool GetReportInterpreterErrors ()
virtual void SetReportInterpreterErrors (bool)
virtual void ReportInterpreterErrorsOn ()
virtual void ReportInterpreterErrorsOff ()

Static Public Member Functions

static vtkProcessModuleNew ()
static int IsTypeOf (const char *type)
static vtkProcessModuleSafeDownCast (vtkObject *o)
static ProcessTypes GetProcessType ()
static bool Initialize (ProcessTypes type, int &argc, char **&argv)
static bool Finalize ()
static vtkProcessModuleGetProcessModule ()

Protected Member Functions

virtual void SetSymmetricMPIMode (bool)
void PushActiveSession (vtkSession *)
void PopActiveSession (vtkSession *)

Protected Attributes

vtkNetworkAccessManagerNetworkAccessManager
vtkPVOptionsOptions
vtkIdType MaxSessionId
vtkProcessModuleInternalsInternals
bool ReportInterpreterErrors

Friends

class vtkSession
class vtkSessionIterator
virtual bool GetSymmetricMPIMode ()
 vtkProcessModule ()
 ~vtkProcessModule ()

Detailed Description

process initialization and management core for ParaView processes. vtkProcessModule is the process initialization and session management core for ParaView processes.

Definition at line 35 of file vtkProcessModule.h.


Member Enumeration Documentation

Enumerator:
PROCESS_CLIENT 
PROCESS_SERVER 
PROCESS_DATA_SERVER 
PROCESS_RENDER_SERVER 
PROCESS_BATCH 
PROCESS_INVALID 

Definition at line 42 of file vtkProcessModule.h.

These flags are used to specify destination servers for the SendStream function. FIXME: These flags should simply move to PVSession. They don't make sense in non-PVSessions since the processes may have different roles in that case.

Enumerator:
DATA_SERVER 
DATA_SERVER_ROOT 
RENDER_SERVER 
RENDER_SERVER_ROOT 
SERVERS 
CLIENT 
CLIENT_AND_SERVERS 

Definition at line 59 of file vtkProcessModule.h.


Constructor & Destructor Documentation

vtkProcessModule::vtkProcessModule ( ) [protected]

Returns true if ParaView is to be run in symmetric mode. Symmetric mode implies that satellites process same code as the root node. This is applicable only for PROCESS_BATCH.

vtkProcessModule::~vtkProcessModule ( ) [protected]

Returns true if ParaView is to be run in symmetric mode. Symmetric mode implies that satellites process same code as the root node. This is applicable only for PROCESS_BATCH.


Member Function Documentation

static vtkProcessModule* vtkProcessModule::New ( ) [static]

Reimplemented from vtkObject.

virtual const char* vtkProcessModule::GetClassName ( ) [virtual]

Reimplemented from vtkObject.

static int vtkProcessModule::IsTypeOf ( const char *  type) [static]

Reimplemented from vtkObject.

virtual int vtkProcessModule::IsA ( const char *  type) [virtual]

Reimplemented from vtkObject.

static vtkProcessModule* vtkProcessModule::SafeDownCast ( vtkObject o) [static]

Reimplemented from vtkObject.

void vtkProcessModule::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Reimplemented from vtkObject.

static ProcessTypes vtkProcessModule::GetProcessType ( ) [static]
void vtkProcessModule::UpdateProcessType ( ProcessTypes  newType,
bool  dontKnowWhatImDoing = true 
)

This method has been added to support migration from one type to another but this method call if NOT RECOMMENDED. -> We use it to handle the Animation saving at disconnection time on the server side. We create a new session and migrate the sever process to a batch process.

static bool vtkProcessModule::Initialize ( ProcessTypes  type,
int argc,
char **&  argv 
) [static]

Initializes the process and the ProcessModule. The function is to initialize MPI if applicable for the process and setup some environment e.g. DISPLAY. Initializes the ProcessModule. for the process and setup some environment e.g. DISPLAY.

static bool vtkProcessModule::Finalize ( ) [static]

Finalizes and cleans up the process.

vtkIdType vtkProcessModule::RegisterSession ( vtkSession )

Registers a new session. A new ID is assigned for the session and that ID is returned. The ID can be used in future to access this session. Fires vtkCommand::ConnectionCreatedEvent every time a session is registered. The event-data for this event is a vtkIdType whose value is the session id.

bool vtkProcessModule::UnRegisterSession ( vtkIdType  sessionID)

Unregister a session given its ID. This is the same ID that is returned when the session was registered. Returns true is the session was unregistered. Unregistering a session implies that the ProcessModule will no longer monitor communication on the sockets, if any, in the session. Fires vtkCommand::ConnectionClosedEvent every time a session is unregistered. The event-data for this event is a vtkIdType whose value is the session id.

bool vtkProcessModule::UnRegisterSession ( vtkSession session)

Unregister a session given its ID. This is the same ID that is returned when the session was registered. Returns true is the session was unregistered. Unregistering a session implies that the ProcessModule will no longer monitor communication on the sockets, if any, in the session. Fires vtkCommand::ConnectionClosedEvent every time a session is unregistered. The event-data for this event is a vtkIdType whose value is the session id.

vtkSession* vtkProcessModule::GetSession ( vtkIdType  )

Returns the session associated with a given ID.

vtkIdType vtkProcessModule::GetSessionID ( vtkSession )

Returns the session id for the session, if any. Return 0 is the session has not been registered with the process module.

vtkSessionIterator* vtkProcessModule::NewSessionIterator ( )

Returns a new session iterator that can be used to iterate over the registered sessions.

vtkSession* vtkProcessModule::GetActiveSession ( )

Whenever any session is processing some message, it typically marks itself active with the process module. The active session can be accessed using this method.

vtkSession* vtkProcessModule::GetSession ( )

This is a convenience method that either returns the active session, if present, otherwise the first session. Don't use this for new API. This is provided for some old api.

virtual bool vtkProcessModule::GetMultipleSessionsSupport ( ) [virtual]

Return true, if multiple sessions can be used simultanuously. We set the default to be FALSE.

virtual void vtkProcessModule::SetMultipleSessionsSupport ( bool  ) [virtual]

Return true, if multiple sessions can be used simultanuously. We set the default to be FALSE.

virtual void vtkProcessModule::MultipleSessionsSupportOn ( ) [virtual]

Return true, if multiple sessions can be used simultanuously. We set the default to be FALSE.

virtual void vtkProcessModule::MultipleSessionsSupportOff ( ) [virtual]

Return true, if multiple sessions can be used simultanuously. We set the default to be FALSE.

static vtkProcessModule* vtkProcessModule::GetProcessModule ( ) [static]

Provides access to the global ProcessModule. This method can only be called after Initialize().

virtual vtkPVOptions* vtkProcessModule::GetOptions ( ) [virtual]

Set/Get the application command line options object. Note that this has to be explicitly set. vtkProcessModule::Initialize() does not initialize the vtkPVOptions.

void vtkProcessModule::SetOptions ( vtkPVOptions op)

Set/Get the application command line options object. Note that this has to be explicitly set. vtkProcessModule::Initialize() does not initialize the vtkPVOptions.

virtual vtkNetworkAccessManager* vtkProcessModule::GetNetworkAccessManager ( ) [virtual]

Get/Set the network access manager. vtkNetworkAccessManager encapsulates the setup of interprocess communication channels. By default a vtkTCPNetworkAccessManager is setup. If you want to change the network access manager, it should be done only when no sessions are present. Ideally, you want to do that during the initialization of the process itself.

void vtkProcessModule::SetNetworkAccessManager ( vtkNetworkAccessManager )

Get/Set the network access manager. vtkNetworkAccessManager encapsulates the setup of interprocess communication channels. By default a vtkTCPNetworkAccessManager is setup. If you want to change the network access manager, it should be done only when no sessions are present. Ideally, you want to do that during the initialization of the process itself.

vtkMultiProcessController* vtkProcessModule::GetGlobalController ( )

Provides access to the global MPI controller, if any. Same can be obtained using vtkMultiProcessController::GetGlobalController();

int vtkProcessModule::GetNumberOfLocalPartitions ( )

Returns the number of processes in this process group.

int vtkProcessModule::GetPartitionId ( )

Returns the local process id.

virtual bool vtkProcessModule::GetReportInterpreterErrors ( ) [virtual]

Set/Get whether to report errors from the Interpreter.

virtual void vtkProcessModule::SetReportInterpreterErrors ( bool  ) [virtual]

Set/Get whether to report errors from the Interpreter.

virtual void vtkProcessModule::ReportInterpreterErrorsOn ( ) [virtual]

Set/Get whether to report errors from the Interpreter.

virtual void vtkProcessModule::ReportInterpreterErrorsOff ( ) [virtual]

Set/Get whether to report errors from the Interpreter.

virtual bool vtkProcessModule::GetSymmetricMPIMode ( ) [virtual]

Returns true if ParaView is to be run in symmetric mode. Symmetric mode implies that satellites process same code as the root node. This is applicable only for PROCESS_BATCH.

virtual void vtkProcessModule::SetSymmetricMPIMode ( bool  ) [protected, virtual]
void vtkProcessModule::PushActiveSession ( vtkSession ) [protected]

Push/Pop the active session.

void vtkProcessModule::PopActiveSession ( vtkSession ) [protected]

Push/Pop the active session.


Friends And Related Function Documentation

friend class vtkSession [friend]

Marking vtkSession as friend since it needs access to PushActiveSession/PopActiveSession.

Definition at line 207 of file vtkProcessModule.h.

friend class vtkSessionIterator [friend]

Definition at line 221 of file vtkProcessModule.h.


Member Data Documentation

Definition at line 209 of file vtkProcessModule.h.

Definition at line 210 of file vtkProcessModule.h.

Used to keep track of maximum session used. Only used to ensure that no session id is ever repeated.

Definition at line 214 of file vtkProcessModule.h.

Definition at line 217 of file vtkProcessModule.h.

Definition at line 223 of file vtkProcessModule.h.


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