Hi everyone
i'm beginner using ns 2.35, i'm working on researh about How to select an energy based path in AODV routing protocol using NS2.i try to implement energy based path in AODV routing protocol based on
http://slogix.in/how-to-select-an-en...ocol-using-ns2
i can't solve this error :
aodv/aodv.cc: In member function ‘void AODV::sendPacket(Packet*, aodv_rt_entry*, double)’:
aodv/aodv.cc:91:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(ih->daddr() == IP_BROADCAST)
^
aodv/aodv.cc: In constructor ‘AODV::AODV(nsaddr_t)’:
aodv/aodv.cc:201:2: error: ‘iEnergy’ was not declared in this scope
iEnergy = 0.0;
^
aodv/aodv.cc:204:2: error: ‘iNode1’ was not declared in this scope
iNode1 = (MobileNode *) (Node::get_node_by_address(index));
^
aodv/aodv.cc:206:2: error: ‘residual_energy’ was not declared in this scope
residual_energy = iNode1->energy_model()->energy();
^
aodv/aodv.cc:208:39: error: ‘packet’ was not declared in this scope
if (residual_energy > 35.0) {forward(packet);}
^
aodv/aodv.cc:209:16: error: ‘packet’ was not declared in this scope
else {discard(packet);
^
aodv/aodv.cc:209:22: error: ‘discard’ was not declared in this scope
else {discard(packet);
^
aodv/aodv.cc:200:14: warning: unused variable ‘iNode’ [-Wunused-variable]
MobileNode *iNode;
^
aodv/aodv.cc: In member function ‘void AODV::recvError(Packet*)’:
aodv/aodv.cc:1048:45: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
while(pkt = ifqueue->filter(ih->saddr())) {
^
make: *** [aodv/aodv.o] Error 1
Ns make failed!