|
|
Software
nscript-1.0.4
nscript is graphical user interface to create ns-2 simulation scripts, developed in Java 2.

Downloads
Capabilities
With nscript you can:
- Create topologies, and and configure nodes and links.
- Add and configure transport agents, UDP, TCP, and some others
included.
- Schedule simulation events.
- Trace variables.
- nscript is extensible, allowing you to create your own
libraries of objects that can be added to the graphical environment.
| Diagram |
Configure Objects |
Otcl script generated by nscript |
|

|
|
set ns [new Simulator]
set namFile [open trace.nam w]
$ns namtrace-all $namFile
$ns at 10.0 "finish"
proc finish {} {
global ns
global namFile
$ns flush-trace
close $namFile
exec nam trace.nam &
exit 0
}
set Node0 [$ns node]
set Node1 [$ns node]
$ns duplex-link $Node0 $Node1 1Mb 10ms DropTail
set DuplexLink0 [$ns link $Node0 $Node1]
set UDP0 [new Agent/UDP]
set Null0 [new Agent/Null]
$ns attach-agent $Node0 $UDP0
$ns attach-agent $Node1 $Null0
$ns connect $UDP0 $Null0
set CBR0 [new Application/Traffic/CBR]
$CBR0 set packetSize_ 500
$CBR0 set random_ 0
$CBR0 attach-agent $UDP0
$ns run
|
|