Re: [ns] how to install adjacency matrix at each node

2006-08-09 Thread plucs

I'd suggest that it is easier to use the c++ function which tells you 
the neighbouring nodes.

P.

piyush sharma wrote:
 Hi Everybody,
 I want to know how can I install the adjacency matrix at each node ?
 I have created an adjacency matrix (which is a NxN matrix, where N is the
 no. of nodes in the topology) using some tcl commands in my ns2 tcl script.
 I want to install this adjacency matrix at every node so that each node
 becomes aware of its adjacent neighbour nodes. I have tried to bind this two
 dimentional array from tcl to c++ but it dont works.
 So what shall I do to install this matrix at each node ?
 Thanks!
 Piyush



   



[ns] ns2 under Knoppix?

2006-08-09 Thread Renke Bischoff

Hi everybody!

Does anybody of you gained some experience with ns2 under Knoppix? Is ns2 easy 
to install under Knoppix and also fully functional? 

Thank you for your response.


Best wishes

   Renke
-- 


Feel free – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail



[ns] Problem with .o files

2006-08-09 Thread Aleksandar Smolovic

Hi all,

I have file.cc and file.h and I put that in for example ~/tcp/file.cc and 
~/tcp/file.h.

Now I make neccesary modifications and among other things in OBJ_CC section on 
Makefile I have put this
.
tcp/file.o \
..

When I do ./configure and make and make install I do not have file.o 
under path where I put file.cc and file.h.

In futher, I open Makefile after congifure,make and make install procedure 
and there is no line I put - the line I mentioned above tcp/file.o \

How can disapear a coplete line from Makefile ?

Am I missing something here?

When I try to start ns on prompt I have something like this:

machine:/mypath/# ns
ns:
[code omitted because of length]
: invalid command name Agent/TCP/WestwoodNR
while executing
Agent/TCP/WestwoodNR set current_bwe_ 0
machine:/mypath/# ns


Thank you.


[ns] OTCL-Linkage

2006-08-09 Thread Henni Girl

Hello P.

actually I need only the values of the bind variables in the AODV agent. The 
binding itsself works - I've tested it.
What I want is to use the value of, let's say, rq_context in the function 
AODV::sendRequest(). This variable has the value of 0, it gets it in the 
simulation script:

set context1 [new Agent/Context]
$ns_ attach-agent $node_(1) $context1
$context1 set rq_cxt_otcl 0 
$context1 set rt_cxt_otcl 5 

But I don't know how to call on the current instance of my ContextAgent out of 
the function sendRequest()to be able to us the value of rq_context???

// call in AODV-function
void
AODV::sendRequest(nsaddr_t dst) {
 ...
ContextAgentObject = ;
rq-rq_cxt = ContextAgentObject-rq_context;   //value of rq_context 
should be 0
 ...
}

jana


-- 


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer



Re: [ns] Problem with .o files

2006-08-09 Thread Prashant Batra

Hi,

Your observations are expected!! The only thing that's going wrong in 
your case is that you do './configure' over and over again !! When you 
run './configure', it regenerates a new Makefile, which overwrites the 
Makefile that you modified. Thus, your changes vanish. So, after you 
modify the Makefile, please do not run the 'configure' file again. Just 
do 'make' and 'make install'

Regards,
Prashant Batra



Aleksandar Smolovic wrote:
 Hi all,

 I have file.cc and file.h and I put that in for example ~/tcp/file.cc and 
 ~/tcp/file.h.

 Now I make neccesary modifications and among other things in OBJ_CC section 
 on Makefile I have put this
 .
 tcp/file.o \
 ..

 When I do ./configure and make and make install I do not have file.o 
 under path where I put file.cc and file.h.

 In futher, I open Makefile after congifure,make and make install procedure 
 and there is no line I put - the line I mentioned above tcp/file.o \

 How can disapear a coplete line from Makefile ?

 Am I missing something here?

 When I try to start ns on prompt I have something like this:

 machine:/mypath/# ns
 ns:
 [code omitted because of length]
 : invalid command name Agent/TCP/WestwoodNR
 while executing
 Agent/TCP/WestwoodNR set current_bwe_ 0
 machine:/mypath/# ns


 Thank you.

   



Re: [ns] installation problems with otcl-1.11

2006-08-09 Thread Prashant Batra

Hi,

Well you have to do what the message says. Clearly, your X11 Header 
Files are missing. You will have to pick up your FC5 CD/DVD, and install 
the Header Files. If you run the Package Installer or Update Manager, 
you will have to go into the Development / Library section of packages, 
find X11 related packages / headers and install them. Once the headers 
are installed, the installation should (hopefully) run smoothly  !!

Good Luck !!

Regards,
Prashant Batra

jaime venzala wrote:
 I working with fedora core5 and i tried to install ns-allinone-2.29.3.
 Everythings was ok untill otcl-1.11 was installing and i saw the next
 messages:

 checking for X11 header files
 can't find X includes
 otcl-1.11 configuration failed! Exiting ...

 Is there any solution?



   



Re: [ns] OTCL-Linkage

2006-08-09 Thread plucs

Hi Jana,

I can't see the solution straight away and without looking at it longer 
I can't tell you.

Your solution looks ok but I am concerned about your use of friend. Does 
it actually create an AODV agent?

I'd suggest using gdb with breakpoints to work out what is going on.

Jana Henniger wrote:
 I’m new to ns-2 and C++ and need help concerning OTCL-Linkage.
 I’ve created a new class ContextAgent which has AODV as friendclass. 
 ContextAgent has two public variables that are bound to OTCL using the 
 bind()-function (as it is used in the Example ex-linkage.cc from the tutorial 
 “ns by example”). That works, as far as I could see.

 My problem is, how can I call on the variables from the AODV-function 
 sendRequest()?
 Since the ContextAgent is created in the simulation script, I don’t know the 
 name of it to assign it to an object of the type ContextAgent.

 I send parts of my source code for better understanding. Please help!!

 *

 class ContextAgent : public Agent{

 friend class AODV;

 public:
   ContextAgent();
   int rq_context;
   int rt_context;
 }

 //LinkObject
 static class ContextAgentClass : public TclClass {
 public:
   ContextAgentClass() : TclClass(Agent/Context){}
   TclObject* create(int, const char*const*) {
   return (new ContextAgent());
   }
 } class_context_agent;

 //Constructor
 ContextAgent::ContextAgent() : Agent(PT_AODV) {
   bind(rq_cxt_otcl, rq_context);
   bind(rt_cxt_otcl, rt_context);
 };

 *

 class AODV: public Agent {
  ...
 private:
   ContextAgent  *ContextAgentObject;
  ...
 };

 **

 // call in AODV-function
 void
 AODV::sendRequest(nsaddr_t dst) {
  ...
   ContextAgentObject = ;
   rq-rq_cxt = ContextAgentObject-rq_context;
  ...
 }

 **

 # tcl-code
  ...
   set context1 [new Agent/Context]
 $ns_ attach-agent $node_(1) $context1
 $context1 set rq_cxt_otcl 0   
 $context1 set rt_cxt_otcl 5   
  ...


   



[ns] How to reference an object generated in simulation script?

2006-08-09 Thread Henni Girl

when I create a new Object in my tcl script, just like 

set Agent1 [new Agent/AODV]

How do I reference this special Agent in C++? Are there special methods that I 
can use?

jana
-- 


Feel free – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail



Re: [ns] OTCL-Linkage

2006-08-09 Thread Prashant Batra

Hi Jana,

Interesting Problem !! But, unfortunately I am also new to NS-2, so I 
can't answer your question in the way you expected, but I can propose an 
alternate solution, purely on the C++ platform.

If you need just one instance of the ContextAgent object, you can create 
a Global variable or a member variable in AODV class, where you can 
register your pointer to the newly created ContextAgent Object. Now, in 
your AODV code when you need to access the member variables of the 
ContextAgent object, you simply dereference this pointer and access the 
variables. Obviously, you can acess them, as AODV has been declared as a 
Friend Class.

Alternately, if you need more than one instances of the ContextAgent 
class, you can create a Global or a member variable in AODV class, of 
the type HashTable or something simmilar, in which you can register an 
identifier and the pointer to the ContextAgent object, everytime you 
create it. Whenever you need to access the variables of the ContextAgent 
class, you will also have to pass along this identifier, so as to access 
the appropriate object. This identifier could be the node name or 
anything you please.

This could be a way out of your situation, even though it will be much 
better and smarter, if you are able to find the way of accessing objects 
created in your TCL script, in the C++ code !!

Hope this helps.

Regards,
Prashant Batra

Jana Henniger wrote:
 I’m new to ns-2 and C++ and need help concerning OTCL-Linkage.
 I’ve created a new class ContextAgent which has AODV as friendclass. 
 ContextAgent has two public variables that are bound to OTCL using the 
 bind()-function (as it is used in the Example ex-linkage.cc from the tutorial 
 “ns by example”). That works, as far as I could see.

 My problem is, how can I call on the variables from the AODV-function 
 sendRequest()?
 Since the ContextAgent is created in the simulation script, I don’t know the 
 name of it to assign it to an object of the type ContextAgent.

 I send parts of my source code for better understanding. Please help!!

 *

 class ContextAgent : public Agent{

 friend class AODV;

 public:
   ContextAgent();
   int rq_context;
   int rt_context;
 }

 //LinkObject
 static class ContextAgentClass : public TclClass {
 public:
   ContextAgentClass() : TclClass(Agent/Context){}
   TclObject* create(int, const char*const*) {
   return (new ContextAgent());
   }
 } class_context_agent;

 //Constructor
 ContextAgent::ContextAgent() : Agent(PT_AODV) {
   bind(rq_cxt_otcl, rq_context);
   bind(rt_cxt_otcl, rt_context);
 };

 *

 class AODV: public Agent {
  ...
 private:
   ContextAgent  *ContextAgentObject;
  ...
 };

 **

 // call in AODV-function
 void
 AODV::sendRequest(nsaddr_t dst) {
  ...
   ContextAgentObject = ;
   rq-rq_cxt = ContextAgentObject-rq_context;
  ...
 }

 **

 # tcl-code
  ...
   set context1 [new Agent/Context]
 $ns_ attach-agent $node_(1) $context1
 $context1 set rq_cxt_otcl 0   
 $context1 set rt_cxt_otcl 5   
  ...


   



Re: [ns] Problem with .o files

2006-08-09 Thread Vindya Amaradasa

Hi,

When you run ./configure, your makefile gets altered. That's why your line
'disappeard'! And as a result, file.o was not created, hence the 'invalid
command' error.
(you only need to run ./configure if you're compiling for the very first
time)

So, once you add the tcp/file.o \line, just run make. If it's
successfull, it'll create file.o (you can check this)

Then you shouldn't get the error when running your tcl script.

Hope this helps!
Vindya


- Original Message - 
From: Aleksandar Smolovic [EMAIL PROTECTED]
To: ns-users@ISI.EDU
Sent: Wednesday, August 09, 2006 9:40 AM
Subject: [ns] Problem with .o files



 Hi all,

 I have file.cc and file.h and I put that in for example ~/tcp/file.cc and 
 ~/tcp/file.h.

 Now I make neccesary modifications and among other things in OBJ_CC 
 section on Makefile I have put this
 .
 tcp/file.o \
 ..

 When I do ./configure and make and make install I do not have 
 file.o under path where I put file.cc and file.h.

 In futher, I open Makefile after congifure,make and make install 
 procedure and there is no line I put - the line I mentioned above 
 tcp/file.o \

 How can disapear a coplete line from Makefile ?

 Am I missing something here?

 When I try to start ns on prompt I have something like this:

 machine:/mypath/# ns
 ns:
 [code omitted because of length]
 : invalid command name Agent/TCP/WestwoodNR
while executing
 Agent/TCP/WestwoodNR set current_bwe_ 0
 machine:/mypath/# ns


 Thank you.
 



[ns] to resolve to run Satpep.tcl in ns-2

2006-08-09 Thread wosesat

 Hello everyone!
I want to complie and use TCP WestwoodNR as an agent.
Is there anyone who test it and run it successfully? If so pls help me.

  Thanks
  Wossenu A. 







Re: [ns] OTCL-Linkage

2006-08-09 Thread Henni Girl

Hello Prashant Batra,

actually I thought about a solution with global variables, 
but I want to use my new class the same way the AODV protocol is used
just with some extensions and without affecting AODV. 
That's why I think it's best to go on looking for a solution accessing 
objects created in my tcl script.
Thank you anyway.

jana


-- 


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

-- 


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer



[ns] datarate from tracefile

2006-08-09 Thread sxroy1

i) can someone please tell me how to measure the datarate from the trace file.
I am using ns2.1b7a, and i have set the mac trace on, and the packet size is 
1000bytes, and i set the dataRate at 11Mb in the tcl file. i want to see if the 
datarate is actually working or not. I searched the archive, theres a post abt 
time of transmission of data frame, but i didnt get it ... if someone could 
help me please.

ii) To set individual data cbr datarate of nodes to 11Mbps, i set packet size 
=1000bytes, interval_=.00072 and rate_=11000Kb.. am i doing this right ?

 thanks in advance, any input would be really appriciated,
  Roy



[ns] List of Packets

2006-08-09 Thread Albalas F \(AT\)

Hi all,

 

I am implementing AODV, I need to keep all the data packets received by
the receiver node, where and how to add a list at the node to keep these
packets for future use.

 

Is it implemented or I need to define a list.

 

Thanks

firas 



[ns] MACA MAC Protcol

2006-08-09 Thread Touseef Liaqat


Have anybody able to run MACA protocol in ad-hoc wireless network in 
ns2? If yes how and can you provide some links or hints to do so? I have 
found nothing on the net on MACA support in ns2.I have seen the archive 
that people have asked this questions many time without any response, 
but still i am hoping that there might be someone willing to help me 
here.

Thanks,
Touseef


-
Do you Yahoo!?
 Everyone is raving about the  all-new Yahoo! Mail Beta.