Re: [ns] how events are scheduled

2006-12-05 Thread Shafiq Hashmi
Hi, In OTcl when you write any statement like $ns at $stop "finish_proc" then in scheduler.cc, it schedules the the 'finish_proc' (or anything u want) to execute/run at time 'stop'. In C++, you have to call the schedule method with the parameters (a handler, a packet and delay), like here

Re: [ns] Multi-channel Multi-interface extention ns-2-28 or ns-2-29

2006-12-13 Thread Shafiq Hashmi
Hi, I did implement the same (Multi-channel Multi-interface) from the given site, but on LEACH protocol. It worked fine there. Though I did not have to use the 802.11, as it used its own mac layer protocol. I just modified Modifications in tcl/lib/ns-lib.tcl Modifications in mac/channel.cc a

Re: [ns] ATM service classes

2006-12-16 Thread Shafiq Hashmi
Hi, Sometimes those who are following up with the ns-forum currently are not expert in your area or have no idea at all. Search in the previous emails of 4-5 years, you may find someone who might have worked on VOIP/ATM or exactly on your stuff. You can send them the email directly, if that ex

Re: [ns] Help me!Problem when running LEACH with ns-2.27

2007-03-27 Thread Shafiq Hashmi
apparently it looks like '//' is wrongly placed. It should be '#' instead of '//' to comment out the line - Original Message - From: "Nguyen Vo Minh Chau" <[EMAIL PROTECTED]> To: "NS USER" Sent: Tuesday, March 27, 2007 4:39 AM Subject: [ns] Help me!Problem when running LEACH with ns-2

Re: [ns] difference between ns and ns_ ?

2006-02-09 Thread Shafiq Hashmi
Hi, I understand that the two are the same. But I would like to know why is there the tendency to put an 'underscore' at the end of the variables, like nodeID_ , msg_ , packetSize_, etc . I understand that in naming a variable there is no extra meaning. But is there any naming convention or any b

[ns] What does this line means " [[$self agent] set node_ ] "

2006-03-16 Thread Shafiq Hashmi
Hello all, I am always confused with this assignment statement [[$self agent] set node_ ] What does it exaclty means? What value it is assigning to which variable ?? Here 'agent' is a shadow instance, created in OTcl space, of an object in C++. Can somebody help me understanding it. There are

[ns] having problem in Link layer issues

2006-04-15 Thread Shafiq Hashmi
Hello everyone, I am trying to modify LEACH code, which is a cluster-oriented sensor network protocol. It uses CDMA technique, using different code for each cluster-node/cluster-head-node communication and cluster-head-nodes/Base Station (BS) communication. In the protocol the CHs (cluster hea

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

2006-06-09 Thread Shafiq Hashmi
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]>

[ns] no. of nodes in ns-2.29

2006-06-12 Thread Shafiq Hashmi
Hi everyone, What is the limit of number of nodes that ns-2.29 can support? Can anybody tell me please? Thanx Shafiq

Re: [ns] R: Turn Nodes on/off

2006-06-23 Thread Shafiq Hashmi
Hi all, That would be a bad idea if you go offline to discuss this topic or any other topic by which others can benefit as well. At least I learned from this discussion ;-) Regards - Original Message - From: "Gilles Bertrand" <[EMAIL PROTECTED]> To: "Hai Nam" <[EMAIL PROTECTED]> Cc

Re: [ns] SPIN and LEACH Protocol

2006-06-28 Thread Shafiq Hashmi
Hi Mary, See the pdf at this link http://www.internetworkflow.com/resources/ns2leach.pdf. This article is for LEACH protocol to make it work on ns-2.27. To make it work on ns-2.29 version, you will need to edit the files that is mentioned in this document. I already have editted these files

Re: [ns] SPIN and LEACH Protocol

2006-06-29 Thread Shafiq Hashmi
Yeah, make always take a long time to compile if you clean all the object files ( with 'make clean'). I didnot run the validate thing. Simply ran leach_test command in ns-2.29/ns-2.27 folder. Shafiq - Original Message - From: ankit singhal To: Shafiq Hashmi Sent

Re: [ns] SPIN and LEACH Protocol

2006-07-06 Thread Shafiq Hashmi
/copying SPIN files do a 'make clean' before compiling it. Good luck Shafiq - Original Message - From: Marisangela To: Shafiq Hashmi Sent: Thursday, July 06, 2006 11:24 AM Subject: [Spam:**] Re: [ns] SPIN and LEACH Protocol Hi Shafiq, I thank you so muc

[ns] Need help to implement Timer feature

2006-07-07 Thread Shafiq Hashmi
Hello all, I want to implement a timer function for a packet to be resent if that same timer expires for not getting the respective ACK. Can anybody help me to get a simple example so that I can use that function. Whatever I got on the net or on this forum is difficult to comprehend. I would

Re: [ns] Need help to implement Timer feature

2006-07-08 Thread Shafiq Hashmi
Dear Hai Nam, Is there anyway to implement the same timer feature implemented in OTcl instead of C++. Thanx - Original Message - From: "Hai Nam" <[EMAIL PROTECTED]> To: "Shafiq Hashmi" <[EMAIL PROTECTED]> Cc: Sent: Friday, July 07, 2006 5:25 A

Re: [ns] ask you a question about LEACH

2006-07-16 Thread Shafiq Hashmi
Hi, The following statement gives you the energy in 'er' for the node 'id' set er [$node_($id) getER] Use this anywhere you want. Make a loop for the cluster you are concerned about to find the total energy of the nodes in that respective cluster. I dont know much about the decideclusterhead p

[ns] Reading a variable from C++, which is declared and set in OTcl

2006-07-18 Thread Shafiq Hashmi
Hello all, I want to access a variable created in OTcl, from C++ files. Tried bind() function but could not succeed to make it work. Can anybody help. This is what I did. Is anything wrong here ? I want to read the variable 'ackRcvd_', from a handle method of a class derived from 'public TclO

Re: [ns] Still looking for the reply: Re: Reading a variable from C++, which is declared and set in OTcl

2006-07-19 Thread Shafiq Hashmi
in Shafiq - Original Message - From: "Abhijeet More" <[EMAIL PROTECTED]> To: "Shafiq Hashmi" <[EMAIL PROTECTED]> Cc: Sent: Wednesday, July 19, 2006 2:00 PM Subject: Re: [ns] Still looking for the reply: Re: Reading a variable from C++, which is declared and set in OTcl

[ns] Still looking for the reply: Re: Reading a variable from C++, which is declared and set in OTcl

2006-07-19 Thread Shafiq Hashmi
Thanx - Original Message - From: "Shafiq Hashmi" <[EMAIL PROTECTED]> To: Sent: Tuesday, July 18, 2006 5:03 PM Subject: [ns] Reading a variable from C++, which is declared and set in OTcl > > Hello all, > > I want to access a variable created in OTcl

Re: [ns] Still looking for the reply: Re: Reading a variable from C++, which is declared and set in OTcl

2006-07-19 Thread Shafiq Hashmi
ent/RCAgent set ackRcvd_ 0 ( If I dont do this, then it prints garbage nos. but not '5') - Original Message - From: "Abhijeet More" <[EMAIL PROTECTED]> To: "Shafiq Hashmi" <[EMAIL PROTECTED]> Cc: Sent: Wednesday, July 19, 2006 7:33 PM Subject: R

Re: [ns] Still looking for the reply: Re: Reading a variable from C++, which is declared and set in OTcl

2006-07-19 Thread Shafiq Hashmi
resend the packet. LEACH/LEACH-C instproc recv {args} { $self instvar msgArr compNo_ ackRcvd_ node_number_ set ackRcvd_ 5 puts "ackRcvd_ = $ackRcvd_" } Thanx and regards Shafiq - Original Message - From: "Abhijeet More" <[EMAIL PROTECTED]> To: "Sha

Re: [ns] how to turn off collision effect in ns-2.28

2006-07-25 Thread Shafiq Hashmi
In ns-2.28/mac folder, look for the mac layer protocol file that you might be using. For example, mac-802_11.c. Go to the 'recv' function. In this case will be "Mac802_11::recv(Packet *p, Handler *h)". You can find the if-else condition to go to collision() method. You can disable over there,

[ns] Accessing object created in Tcl from C++

2006-08-17 Thread Shafiq Hashmi
Hello all, Is it possible to access an object of Agent/RCAgent, created in Tcl, from another C++ class. Can anybody tell me ? Thanx Shafiq