Click here to Skip to main content
15,894,539 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionQuestions about CPropertySheet::AddPage Pin
transoft20-Sep-09 10:42
transoft20-Sep-09 10:42 
AnswerRe: Questions about CPropertySheet::AddPage Pin
David Crow20-Sep-09 14:09
David Crow20-Sep-09 14:09 
AnswerRe: Questions about CPropertySheet::AddPage Pin
KarstenK21-Sep-09 0:20
mveKarstenK21-Sep-09 0:20 
GeneralRe: Questions about CPropertySheet::AddPage Pin
transoft21-Sep-09 2:07
transoft21-Sep-09 2:07 
GeneralRe: Questions about CPropertySheet::AddPage Pin
KarstenK21-Sep-09 2:38
mveKarstenK21-Sep-09 2:38 
GeneralRe: Questions about CPropertySheet::AddPage Pin
transoft21-Sep-09 2:47
transoft21-Sep-09 2:47 
GeneralRe: Questions about CPropertySheet::AddPage Pin
KarstenK21-Sep-09 3:13
mveKarstenK21-Sep-09 3:13 
GeneralRe: Questions about CPropertySheet::AddPage Pin
transoft21-Sep-09 6:08
transoft21-Sep-09 6:08 
GeneralRe: Questions about CPropertySheet::AddPage Pin
KarstenK21-Sep-09 21:16
mveKarstenK21-Sep-09 21:16 
Question[Message Deleted] Pin
includeh1020-Sep-09 5:07
includeh1020-Sep-09 5:07 
AnswerRe: how to change comple warning level by project setting ? Pin
Richard MacCutchan20-Sep-09 5:11
mveRichard MacCutchan20-Sep-09 5:11 
GeneralRe: how to change comple warning level by project setting ? Pin
includeh1020-Sep-09 5:36
includeh1020-Sep-09 5:36 
Questionis it possible to get warning message from UINT value mismatched? Pin
includeh1020-Sep-09 4:28
includeh1020-Sep-09 4:28 
AnswerRe: is it possible to get warning message from UINT value mismatched? Pin
Richard MacCutchan20-Sep-09 4:35
mveRichard MacCutchan20-Sep-09 4:35 
GeneralRe: is it possible to get warning message from UINT value mismatched? Pin
includeh1020-Sep-09 4:43
includeh1020-Sep-09 4:43 
GeneralRe: is it possible to get warning message from UINT value mismatched? Pin
Richard MacCutchan20-Sep-09 5:10
mveRichard MacCutchan20-Sep-09 5:10 
GeneralRe: is it possible to get warning message from UINT value mismatched? Pin
includeh1020-Sep-09 5:20
includeh1020-Sep-09 5:20 
GeneralRe: is it possible to get warning message from UINT value mismatched? Pin
KarstenK21-Sep-09 2:56
mveKarstenK21-Sep-09 2:56 
QuestionDifferent results with debug and release version of simulation program Pin
mass8520-Sep-09 3:37
mass8520-Sep-09 3:37 
AnswerRe: Different results with debug and release version of simulation program Pin
Chris Losinger20-Sep-09 4:08
professionalChris Losinger20-Sep-09 4:08 
GeneralRe: Different results with debug and release version of simulation program Pin
mass8520-Sep-09 4:23
mass8520-Sep-09 4:23 
GeneralRe: Different results with debug and release version of simulation program Pin
Richard MacCutchan20-Sep-09 4:33
mveRichard MacCutchan20-Sep-09 4:33 
GeneralRe: Different results with debug and release version of simulation program Pin
mass8520-Sep-09 4:46
mass8520-Sep-09 4:46 
But do you think I can look for the uninitialized variable within the function part of which I presented here and all objects that are used by this function? Or maybe I should look through whole code?

This is the code of the function:
void BEload::execute(){
	MSDU *msdu = new MSDU();
	msdu->ac = 2;
	msdu->type = DATA;
	msdu->arrivalTime = msdu->staArrivalTime = clock;
	msdu->id = id++;
	double temp = generator.getUpLinkRandom(staAddress);
	t += temp;
	cntr++;
	if (temp < upLinkRatio){
		//packet will be sent from STA to AP
		msdu->DA = 0;
		msdu->TA = msdu->SA = staAddress;
	}else{
		//packet will be sent from AP to STA
		msdu->SA = msdu->TA = 0;
		msdu->DA = staAddress;
	}
	Mac *s = sta[msdu->SA];
	msdu->RA = s->routing[msdu->DA];
	msdu->bitrate = s->bitrate[msdu->RA];
	msdu->size = packetSize;
	if (msdu->size + overhead > s->fragmTSH){ //fragment the frame					
		double fragments = double (msdu->size)/(s->fragmTSH - overhead);
		if (fragments != int(fragments)) fragments = int (fragments + 1);
		msdu->fragments = int(fragments);
		msdu->lastFragmSize = int(msdu->size - (s->fragmTSH - overhead)*(fragments - 1));		
	}else
		msdu->fragments = 1;
	s->bufOUT[2].insertLast(msdu);
		
	time = clock + generator.getTimeBE(staAddress, intensity);
	agenda.schedule(this);
}
double Generator::getUpLinkRandom(int staAddress){
		int x = uniform(coreUpLinkRatio[staAddress]);
		coreUpLinkRatio[staAddress] = x;
		return double(x)/m;
	}

Constructor of MSDU initializes all of MSDU's variables. t, cntr and upLinkRatio are members of BEload and are initialized by BEload's constructor and upLinkRatio is later changed to the value of global upLinkRatio variable (this global variable is not needed anymore, but could it cause any problems? I don't think so.). All variables in Generator class are initialized too.
GeneralRe: Different results with debug and release version of simulation program Pin
Richard MacCutchan20-Sep-09 5:00
mveRichard MacCutchan20-Sep-09 5:00 
GeneralRe: Different results with debug and release version of simulation program Pin
mass8520-Sep-09 5:24
mass8520-Sep-09 5:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.