source: vtkvis/branches/1.7/RenderServer.h @ 4952

Last change on this file since 4952 was 4808, checked in by ldelgass, 9 years ago

bump version

  • Property svn:eol-style set to native
File size: 1.5 KB
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/*
3 * Copyright (C) 2004-2012  HUBzero Foundation, LLC
4 *
5 * Author: Leif Delgass <ldelgass@purdue.edu>
6 */
7
8#ifndef VTKVIS_RENDERSERVER_H
9#define VTKVIS_RENDERSERVER_H
10
11#include <sys/types.h>
12#include <sys/time.h>
13
14namespace VtkVis {
15
16class Renderer;
17
18#define VTKVIS_VERSION_STRING "1.7.3"
19
20#define MSECS_ELAPSED(t1, t2) \
21    ((t1).tv_sec == (t2).tv_sec ? (((t2).tv_usec - (t1).tv_usec)/1.0e+3) : \
22     (((t2).tv_sec - (t1).tv_sec))*1.0e+3 + (double)((t2).tv_usec - (t1).tv_usec)/1.0e+3)
23
24#define CVT2SECS(x)  ((double)(x).tv_sec) + ((double)(x).tv_usec * 1.0e-6)
25
26#ifndef STATSDIR
27#define STATSDIR        "/var/tmp/visservers"
28#endif
29
30typedef struct {
31    pid_t pid;
32    size_t nDataSets;       /**< # of data sets received */
33    size_t nDataBytes;      /**< # of bytes received as data sets */
34    size_t nFrames;         /**< # of frames sent to client. */
35    size_t nFrameBytes;     /**< # of bytes for all frames. */
36    size_t nCommands;       /**< # of commands executed */
37    double cmdTime;         /**< Elasped time spend executing commands. */
38    struct timeval start;   /**< Start of elapsed time. */
39} Stats;
40
41extern Stats g_stats;
42
43extern int g_fdIn;
44extern int g_fdOut;
45extern FILE *g_fOut;
46extern FILE *g_fLog;
47extern Renderer *g_renderer;
48extern ReadBuffer *g_inBufPtr;
49extern int g_statsFile;
50extern int writeToStatsFile(int f, const char *s, size_t length);
51extern int getStatsFile(Tcl_Obj *objPtr);
52
53}
54
55#endif
Note: See TracBrowser for help on using the repository browser.