ParaView
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | Static Protected Member Functions
pqServer Class Reference

pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vtkSMSession. More...

#include <pqServer.h>

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

List of all members.

Public Slots

void sendToOtherClients (vtkSMMessage *msg)
 Allow user to broadcast to other client a given message.

Signals

void nameChanged (pqServerManagerModelItem *)
 Fired when the name of the proxy is changed.
void fiveMinuteTimeoutWarning ()
 Fired about 5 minutes before the server timesout.
void finalTimeoutWarning ()
 Fired about 1 minute before the server timesout.
void sentFromOtherClient (pqServer *, vtkSMMessage *msg)
 Allow user to listen messages from other clients.
void triggeredMasterUser (int)
 Signal triggered when user information get updated.
void triggeredUserName (int, QString &)
void triggeredUserListChanged ()
void triggerFollowCamera (int)
void closeSessionRequest ()
 Forward request for disconnection.

Public Member Functions

 pqServer (vtkIdType connectionId, vtkPVOptions *, QObject *parent=NULL)
virtual ~pqServer ()
const pqServerResourcegetResource ()
void setResource (const pqServerResource &server_resource)
vtkSMSessionsession () const
 Returns the session instance which the pqServer represents.
vtkIdType GetConnectionID () const
 Returns the connection id for the server connection.
vtkSMSessionProxyManagerproxyManager () const
 Returns the proxy manager for this session.
vtkSMProxySelectionModelactiveSourcesSelectionModel () const
 Sources selection model is used to keep track of sources currently selected on this session/server-connection.
vtkSMProxySelectionModelactiveViewSelectionModel () const
 View selection model is used to keep track of active view.
int getNumberOfPartitions ()
 Return the number of data server partitions on this server connection.
bool isRemote () const
 Returns is this connection is a connection to a remote server or a built-in server.
bool isMaster () const
 Returns true if the client is currently master.
bool isProcessingPending () const
 Returns true if the client is currently processing remote messages and still have more to process.
bool isRenderServerSeparate ()
 Returns true is this connection has a separate render-server and data-server.
pqTimeKeepergetTimeKeeper () const
 Returns the time keeper for this connection.
void initialize ()
 Initializes the pqServer, must be called as soon as pqServer is created.
vtkPVOptionsgetOptions () const
 Returns the PVOptions for this connection. These are client side options.
vtkPVServerInformationgetServerInformation () const
 Returns the vtkPVServerInformation object which contains information about the command line options specified on the remote server, if any.
bool isProgressPending () const
 Returns true if the client is waiting on some actions from the server that typically result in progress events.

Static Public Member Functions

static void setHeartBeatTimeoutSetting (int msec)
 Get/Set the application wide heart beat timeout setting.
static int getHeartBeatTimeoutSetting ()
static void setCoincidentTopologyResolutionModeSetting (int mode)
 Get/Set the application wide coincident topology resolution settings.
static int coincidentTopologyResolutionModeSetting ()
static void setPolygonOffsetParametersSetting (double factor, double value)
static void polygonOffsetParametersSetting (double &factor, double &value)
static void setPolygonOffsetFacesSetting (bool)
static bool polygonOffsetFacesSetting ()
static void setZShiftSetting (double shift)
static double zShiftSetting ()
static void setGlobalImmediateModeRenderingSetting (bool val)
 Get/Set global immediate mode rendering.
static bool globalImmediateModeRenderingSetting ()

Protected Slots

void heartBeat ()
 Called to send a heartbeat to the server.
void processServerNotification ()
 Called when idle to look for server notification for collaboration purpose.
void onCollaborationCommunication (vtkObject *, unsigned long, void *, void *)
 Called by vtkSMCollaborationManager when associated message happen.

Protected Member Functions

void createTimeKeeper ()
void setHeartBeatTimeout (int msec)
 Set the heartbeat timeout for this instance of pqServer.
void setCoincidentTopologyResolutionMode (int)
void setPolygonOffsetParameters (double factor, double units)
void setPolygonOffsetFaces (bool offset_faces)
void setZShift (double shift)
void setGlobalImmediateModeRendering (bool)

Static Protected Member Functions

static const char * HEARBEAT_TIME_SETTING_KEY ()
 Returns the string key used for the heart beat time interval.
static void updateGlobalMapperProperties ()

Detailed Description

pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vtkSMSession.

Besides providing API to access vtkSMSession, it also performs some initialization of session-related proxies such as time-keeper and global-mapper-properties proxies.

Definition at line 62 of file pqServer.h.


Constructor & Destructor Documentation

pqServer::pqServer ( vtkIdType  connectionId,
vtkPVOptions ,
QObject *  parent = NULL 
)
virtual pqServer::~pqServer ( ) [virtual]

Member Function Documentation

const pqServerResource& pqServer::getResource ( )
void pqServer::setResource ( const pqServerResource server_resource)
vtkSMSession* pqServer::session ( ) const

Returns the session instance which the pqServer represents.

vtkIdType pqServer::GetConnectionID ( ) const

Returns the connection id for the server connection.

vtkSMSessionProxyManager* pqServer::proxyManager ( ) const

Returns the proxy manager for this session.

vtkSMProxySelectionModel* pqServer::activeSourcesSelectionModel ( ) const

Sources selection model is used to keep track of sources currently selected on this session/server-connection.

vtkSMProxySelectionModel* pqServer::activeViewSelectionModel ( ) const

View selection model is used to keep track of active view.

int pqServer::getNumberOfPartitions ( )

Return the number of data server partitions on this server connection.

A convenience method.

bool pqServer::isRemote ( ) const

Returns is this connection is a connection to a remote server or a built-in server.

bool pqServer::isMaster ( ) const

Returns true if the client is currently master.

For non-collaborative session, it always return true.

bool pqServer::isProcessingPending ( ) const

Returns true if the client is currently processing remote messages and still have more to process.

This method is used to deffered the tryRender.

bool pqServer::isRenderServerSeparate ( )

Returns true is this connection has a separate render-server and data-server.

pqTimeKeeper* pqServer::getTimeKeeper ( ) const

Returns the time keeper for this connection.

void pqServer::initialize ( )

Initializes the pqServer, must be called as soon as pqServer is created.

vtkPVOptions* pqServer::getOptions ( ) const

Returns the PVOptions for this connection. These are client side options.

vtkPVServerInformation* pqServer::getServerInformation ( ) const

Returns the vtkPVServerInformation object which contains information about the command line options specified on the remote server, if any.

bool pqServer::isProgressPending ( ) const

Returns true if the client is waiting on some actions from the server that typically result in progress events.

static void pqServer::setHeartBeatTimeoutSetting ( int  msec) [static]

Get/Set the application wide heart beat timeout setting.

Heartbeats are used in case of remote server connections to avoid the connection timing out due to inactivity. When set, the client send a heartbeat message to all servers every msec milliseconds.

static int pqServer::getHeartBeatTimeoutSetting ( ) [static]
static void pqServer::setCoincidentTopologyResolutionModeSetting ( int  mode) [static]

Get/Set the application wide coincident topology resolution settings.

static int pqServer::coincidentTopologyResolutionModeSetting ( ) [static]
static void pqServer::setPolygonOffsetParametersSetting ( double  factor,
double  value 
) [static]
static void pqServer::polygonOffsetParametersSetting ( double factor,
double value 
) [static]
static void pqServer::setPolygonOffsetFacesSetting ( bool  ) [static]
static bool pqServer::polygonOffsetFacesSetting ( ) [static]
static void pqServer::setZShiftSetting ( double  shift) [static]
static double pqServer::zShiftSetting ( ) [static]
static void pqServer::setGlobalImmediateModeRenderingSetting ( bool  val) [static]

Get/Set global immediate mode rendering.

static bool pqServer::globalImmediateModeRenderingSetting ( ) [static]
void pqServer::nameChanged ( pqServerManagerModelItem ) [signal]

Fired when the name of the proxy is changed.

void pqServer::fiveMinuteTimeoutWarning ( ) [signal]

Fired about 5 minutes before the server timesout.

This signal will not be fired at all if server timeout < 5 minutes. The server timeout is specified by --timeout option on the server process. This is not fired if timeout is not specified on the server process.

void pqServer::finalTimeoutWarning ( ) [signal]

Fired about 1 minute before the server timesout.

The server timeout is specified by --timeout option on the server process. This is not fired if timeout is not specified on the server process.

void pqServer::createTimeKeeper ( ) [protected]
static const char* pqServer::HEARBEAT_TIME_SETTING_KEY ( ) [static, protected]

Returns the string key used for the heart beat time interval.

void pqServer::setHeartBeatTimeout ( int  msec) [protected]

Set the heartbeat timeout for this instance of pqServer.

void pqServer::setCoincidentTopologyResolutionMode ( int  ) [protected]
void pqServer::setPolygonOffsetParameters ( double  factor,
double  units 
) [protected]
void pqServer::setPolygonOffsetFaces ( bool  offset_faces) [protected]
void pqServer::setZShift ( double  shift) [protected]
void pqServer::setGlobalImmediateModeRendering ( bool  ) [protected]
static void pqServer::updateGlobalMapperProperties ( ) [static, protected]
void pqServer::sentFromOtherClient ( pqServer ,
vtkSMMessage msg 
) [signal]

Allow user to listen messages from other clients.

But if you plan to push some state by for example calling the sendToOtherClients(vtkSMMessage*) slot, you MUST queued your slot. Otherwise your communication will not be sent to the server. Here is a code sample on how to connect to that signal:

QObject::connect( server, SIGNAL(sentFromOtherClient(vtkSMMessage*)), this, SLOT(onClientMessage(vtkSMMessage*)), Qt::QueuedConnection);

void pqServer::triggeredMasterUser ( int  ) [signal]

Signal triggered when user information get updated.

void pqServer::triggeredUserName ( int  ,
QString &   
) [signal]
void pqServer::triggeredUserListChanged ( ) [signal]
void pqServer::triggerFollowCamera ( int  ) [signal]
void pqServer::closeSessionRequest ( ) [signal]

Forward request for disconnection.

void pqServer::sendToOtherClients ( vtkSMMessage msg) [slot]

Allow user to broadcast to other client a given message.

void pqServer::heartBeat ( ) [protected, slot]

Called to send a heartbeat to the server.

void pqServer::processServerNotification ( ) [protected, slot]

Called when idle to look for server notification for collaboration purpose.

void pqServer::onCollaborationCommunication ( vtkObject ,
unsigned  long,
void *  ,
void *   
) [protected, slot]

Called by vtkSMCollaborationManager when associated message happen.

This will convert the given parameter into vtkSMMessage and emit sentFromOtherClient(pqServer*,vtkSMMessage*) signal.


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