[ns] Segmentation Fault !

2011-08-29 Thread Pouria P

Hi friends.
I was going to change aodv.h and aodv.cc for getting node position  energy.
+++
aodv.h changes :
 
#includemobilenode.h
.
.
.
double xpos;
double ypos;
double zpos;
double iEnergy;
MobileNode *iNode;
.
.
+++
aodv.cc changes :
.
.
xpos=0.0;
ypos=0.0;
zpos=0.0;
MobileNode *iNode;
iEnergy=0.0;
.
.
.
iNode = (MobileNode *) (Node::get_node_by_address(index));
xpos = iNode-X();
ypos = iNode-Y();
iEnergy = iNode-energy_model()-energy();
printf(at time (%.6f), Position of %d is X: %.4f and Y : %.4f 
\n,CURRENT_TIME,index,xpos,ypos);
printf(at time (%.6f), Updated Enery for Node %d is Energy %.4f 
\n,CURRENT_TIME,index,iEnergy);
.
.
++
tcl file changes :
.
.
set val(rp)    AODV   
set val(energymodel)    EnergyModel  
set val(initialenergy) 100
.
.
$nets node-config  -adhocRouting $val(rp) 
...
  -energyModel $val(energymodel) \
  -initialEnergy $val(initialenergy) \
  -rxPower 35.28e-3 \
  -txPower 31.32e-3 \
  -idlePower 712e-6 \
  -sleepower 144e-9 \
...
After these changes, I run make clean and make.
Then I executed tcl file, But I saw this message : Segmentation Fault.
What is that ??? I was so confuse.
is any idea about that ?


[ns] error with handover sample

2011-08-29 Thread zmezm 14

hi 


i am using ns-2.29 with nist mobility model , under cygwin , 

i want to run wimax ,and handover sample , witch is located in this directory 

“ns-allinone-2.29/ns-2.29/tcl/hsntg/wimax/handover-wimax-wimax”


i got this error , can  you plz tell me whats the problem 


zmezm@hz ~/ns-allinone-2.29/ns-2.29/tcl/hsntg/wimax/handover-wimax-wimax
$ ns handover.tcl
Wrong Number of Arguments! No arguments in this topology
ns handover2.tcl seed scan_iteration going_down other_nodes
zmezm@hz ~/ns-allinone-2.29/ns-2.29/tcl/hsntg/wimax/handover-wimax-wimax