ParaView
|
vtkSMSessionClient is a remote-session that connects to a remote server. More...
#include <vtkSMSessionClient.h>
Public Types | |
typedef vtkSMSession | Superclass |
![]() | |
enum | RenderingMode { RENDERING_NOT_AVAILABLE = 0x00, RENDERING_UNIFIED = 0x01, RENDERING_SPLIT = 0x02 } |
typedef vtkPVSessionBase | Superclass |
![]() | |
enum | EventIds { RegisterRemoteObjectEvent = 1234, UnRegisterRemoteObjectEvent = 4321, ProcessingRemoteEnd = 2143, ConnectionLost = 6789 } |
typedef vtkPVSession | Superclass |
![]() | |
enum | ServerFlags { NONE = 0, 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 } |
typedef vtkSession | Superclass |
![]() | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual const char * | GetURI () |
Return the url used to connect the current session to a server. More... | |
virtual bool | Connect (const char *url) |
Connects a remote server. More... | |
virtual bool | GetIsAlive () |
Returns true is this session is active/alive/valid. More... | |
virtual ServerFlags | GetProcessRoles () |
Returns a ServerFlags indicate the nature of the current processes. More... | |
virtual vtkMultiProcessController * | GetController (ServerFlags processType) |
Returns the controller used to communicate with the process. More... | |
virtual vtkPVServerInformation * | GetServerInformation () |
vtkPVServerInformation is an information-object that provides information about the server processes. More... | |
virtual void | Initialize () |
Called to do any initializations after a successful session has been established. More... | |
void | CloseSession () |
Gracefully exits the session. More... | |
virtual bool | GatherInformation (vtkTypeUInt32 location, vtkPVInformation *information, vtkTypeUInt32 globalid) |
Gather information about an object referred by the globalid . More... | |
virtual int | GetNumberOfProcesses (vtkTypeUInt32 servers) |
Returns the number of processes on the given server/s. More... | |
virtual bool | IsMPIInitialized (vtkTypeUInt32 servers) |
Returns whether or not MPI is initialized on the specified server/s. More... | |
virtual void | PreDisconnection () |
virtual bool | IsNotBusy () |
Flag used to know if it is a good time to handle server notification. More... | |
virtual void | StartBusyWork () |
BusyWork should be declared inside method that will request several network call that we don't want to interupt such as GatherInformation and Pull. More... | |
virtual void | EndBusyWork () |
BusyWork should be declared inside method that will request several network call that we don't want to interupt such as GatherInformation and Pull. More... | |
virtual vtkSMCollaborationManager * | GetCollaborationManager () |
Return the instance of vtkSMCollaborationManager that will be lazy created at the first call. More... | |
virtual vtkTypeUInt32 | GetNextGlobalUniqueIdentifier () |
Provides the next available identifier. More... | |
virtual vtkTypeUInt32 | GetNextChunkGlobalUniqueIdentifier (vtkTypeUInt32 chunkSize) |
Return the first Id of the requested chunk. More... | |
void | OnServerNotificationMessageRMI (void *message, int message_length) |
virtual void | PushState (vtkSMMessage *msg) |
Push the state. More... | |
virtual void | PullState (vtkSMMessage *message) |
Push the state. More... | |
virtual void | ExecuteStream (vtkTypeUInt32 location, const vtkClientServerStream &stream, bool ignore_errors=false) |
Push the state. More... | |
virtual const vtkClientServerStream & | GetLastResult (vtkTypeUInt32 location) |
Push the state. More... | |
virtual void | SetAbortConnect (bool) |
When Connect() is waiting for a server to connect back to the client (in reverse connect mode), then it periodically fires ProgressEvent. More... | |
![]() | |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual vtkSMProxyLocator * | GetProxyLocator () |
virtual unsigned int | GetRenderClientMode () |
Convenient method to determine if the rendering is done in a pvrenderer or not. More... | |
virtual void | NotifyAllClients (const vtkSMMessage *msg) |
Sends the message to all clients. More... | |
virtual void | NotifyOtherClients (const vtkSMMessage *) |
Sends the message to all but the active client-session. More... | |
virtual vtkSMSessionProxyManager * | GetSessionProxyManager () |
Returns the vtkSMSessionProxyManager associated with this session. More... | |
virtual vtkSMStateLocator * | GetStateLocator () |
Provide an access to the session state locator that can provide the last state of a given remote object that have been pushed. More... | |
virtual bool | GetIsAutoMPI () |
This flag if set indicates that the current session module has automatically started "pvservers" as MPI processes as default pipeline. More... | |
![]() | |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual vtkMPIMToNSocketConnection * | GetMPIMToNSocketConnection () |
This is socket connection, if any to communicate between the data-server and render-server nodes. More... | |
vtkSIProxyDefinitionManager * | GetProxyDefinitionManager () |
Get the ProxyDefinitionManager. More... | |
vtkSIObject * | GetSIObject (vtkTypeUInt32 globalid) |
Returns a vtkSIObject or subclass given its global id, if any. More... | |
vtkObject * | GetRemoteObject (vtkTypeUInt32 globalid) |
Return a vtkSMRemoteObject given its global id if any otherwise return NULL;. More... | |
virtual void | GetAllRemoteObjects (vtkCollection *collection) |
Allow the user to fill its vtkCollection with all RemoteObject This could be usefull when you want to hold a reference to them to prevent any deletion across several method call. More... | |
virtual bool | IsProcessingRemoteNotification () |
This propertie is used to discard ignore_synchronization proxy property when we load protobuf states. More... | |
virtual void | UseSessionCoreOf (vtkPVSessionBase *other) |
Update internal session core in order to use the one used in another session. More... | |
virtual vtkPVSessionCore * | GetSessionCore () |
Provides access to the session core. More... | |
![]() | |
void | PrintSelf (ostream &os, vtkIndent indent) |
bool | HasProcessRole (vtkTypeUInt32 flag) |
Convenience method that returns true if the current session is serving the indicated role on this process. More... | |
virtual bool | IsMultiClients () |
Allow anyone to know easily if the current session is involved in collaboration or not. More... | |
bool | GetPendingProgress () |
Returns true if the session is within a PrepareProgress() and CleanupPendingProgress() block. More... | |
virtual vtkPVProgressHandler * | GetProgressHandler () |
Provides access to the progress handler. More... | |
void | PrepareProgress () |
Should be called to begin/end receiving progresses on this session. More... | |
void | CleanupPendingProgress () |
Should be called to begin/end receiving progresses on this session. More... | |
![]() | |
void | PrintSelf (ostream &os, vtkIndent indent) |
Static Public Member Functions | |
static vtkSMSessionClient * | New () |
static int | IsTypeOf (const char *type) |
static vtkSMSessionClient * | SafeDownCast (vtkObject *o) |
![]() | |
static vtkSMSession * | New () |
static vtkSMSession * | New (vtkPVSessionBase *otherSession) |
static vtkSMSession * | New (vtkPVSessionCore *otherSessionCore) |
static int | IsTypeOf (const char *type) |
static vtkSMSession * | SafeDownCast (vtkObject *o) |
static vtkIdType | ConnectToCatalyst () |
These are static helper methods that help create Catalyst ParaView sessions. More... | |
static vtkIdType | ConnectToSelf () |
These are static helper methods that help create standard ParaView sessions. More... | |
static vtkIdType | ConnectToRemote (const char *hostname, int port) |
These are static helper methods that help create standard ParaView sessions. More... | |
static vtkIdType | ReverseConnectToRemote (int port) |
Same as ConnectToRemote() except that it waits for a reverse connection. More... | |
static vtkIdType | ReverseConnectToRemote (int port, bool(*callback)()) |
static vtkIdType | ConnectToRemote (const char *dshost, int dsport, const char *rshost, int rsport) |
These are static helper methods that help create standard ParaView sessions. More... | |
static vtkIdType | ReverseConnectToRemote (int dsport, int rsport) |
Same as ConnectToRemote() except that it waits for a reverse connection. More... | |
static vtkIdType | ReverseConnectToRemote (int dsport, int rsport, bool(*callback)()) |
static void | Disconnect (vtkIdType sessionid) |
Use this method to disconnect from a session. More... | |
static void | Disconnect (vtkSMSession *session) |
Use this method to disconnect from a session. More... | |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkPVSessionBase * | SafeDownCast (vtkObject *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkPVSession * | SafeDownCast (vtkObject *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkSession * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
vtkSMSessionClient () | |
~vtkSMSessionClient () | |
void | SetRenderServerController (vtkMultiProcessController *) |
void | SetDataServerController (vtkMultiProcessController *) |
void | SetupDataServerRenderServerConnection () |
virtual void | UnRegisterSIObject (vtkSMMessage *msg) |
Delete server side object. More... | |
virtual void | RegisterSIObject (vtkSMMessage *msg) |
Notify server side object that it is used by one more client. More... | |
vtkTypeUInt32 | GetRealLocation (vtkTypeUInt32) |
Translates the location to a real location based on whether a separate render-server exists. More... | |
virtual void | SetURI (const char *) |
virtual bool | OnWrongTagEvent (vtkObject *caller, unsigned long eventid, void *calldata) |
Callback when any vtkMultiProcessController subclass fires a WrongTagEvent. More... | |
virtual void | OnConnectionLost (vtkObject *caller, unsigned long eventid, void *calldata) |
Callback when any vtkMultiProcessController subclass fires a ErrorEvent. More... | |
![]() | |
vtkSMSession (bool initialize_during_constructor=true, vtkPVSessionCore *preExistingSessionCore=NULL) | |
~vtkSMSession () | |
virtual void | ProcessNotification (const vtkSMMessage *) |
Process the Notifation message sent using API to communicate from server-to-client. More... | |
void | UpdateStateHistory (vtkSMMessage *msg) |
This method has been externalized so classes that heritate from vtkSMSession and override PushState could easily keep track of the StateHistory and maintain the UndoRedo mecanisme. More... | |
![]() | |
vtkPVSessionBase () | |
vtkPVSessionBase (vtkPVSessionCore *coreToUse) | |
~vtkPVSessionBase () | |
void | RegisterRemoteObject (vtkTypeUInt32 globalid, vtkTypeUInt32 location, vtkObject *obj) |
Register a remote object. More... | |
void | UnRegisterRemoteObject (vtkTypeUInt32 globalid, vtkTypeUInt32 location) |
Unregister a remote object. More... | |
vtkPVSessionCore * | GetSessionCore () const |
Method used to migrate from one Session type to another by keeping the same vtkPVSessionCore. More... | |
void | SetSessionCore (vtkPVSessionCore *) |
Method used to migrate from one Session type to another by keeping the same vtkPVSessionCore. More... | |
virtual void | PrepareProgressInternal () |
Should be called to begin/end receiving progresses on this session. More... | |
virtual void | CleanupPendingProgressInternal () |
Should be called to begin/end receiving progresses on this session. More... | |
virtual bool | StartProcessingRemoteNotification () |
Methods used to monitor if we are currently processing a server notification Only vtkSMSessionClient use the flag to disable ignore_synchronization properties from beeing updated. More... | |
virtual void | StopProcessingRemoteNotification (bool previousValue) |
Methods used to monitor if we are currently processing a server notification Only vtkSMSessionClient use the flag to disable ignore_synchronization properties from beeing updated. More... | |
![]() | |
vtkPVSession () | |
~vtkPVSession () | |
![]() | |
vtkSession () | |
~vtkSession () | |
virtual void | Activate () |
Subclasses must call this to mark the session active. More... | |
virtual void | DeActivate () |
Subclasses must call this to mark the session inactive. More... | |
Protected Attributes | |
vtkMultiProcessController * | RenderServerController |
vtkMultiProcessController * | DataServerController |
vtkPVServerInformation * | DataServerInformation |
vtkPVServerInformation * | RenderServerInformation |
vtkPVServerInformation * | ServerInformation |
vtkClientServerStream * | ServerLastInvokeResult |
bool | AbortConnect |
char * | URI |
bool | NoMoreDelete |
vtkSMCollaborationManager * | CollaborationCommunicator |
![]() | |
vtkSMSessionProxyManager * | SessionProxyManager |
vtkSMStateLocator * | StateLocator |
vtkSMProxyLocator * | ProxyLocator |
bool | IsAutoMPI |
![]() | |
vtkPVSessionCore * | SessionCore |
bool | ProcessingRemoteNotification |
Methods used to monitor if we are currently processing a server notification Only vtkSMSessionClient use the flag to disable ignore_synchronization properties from beeing updated. More... | |
![]() | |
vtkPVProgressHandler * | ProgressHandler |
Additional Inherited Members | |
![]() | |
enum | { EXCEPTION_EVENT_TAG = 31416 } |
![]() | |
static vtkIdType | ConnectToRemoteInternal (const char *hostname, int port, bool is_auto_mpi) |
Internal method used by ConnectToRemote(). More... | |
vtkSMSessionClient is a remote-session that connects to a remote server.
vtkSMSessionClient supports both connecting a pvserver as well as connecting a pvdataserver/pvrenderserver.
Definition at line 35 of file vtkSMSessionClient.h.
Definition at line 39 of file vtkSMSessionClient.h.
|
protected |
|
protected |
|
static |
|
virtual |
Reimplemented from vtkSMSession.
|
static |
|
virtual |
Reimplemented from vtkSMSession.
|
static |
void vtkSMSessionClient::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
|
inlinevirtual |
Return the url used to connect the current session to a server.
Reimplemented from vtkSMSession.
Definition at line 45 of file vtkSMSessionClient.h.
|
virtual |
Connects a remote server.
URL can be of the following format: cs://<pvserver-host>:<pvserver-port> cdsrs://<pvdataserver-host>:<pvdataserver-port>/<pvrenderserver-host>:<pvrenderserver-port> In both cases the port is optional. When not provided default pvserver/pvdataserver port // is 11111, while default pvrenderserver port is 22221. For reverse connect i.e. the client waits for the server to connect back, simply add "rc" to the protocol e.g. csrc://<pvserver-host>:<pvserver-port> cdsrsrc://<pvdataserver-host>:<pvdataserver-port>/<pvrenderserver-host>:<pvrenderserver-port> In this case, the hostname is irrelevant and is ignored.
|
virtual |
Returns true is this session is active/alive/valid.
Reimplemented from vtkSMSession.
|
inlinevirtual |
Returns a ServerFlags indicate the nature of the current processes.
e.g. if the current processes acts as a data-server and a render-server, it returns DATA_SERVER | RENDER_SERVER. Overridden to return CLIENT since this process only acts as the client.
Reimplemented from vtkSMSession.
Definition at line 73 of file vtkSMSessionClient.h.
|
virtual |
Returns the controller used to communicate with the process.
Value must be DATA_SERVER_ROOT or RENDER_SERVER_ROOT or CLIENT.
Reimplemented from vtkPVSession.
|
inlinevirtual |
vtkPVServerInformation is an information-object that provides information about the server processes.
These include server-side capabilities as well as server-side command line arguments e.g. tile-display parameters. Use this method to obtain the server-side information. Overridden to provide return the information gathered from data-server and render-server.
Reimplemented from vtkPVSessionBase.
Definition at line 89 of file vtkSMSessionClient.h.
|
virtual |
Called to do any initializations after a successful session has been established.
Initialize the data-server-render-server connection, if applicable.
Reimplemented from vtkSMSession.
|
virtual |
Push the state.
Reimplemented from vtkSMSession.
|
virtual |
Push the state.
Reimplemented from vtkPVSessionBase.
|
virtual |
Push the state.
Reimplemented from vtkPVSessionBase.
|
virtual |
Push the state.
Reimplemented from vtkPVSessionBase.
|
virtual |
When Connect() is waiting for a server to connect back to the client (in reverse connect mode), then it periodically fires ProgressEvent.
Application can add observer to this signal and set this flag to true, if it wants to abort the wait for the server.
void vtkSMSessionClient::CloseSession | ( | ) |
Gracefully exits the session.
|
virtual |
Gather information about an object referred by the globalid
.
location
identifies the processes to gather the information from. Overridden to fetch the information from server if needed, otherwise it's handled locally.
Reimplemented from vtkPVSessionBase.
|
virtual |
Returns the number of processes on the given server/s.
If more than 1 server is identified, than it returns the maximum number of processes e.g. is servers = DATA_SERVER | RENDER_SERVER and there are 3 data-server nodes and 2 render-server nodes, then this method will return 3.
Reimplemented from vtkSMSession.
|
virtual |
Returns whether or not MPI is initialized on the specified server/s.
If more than 1 server is identified it will return true only if all of the servers have MPI initialized.
Reimplemented from vtkSMSession.
|
virtual |
Reimplemented from vtkSMSession.
|
virtual |
Flag used to know if it is a good time to handle server notification.
|
virtual |
BusyWork should be declared inside method that will request several network call that we don't want to interupt such as GatherInformation and Pull.
|
virtual |
BusyWork should be declared inside method that will request several network call that we don't want to interupt such as GatherInformation and Pull.
|
virtual |
Return the instance of vtkSMCollaborationManager that will be lazy created at the first call.
Reimplemented from vtkSMSession.
|
virtual |
Provides the next available identifier.
This implementation works locally. without any code distribution. To support the distributed architecture the vtkSMSessionClient overide those method to call them on the DATA_SERVER vtkPVSessionBase instance.
Reimplemented from vtkPVSessionBase.
|
virtual |
Return the first Id of the requested chunk.
1 = ReverveNextIdChunk(10); | Reserved ids [1,2,3,4,5,6,7,8,9,10] 11 = ReverveNextIdChunk(10);| Reserved ids [11,12,13,14,15,16,17,18,19,20] b = a + 10;
Reimplemented from vtkPVSessionBase.
void vtkSMSessionClient::OnServerNotificationMessageRMI | ( | void * | message, |
int | message_length | ||
) |
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
|
protectedvirtual |
Notify server side object that it is used by one more client.
(SIObject)
Reimplemented from vtkPVSessionBase.
|
protected |
Translates the location to a real location based on whether a separate render-server exists.
|
protectedvirtual |
|
protectedvirtual |
Callback when any vtkMultiProcessController subclass fires a WrongTagEvent.
Return true if the event was handle locally.
Reimplemented from vtkPVSession.
|
protectedvirtual |
Callback when any vtkMultiProcessController subclass fires a ErrorEvent.
|
protected |
Definition at line 227 of file vtkSMSessionClient.h.
|
protected |
Definition at line 228 of file vtkSMSessionClient.h.
|
protected |
Definition at line 230 of file vtkSMSessionClient.h.
|
protected |
Definition at line 231 of file vtkSMSessionClient.h.
|
protected |
Definition at line 232 of file vtkSMSessionClient.h.
|
protected |
Definition at line 233 of file vtkSMSessionClient.h.
|
protected |
Definition at line 235 of file vtkSMSessionClient.h.
|
protected |
Definition at line 238 of file vtkSMSessionClient.h.
|
protected |
Definition at line 244 of file vtkSMSessionClient.h.
|
protected |
Definition at line 247 of file vtkSMSessionClient.h.