Re: [ns] Clearing a queue at a node in ns-2

2006-06-09 Thread smythek

Yes, I'd want to stop queueing at that _particular_ node... but won't 
commenting everything out stop it everywhere (I still want it to continue at 
all the other nodes... it's an interesting simulation!).

Thanks,

Kathy


On Fri, 9 Jun 2006, Shafiq Hashmi wrote:

> If you want to stop queueing at all, then
>
> in queue.cc, within void Queue::recv(Packet* p, Handler*) method, comment 
> everything else but the line
> target_->recv(p, &qh_);
>
> I dont know whether will it answer your problem or not.
>
> Shafiq
>
>
>
>
>
>
> - Original Message - From: <[EMAIL PROTECTED]>
> To: "Pedro Vale Estrela" <[EMAIL PROTECTED]>
> Cc: 
> Sent: Friday, June 09, 2006 6:32 PM
> Subject: Re: [ns] Clearing a queue at a node in ns-2
>
>
>> 
>> Whoah, that is too complicated for me.   I don't know ns-2 very well. What 
>> do you mean by:
>> "make a pointer to the ITF" -- doesn't it have a pointer (uptarget_)? 
>> According to the diagram on pg 145 I should do uptarget_ 
>> ->downtarget_->reset()
>> since
>> uptarget will take me to the LL, downtarget will take me to the IFq, and 
>> reset will reset the queue for that node.
>> 
>> But this doesn't work.  Uptarget_ gives me an NsObject instead of a LL 
>> object...
>> 
>> 
>> 
>> On Fri, 9 Jun 2006, Pedro Vale Estrela wrote:
>> 
>>> 
>>> Yes,
>>> 
>>> http://www.isi.edu/nsnam/ns/doc/ns_doc.pdf
>>> pag 145,
>>> 
>>> - at your C++ MAC module, make a pointer to the ITF;
>>> - either search the C++ NODE methods for getting the pointer
>>> reference you need (you want the reverse of the downtarget_ on the ITF; 
>>> for
>>> making this, search the code that sets the downtarget_ variable in C++ in
>>> the ITF; (tip: use DDD, put a breakpoint somewhere in mobilenode.cc)
>>> in that moment, set something like:
>>>  downtarget_->my_ITF_ = this;
>>> 
>>> - then at the appropriate time, call reset() of it.
>>>my_ITF->reset();
>>> 
>>> Of course that this is not good C++ Object-Orientation practices, but use 
>>> it
>>> to simply try your ideia; if it works nice, then make the same thing with
>>> provte variables and public set/get methods.
>>> 
>>> 
>>> You can also perform the same trick by:
>>>   Calling TCL / searching the ITF object you want based on the current MAC
>>> object / call reset of it. The benefit is that you can fine tune this 
>>> method
>>> without recompiling NS2 each time.
>>> 
>>> 
>>> If this works, please put this on the NS2 WIKI!
>>> Pedro Vale Estrela
>>> 
>>> 
 Hi ns,
 
 I'd like to clear a node's queue from the mac-layer in my simulation 
 after
 I've received a certain packet.  Can I call a PacketQueue function like
 "reset()" from the mac layer?  If not, how would I clear the queue?
 
 Thanks!
 
 Kathy
 
 
 
>>> 
>>> 
>>> 
>> 
>> 
>> 
>
>
>




Re: [ns] Clearing a queue at a node in ns-2

2006-06-09 Thread smythek

...I'd even be willing to just make the queue "blocked" at the node, but I 
can't seem to access the blocked_ variable from mac-802_11.cc (which is where I 
need to have this queue stuff happen).  Can anyone help?

Kathy


On Fri, 9 Jun 2006, Shafiq Hashmi wrote:

> If you want to stop queueing at all, then
>
> in queue.cc, within void Queue::recv(Packet* p, Handler*) method, comment 
> everything else but the line
> target_->recv(p, &qh_);
>
> I dont know whether will it answer your problem or not.
>
> Shafiq
>
>
>
>
>
>
> - Original Message - From: <[EMAIL PROTECTED]>
> To: "Pedro Vale Estrela" <[EMAIL PROTECTED]>
> Cc: 
> Sent: Friday, June 09, 2006 6:32 PM
> Subject: Re: [ns] Clearing a queue at a node in ns-2
>
>
>> 
>> Whoah, that is too complicated for me.   I don't know ns-2 very well. What 
>> do you mean by:
>> "make a pointer to the ITF" -- doesn't it have a pointer (uptarget_)? 
>> According to the diagram on pg 145 I should do uptarget_ 
>> ->downtarget_->reset()
>> since
>> uptarget will take me to the LL, downtarget will take me to the IFq, and 
>> reset will reset the queue for that node.
>> 
>> But this doesn't work.  Uptarget_ gives me an NsObject instead of a LL 
>> object...
>> 
>> 
>> 
>> On Fri, 9 Jun 2006, Pedro Vale Estrela wrote:
>> 
>>> 
>>> Yes,
>>> 
>>> http://www.isi.edu/nsnam/ns/doc/ns_doc.pdf
>>> pag 145,
>>> 
>>> - at your C++ MAC module, make a pointer to the ITF;
>>> - either search the C++ NODE methods for getting the pointer
>>> reference you need (you want the reverse of the downtarget_ on the ITF; 
>>> for
>>> making this, search the code that sets the downtarget_ variable in C++ in
>>> the ITF; (tip: use DDD, put a breakpoint somewhere in mobilenode.cc)
>>> in that moment, set something like:
>>>  downtarget_->my_ITF_ = this;
>>> 
>>> - then at the appropriate time, call reset() of it.
>>>my_ITF->reset();
>>> 
>>> Of course that this is not good C++ Object-Orientation practices, but use 
>>> it
>>> to simply try your ideia; if it works nice, then make the same thing with
>>> provte variables and public set/get methods.
>>> 
>>> 
>>> You can also perform the same trick by:
>>>   Calling TCL / searching the ITF object you want based on the current MAC
>>> object / call reset of it. The benefit is that you can fine tune this 
>>> method
>>> without recompiling NS2 each time.
>>> 
>>> 
>>> If this works, please put this on the NS2 WIKI!
>>> Pedro Vale Estrela
>>> 
>>> 
 Hi ns,
 
 I'd like to clear a node's queue from the mac-layer in my simulation 
 after
 I've received a certain packet.  Can I call a PacketQueue function like
 "reset()" from the mac layer?  If not, how would I clear the queue?
 
 Thanks!
 
 Kathy
 
 
 
>>> 
>>> 
>>> 
>> 
>> 
>> 
>
>
>




Re: [ns] Clearing a queue at a node in ns-2

2006-06-09 Thread smythek

Whoah, that is too complicated for me.   I don't know ns-2 very well.  What do 
you mean by:
"make a pointer to the ITF" -- doesn't it have a pointer (uptarget_)?  
According to the diagram on pg 145 I should do uptarget_ ->downtarget_->reset()
since
uptarget will take me to the LL, downtarget will take me to the IFq, and reset 
will reset the queue for that node.

But this doesn't work.  Uptarget_ gives me an NsObject instead of a LL object...



On Fri, 9 Jun 2006, Pedro Vale Estrela wrote:

>
> Yes,
>
> http://www.isi.edu/nsnam/ns/doc/ns_doc.pdf
> pag 145,
>
> - at your C++ MAC module, make a pointer to the ITF;
>   - either search the C++ NODE methods for getting the pointer
> reference you need (you want the reverse of the downtarget_ on the ITF; for
> making this, search the code that sets the downtarget_ variable in C++ in
> the ITF; (tip: use DDD, put a breakpoint somewhere in mobilenode.cc)
> in that moment, set something like:
>  downtarget_->my_ITF_ = this;
>
> - then at the appropriate time, call reset() of it.
>my_ITF->reset();
>
> Of course that this is not good C++ Object-Orientation practices, but use it
> to simply try your ideia; if it works nice, then make the same thing with
> provte variables and public set/get methods.
>
>
> You can also perform the same trick by:
>   Calling TCL / searching the ITF object you want based on the current MAC
> object / call reset of it. The benefit is that you can fine tune this method
> without recompiling NS2 each time.
>
>
> If this works, please put this on the NS2 WIKI!
> Pedro Vale Estrela
>
>
>> Hi ns,
>>
>> I'd like to clear a node's queue from the mac-layer in my simulation after
>> I've received a certain packet.  Can I call a PacketQueue function like
>> "reset()" from the mac layer?  If not, how would I clear the queue?
>>
>> Thanks!
>>
>> Kathy
>>
>>
>>
>
>
>




[ns] Clearing a queue at a node in ns-2

2006-06-09 Thread smythek

Hi ns,

I'd like to clear a node's queue from the mac-layer in my simulation after I've 
received a certain packet.  Can I call a PacketQueue function like "reset()" 
from the mac layer?  If not, how would I clear the queue?

Thanks!

Kathy






Re: [ns] ns remove() error -- try 2

2006-05-24 Thread smythek

Hey ns,

It seems I must ask again:  I have an error "PacketQueue:: remove() couldn't 
find target" that kills my simulation.

Does anyone know what causes this?  I found out that I don't get this error if 
I move my nodes far enough apart, but I need them pretty close.

Kathy


On Sun, 21 May 2006, k s wrote:

>
> Hello,
>
> I searched for this error online, and it's happened before, but I couldn't
> find an explanation for why:
>
> in my wireless model, I've been decreasing the distance between nodes.  If I
> make the nodes too close, I get this error after ns runs for ~1.8 simulation
> seconds:
>   PacketQueue:: remove() couldn't find target
>
> and then it quits.
>
> Can anyone tell me why the distance between nodes matters?  What is ns-2
> even complaining about?  I went to this error in queue/queue.cc and couldn't
> tell what the function was doing.
>
> Thanks,
>
> Kathy
>
>




Re: [ns] UMTS simulation error

2006-05-16 Thread smythek

I had a no-slot error too in my simulation.  I found out that it means there's 
no port assigned for your application at your nodes.  You can set it manually 
or you can connect the agents in your Tcl script.  See Marc Greis' tutorial for 
how.

Kathy


On Tue, 16 May 2006, Anoop Ramamurthy wrote:

>
> Hello ,
>
>
>I am a new NS user. I have written a tcl script which comprises of
> a simple ftp application with tcp (UMTS using eurane) . I am not getting
> any syntactical errors in the script but it is runnig for sometime and
> giving me this error message.
>
> "add-interface: t>2: t == 3 (t == nifs_ -1)
> simulation is running  please wait ...
> --- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
>_o71: no target for slot -1
>_o71 type: Classifier/Hash/Dest
> content dump:
> classifier _o71
>0 offset
>0 shift
>2147483647 mask
>0 slots
>-1 default
> -- Finished standard no-slot{} default handler -- "
>
> Can anyone help me to find the mistake which is causing this error ?
> the original script which i have written is ...
>
>
>
> global ns
>
> # Remove all headers and add only those that are required
> # This significantly reduces the memory requirements for large simulations
>
>
> remove-all-packet-headers
> add-packet-header MPEG4 MSC-HS RLS LL Mac RTP TCP IP Common Flags
>
>
> set ns [new Simulator]
>
> set output [open out.tr w]
> $ns trace-all $output
>
> proc finish {} {
>global ns
>global output
>$ns flush-trace
>close $output
>puts "Simulation ended "
>exit 0
> }
>
> # Configure and create rnc
>
> $ns node-config -UmtsNodeType rnc
> set rnc [$ns create-Umtsnode]
>
> # Configure and create bs
>
> $ns node-config -UmtsNodeType bs \
>-downlinkBW 32kbs \
>-downlinkTTI 10ms \
>-uplinkBW 32kbs \
>-uplinkTTI 10ms \
>-hs_downlinkTTI 2ms \
>-hs_downlinkBW 64kbs
>
> set bs [$ns create-Umtsnode]
>
> # Define Iub interface between RNC and BS
> $ns setup-Iub $bs $rnc 622Mbit 622Mbit 15ms 15ms DummyDropTail 2000
>
> # Configure and create ue
> $ns node-config -UmtsNodeType ue \
>-baseStation $bs \
>-radioNetworkController $rnc
>
> set ue1 [$ns create-Umtsnode]
>
> # Create sgsn and ggsn
> set sgsn1 [$ns node]
> set ggsn1 [$ns node]
>
> # Create node1 and node 2 ( Fixed nodes )
> set node1 [$ns node]
> set node2 [$ns node]
>
> # Connections between fixed network nodes
> $ns duplex-link $rnc $sgsn1 622Mbit 0.4ms DropTail 1000
> $ns duplex-link $sgsn1 $ggsn1 622Mbit 10ms DropTail 1000
> $ns duplex-link $ggsn1 $node1 10Mbit 15ms DropTail 1000
> $ns duplex-link $node1 $node2 10Mbit 35ms DropTail 1000
>
> # Routing gateway
> $rnc add-gateway $sgsn1
>
>  Set up the agents and their respective connections
> 
> # Agent setup for ue
> set tcp0 [new Agent/TCP]
> $tcp0 set fid_ 0
> $tcp0 set prio_ 2
>
> # Attach agents to a common fixed nodes
> $ns attach-agent $node2 $tcp0
>
> # Create and connect two applications to their agent
> set ftp0 [new Application/FTP]
> $ftp0 attach-agent $tcp0
>
> # Create and attach sinks
> set sink0 [new Agent/TCPSink]
> $sink0 set fid_ 0
> $ns attach-agent $ue1 $sink0
>
> # Connect sinks to TCP agents
> $ns connect $tcp0 $sink0
>
> $ns node-config -llType UMTS/RLC/AM \
>-downlinkBW 64kbs \
>-uplinkBW 64kbs \
>-downlinkTTI 20ms \
>-uplinkTTI 20ms \
>-hs_downlinkTTI 2ms \
>-hs_downlinkBW 64kbs
>
> # Create HS-DSCH and attach TCP agent for ue1
> $ns create-hsdsch $ue1 $sink0
>
> # Loads input trace file for ue identified by its fid_
> $bs setErrorTrace 0 "idealtrace"
>
> # Load BLER lookup table from SNRBLERMatrix
> $bs loadSnrBlerMatrix "SNRBLERMatrix"
>
> # UE1 tracing
> $ue1 trace-inlink $output 2
>
> $ns at 0.0 "$ftp0 start"
> $ns at 10.0 "$ftp0 stop "
> $ns at 10.2 "finish"
>
> puts " simulation is running  please wait ... "
> $ns run
>
> __
>




[ns] creating a mac packet and broadcasting it

2006-05-12 Thread smythek

Can anyone tell me how I can create a mac packet and broadcast it in a wireless 
network (which variables need to be set, whether I need an agent or not)?  I've 
looked through the ns manual and searched online.  Does anyone know the steps?

Please help me out.. I'm desparate!

Thank you,

Kathy






[ns] wireless ping broadcast questions

2006-05-11 Thread smythek

Hi,

I was messing around with the ping agent from Marc Greis' Tutorial, and wanted 
to change the ping to a broadcast.  I added the IP header stuff as I've seen 
elsewhere online,

hdr_ip *ip = hdr_ip::access(pkt);
 ip->daddr() = IP_BROADCAST;

and now I get this error:

-- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
 _o996: no target for slot -1
 _o996 type: Classifier/Port
content dump:
classifier _o996
 0 offset
 0 shift
 2147483647 mask
 2 slots
 slot 0: _o (Agent/Ping)
 slot 255: _o983 (Agent/DSDV)

I can't find out how to fix it and I don't know anything about Classifiers.  I 
realize that there was no port assigned to Ping, but how do I fix this?

My other question is, do I have to use an IP_Broadcast?  Can I just use a 
MAC_BROADCAST?

Kathy






[ns] What happens when I call set node [$ns_ node]

2006-05-09 Thread smythek

I am trying to find out what happens (what C++ functions are called, what .cc 
files are accessed) when a new node is created in ns-2.  The ns-2 documentation 
refers to ns-lib.tcl, which does not exist.  Does anyone know?  The reason is 
I'm trying to access a MAC layer function from my new Agent class, and I don't 
want to create a new MAC object to do so.

Thanks,

Kathy