confused about function recv(p,h) in class Phy in ns2.35.----- onlyfor ns2 users

E

engineer

Dear friends,

I am reading ns2 code and trying to understand the class Phy. https://github.com/hbatmit/ns2.35/blob/master/mac/phy.cc
Following lines are extracted from the function void Phy::recv(Packet* p, Handler*). I do not understand line 134 and want to know what lines exactly are executed when the function 'recv' is called. Here uptarget is a pointerof type biconnector (base class for Phy), but where does uptarget exactly pointing to.


------------------------------------------------------------------------
Packet::free(p);
return;
} else { //line 133
uptarget_->recv(p, (Handler*) 0); //line 134
}
break;
 
B

Bart van Ingen Schenau

Dear friends,

I am reading ns2 code and trying to understand the class Phy.
https://github.com/hbatmit/ns2.35/blob/master/mac/phy.cc Following lines
are extracted from the function void Phy::recv(Packet* p, Handler*). I
do not understand line 134 and want to know what lines exactly are
executed when the function 'recv' is called. Here uptarget is a pointer
of type biconnector (base class for Phy), but where does uptarget
exactly pointing to.

It is impossible for us to tell what uptarget_ exactly points to. The
only thing we can tell is that it is an object of a class derived from
NSObject.
Thanks in advance.
-Ahmed

Bart v Ingen Schenau
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top