Alex Bikfalvi
SimStream Documentation
Data.h
00001 #pragma once 00002 00003 #include "DataSession.h" 00004 00005 class CData 00006 { 00007 private: 00008 CDataSession* dataSession; 00009 00010 // Parameters 00011 __uint32 numChannelsMcast; 00012 00013 00015 //__time delaySyncDistMin; 00016 //__time delaySyncDistMax; 00017 //__uint32 delaySyncDistPoints; 00018 00020 //__uint32 numChannels; 00021 //__uint32 numChannelsMcast; 00022 //__uint32 maxDuration; 00023 00024 //double qualityGlobalNormalSum; 00025 //__uint32 qualityGlobalNormalNum; 00026 //double qualityGlobalWeightedSum; 00027 //__time qualityGlobalWeightedNum; 00028 00029 //double qualityGlobalNormalUcastSum; 00030 //__uint32 qualityGlobalNormalUcastNum; 00031 //double qualityGlobalWeightedUcastSum; 00032 //__time qualityGlobalWeightedUcastNum; 00033 00034 //double qualityGlobalNormalMcastSum; 00035 //__uint32 qualityGlobalNormalMcastNum; 00036 //double qualityGlobalWeightedMcastSum; 00037 //__time qualityGlobalWeightedMcastNum; 00038 00039 //double* qualityChannelNormalSum; 00040 //__uint32* qualityChannelNormalNum; 00041 //double* qualityChannelWeightedSum; 00042 //__time* qualityChannelWeightedNum; 00043 00044 //double* qualitySessionSum; 00045 //__uint32* qualitySessionNum; 00046 00047 //double timeChannelSetupSum; 00048 //__uint32 timeChannelSetupNum; 00049 00050 //double timeChannelSetupUcastSum; 00051 //__uint32 timeChannelSetupUcastNum; 00052 00053 //double timeChannelSetupMcastSum; 00054 //__uint32 timeChannelSetupMcastNum; 00055 00056 //double timeChannelWaitSum; 00057 //__time timeChannelWaitNum; 00058 00059 //double timeChannelWaitUcastSum; 00060 //__time timeChannelWaitUcastNum; 00061 00062 //double timeChannelWaitMcastSum; 00063 //__time timeChannelWaitMcastNum; 00064 00065 //double delaySyncNormalSum; 00066 //__uint32 delaySyncNormalNum; 00067 00068 //double delaySyncWeightedSum; 00069 //__time delaySyncWeightedNum; 00070 00071 //double delaySyncMcastNormalSum; 00072 //__uint32 delaySyncMcastNormalNum; 00073 00074 //double delaySyncMcastWeightedSum; 00075 //__time delaySyncMcastWeightedNum; 00076 00077 //double delaySyncUcastNormalSum; 00078 //__uint32 delaySyncUcastNormalNum; 00079 00080 //double delaySyncUcastWeightedSum; 00081 //__time delaySyncUcastWeightedNum; 00082 00083 //CDataPool* delaySyncDistGlobal; 00084 //CDataPool* delaySyncDistMcast; 00085 //CDataPool* delaySyncDistUcast; 00086 00087 public: 00088 CData( 00089 char* name, 00090 __uint32 topology, 00091 __uint32 numChannelsMcast 00092 ); 00093 ~CData(); 00094 00095 void Session( 00096 __uint32 host, 00097 __uint32 channel, 00098 __time duration, 00099 __time timeClientStart, 00100 __time timeRecvStart, 00101 __time timePlayStart, 00102 __time timeClientFinish, 00103 __time delayWait, 00104 __time delaySync, 00105 __uint32 framesRecv, 00106 __uint32 framesPlay, 00107 __uint32* framesSuccess, 00108 __uint32* framesFail 00109 ); 00110 00111 //inline double QualityGlobalNormal() { return ((this->qualityGlobalNormalNum > 0) ? this->qualityGlobalNormalSum/this->qualityGlobalNormalNum : 0); } 00112 //inline double QualityGlobalWeighted() { return ((this->qualityGlobalWeightedNum > 0) ? this->qualityGlobalWeightedSum/this->qualityGlobalWeightedNum : 0); } 00113 00114 //inline double QualityGlobalNormalUcast() { return ((this->qualityGlobalNormalUcastNum > 0) ? this->qualityGlobalNormalUcastSum/this->qualityGlobalNormalUcastNum : 0); } 00115 //inline double QualityGlobalWeightedUcast() { return ((this->qualityGlobalWeightedUcastNum > 0) ? this->qualityGlobalWeightedUcastSum/this->qualityGlobalWeightedUcastNum : 0); } 00116 00117 //inline double QualityGlobalNormalMcast() { return ((this->qualityGlobalNormalMcastNum > 0) ? this->qualityGlobalNormalMcastSum/this->qualityGlobalNormalMcastNum : 0); } 00118 //inline double QualityGlobalWeightedMcast() { return ((this->qualityGlobalWeightedMcastNum > 0) ? this->qualityGlobalWeightedMcastSum/this->qualityGlobalWeightedMcastNum : 0); } 00119 00120 //inline double QualityChannelNormal(__uint32 channel) { assert(channel < this->numChannels); return ((this->qualityChannelNormalNum[channel] > 0) ? this->qualityChannelNormalSum[channel]/this->qualityChannelNormalNum[channel] : 0); } 00121 //inline double QualityChannelWeighted(__uint32 channel) { assert(channel < this->numChannels); return ((this->qualityChannelWeightedNum[channel] > 0) ? this->qualityChannelWeightedSum[channel]/this->qualityChannelWeightedNum[channel] : 0); } 00122 00123 //inline double QualitySession(__uint32 duration) { assert(duration < this->maxDuration); return ((this->qualitySessionNum[duration] > 0) ? this->qualitySessionSum[duration]/this->qualitySessionNum[duration] : 0); } 00124 00125 //inline double TimeChannelSetup() { return (this->timeChannelSetupNum > 0) ? this->timeChannelSetupSum/this->timeChannelSetupNum : 0; } 00126 //inline double TimeChannelSetupUcast() { return (this->timeChannelSetupUcastNum > 0) ? this->timeChannelSetupUcastSum/this->timeChannelSetupUcastNum : 0; } 00127 //inline double TimeChannelSetupMcast() { return (this->timeChannelSetupMcastNum > 0) ? this->timeChannelSetupMcastSum/this->timeChannelSetupMcastNum : 0; } 00128 00129 //inline double TimeChannelWait() { return (this->timeChannelWaitNum > 0) ? this->timeChannelWaitSum/this->timeChannelWaitNum : 0; } 00130 //inline double TimeChannelWaitUcast() { return (this->timeChannelWaitUcastNum > 0) ? this->timeChannelWaitUcastSum/this->timeChannelWaitUcastNum : 0; } 00131 //inline double TimeChannelWaitMcast() { return (this->timeChannelWaitMcastNum > 0) ? this->timeChannelWaitMcastSum/this->timeChannelWaitMcastNum : 0; } 00132 00133 //inline double DelaySyncNormal() { return (this->delaySyncNormalNum > 0) ? this->delaySyncNormalSum/this->delaySyncNormalNum : 0; } 00134 //inline double DelaySyncWeighted() { return (this->delaySyncWeightedNum > 0) ? this->delaySyncWeightedSum/this->delaySyncWeightedNum : 0; } 00135 00136 //inline double DelaySyncMcastNormal() { return (this->delaySyncMcastNormalNum > 0) ? this->delaySyncMcastNormalSum/this->delaySyncMcastNormalNum : 0; } 00137 //inline double DelaySyncMcastWeighted() { return (this->delaySyncMcastWeightedNum > 0) ? this->delaySyncMcastWeightedSum/this->delaySyncMcastWeightedNum : 0; } 00138 00139 //inline double DelaySyncUcastNormal() { return (this->delaySyncUcastNormalNum > 0) ? this->delaySyncUcastNormalSum/this->delaySyncUcastNormalNum : 0; } 00140 //inline double DelaySyncUcastWeighted() { return (this->delaySyncUcastWeightedNum > 0) ? this->delaySyncUcastWeightedSum/this->delaySyncUcastWeightedNum : 0; } 00141 };
Last updated: February 8, 2011