source: trunk/src/testing/include/sageConfig.h @ 4

Revision 4, 5.4 KB checked in by ajaworski, 13 years ago (diff)

Added modified SAGE sources

Line 
1/******************************************************************************
2 * SAGE - Scalable Adaptive Graphics Environment
3 *
4 * Module: sageConfig.h
5 * Author : Byungil Jeong
6 *
7 * Copyright (C) 2004 Electronic Visualization Laboratory,
8 * University of Illinois at Chicago
9 *
10 * All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions are met:
14 *
15 *  * Redistributions of source code must retain the above copyright
16 *    notice, this list of conditions and the following disclaimer.
17 *  * Redistributions in binary form must reproduce the above
18 *    copyright notice, this list of conditions and the following disclaimer
19 *    in the documentation and/or other materials provided with the distribution.
20 *  * Neither the name of the University of Illinois at Chicago nor
21 *    the names of its contributors may be used to endorse or promote
22 *    products derived from this software without specific prior written permission.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
28 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
30 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
31 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
32 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 *
36 * Direct questions, comments etc about SAGE to sage_users@listserv.uic.edu or
37 * http://www.evl.uic.edu/cavern/forum/
38 *
39 *****************************************************************************/
40
41#ifndef SAGE_CONFIG_H_
42#define SAGE_CONFIG_H_
43
44#include "sage.h"
45
46class sageSyncServer;
47class sageSyncClient;
48class syncGroup;
49
50class streamerConfig {
51public:
52   int   blockX, blockY, blockSize;
53   nwProtocol protocol;
54
55   int   totalWidth, totalHeight;   
56   int   rank;      // the rank of this node   
57   int   resX;      // the width of application buffer in pixels
58   int   resY;      // the height of application buffer in pixels
59   sageRect   imageMap;  // the location of sub-image rendered by this node in the whole app image
60   sagePixFmt pixFmt;    // pixel format defined in sage.h
61   int   nodeNum;     // number of rendering nodes for an app instance   
62   int   rowOrd;      // row order flag
63   bool  master;      // is master node or not
64   bool  asyncUpdate;
65   sageCompressType compression;
66   int  frameRate;
67   int  syncMode;
68   int  streamType; // SAGE_BLOCK_HARD_SYNC, NO_SYNC
69   int  streamerID;
70   int  groupSize;
71   int  maxBandwidth;  // maximum hardware bandwidth of sending node
72   int  maxCheckInterval;
73   int  flowWindow;
74   bool autoBlockSize;
75   bool frameDrop;
76     
77////////
78   long totalFrames;
79   bool bridgeOn;   
80   bool audioOn;                   // audio on/off flag
81   nwProtocol audioProtocol;
82   int audioKeyFrame;
83   sageAudioMode audioMode;        // audio mode : capture, play, read, write
84   int  audioPort;                 // audio port number
85   int  audioDeviceNum;            // device number
86   sageSampleFmt sampleFmt;        // audio sampling format : float, short, char, unsigned char
87   long samplingRate;              // audio sampling rate : default-44100
88   int  channels;                  // number of audio channel
89   int  framePerBuffer;            // audio frames per buffer
90   int  bytesPerSample;
91   sageAudioSyncType syncType;
92   char  audioFileName[SAGE_NAME_LEN];  // application name
93   int   audioBuffSize;
94   
95   int  syncPolicy, syncID;
96   syncGroup *sGroup;
97   sageSyncClient *syncClientObj;
98   
99   bool swexp; // sungwon experimental
100   bool fromBridgeParallel;
101
102   streamerConfig();
103};   
104
105class sailConfig : public streamerConfig {
106public:
107   char  appName[SAGE_NAME_LEN];  // application name
108   char  masterIP[SAGE_IP_LEN];  // the SAIL Master IP
109   int   nwID;
110   char  fsIP[SAGE_IP_LEN];
111   int   fsPort;
112   char    bridgeIP[SAGE_IP_LEN];
113   int    bridgePort;
114
115   int   syncPort;
116   int   msgPort;
117   int   appID;   // ID for each app instance
118   char  launcherID[SAGE_NAME_LEN];  // which appLauncher started this app
119
120   int   winX, winY, winWidth, winHeight; //window position and size on tiled display
121   
122   int   syncMode;
123   int   streamMode;
124   int   rcvBufSize;  // stream receiving buffer size
125   
126   bool  rendering;   // rendering or control only
127   char streamIP[SAGE_IP_LEN];
128
129   int   portForwarding;
130     
131   sailConfig();
132   int init(const char *fname); //initialize app configuration by config file
133   int setAppName(const char *name);
134};   
135
136class appInExec : public sageRect {
137public:   
138   int uiClient;
139   int sailClient;
140   char appName[SAGE_NAME_LEN];
141   int instID;
142        int fsInstID;
143   char launcherID[SAGE_NAME_LEN];
144   nwProtocol protocol;
145   int nwID;
146   char fsIP[SAGE_IP_LEN];
147   int fsPort;
148   int imageWidth, imageHeight;
149   //int bytesPerPixel;
150   int bandWidth;
151   int frameRate;
152   int displayID;
153   bool audioOn;
154   char renderNodeIP[SAGE_IP_LEN];
155   int portForwarding;   
156
157   appInExec() : displayID(0) {}
158};
159
160#endif
Note: See TracBrowser for help on using the repository browser.