[ns] Why I cannot declare member functions ???
Hi, I am trying to extend ns2 and when I compile my files with make I get In file included from dtn/DTNAgent.h:19, from dtn/DTNAgent.cc:15: dtn/routes.h: In constructor `LinkInfo::LinkInfo()': dtn/routes.h:16: warning: `LinkInfo::busyTo_' will be initialized after dtn/routes.h:15: warning: `char*LinkInfo::linkObj_' dtn/routes.h:9: warning: when initialized here dtn/DTNAgent.cc: At global scope: dtn/DTNAgent.cc:18: error: type `Routes::hdr_bdlprim' is not derived from type `Routes' dtn/DTNAgent.cc:40: error: cannot declare member function `Routes::DTNAgent::DTNAgent' within `Routes' dtn/DTNAgent.cc:50: error: cannot declare member function `Routes::DTNAgent::command' within `Routes' dtn/DTNAgent.cc:83: error: expected `}' at end of input dtn/DTNAgent.cc:37: error: expected unqualified-id at end of input make: *** [dtn/DTNAgent.o] Error 1 -bash-3.00$ Does anybody knows the reason or has any clue ?? Any help would be great, Cheers, adriano This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
[ns] where is TclClass ?
Hi, I was looking and did not find, for the file where TclClass is written... does anybody know it? Cheers Adriano This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
[ns] Segmentation Fault extending ns2
Hi, I have extended ns2 for dtn simulations. I have also created my classes for routing. I have written my tcl file, see below, and I simply get a segmentation fault, without any explanation... Does anybody have suggestions or got similar problem??? Thank you in advance, Adriano # Create a simulator object set ns [new Simulator] #Create nodes set node1 [$ns node] set node2 [$ns node] #Create the agent for the first node set dtn1 [new Agent/DTNAgent] #Create another Agent for the second node set dtn2 [new Agent/DTNAgent] #attach the agents to the nodes $ns attach-agent $node1 $dtn1 $ns attach-agent $node2 $dtn2 #Set local region $dtn1 region "REGION1" $dtn2 region "REGION2" #Setup routing table $dtn1 add "REGION2" $dtn2 1 1 1500 $dtn2 add "REGION1" $dtn1 1 1 1500 This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
[ns] segmentation fault in the tcl script
Hi, when I write and run my tcl script with puts "Starting Simulation..." or when I open a file for writing with set f [open out.tr w] $ns trace-all $f I get a segmentation fault Does anybody know the reason? Thanks Adriano This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
[ns] segmentation fault extending ns2 because of more output channels: how to fix it???
Hi everybody, I am extending ns2 and below is my script tcl. I have realized that my tcl script works only with one output stream. For example, If at the script below I take off the "open a file" part and the "puts" function in the finish{} then the tcl script works. Any idea? Thanks Adriano # Create a simulator object set ns [new Simulator] #Open a file set f [open out.tr w] $ns trace-all $f # Open a nam trace file set nf [open out.nam w] $ns namtrace-all $nf # Define a 'finish' procedure proc finish {} { global ns f nf $ns flush-trace close $f close $nf puts "Starting nam..." exec nam out.nam & exit 0 } #Create nodes set node1 [$ns node] set node2 [$ns node] #Create the agent for the first node set dtn1 [new Agent/DTNAgent] #Create another Agent for the second node set dtn2 [new Agent/DTNAgent] #attach the agents to the nodes $ns attach-agent $node1 $dtn1 $ns attach-agent $node2 $dtn2 #Set local region $dtn1 region "REGION1" $dtn2 region "REGION2" #Setup routing table #$dtn1 add "REGION2" $dtn2 1 1 1500 #$dtn2 add "REGION1" $dtn1 1 1 1500 # Set endtime $ns at 100.0 "finish" # Run the simulation $ns run This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.