Re: [ns] Debugging ns code (.cc files) with print statements

2011-03-17 Thread Ns Learner

printf works!

I had two copies of ns and I made changes to one of them. The PATH variable was 
pointing to the original ns folder. Whereas, I wanted to test the result of the 
changes made in the ns-copy folder. When I gave, ns file1.tcl, the original ns 
pointed out by PATH was being used. Hence, I could not see the effect of the 
changes although I was able to compile them successfully. To see which ns 
folder is being used, issue the command which ns.

To use the ns other than the default one pointed by PATH, traverse to the new 
ns folder and to the location in which the tcl file is located and give 
../../ns file1.tcl

Thanks to my teachers who helped me by pointing out my mistake.

--- On Thu, 17/3/11, Ns Learner ns2.lear...@yahoo.com.au wrote:

From: Ns Learner ns2.lear...@yahoo.com.au
Subject: Re: [ns] Debugging ns code (.cc files) with print statements
To: pedro chaparro pdr...@gmail.com, ns-users@ISI.EDU
Received: Thursday, 17 March, 2011, 2:27 PM


Thanks, Pedro. I used printf in tcp.cc file inside the methods that are usually 
called. But, I don't get any statements printed on the console.

What could be the mistake?

Thanks.


--- On Thu, 17/3/11, pedro chaparro pdr...@gmail.com wrote:

From: pedro chaparro pdr...@gmail.com
Subject: Re: [ns] Debugging ns code (.cc files) with print statements
To: Ns Learner ns2.lear...@yahoo.com.au
Received: Thursday, 17 March, 2011, 4:42 AM

u can use printf, bu cout should works too!!!

2011/3/14 Ns Learner ns2.lear...@yahoo.com.au



Hello,



I am trying to debug ns code (.cc files) with print or cout statements.



With cout, I get this error message:



error: ISO C++ forbids declaration of ‘cout’ with no type

error: expected ‘;’ before ‘’ token





I tried inserting using namespace std and it still gives me an error message.

Print or printf statements simply do not print message on to my console.



Can somebody help?



Thanks :D





      


-- 
Pedro Alonso Chaparro Valero RD Engineer
Ciudad Politecnica de la Innovación
iTEAM - Mobile Communications Group
Polytechnic University of Valencia

C\ Camino de Vera S/N, Edificio 8G
46022 Valencia, Spain






   


  

Re: [ns] Debugging ns code (.cc files) with print statements

2011-03-16 Thread Ns Learner


Thanks, Pedro. I used printf in tcp.cc file inside the methods that are usually 
called. But, I don't get any statements printed on the console.

What could be the mistake?

Thanks.


--- On Thu, 17/3/11, pedro chaparro pdr...@gmail.com wrote:

From: pedro chaparro pdr...@gmail.com
Subject: Re: [ns] Debugging ns code (.cc files) with print statements
To: Ns Learner ns2.lear...@yahoo.com.au
Received: Thursday, 17 March, 2011, 4:42 AM

u can use printf, bu cout should works too!!!

2011/3/14 Ns Learner ns2.lear...@yahoo.com.au



Hello,



I am trying to debug ns code (.cc files) with print or cout statements.



With cout, I get this error message:



error: ISO C++ forbids declaration of ‘cout’ with no type

error: expected ‘;’ before ‘’ token





I tried inserting using namespace std and it still gives me an error message.

Print or printf statements simply do not print message on to my console.



Can somebody help?



Thanks :D





      


-- 
Pedro Alonso Chaparro Valero RD Engineer
Ciudad Politecnica de la Innovación
iTEAM - Mobile Communications Group
Polytechnic University of Valencia

C\ Camino de Vera S/N, Edificio 8G
46022 Valencia, Spain




  

Re: [ns] Debugging ns code (.cc files) with print statements

2011-03-16 Thread Ns Learner

Thanks, Manoj. I used printf in tcp.cc file inside the methods that are
usually called. But, I don't get any statements printed on the console.

What could be the mistake?

Thanks.

--- On Thu, 17/3/11, Manoj_Kumar micman.ma...@ymail.com wrote:

From: Manoj_Kumar micman.ma...@ymail.com
Subject: Re: [ns] Debugging ns code (.cc files) with print statements
To: ns-users@ISI.EDU
Received: Thursday, 17 March, 2011, 4:28 AM




Ns Learner wrote:
 
 With cout, I get this error message:
 error: ISO C++ forbids declaration of ‘cout’ with no type
 error: expected ‘;’ before ‘’ token
 

Do not use cout. Use printf instead.


-
---
ManojKumar.A
---
Blog: http://getch.wordpress,com
Mailing list guidelines: http://goo.gl/xC874
-- 
View this message in context: 
http://old.nabble.com/Debugging-ns-code-%28.cc-files%29-with-print-statements-tp31140445p31165658.html
Sent from the ns-users mailing list archive at Nabble.com.





  

[ns] Debugging ns code (.cc files) with print statements

2011-03-13 Thread Ns Learner

Hello,

I am trying to debug ns code (.cc files) with print or cout statements.

With cout, I get this error message:

error: ISO C++ forbids declaration of ‘cout’ with no type
error: expected ‘;’ before ‘’ token


I tried inserting using namespace std and it still gives me an error message.
Print or printf statements simply do not print message on to my console.

Can somebody help?

Thanks :D


  

[ns] How to call one function out of 2, using set nd [ns node] ???

2010-04-13 Thread The Learner


while creating a new node using the statement-
Using this statement set nd [ns node], a function defined in  ns-lib.tcl is
called(particular to a protocol).
In my case I have 2 agents, for different types of nodes and thus two
functions in ns-lib.tcl, how shall I specify which function to be called
while creating nodes using the statement set nd [ns node]...?

Regards,
The Learner
-- 
View this message in context: 
http://old.nabble.com/How-to-call-one-function-out-of-2%2C-using-set-nd--ns-node--tp28219421p28219421.html
Sent from the ns-users mailing list archive at Nabble.com.



[ns] Value of the Routing protocol [val(rp) ??? ]

2010-04-12 Thread The Learner


Hi all,
In the tcl script while setting the options of the node, where should the
value of the routing protocol, val(rp), be defined? Is it in the
ns-packet.tcl, inside the foreach prot { ... }?

I have two different agents in my protocol, and the name I have provided in
the ns-packet.tcl file does not match with any of the agents' names. The
name I've provided inside the foreach prot { ... MSProto ...} is the name of
the Directory inside the ns-2.34 directory wherein all the files of my
protocol reside.

I want to know if this is correct or the name of the protocol should match
with any agent?

Thanks and Regards,
The Learner 
-- 
View this message in context: 
http://old.nabble.com/Value-of-the-Routing-protocol--val%28rp%29---tp28219215p28219215.html
Sent from the ns-users mailing list archive at Nabble.com.



[ns] Error with bind() function

2010-04-09 Thread The Learner


Hi all.
While issuing the make command after inserting my own protocol in the ns2
directory, I get the following error with bind() function.

MSProto/msproto.cc:71: error: call of overloaded ‘bind(const char [10],
int)’ is ambiguous
/home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:177: note: candidates are:
void TclObject::bind(const char*, TracedInt*) near match
/home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:178: note:
void TclObject::bind(const char*, TracedDouble*) near match
/home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:179: note:
void TclObject::bind(const char*, double*) near match
/home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:182: note:
void TclObject::bind(const char*, unsigned int*) near match
/home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:183: note:
void TclObject::bind(const char*, int*) near match
/home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:185: note:
void TclObject::bind(const char*, TclObject**) near match
/home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:188: note:
void TclObject::bind(const char*, int64_t*) near match
make: *** [MSProto/msproto.o] Error 1


Does anybody have any idea what can rectify this error-

The line using bind function is - 
bind(sector_id, sector_id_);


Thanking You,
The Learner
-- 
View this message in context: 
http://old.nabble.com/Error-with-bind%28%29-function-tp28188357p28188357.html
Sent from the ns-users mailing list archive at Nabble.com.




[ns] Error with bind() function.

2010-04-07 Thread The Learner


Hi all.
I have coded my own protocol and I get three errors while compiling NS2.
I have made the necessary changes in the files packet.h, ns-packet.tcl,
ns-default.tcl and ns-lib.tcl. Also priqueue.cc and Makefile.in.
The changes are as follows -
~~~packet.h~~~
Defined the following ---
static const packet_t PT_MSPROTOCH = 63;
static const packet_t PT_MSPROTODD = 64;

Added the following in p_info()---
name_[PT_MSPROTOCH] = msprotoch; // MS Protocol Cluster Head
name_[PT_MSPROTODD] = msprotodd; // MS Protocol Data Discovery


~~~ ns-default.tcl ~~~
Agent/MSProtoClusterHead set level_id 0
Agent/MSProtoClusterHead set sector_id 0

~~~ ns-packet.tcl ~~~
foreach prot {
# Common:
###...
MSProto # MSProto -Mobile Static Protocol
###
}

MSProto is the folder inside which all the protocol files reside.
I am not sure what else is supposed to be entered here.


~~~ ns-lib.tcl ~~~
Added the following -
Simulator instproc create-msprotoch-agent { node } {
# Create Cluster Head routing agent
set ragent [new Agent/MSClusterHead [$node node-addr]]
$self at 0.0 $ragent start
$node set ragent_ $ragent
return $ragent
}

Simulator instproc create-msprotodd-agent { node } {
# Create Data Discovery routing agent
set ragent [new Agent/MS [$node node-addr]]
$self at 0.0 $ragent start
$node set ragent_ $ragent
return $ragent
}

Simulator instproc create-wireless-node args {
..
MSClusterHead {
set ragent [$self create-msprotoch-agent $node]
}
MSDataDiscovery {
set ragent [$self create-msprotodd-agent $node]
}
..
}


MSClusterHead and MSDataDiscovery are the two agents.


On compiling I get the following three errors-

In file included from MSProto/msproto.cc:5:
MSProto/msproto.h:35: error: multiple types in one declaration
MSProto/msproto.cc: In constructor ‘MSClusterHead::MSClusterHead(nsaddr_t)’:
MSProto/msproto.cc:70: error: no matching function for call to
‘MSClusterHead::bind(const char [9], u_int8_t*)’
/home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:177: note: candidates are:
void TclObject::bind(const char*, TracedInt*)
/home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:178: note:
void TclObject::bind(const char*, TracedDouble*)
/home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:179: note:
void TclObject::bind(const char*, double*)
/home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:182: note:
void TclObject::bind(const char*, unsigned int*)
/home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:183: note:
void TclObject::bind(const char*, int*)
/home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:185: note:
void TclObject::bind(const char*, TclObject**)
/home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:188: note:
void TclObject::bind(const char*, int64_t*)
MSProto/msproto.cc:71: error: no matching function for call to
‘MSClusterHead::bind(const char [10], u_int8_t*)’
/home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:177: note: candidates are:
void TclObject::bind(const char*, TracedInt*)
/home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:178: note:
void TclObject::bind(const char*, TracedDouble*)
/home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:179: note:
void TclObject::bind(const char*, double*)
/home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:182: note:
void TclObject::bind(const char*, unsigned int*)
/home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:183: note:
void TclObject::bind(const char*, int*)
/home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:185: note:
void TclObject::bind(const char*, TclObject**)
/home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:188: note:
void TclObject::bind(const char*, int64_t*)
make: *** [MSProto/msproto.o] Error 1
r...@deepti-laptop:/home/deepti/ns-allinone-2.34/ns-2.34#

PS: Please find the files attached with this mail.
http://old.nabble.com/file/p28162719/msproto.cc msproto.cc 
http://old.nabble.com/file/p28162719/msproto.h msproto.h 
http://old.nabble.com/file/p28162719/msprotopkt.h msprotopkt.h 

Thanks and Regards,
The Learner 
-- 
View this message in context: 
http://old.nabble.com/Error-with-bind%28%29-function.-tp28162719p28162719.html
Sent from the ns-users mailing list archive at Nabble.com.




Re: [ns] Problem with using ./configure command in ns2 while recompiling ns2

2010-03-29 Thread The Learner
 for dlopen in -ldl... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for ns library name... libns.so
checking for struct ether_header... found
checking for struct ether_addr... found
checking for addr2ascii... no
checking for Linux compliant tcphdr... found
checking for BSD compliant tcphdr... not found
checking for socklen_t... yes
checking for main in -lpcap... no
checking to make nse... no
Explicitly disabling static compilation
checking for dlopen in -ldl... (cached) yes
checking for a BSD-compatible install... /usr/bin/install -c
configure: creating ./config.status
config.status: creating Makefile
config.status: creating tcl/lib/ns-autoconf.tcl
config.status: creating indep-utils/webtrace-conv/ucb/Makefile
config.status: creating indep-utils/webtrace-conv/dec/Makefile
config.status: creating indep-utils/webtrace-conv/nlanr/Makefile
config.status: creating indep-utils/webtrace-conv/epa/Makefile
config.status: creating indep-utils/cmu-scen-gen/setdest/Makefile
config.status: creating autoconf.h
config.status: autoconf.h is unchanged


After using this I issued the 'make' command.

Now, when I run the ex-linkage.tcl file from the same site, I  get the
following error - 
invalid command name Agent/MyAgentOtcl
while executing
Agent/MyAgentOtcl create _o3 
invoked from within
catch $className create $o $args msg
invoked from within
if [catch $className create $o $args msg] {
if [string match __FAILED_SHADOW_OBJECT_ $msg] {
delete $o
return 
}
global errorInfo
error class $...
(procedure new line 3)
invoked from within
new Agent/MyAgentOtcl
invoked from within
set myagent [new Agent/MyAgentOtcl]
(file ex-linkage.tcl line 5)
r...@deepti-laptop:/home/deepti/NS2/Tcl Scripts# make clear
make: *** No rule to make target `clear'.  Stop.

I have uploaded the ex-linkage.cc and ex-linkage.tcl files.



I really seek you help in this.

Thank You and Regards,
The Learner
-- 
View this message in context: 
http://old.nabble.com/Problem-with-using-.-configure-command-in-ns2-while-recompiling-ns2-tp28060659p28067571.html
Sent from the ns-users mailing list archive at Nabble.com.



[ns] Problem with using ./configure command in ns2 while recompiling ns2

2010-03-28 Thread The Learner


Hi all.
I am facing problem with using ./configure command in ns2.
Here is waht I get,

dee...@deepti-laptop:~/ns-allinone-2.34/ns-2.34$ ./configure
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
No .configure file found in current directory
Continuing with default options...
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for ANSI C header files... (cached) yes
checking for string.h... (cached) yes
checking for main in -lXbsd... no
checking for socket in -lsocket... no
checking for gethostbyname in -lnsl... yes
checking for dcgettext in -lintl... no
checking for getnodebyname in -ldnet_stub... no
checking that g++ can handle -O2... no
checking if C++ libraries work without any namespace... no
checking if C++ libraries work with namespace std... yes
checking if STL works without any namespace... no
checking if STL works with namespace std... yes
checking should use STL... yes
checking for tcl.h... -I../include
checking for tclInt.h... -I../include
checking for libtcl8.4... -L../lib -ltcl8.4
checking for init.tcl... ../lib/tcl8.4
checking for http.tcl... ../lib/tcl8.4/http1.0
checking Tcl http.tcl library... yes
checking for tclsh8.4.18... no
checking for tclsh8.4... ../bin/tclsh8.4
checking for tk.h... -I../include
checking for libtk8.4... -L../lib -ltk8.4
checking for tk.tcl... ../lib/tk8.4
checking for otcl.h... -I../otcl-1.13
checking for libotcl1.13... -L../otcl-1.13 -lotcl
checking for tclcl.h... -I../tclcl-1.19
checking for libtclcl... no
checking for tcl2c++... /usr/bin
configure: error: Installation of tclcl seems incomplete or can't be found
automatically.
Please correct the problem by telling configure where tclcl is
using the argument --with-tclcl=/path/to/package
(perhaps after installing it),
or the package is not required, disable it with --with-tclcl=no.


How do I check if the installation of tclcl is done or not?
And if yes, what is the path//?
If not, then how do I install it?

Thank You,
The Learner
-- 
View this message in context: 
http://old.nabble.com/Problem-with-using-.-configure-command-in-ns2-while-recompiling-ns2-tp28060659p28060659.html
Sent from the ns-users mailing list archive at Nabble.com.



Re: [ns] How to recomplie ns2 using make command?

2010-03-26 Thread The Learner


After using /.configure command, I get the following error - configure:
error: Installation of tclcl seems incomplete or can't be found
automatically.
Please correct the problem by telling configure where tclcl is using the
argument --with-tclcl=/path/to/package (perhaps after installing it), or the
package is not required, disable it with --with-tclcl=no.

How do I check if tclcl is installed in ununbtu 9.10? If not what should I
do?

Regards,
The Learner

-- 
View this message in context: 
http://old.nabble.com/How-to-recomplie-ns2-using-make-command--tp27950947p28045359.html
Sent from the ns-users mailing list archive at Nabble.com.



[ns] Is common header a must in a packet and address type defined in config.h

2010-03-25 Thread The Learner


I want to know if using common header in packet is a must?
If I create my own packet header and do not include common header in my
packet, will it create any trouble?

Since I am working on a routing protocol for wireless sensor networks, the
addresses can't be of the type u_int32_t, so I created my own type(typedef
u_int8_t msaddr_t) in the config.h file. Will it siuffice or I need to do
some other things to make ns2 work with this type of address?

Thank You,
The Learner
-- 
View this message in context: 
http://old.nabble.com/Is-common-header-a-must-in-a-packet-and-address-type-defined-in-config.h-tp28024535p28024535.html
Sent from the ns-users mailing list archive at Nabble.com.



Re: [ns] Is common header a must in a packet and address type defined in config.h

2010-03-25 Thread The Learner


Thank you for your reply sir.

I came to know that the value of ch-addr_type is NS_AF_INET(for internet
protocol). 
It's value can be NS_AS_NONE; NS_AF_ILINK depending on what protocol is
being implemented.

While implementing a new protocol, how to decide what type should this be?
If the address is also of the type nsaddr_t(u_int32_t), the value of
ch-addr_type changes or remains same (NS_AF_INET)?

-- 
View this message in context: 
http://old.nabble.com/Is-common-header-a-must-in-a-packet-and-address-type-defined-in-config.h-tp28024535p28033299.html
Sent from the ns-users mailing list archive at Nabble.com.



[ns] Common header definition inside ns2 directory

2010-03-22 Thread The Learner


Hi.

Which file in NS2 contains the definition of the common header (hdr_cmn)???

-- 
View this message in context: 
http://old.nabble.com/Common-header-definition-inside-ns2-directory-tp27985812p27985812.html
Sent from the ns-users mailing list archive at Nabble.com.



Re: [ns] Common header definition inside ns2 directory

2010-03-22 Thread The Learner


Hi.

Can there be multiple packet headers for a protocol implementation in ns2?

i.e, a packet header while sending broadcast in the network and another
packet header while sending data, and another packet header for sending
another type of broadcast...?
If thats the case, then I just need to define various constants for each
packet header,(PT_HDR1, PT_HDR2...etc). and use ch-ptype == PT_HDR1 to
check the type of header in a packet.

Please correct me if I am wrong.

Thank You,
The Learner.
-- 
View this message in context: 
http://old.nabble.com/Common-header-definition-inside-ns2-directory-tp27985812p27996580.html
Sent from the ns-users mailing list archive at Nabble.com.



[ns] Directional Antenna support in ns2.34?

2010-03-21 Thread The Learner


Hi all.
I would like to know if ns-allinone-2.34 (2.34 version) provides support for
Directional Antenna?
Which file I should check for the in ns2 directory?

Regards,
The Learner.
-- 
View this message in context: 
http://old.nabble.com/Directional-Antenna-support-in-ns2.34--tp27975754p27975754.html
Sent from the ns-users mailing list archive at Nabble.com.



[ns] Make file

2010-03-19 Thread The Learner


Hi all

While trying a new protocol, we need to make changes in the makefile.
There are multiple makefiles( with extensions, .in, .vc), in which makefile
am i suppose to add the object file list? and where?
Also why should this be added?

Thank You,
The Learner
-- 
View this message in context: 
http://old.nabble.com/Make-file-tp27950929p27950929.html
Sent from the ns-users mailing list archive at Nabble.com.



[ns] How to recomplie ns2 using make command?

2010-03-19 Thread The Learner



-- 
View this message in context: 
http://old.nabble.com/How-to-recomplie-ns2-using-make-command--tp27950946p27950946.html
Sent from the ns-users mailing list archive at Nabble.com.



[ns] How to recomplie ns2 using make command?

2010-03-19 Thread The Learner



what is the procedure to recompile ns2 using make command?

-- 
View this message in context: 
http://old.nabble.com/How-to-recomplie-ns2-using-make-command--tp27950947p27950947.html
Sent from the ns-users mailing list archive at Nabble.com.



[ns] Addressing of nodes while implementation of a routing protocol in Wireless sensor networks in NS2

2010-03-17 Thread The Learner


Hi all.

I am facing below mentioned issues with addressing of the nodes while
implementing a routing protocol in Wireless Sensor networks.

If I want all the nodes in Wireless Sensor networks to forward/Route the
data to the same node (Base Station) always, then I should add the address
of the base station as the destination address in the ip header, Rite? Now
how do I know the address of the base station while implementing the
protocol???

Also how to implement fixed routing in NS2 for wireless sensor networks?
The protocol uses two functionalities wherein the data generator node needs
to broadcast a query to know the next hop and after knowing the next hop, it
needs to forward the data to the final destination using a fixed route.
How do I implement fixed routing in coding?
The problem I am facing is with the addressing, If in the above case, I will
add the address of node2 as the destination address, how do I know the
address of node2 while implementing the code?

Thank You,
The Learner
-- 
View this message in context: 
http://old.nabble.com/Addressing-of-nodes-while-implementation-of-a-routing-protocol-in-Wireless-sensor-networks-in-NS2-tp27929848p27929848.html
Sent from the ns-users mailing list archive at Nabble.com.



[ns] Addressing of nodes.

2010-03-13 Thread The Learner



-- 
View this message in context: 
http://old.nabble.com/Addressing-of-nodes.-tp27886731p27886731.html
Sent from the ns-users mailing list archive at Nabble.com.



[ns] Number of agent classes and the constants.

2010-03-12 Thread The Learner


Hi all!
In my protocol, there are three types of nodes performing different
functions, and thus I'll have to create three different agent classes. Rite?
Now my doubt is while implementing these three different (programmer
defined) agent classes, the constant passed in the constructor of the Agent
class will be different or a same value for all the three classes?

Hope to get a reply soon.

Regards,
The Learner.
-- 
View this message in context: 
http://old.nabble.com/Number-of-agent-classes-and-the-constants.-tp27874121p27874121.html
Sent from the ns-users mailing list archive at Nabble.com.



Re: [ns] Number of agent classes and the constants.

2010-03-12 Thread The Learner


Thank You for your reply,

But what I mean to ask is, as given in the pdf, nstr-how_to.pdf, the one
which implements protoname protocol, the class Protoname derives from class
Agent, and the constructor of Agent class is passed with the argument,
PT_PROTONAME which is a constant.
In my case, I create three different classes (to represent three different
agents to be used for three different types of nodes) and each class derives
from the Agent class.
Now when the constructor of these classes are called, the parameter passed
in the Agent class must be same or different in the three cases...?

Regards,
The Learner
-- 
View this message in context: 
http://old.nabble.com/Number-of-agent-classes-and-the-constants.-tp27874121p27874739.html
Sent from the ns-users mailing list archive at Nabble.com.



[ns] Implementing a new protocol in NS2

2010-03-06 Thread The Learner


Hi all.
I am a newbie in NS2.
I need your help in guiding me as to how should I implement my own protocol
in Wireless sensor networks in NS2. How should I proceed ?
What is it that I need to know priori implementation of new protocol.
I know the scripting in tcl by reading the document -
http://www.isi.edu/nsnam/ns/tutorial/
but I am not clear with the C code it  uses to implement the new protocol in
NS2.

Kindly guide me with the same asap.

Thank You.
Regards,
The Learner...
-- 
View this message in context: 
http://old.nabble.com/Implementing-a-new-protocol-in-NS2-tp27803359p27803359.html
Sent from the ns-users mailing list archive at Nabble.com.