pqServer.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 #ifndef pqServer_h
5 #define pqServer_h
6 
7 class vtkObject;
8 class pqTimeKeeper;
9 class vtkProcessModule;
11 class vtkPVXMLElement;
12 class vtkSMApplication;
13 class vtkSMProxy;
16 class vtkSMSession;
18 
19 #include "pqCoreModule.h"
21 #include "pqServerResource.h"
22 #include "pqTimer.h"
23 #include "vtkSMMessageMinimal.h"
24 #include "vtkSmartPointer.h"
25 #include "vtkWeakPointer.h"
26 
27 #include <QPointer>
28 
36 {
37  Q_OBJECT
38 public:
39  pqServer(vtkIdType connectionId, QObject* parent = nullptr);
40  ~pqServer() override;
41 
42  const pqServerResource& getResource();
43  void setResource(const pqServerResource& server_resource);
44 
48  vtkSMSession* session() const;
49 
53  vtkIdType GetConnectionID() const;
54  vtkIdType sessionId() const { return this->GetConnectionID(); }
55 
59  vtkSMSessionProxyManager* proxyManager() const;
60 
65  vtkSMProxySelectionModel* activeSourcesSelectionModel() const;
66 
70  vtkSMProxySelectionModel* activeViewSelectionModel() const;
71 
76  int getNumberOfPartitions();
77 
82  bool isRemote() const;
83 
88  bool isMaster() const;
89 
95  bool isProcessingPending() const;
96 
101  bool isRenderServerSeparate();
102 
106  pqTimeKeeper* getTimeKeeper() const;
107 
112  vtkPVServerInformation* getServerInformation() const;
113 
118  bool isProgressPending() const;
119 
126  static void setHeartBeatTimeoutSetting(int msec);
127  static int getHeartBeatTimeoutSetting();
128 
132  void setMonitorServerNotifications(bool);
133 
137  int getRemainingLifeTime() const;
138 
142  void setRemainingLifeTime(int value);
143 
144 Q_SIGNALS:
148  void nameChanged(pqServerManagerModelItem*);
149 
156  void fiveMinuteTimeoutWarning();
157 
163  void finalTimeoutWarning();
164 
168  void serverSideDisconnected();
169 
170 protected:
174  static const char* HEARBEAT_TIME_SETTING_KEY();
175 
179  void setHeartBeatTimeout(int msec);
180 
181  // ---- Collaboration client-to-clients communication mechanisme ----
182 
183 Q_SIGNALS:
195  void sentFromOtherClient(pqServer*, vtkSMMessage* msg);
196 
200  void triggeredMasterUser(int);
201  void triggeredUserName(int, QString&);
202  void triggeredUserListChanged();
203  void triggerFollowCamera(int);
204 
205 public Q_SLOTS:
209  void sendToOtherClients(vtkSMMessage* msg);
210 
211  // ---- Collaboration client-to-clients communication mechanisme ----
212 
213 protected Q_SLOTS:
217  void heartBeat();
218 
222  void updateRemainingLifeTime();
223 
227  void processServerNotification();
228 
234  void onCollaborationCommunication(vtkObject*, unsigned long, void*, void*);
235 
240  void onConnectionLost(vtkObject*, unsigned long, void*, void*);
241 
242 private:
243  Q_DISABLE_COPY(pqServer)
244 
245  pqServerResource Resource;
246  vtkIdType ConnectionID;
248  vtkSmartPointer<vtkSMProxy> ExecutableRunnerProxy;
249 
250  pqTimer IdleCollaborationTimer;
251 
252  class pqInternals;
253  pqInternals* Internals;
254 };
255 
256 #endif // !pqServer_h
vtkSMSession is the default ParaView session.
Definition: vtkSMSession.h:22
Gets features of the server.
pqServerManagerModelItem is a element maintained by pqServerManagerModel.
pqTimeKeeper is pqProxy for "TimeKeeper" proxy.
Definition: pqTimeKeeper.h:18
int vtkIdType
vtkIdType sessionId() const
Definition: pqServer.h:54
Header class that setup every thing in order to use Protobuf messages in a transparent manner...
implementation for View that includes render window and renderers.
#define PQCORE_EXPORT
Definition: pqCoreModule.h:15
The vtkSMSessionProxyManager is esponsible for creating and managing proxies for a given session...
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
value
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
pqServerResource encapsulates a resource in ParaView.
process initialization and management core for ParaView processes.
pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vt...
Definition: pqServer.h:35