[ns] ns units

2006-05-17 Thread k s

Hello,

I was wondering, when I set two nodes a distance apart of 30, is it 30m or
feet or km...?  Also in wireless simulation, the transmission range of the
antenna is km or m...?  Does anyone know where this is discussed?

Or is it all relative? :)

Kathy



[ns] Regarding solution of problem in simple programe.

2006-05-17 Thread Bhoi Maheshbhai Mohanbhai

Hi all,
  When I run the sample program about C++/Otcl linkage I got the error as 
described below:
  Program:
  class MyAgent : public Agent
{
 public:
  MyAgent();
 protected:
  int command(int *argc,const char *const* argv);
 private:
  int My_var1;
  double My_var2;
  void MyPrivFun(void);
};
  static class MyAgentClass: public TclClass
{
 public:
  MyAgentClass() : TclClass(Agent/MyAgentOtcl){};
  TclObject* create(int, const char*const*) 
  {
  return (new MyAgent());
  }
}class_my_agent;
  MyAgent : MyAgent() : Agent(PT_UDP)
{
 bind(my_var1_otcl, my_var1);
 bind(my_var2_otcl, my_var2);
}
  int MyAgent::command(int *argc,const char *const* argv)
{
 if(argc==2)
 {
  if(strcmp(argv[1], call_my_priv_func)==0)
  {
   MyPrivFun();
   return(TCL_OK);
  }
 }
 return(Agent : command(argc,argv));
}
  
void MyAgent :: MyPrivFun(void)
{
 Tcl tcl=Tcl::instance();
 Tcl.eval(puts \Message from MyPrivFun\);
 Tcl.evalf(puts \  my_var1= %d\, my_var1);
 Tcl.evalf(puts \  my_var2= %f\, my_var2);
}
  ex-linkage.cc
   
   
  set myagent [new Agent/MyAgentOtcl]
  $myagent set my_var1_otcl 2
$myagent set my_var2_otcl 3.14
  $myagent call_my_priv_func
   
  ex-linkage.tcl
   
   
  Running above tcl script in ns-2.26 I got the error
  Invalid command name “Agent/MyAgentOtcl”
  While executing
  “A Agent/MyAgentOtcl create _o3”
  “catch “$className create $o $args” msg”
  (procedure “new” line 3)
  invoked from within
  “new Agent/MyAgentOtcl”
  invoked from within
  “set myagent [new Agent/MyAgentOtcl]”
  (file “ex-linkage.tcl” line 1)
   
   
  I apply the following procedure:
  Open Makefile, add ex-linkage.o at the end of object file list. 
   Re-compile NS using the make command.
   Run tcl script.
   
  if anyone knows the solutins then immediately mail me...
   
  Mahesh


-
 Why was V. Sehwag warned by the BCCI? Share your knowledge on Yahoo! Answers 
India
 Send instant messages to your online friends - NOW


[ns] Regarding solution of problem in simple programe.

2006-05-17 Thread Bhoi Maheshbhai Mohanbhai

Hi all,
  When I run the sample program about C++/Otcl linkage I got the error as 
described below:
  Program:
  class MyAgent : public Agent
{
 public:
  MyAgent();
 protected:
  int command(int *argc,const char *const* argv);
 private:
  int My_var1;
  double My_var2;
  void MyPrivFun(void);
};
  static class MyAgentClass: public TclClass
{
 public:
  MyAgentClass() : TclClass(Agent/MyAgentOtcl){};
  TclObject* create(int, const char*const*) 
  {
  return (new MyAgent());
  }
}class_my_agent;
  MyAgent : MyAgent() : Agent(PT_UDP)
{
 bind(my_var1_otcl, my_var1);
 bind(my_var2_otcl, my_var2);
}
  int MyAgent::command(int *argc,const char *const* argv)
{
 if(argc==2)
 {
  if(strcmp(argv[1], call_my_priv_func)==0)
  {
   MyPrivFun();
   return(TCL_OK);
  }
 }
 return(Agent : command(argc,argv));
}
  
void MyAgent :: MyPrivFun(void)
{
 Tcl tcl=Tcl::instance();
 Tcl.eval(puts \Message from MyPrivFun\);
 Tcl.evalf(puts \  my_var1= %d\, my_var1);
 Tcl.evalf(puts \  my_var2= %f\, my_var2);
}
  ex-linkage.cc
   
   
  set myagent [new Agent/MyAgentOtcl]
  $myagent set my_var1_otcl 2
$myagent set my_var2_otcl 3.14
  $myagent call_my_priv_func
   
  ex-linkage.tcl
   
   
  Running above tcl script in ns-2.26 I got the error
  Invalid command name “Agent/MyAgentOtcl”
  While executing
  “A Agent/MyAgentOtcl create _o3”
  “catch “$className create $o $args” msg”
  (procedure “new” line 3)
  invoked from within
  “new Agent/MyAgentOtcl”
  invoked from within
  “set myagent [new Agent/MyAgentOtcl]”
  (file “ex-linkage.tcl” line 1)
   
   
  I apply the following procedure:
  Open Makefile, add ex-linkage.o at the end of object file list. 
   Re-compile NS using the make command.
   Run tcl script.
   
  if anyone knows the solutins then immediately mail me...
   
  Mahesh


-
 Why was V. Sehwag warned by the BCCI? Share your knowledge on Yahoo! Answers 
India
 Send instant messages to your online friends - NOW


Re: [ns] UMTS simulation error

2006-05-17 Thread Martina Umlauft

Hi there!

This is a known (but not well documented) bug in EURANE.

You have an uneven number of UMTS nodes (1 RNC + 1 BS + 1 UE = 3 nodes) 
AND your traffic starts from the fixed node.

2 ways to work around it:

1) set up another dummy UMTS node (eg. another UE which is never used)

2) put the traffic source directly on the RNC as in the EURANE sample 
script.

This bug is documented in a footnote in the section on HSDPA of the 
EURANE manual, but it *also* affects the DCH, too, not just the HS-DCH.

HTH  good luck!

lg,
 Martina Umlauft[EMAIL PROTECTED]
-
http://frauenweb.at/~tina

Anoop Ramamurthy schrieb:
 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: t2: 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] how to get current date ($ns now) in c++?

2006-05-17 Thread Gilles Bertrand

Dear NS-users

I am modifying an extension of ns (RSVP-TE\ns), and at some point I need to
have an access to the current date (given in tcl by $ns now). I don't know
how to do this. I suppose I could use something like:

Tcl tcl = Tcl::instance();
tcl.evalf(%d now, my_simulator_instance);

but I don't know how to refer to the simulator instance.

I would be very grateful if you could help me on this topic.

Mit freundlichen Grüßen, with kind regards, cordialement,

--
Gilles BERTRAND
Telecom INT (GET) - University of Stuttgart
--


Re: [ns] how to get current date ($ns now) in c++?

2006-05-17 Thread Gilles Bertrand

Well, I am sorry for having bothered your mailboxes. I have finally found
the solution:

Scheduler::instance().clock()

indeed returns the simulated time, as I needed.

Mit freundlichen Grüßen, with kind regards, cordialement,

--
Gilles BERTRAND
Telecom INT (GET) - University of Stuttgart
---

2006/5/17, Gilles Bertrand [EMAIL PROTECTED]:

 Dear NS-users

 I am modifying an extension of ns (RSVP-TE\ns), and at some point I need
 to have an access to the current date (given in tcl by $ns now). I don't
 know how to do this. I suppose I could use something like:

 Tcl tcl = Tcl::instance();
 tcl.evalf(%d now, my_simulator_instance);

 but I don't know how to refer to the simulator instance.

 I would be very grateful if you could help me on this topic.

 Mit freundlichen Grüßen, with kind regards, cordialement,

 --
 Gilles BERTRAND
 Telecom INT (GET) - University of Stuttgart
 ---



Re: [ns] how to get current date ($ns now) in c++?

2006-05-17 Thread Alexander Sayenko

Hi

From C++ use it is better to use:
Scheduler::instance().clock()

You can also call the Otcl code from C++, but the former will call C++
again. So if you use C++, call C++ functions directly. Here is the Otcl
solution

Tcl tcl = Tcl::instance();
tcl.evalf([Simulator instance] now);

Then analyse tcl.result()

Sincerely,
Alexander Sayenko (PhD)
Assistant
Telecommunication laboratory, MIT department
University of Jyvaskyla, Finland



Dear NS-users

I am modifying an extension of ns (RSVP-TE\ns), and at some point I need to
have an access to the current date (given in tcl by $ns now). I don't know
how to do this. I suppose I could use something like:

Tcl tcl = Tcl::instance();
tcl.evalf(%d now, my_simulator_instance);

but I don't know how to refer to the simulator instance.

I would be very grateful if you could help me on this topic.

Mit freundlichen Grüßen, with kind regards, cordialement,

--
Gilles BERTRAND
Telecom INT (GET) - University of Stuttgart
--



-- 
Internal Virus Database is out-of-date.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.5.2/329 - Release Date: 02.05.2006




[ns] I NEED HELP IN ORDER TO DEBUG C++ CODE

2006-05-17 Thread Edwin Cruz

hi everyone

In past message I read that in order to debug I need to do:
++
look for the line :

# Build Tcl8.3.2  (should be around line 173)

In this section you need to add the option --enable-symbols to the line :
./configure --enable-gcc --disable-shared --prefix=$CUR_PATH || 

so it becomes:
./configure --enable-gcc --enable-symbols --disable-shared
--prefix=$CUR_PATH || 

Now, still in the ns-allinone/install file, look for the tclcl section.

# Build tclcl  (should be around line 260)

in this section, you need to add --enable-debug to your configure line, such
that:

./configure ||  ...

becomes

./configure --enable-debug || ...

ok, we're done with this one. save and close.

now, go into your ns-allinone/ns directory, and open your Makefile.in. Search
for CFLAGS (should be around line 90), and change it from

CFLAGS  = $(CCOPT) $(DEFINE)

to

CFLAGS  = -g $(CCOPT) $(DEFINE)

++
 I did this steps but now my scripts don´t work, what Happend
I use Ns-2-29. I read the section in the ns manual for debug but is not
clear.
If some one know a good guide, and could send me it. I aprecite the help.


Ing. Edwin Cruz.
Área de Comunicaciones.
50613800 Ext. 6357



[ns] trace format of WPAN(802.15.4)

2006-05-17 Thread louis . csie89


Dear all:
It takes me few days long to search the definition of each field.
But so far, I still can not understand the trace format.
Please all you!

The trace file looks like the following form.
r 11.480768033 _5_ MAC  --- 0 BCN 12 [0  0 0]
s 11.591552000 _0_ MAC  --- 14 exp 97 [0 1 0 800] --- [0:0 1:0 30 1]
s 11.595072033 _1_ MAC  --- 14 ACK 5 [0 0 1 0]
r 11.595424067 _0_ MAC  --- 14 ACK 5 [0 0 1 0]
r 11.596064033 _1_ MAC  --- 14 exp 90 [0 1 0 800] --- [0:0 1:0 30 1]

-
This mail sent through NCTU WebMail System: https://webmail.nctu.edu.tw




[ns] how to start modifying code

2006-05-17 Thread ra sa

hi;
i am a beginner in ns2 and i want to modify aodv or dsr protocol code such
that i want this protocol to save all possible routes to the destination in
a cache for example in a file such that if a link is broken it directly take
the other route without doing route discovery how it can be applied in code
because it is hard for me in the beginning to start modifying this code
thanks a lot for your help

_
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



[ns] Routing Tables

2006-05-17 Thread Gcmm RS

Hi ,

I would like to extract from any node at any time it's current routing
table. I'm using DV protocol as also LS .

Do you know what command do that?

Thanx,

Giovane


Re: [ns] query:otcl command explanation?

2006-05-17 Thread Filippos Kolovos

Well, the terms that you are referring to are
standard object oriented programming terms. There are some
sites that can offer a relative introduction to what
you are asking, but in order to understand in depth
these issues, you should read a good object-oriented
programming book, or an OTcl manual in specific.

However, you can check the following link:

http://www.openmash.org/developers/docs/otcl-doc/doc/tutorial.html

It has an introduction to OTcl, in somehow more concrete terms.

In order to give you a relatively short description of the terms that you
mention
in your question...:

self is used when we need to refer to the SAME object that is invoking the
command.
Is usually invoked from whithin a method (i.e. a procedure inside a class
definition) and it
refers (i.e. substitutes) the name of any object that will use this keyword
when it will invoke
the method that contains it.

global is used to refer to the variables that are in global scope. It is
usually invoked
from within procedures and/or class methods that want to include in their
local variable
scope some variables from the global scope (i.e. variables that are declared
outside any
procedures and methods. Variables that are declared in the main body of a
tcl script).

instproc and instvar refer to the way that we can declare new class
methods (instproc,
is derived from instance procedure), which will be used by the corresponding
objects
and instvar (instance-variable) refers to the way we declare class
attributes, or in other words, variables that will contain attributes (like
integers, strings,
arrays, other objects, etc) for every object-instance that belongs to the
same class (or any other inherited class).

However, as you can see all these are referring to standard object-oriented
programming
and if you do not have such a background I would suggest (starting from the
link above)
to read one or two short-course manuals, just to get the hang of it.

Hope that I have helped you.

Kind Regards,

-Fk

On 5/16/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:



 -- Forwarded message --
 From: balraj karthikeyan [EMAIL PROTECTED]
 To: ns-users@ISI.EDU
 Date: Tue, 16 May 2006 12:36:21 +0930
 Subject: [ns] query:otcl command explanation?
 hi
 I am trying to understand the meaning of commands we use in otcl
 programming like;
 what is self?
 what is global?
 why we use instproc,instvar and 
 someone plz help me by giving a good link other then otcl tutorial and
 manual


 Cheers,
 Cartic






-- 
Filippos N Kolovos

Software Systems Analyst  Engineer
M.Sc. (Eng.) in Data Communications

Automation  Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
   [EMAIL PROTECTED]
--


[ns] Multipath classifier and port classifier

2006-05-17 Thread Shruti Gorappa

Hello,

I am trying to understand the structure of the classifier when the 
multipath classifier is used. From the manual, I understand that the 
main classifier points to the multipath classifier instead of the link, 
and the classify() function of the multipath classifier is invoked when 
Classifier::classify() is invoked.

So, I think the structure looks something like this

Main classifier - Multipath Classifier
|
v
Port Classifier

That is, the main classifier points to both the port and multipath 
classifiers. However, I cannot indentify the reference to the port 
classifier or the dmux table in the classifier code.

I need to understand how the packets at the destination are sent up to 
the agent by the classifier. When is the PortClassifier::classify() 
invoked and at what point is the decision made to send the packet up to 
the agent?

I need to modify the classifier so that some packets are sent to the 
agent even when they are not destined for that agent.

Thanks in advance for any pointers.

-- 
Shruti Gorappa

Distributed Object Computing Laboratory
608 Engineering Tower
University of California, Irvine

[EMAIL PROTECTED]
http://doc.ece.uci.edu/~shruti
(949) 824-7548




[ns] wirelessphy in aodv

2006-05-17 Thread chen xiaoqin


Hello:

1) I need use the WirelessPhy  object (for receive threshold) in routing 
layer,


How can I get a reference to them (such as in AODV or DSR)? For example, in 
DSR, it use install-tap to connect mac_ in DSR with the MAC object in tcl 
in DSRagent::command, however, when I check the ns-mobile.tcl, I can not 
find the way for netif or channel object, Could you pls. give me some help?


2)  I need the rms value of the channel, how can I implement it?

_
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com