[4] | 1 | /****************************************************************************** |
---|
| 2 | * SAGE - Scalable Adaptive Graphics Environment |
---|
| 3 | * |
---|
| 4 | * Module: displayInstance.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 _DISPLAY_MANAGER_H |
---|
| 42 | #define _DISPLAY_MANAGER_H |
---|
| 43 | |
---|
| 44 | #include "sage.h" |
---|
| 45 | #include "sageConfig.h" |
---|
| 46 | |
---|
| 47 | class fsManager; |
---|
| 48 | class appInExec; |
---|
| 49 | class sageVirtualDesktop; |
---|
| 50 | class streamInfo; |
---|
| 51 | class connectionInfo; |
---|
| 52 | |
---|
| 53 | /** |
---|
| 54 | * class displayInstance |
---|
| 55 | */ |
---|
| 56 | class displayInstance { |
---|
| 57 | public: |
---|
| 58 | int winID; |
---|
| 59 | private: |
---|
| 60 | fsManager *fsm; |
---|
| 61 | appInExec *appExec; |
---|
| 62 | sageVirtualDesktop *vdt; |
---|
| 63 | |
---|
| 64 | std::vector<int> receiverList; |
---|
| 65 | streamGroup streamGrp; |
---|
| 66 | |
---|
| 67 | int tileNum; |
---|
| 68 | int dispNodeNum; |
---|
| 69 | int streamNum; |
---|
| 70 | int sailClient; |
---|
| 71 | int zValue; |
---|
| 72 | int rcvFlagCnt; |
---|
| 73 | int syncMode; |
---|
| 74 | int waitNodes; |
---|
| 75 | int imageSize; |
---|
| 76 | float rcvFrate, rcvBwidth, rcvLoss, accBwidth, accLoss; |
---|
| 77 | float sendFrate; |
---|
| 78 | int accFSize; |
---|
| 79 | |
---|
| 80 | char winTitle[SAGE_NAME_LEN]; |
---|
| 81 | int borderColor[3]; |
---|
| 82 | int titleColor[3]; |
---|
| 83 | |
---|
| 84 | bool *rcvFlag; |
---|
| 85 | |
---|
| 86 | void reportPerformance(char *sailPerf); |
---|
| 87 | int accumulateBandwidth(char *rcvBand); |
---|
| 88 | void generateStreamInfo(void); |
---|
| 89 | int streamInfoToSender(void); |
---|
| 90 | |
---|
| 91 | int shutdownApp(); |
---|
| 92 | |
---|
| 93 | public: |
---|
| 94 | displayInstance(fsManager *f, int id, appInExec* app); |
---|
| 95 | ~displayInstance() {} |
---|
| 96 | int getReceiverNum() { return receiverList.size(); } |
---|
| 97 | int getReceiver(int i) { return receiverList[i]; } |
---|
| 98 | int getStreamNum() { return streamNum; } |
---|
| 99 | int getSailClient() { return sailClient; } |
---|
| 100 | int parseMsg(sageMessage &msg); |
---|
| 101 | int getWinID() { return winID; } |
---|
| 102 | //int shutdownReceivers(); |
---|
| 103 | int changeWindow(sageRect &devRect, int steps); |
---|
| 104 | int modifyStream(void); |
---|
| 105 | int connectSenders(); /**< send messages to sail client */ |
---|
| 106 | int initStreams(); |
---|
| 107 | int getZValue() { return zValue; } |
---|
| 108 | int setZValue(int z) { zValue = z; return 1;} |
---|
| 109 | int increaseZ() { zValue++; return 1;} |
---|
| 110 | int requestPerformanceInfo(int rate); |
---|
| 111 | int stopPerformanceInfo(); |
---|
| 112 | int updateWinProp(char *info); |
---|
| 113 | int updateBorders(char *title); |
---|
| 114 | |
---|
| 115 | friend class fsCore; |
---|
| 116 | }; |
---|
| 117 | |
---|
| 118 | #endif |
---|