Re: [ns] HOW TO GET THE POSITION OF NODE IN C++ CODE ??

2011-05-16 Thread salahedin rehan

Hi,

Try using this line:


Node* node =0;
node = Node::get_node_by_address(node_ID);
MobileNode* nd = (MobileNode*)node;
nd-getLoc(sx,sy,sz);
 
I think u have to include “#include god.h”, hope this helps...

 
Good luc, 





De: El hadi Cherkaoui e_cherka...@yahoo.fr
Para: NS user ns-users@ISI.EDU
Enviado: dom,15 mayo, 2011 19:19
Asunto: [ns] HOW TO GET THE POSITION OF NODE IN C++ CODE ??




--- En date de : Dim 15.5.11, El hadi Cherkaoui e_cherka...@yahoo.fr a écrit :

De: El hadi Cherkaoui e_cherka...@yahoo.fr
Objet: HOW TO GET THE POSITION OF NODE IN C++ CODE ??
À: NS user ns-users@ISI.EDU
Date: Dimanche 15 mai 2011, 19h35

dear all 

I can not find the c++ instruction to get the position of a node at a given 
time...

I don't need to extract this information from the trace file because i need to 
get it during the simulation and not after it finish... 


Thanx a lot

B. R


[ns] Software validation

2011-05-08 Thread salahedin rehan

Hi all,

I am trying to validate my simulation using coefficient of variation principles 
but when I calculate the confidence interval CI, most of the results I get by 
changing the seed are out from that interval. Are my results wrong?? Need all 
the result to be within that interval??? Please a hint guys, a line answer is 
suffficient.

Thanks a lot,


[ns] port_dmux ???

2011-04-23 Thread salahedin rehan

Hi everybody,

Can anybody tell me what this line of code does. It is part of DSDV.cc file. I 
have to know this in order to progress my work, so please do reply.

port_dmux_- recv ( p,  (Handler*) 0 );

Thank you very much,


[ns] cbrp - error when calling class $cls: $args $...

2011-04-11 Thread salahedin rehan

Hi all,

I am developping a cbrp code for ns2.34 and I thought that I did everything 
good 
when it compiled good, but when I try to use it I am facing the below error. If 
anybody has an idea about this error, please do reply because I have no much 
time left to do this!!! I have been trying to solve it but no matter what I do, 
I still get the exact same error. It is something that has to do when the nodes 
are being created and routing agents attached to them. I guessed to look at 
ns-lib.tcl but I tried a lot of things unsuccessfully. I would be most happy 
to share this protocol with you when it is finished.

Thanks soo much,

 (_o18 cmd line 1)
invoked from within
_o18 cmd port-dmux _o27
invoked from within
catch $self cmd $args ret
invoked from within
if [catch $self cmd $args ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error error when calling class $cls: $args $...
(procedure _o18 line 2)
(SplitObject unknown line 2)
invoked from within
$agent port-dmux $dmux_
(procedure _o15 line 11)
(Node/MobileNode add-target-rtagent line 11)
invoked from within
$self add-target-rtagent $agent $port
(procedure _o15 line 28)
(Node/MobileNode add-target line 28)
invoked from within
$self add-target $agent $port
(procedure _o15 line 15)
(Node attach line 15)
invoked from within
$node attach $ragent [Node set rtagent_port_]
(procedure _o4 line 83)
(Simulator create-wireless-node line 83)
invoked from within
_o4 create-wireless-node
(eval body line 1)
invoked from within
eval $self create-wireless-node $args
(procedure _o4 line 23)
(Simulator node line 23)
invoked from within
$ns_ node
(for body line 2)
invoked from within
for {set i 0} {$i = $val(nn) } {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 0;# disable random motion
}


[ns] cmu wireless extension

2011-04-07 Thread salahedin rehan

Hi,

I am trying to install cmu extension 1.1.2 but I dont know the steps to do so,  
I read from cmu extension pdf that I have to do the following:

1. cp ../ns-2/configure configure-2
2. sh configure-2
3. make depend; make

However, I am getting this: 5. cp: can not stat  ns-2/configure: No such file 
or directory, and I am sure that the directory is right and there is a file 
named configure. I need this extension, so please do reply.

Thanks a lot,


[ns] NS-allinone 2.1b5

2011-04-03 Thread salahedin rehan

Hi,

Can anybody please tell me on which platform ns-allinone 2.1b5 is best 
installed. I tried to install it on fedora but I came across an error that I 
couldnt over come. It is important, so please do reply if you got any hint.

Thanks a lot,


[ns] Rv: Allinone NS 2.1b5 installation error

2011-03-31 Thread salahedin rehan



Hi all,

I found the below wesite solving the tclcl-mappings.h: 51: error by applyinng a 
patch but no matter what I do I am not succeeding in applying it. I thing I am 
doing it wrong as I never done it before. Can anybody who knows how to apply 
this patch guide me please???

Thanks a lot,

http://zzlinux.blogspot.com/2004/12/ns2-building-experiences.html

[apply the following patch] 

 #include tclcl-config.h

-#include tclcl-mappings.h

#include tracedvar.h

+// tclcl-mappings.h included below, AFTER definition of class Tcl

struct Tk_Window_;

@@ -158,6 +158,8 @@

Tcl_HashTable objs_;

};
+#include tclcl-mappings.h
+
class InstVar;

class TclObject {






De: salahedin rehan s_l_...@yahoo.es
Para: NS-users ns-users@ISI.EDU
Enviado: mié,30 marzo, 2011 20:05
Asunto: [ns] Allinone NS 2.1b5 installation error


Hi,

I am  trying to install Allinone-ns 2.1b5 but I keep gettin the next error:

tctcl-mappings.h : 51: error : incomplete type Tcl used in nested name spacifier
tctcl-mappings.h : 52: error : invalid use of incomplete type struct Tcl
tctcl-mappings.h : 40: error : forward declaration of struct Tcl
tctcl-mappings.h : 57: error : invalid use of incomplete type struct Tcl
tctcl-mappings.h : 40: error : forward declaration of struct Tcl

I found some posting regarding this error and said to apply a certain patch 
file 

but it didnt work.  Please guys I need to use this version, or please if 
anybody 

knows a version that could be installed without any problem that is almost the 
same as Allinone-ns 2.1b5 please let me know. I already have the 
Allinone=ns2.34 

but the software is not working on this version. When I tried to apply it on 
ns2.34 I was getting a lot of errors, so I need to install Allinone-ns 2.1b5.

Thank  you sooo much,


[ns] Allinone NS 2.1b5 installation error

2011-03-30 Thread salahedin rehan

Hi,

I am trying to install Allinone-ns 2.1b5 but I keep gettin the next error:

tctcl-mappings.h : 51: error : incomplete type Tcl used in nested name spacifier
tctcl-mappings.h : 52: error : invalid use of incomplete type struct Tcl
tctcl-mappings.h : 40: error : forward declaration of struct Tcl
tctcl-mappings.h : 57: error : invalid use of incomplete type struct Tcl
tctcl-mappings.h : 40: error : forward declaration of struct Tcl

I found some posting regarding this error and said to apply a certain patch 
file 
but it didnt work.  Please guys I need to use this version, or please if 
anybody 
knows a version that could be installed without any problem that is almost the 
same as Allinone-ns 2.1b5 please let me know. I already have the 
Allinone=ns2.34 
but the software is not working on this version. When I tried to apply it on 
ns2.34 I was getting a lot of errors, so I need to install Allinone-ns 2.1b5.

Thank you sooo much,


[ns] signal strenght

2011-03-28 Thread salahedin rehan

I am trying to modify aodv.cc broadcast mechanism so a packet is only 
broadcasted if the signal strenght between the transmitting and the recieving 
node is greater than a certain value. I found out that tworayground.cc file 
calculate the signal strenght between two nodes using the function below:

 double TwoRayGround : : Pr (PacketStamp *t, PacketStamp *r, WirelessPhy 
*ifp).

Can anybody tell me what are these variables PacketStamp *t, PacketStamp *r, 
WirelessPhy *ifp  and how can I call this function from aodv.cc?? 


It is soo urgetn and important guys please give me some hints at least to where 
to look into it... 


Thanks


[ns] Aget or roting protocol is handling this???

2011-03-26 Thread salahedin rehan

Hi all,

I have an agent that rebroadcast to all its neigbours when it recieve a packet 
that has a Broadcast address as destination address. Moreover, I am using a 
probability routing protocl, that means when receiving a broadcast pkt, it 
rebroadcast with some probability. So, I am wondering if a recieved broadcast 
pkt will be handled by the agent or the routing protocol. In other words, will 
the packet be rebroadcasted with some probability, as the routing protocol 
functions, or it will be normal broadcast as the agent functions??

Please guys, it is soo important.

Thanks,


[ns] cbrgen command

2011-03-25 Thread salahedin rehan

Hi all,

I am generating different traffic scenario files by changing the number of 
nodes 
and I am wondering if it is better to change the number of multiple connections 
as well. Logically, I think I should because as the number of nodes increases, 
there should be more multiple connections.

Am I right?? Please anybody who has done some kind of comparison tells me which 
way is it.

Thanks in advance,


[ns] Mac error

2011-03-23 Thread salahedin rehan

Hi everybody,

I am running an ad hoc netwrok having 80 nodes, and it is executed but before 
exiting it show me the following: 


MAC_802_11: accessing MAC cache_ array out of range (src 80, dst 68, size 80)!
MAC_802_11: accessing MAC cache_ array out of range (src 80, dst 68, size 80)!
MAC_802_11: accessing MAC cache_ array out of range (src 80, dst 11, size 80)!
MAC_802_11: accessing MAC cache_ array out of range (src 80, dst 11, size 80)!
MAC_802_11: accessing MAC cache_ array out of range (src 80, dst 11, size 80)!
MAC_802_11: accessing MAC cache_ array out of range (src 80, dst 11, size 80)!
MAC_802_11: accessing MAC cache_ array out of range (src 80, dst 68, size 80)!
MAC_802_11: accessing MAC cache_ array out of range (src 80, dst 11, size 80)!
MAC_802_11: accessing MAC cache_ array out of range (src 80, dst 11, size 80)!
MAC_802_11: accessing MAC cache_ array out of range (src 80, dst 11, size 80)!
[suppressing additional MAC cache_ warnings]


Can anybody tell me why I am getting this and how to eliminate it. I use the 
same coding but with differeny number of nodes and it does not give me any 
warnings!!!

Thank you,


  


[ns] Broadcasting in ad hoc nets

2011-03-18 Thread salahedin rehan

Hi all,

I have an agent that broadcast to all neighbours, and I am using a CBRP 
(Cluster-Based Routing Protocol). So, can anybody tells me what really happens 
in the network when this agent broadcasts a packet. Will it follow the 
clustering broadcast or normal broadcasting. In other words, is the agent 
working on top of the cluster based routing protocol???

I am new to ns2 but I think that the origenating node will perform normal 
broadcasting and then all others will follow the cluster based as the routing 
protocol is cluster based. Am I right?

Please guy give me a hint.

Thanks a lot,


  


[ns] Number of neighbours

2011-03-16 Thread salahedin rehan

Hi all,

How can I know the number of neighbours a node has before sending a packet. I 
am 
using the Agent below. When recieving, the node brodcast the packet with a 
probability. I need to know the number of neighbours to make that probability 
dynamic. In other words, when recieving a packet, the probability of 
rebroadcasting will be higher if there will be fewer neighbours. 


Thanks a lot.


#Probabilistic Broadcast Agent 
#V.B., 2005 
 
Class Agent/MessagePassing/MyPBCast -superclass { Agent/MessagePassing } 
 
Agent/MessagePassing/MyPBCast instproc init {} { 
$self instvar prob_  
$self instvar seqno_  
$self instvar flag_ 
$self next 
set seqno_ 0 
set flag_ 0 
$self instvar agent_addr_ 
set prob_ 1  
$self set_pkttype 13 
$self set packetSize_ 400  
} 
 
 
Agent/MessagePassing/MyPBCast instproc setprob {prob} { 
$self instvar prob_  
set prob_ $prob 
} 
 
Agent/MessagePassing/MyPBCast instproc setseed {seed} { 
$self instvar seed_  
set seed_ $seed 
expr srand($seed_) 
} 
 
Agent/MessagePassing/MyPBCast instproc send {} { 
$self instvar seqno_  
$self instvar agent_addr_ 
set msg pbcast:$agent_addr_:$agent_addr_:$seqno_: 
set flag_ 1 
$self sendto 400 $msg -1 90 
} 
 
Agent/MessagePassing/MyPBCast instproc recv { flg port len p } { 
  # receiver function
 
  $self instvar agent_addr_ 
  $self instvar flag_ 
  $self instvar prob_  
  set L [split $p :] 
  set src_ [lindex $L 2] 
  set seqno_ [lindex $L 3] 
  if {$flag_ == 1} {  return } 
  set flag_ 1 
  #here toss a coin and make probabilistic decision 
  set coin [expr rand()] 
#puts $coin 
#puts $prob_#here I need to make this probability dependable on the no. 
neighbours...?
  if {$coin  $prob_} { return } 
  set msg pbcast:$agent_addr_:$src_:$seqno_: 
  $self sendto 400 $msg -1 90  
 
}


  


[ns] Broadcasting in MANETs

2011-03-15 Thread salahedin rehan

Hi,

I came across you broadcasting agent of 2001: 
http://www.isi.edu/nsnam/archive/ns-users/webarch/2001/msg05889.html

Can anybody give me a hand to implement it and use it. I am using 
ns-allinone-2.34. I really need to learn how it works and how to use it.

Thanks in advance.


  


[ns] Broacasting in ad hoc netwroks

2011-03-14 Thread salahedin rehan

Hi,

I am trying to make a comparison between three broadcast techniques, the normal 
flooding, clustering and the enhanced clustering, in ad hoc networks. I learned 
how to build up a simple ad hoc network, but I still dont know how to simply 
broadcast. Moreover, how can I change the broadcast technique??? Do I have to 
do 
some C++ coding first?? If so, Can you please tell me the steps for 
implementing 
a broadcast technique in MANETs.

Thank you for your time. 


  


[ns] Movement scenarios for Ad Hoc network

2011-03-13 Thread salahedin rehan

Hi,

I am using this command  ns  setdest.cc -n 50 -p 200 -s 20 -t 500 -x 1000 -y 
1000  50_nodes in  order to generate a movement scenario but it gives me an 
error saying  invalid command name /* while executing /* (file 
setdest.cc  line 1). 


How can I do this?? Please reply urgently.

Thanks a lot,

Salahedin.