vtkPVServerInformation.h 6.15 KB
Newer Older
Charles Law's avatar
Charles Law committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
/*=========================================================================

  Program:   ParaView
  Module:    vtkPVServerInformation.h

  Copyright (c) Kitware, Inc.
  All rights reserved.
  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
15 16 17 18 19
/**
 * @class   vtkPVServerInformation
 * @brief   Gets features of the server.
 *
 * This objects is used by the client to get the features
luz paz's avatar
luz paz committed
20
 * supported by the server.
21 22
 * At the moment, server information is only on the root.
*/
Charles Law's avatar
Charles Law committed
23

24 25
#ifndef vtkPVServerInformation_h
#define vtkPVServerInformation_h
Charles Law's avatar
Charles Law committed
26

27
#include "vtkPVClientServerCoreCoreModule.h" //needed for exports
Charles Law's avatar
Charles Law committed
28 29 30
#include "vtkPVInformation.h"

class vtkClientServerStream;
31
class vtkPVServerOptionsInternals;
Charles Law's avatar
Charles Law committed
32

33
class VTKPVCLIENTSERVERCORECORE_EXPORT vtkPVServerInformation : public vtkPVInformation
Charles Law's avatar
Charles Law committed
34 35 36
{
public:
  static vtkPVServerInformation* New();
37
  vtkTypeMacro(vtkPVServerInformation, vtkPVInformation);
Cory Quammen's avatar
Cory Quammen committed
38
  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
Charles Law's avatar
Charles Law committed
39

40 41 42 43 44 45 46
  //@{
  /**
   * This flag indicates whether the server can render remotely.
   * If it is off, all rendering has to be on the client.
   * This is only off when the user starts the server with
   * the --disable-composite command line option.
   */
Charles Law's avatar
Charles Law committed
47 48
  vtkSetMacro(RemoteRendering, int);
  vtkGetMacro(RemoteRendering, int);
49
  //@}
Charles Law's avatar
Charles Law committed
50

Kitware Robot's avatar
Kitware Robot committed
51
  void DeepCopy(vtkPVServerInformation* info);
Charles Law's avatar
Charles Law committed
52

53 54 55
  /**
   * Transfer information about a single object into this object.
   */
56
  void CopyFromObject(vtkObject*) VTK_OVERRIDE;
Charles Law's avatar
Charles Law committed
57

58 59 60
  /**
   * Merge another information object.
   */
61
  void AddInformation(vtkPVInformation*) VTK_OVERRIDE;
Charles Law's avatar
Charles Law committed
62

63 64 65 66
  //@{
  /**
   * Manage a serialized version of the information.
   */
67 68
  void CopyToStream(vtkClientServerStream*) VTK_OVERRIDE;
  void CopyFromStream(const vtkClientServerStream*) VTK_OVERRIDE;
69
  //@}
Charles Law's avatar
Charles Law committed
70

71 72
  //@{
  /**
luz paz's avatar
luz paz committed
73
   * Variables (command line argurments) set to render to a tiled display.
74
   */
75 76
  vtkSetVector2Macro(TileDimensions, int);
  vtkGetVector2Macro(TileDimensions, int);
77 78
  vtkSetVector2Macro(TileMullions, int);
  vtkGetVector2Macro(TileMullions, int);
79
  //@}
80

81 82 83 84
  //@{
  /**
   * Returns 1 if IceT is available.
   */
85 86
  vtkSetMacro(UseIceT, int);
  vtkGetMacro(UseIceT, int);
87
  //@}
88

89 90 91
  //@{
  /**
   * Get/Set if the server supports saving OGVs.
92
   * @deprecated in ParaView 5.5
93
   */
94 95
  VTK_LEGACY(void SetOGVSupport(int));
  VTK_LEGACY(int GetOGVSupport());
96
  //@}
97

98 99 100
  //@{
  /**
   * Get/Set if the server supports saving AVIs.
101
   * @deprecated in ParaView 5.5
102
   */
103 104
  VTK_LEGACY(void SetAVISupport(int));
  VTK_LEGACY(int GetAVISupport());
105
  //@}
106

107 108 109 110 111 112 113 114
  //@{
  /**
   * if the server supports compressing images via NVPipe
   */
  //@}
  vtkSetMacro(NVPipeSupport, bool);
  vtkGetMacro(NVPipeSupport, bool);

115 116 117 118
  //@{
  /**
   * Get/Set the time after which the server timesout.
   */
119 120
  vtkSetMacro(Timeout, int);
  vtkGetMacro(Timeout, int);
121
  //@}
122

123 124 125 126
  //@{
  /**
   * Set/Get the EyeSeparation on server
   */
127 128
  void SetEyeSeparation(double value);
  double GetEyeSeparation() const;
129 130 131 132 133 134 135 136
  //@}

  //@{
  /**
   * Number of machines to use in data or render server
   * Setting the number of machines has the side effect of wiping out any
   * machine parameters previously set.
   */
137 138
  void SetNumberOfMachines(unsigned int num);
  unsigned int GetNumberOfMachines() const;
139
  //@}
140

141 142 143 144
  //@{
  /**
   * Value of DISPLAY environment variable for this cave node
   */
145 146
  void SetEnvironment(unsigned int idx, const char* name);
  const char* GetEnvironment(unsigned int idx) const;
147
  //@}
148

149 150 151 152 153
  //@{
  /**
   * Window geometry for server, specified as x, y, width, height. This is only
   * used if FullScreen is false.
   */
154 155
  void SetGeometry(unsigned int idx, int geo[4]);
  int* GetGeometry(unsigned int idx) const;
156
  //@}
157

158 159 160 161
  //@{
  /**
   * Whether to show the server window as fullscreen.
   */
162 163
  void SetFullScreen(unsigned int idx, bool fullscreen);
  bool GetFullScreen(unsigned int idx) const;
164
  //@}
165

166 167 168 169
  //@{
  /**
   * Whether to show the server window with window decorations.
   */
170 171
  void SetShowBorders(unsigned int idx, bool borders);
  bool GetShowBorders(unsigned int idx) const;
172
  //@}
173

174 175 176 177
  //@{
  /**
   * Get the stereo-type specified in the pvx. -1=no-specified, 0=no-stereo.
   */
178 179
  int GetStereoType(unsigned int idx) const;
  void SetStereoType(unsigned int idx, int type);
180
  //@}
181

182 183 184 185
  //@{
  /**
   * Coordinates of lower left corner of this cave display
   */
186 187
  void SetLowerLeft(unsigned int idx, double coord[3]);
  double* GetLowerLeft(unsigned int idx) const;
188
  //@}
189

190 191 192 193
  //@{
  /**
   * Coordinates of lower right corner of this cave display
   */
194 195
  void SetLowerRight(unsigned int idx, double coord[3]);
  double* GetLowerRight(unsigned int idx) const;
196
  //@}
197

198 199 200 201
  //@{
  /**
   * Coordinates of lower left corner of this cave display
   */
202 203
  void SetUpperRight(unsigned int idx, double coord[3]);
  double* GetUpperRight(unsigned int idx) const;
204
  //@}
205

206 207 208 209
  //@{
  /**
   * Get the number of processes.
   */
Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
210
  vtkGetMacro(NumberOfProcesses, int);
211
  //@}
212

213 214 215
  /**
   * Return whether MPI is initialized or not.
   */
216 217
  virtual bool IsMPIInitialized() const;

218 219 220 221
  //@{
  /**
   * Return true if the server allow server client to connect to itself
   */
222
  vtkGetMacro(MultiClientsEnable, int);
223
  //@}
224

225 226 227 228
  //@{
  /**
   * Get the id that correspond to the current client
   */
229
  vtkGetMacro(ClientId, int);
230
  //@}
231

232 233 234 235 236 237 238 239
  //@{
  /**
   * Set/Get vtkIdType size, which can be 32 or 64
   */
  vtkSetMacro(IdTypeSize, int);
  vtkGetMacro(IdTypeSize, int);
  //@}

Charles Law's avatar
Charles Law committed
240 241
protected:
  vtkPVServerInformation();
242
  ~vtkPVServerInformation() override;
Charles Law's avatar
Charles Law committed
243

Utkarsh Ayachit's avatar
Utkarsh Ayachit committed
244
  int NumberOfProcesses;
245
  bool MPIInitialized;
246
  int OGVSupport;
247
  int AVISupport;
248
  bool NVPipeSupport;
Charles Law's avatar
Charles Law committed
249
  int RemoteRendering;
250
  int TileDimensions[2];
251
  int TileMullions[2];
252
  int Timeout;
253
  int UseIceT;
254
  int MultiClientsEnable;
255
  int ClientId;
256
  int IdTypeSize;
257

258
  vtkPVServerOptionsInternals* MachinesInternals;
Charles Law's avatar
Charles Law committed
259

260 261
  vtkPVServerInformation(const vtkPVServerInformation&) = delete;
  void operator=(const vtkPVServerInformation&) = delete;
Charles Law's avatar
Charles Law committed
262 263 264
};

#endif