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 | |
---|
14 | namespace VtkVis { |
---|
15 | |
---|
16 | class Renderer; |
---|
17 | |
---|
18 | #define VTKVIS_VERSION_STRING "1.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 | |
---|
30 | typedef 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 | |
---|
41 | extern Stats g_stats; |
---|
42 | |
---|
43 | extern int g_fdIn; |
---|
44 | extern int g_fdOut; |
---|
45 | extern FILE *g_fOut; |
---|
46 | extern FILE *g_fLog; |
---|
47 | extern Renderer *g_renderer; |
---|
48 | extern ReadBuffer *g_inBufPtr; |
---|
49 | extern int g_statsFile; |
---|
50 | extern int writeToStatsFile(int f, const char *s, size_t length); |
---|
51 | extern int getStatsFile(Tcl_Interp * interp, Tcl_Obj *objPtr); |
---|
52 | |
---|
53 | } |
---|
54 | |
---|
55 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.