Alex Bikfalvi
SimStream Documentation
Data.cpp
00001 #include "Headers.h" 00002 #include "Data.h" 00003 00004 #pragma warning(disable : 4996) 00005 00006 #define DATA_SIZE 1000000 00007 00008 CData::CData( 00009 char* name, 00010 __uint32 topology, 00011 __uint32 numChannelsMcast 00012 ) 00013 { 00014 // Parameters 00015 this->numChannelsMcast = numChannelsMcast; 00016 00017 // File name 00018 char fileName[256]; 00019 00020 // Data session 00021 sprintf(fileName, "sessions_%s_%u_%u.out", name, topology, numChannelsMcast); 00022 this->dataSession = new CDataSession(DATA_SIZE, fileName); 00023 } 00024 00025 CData::~CData() 00026 { 00027 // Data session 00028 delete this->dataSession; 00029 } 00030 00031 void CData::Session( 00032 __uint32 host, 00033 __uint32 channel, 00034 __time duration, 00035 __time timeClientStart, 00036 __time timeRecvStart, 00037 __time timePlayStart, 00038 __time timeClientFinish, 00039 __time delayWait, 00040 __time delaySync, 00041 __uint32 framesRecv, 00042 __uint32 framesPlay, 00043 __uint32* framesSuccess, 00044 __uint32* framesFail 00045 ) 00046 { 00047 // Record session 00048 this->dataSession->Add()->Set( 00049 host, 00050 channel, 00051 (channel < this->numChannelsMcast), 00052 (timePlayStart != -1), 00053 timeClientStart, 00054 timeRecvStart, 00055 timePlayStart, 00056 timeClientFinish, 00057 delayWait, 00058 delaySync, 00059 framesRecv, 00060 framesPlay, 00061 framesSuccess[0], 00062 framesSuccess[1], 00063 framesSuccess[2], 00064 framesFail[0], 00065 framesFail[1], 00066 framesFail[2]); 00067 00068 00075 00079 00083 00088 00093 00100 00106 00111 00117 00121 00124 00134 00138 00142 00146 00152 00156 00169 00173 00177 00181 00187 00191 00196 }
Last updated: February 8, 2011