Search code examples
c++network-programmingnetwork-protocolsns2

C++ - Development a routing protocol in ns2


I'm developing a new wireless routing protocol in ns2 simulator using c++.. The problem is that the routing protocol needs some data about the received signal from the physical layer like the power of the signal... Can anyone tell me how to obtain these kind of information??

Thanks...


Solution

  • I was able to find the solution to my problem: - the received power is stored in the packet's stamp, so to get it you type: double power = p->txinfo_.RxPr;