network simulator 2 source code analysis method n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Network Simulator 2 Source Code Analysis Method PowerPoint Presentation
Download Presentation
Network Simulator 2 Source Code Analysis Method

Loading in 2 Seconds...

play fullscreen
1 / 13

Network Simulator 2 Source Code Analysis Method - PowerPoint PPT Presentation


  • 72 Views
  • Uploaded on

Network Simulator 2 Source Code Analysis Method. SungKyunKwan-Univ Mobile Computing LAB (http://csn.skku.ac.kr) 안혜환 hyehwan@ece.skku.ac.kr. Contents. The Important Concepts in NS-2 The Very Progressive Source Analysis Tools (ref. WinCam demo) Starting from the Tcl Example

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Network Simulator 2 Source Code Analysis Method' - callie


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
network simulator 2 source code analysis method

Network Simulator 2 Source Code Analysis Method

SungKyunKwan-Univ Mobile Computing LAB(http://csn.skku.ac.kr) 안혜환hyehwan@ece.skku.ac.kr

contents
Contents
  • The Important Concepts in NS-2
  • The Very Progressive Source Analysis Tools (ref. WinCam demo)
  • Starting from the Tcl Example
  • Tracking Member Variances between Otcl and C++
  • Tracking from a Start Scheduler
  • Tracking Packet Processing
  • There are Three Part of NS Simulation Codes
  • You Must Have the Point Of View Event and Packet Scheduling Concept
  • Don’t Forget the Important Concepts in NS-2
  • Reference
the important concepts in ns 2
The Important Concepts in NS-2
  • Scheduler is the core of NS-2
  • NS-2 Doesn’t Have MAIN() Function like Windows Programming, Please Don’t Find Continuous Procedures.
  • Always Running a Packet Scheduler
  • Always Running a Event Scheduler
  • There are Shadow Objects between Otcl and C++
the very progressive source analysis tools ref wincam demo
The Very Progressive Source Analysis Tools (ref. WinCam demo)
  • Doxygen- It can make the Documents from various source codes or directory
  • Graphviz- It doesn’t work operations by itself - Added in Doxygen to make Map of source code
starting from the tcl example
Starting from the Tcl Example
  • Default example tcl source positoin in ns-2.

- “ns-allinone-2.xx/ns-2.xx/tcl/ex”

  • Whatever You make start from the simulation tcl.
  • The architecture of simulation tcl source code in ns-2 or yours.

Set ns [new Simulator]

To schedule Event and Packet

Node-config Or binding

To setup Node configurations and Binding variances

Making Topology

To make simulation topology

$ns at 0.1 “cbr start”

To run reserved simulation time

$ns run

To run all of the simulation elements

tracking member variable between otcl and c
Tracking Member Variable between Otcl and C++
  • There are shadow objects between Otcl and C++ Object
  • Shadow object can bind variances between Otcl and C++
  • We cannot see shadow objects, just knowing in there.

Tcl Object

Shadow Object

Set node0 [$ns node]

Set node1 [$ns node]

Set node2 [$ns node]

Set node3 [$ns node]

Set node4 [$ns node]

Tcl Object

Shadow Object

C++

Object

Tcl Object

Shadow Object

Tcl Object

Shadow Object

Tcl Object

Shadow Object

tracking from a start scheduler
Tracking from a Start Scheduler

OS Scheduler

Node 1

Node 2

  • There isn’t main function like Windows programming
  • There aren’t continuous procedures
  • Just depend on “call scheduler” and “called by scheduler”

7

7

6

6

5

5

NS Scheduler

4

4

3

3

2

2

Call Scheduler

Called

by Scheduler

1

1

tracking packet processing
Tracking Packet Processing

Just schedule Event and Packet

Scheduler

Part of the Packet Scheduling

Part of the Packet Scheduling

7

7

6

6

5

5

Node 2

Node 1

4

4

3

3

2

2

1

1

there are three part of ns simulation codes
There are Three Part of NS Simulation Codes

This level conforms that the Object Initiated states

Otcl initiate

Set ns [new Simulator]

Node-config ……

set node [$ns node]

$ns at 1.0 “cbr start”

$ns run

C++ initiate

Making Topology

By using elements

Level of Node setup

Otcl are changed by processing

Level of Running

C++ are changed by processing

you must have the point of view event and packet scheduling concept
You Must Have the Point Of View Event and Packet Scheduling Concept

Just schedule Event and Packet

Scheduler

Part of the Packet Scheduling

Part of the Packet Scheduling

7

7

Created Events

by Ns user like you,

Such as

“$ns at 0.1 “cbr start”

6

6

5

5

Node 2

Node 1

4

4

3

3

Part of the Event Scheduling

2

2

1

1

don t forget the important concepts in ns 2
Don’t Forget the Important Concepts in NS-2
  • Scheduler is the core of NS-2
  • NS-2 Doesn’t Have MAIN() Function like Windows Programming, Please Don’t Find Continuous Procedures.
  • Always Running a Packet Scheduler
  • Always Running a Event Scheduler
  • There are Shadow Objects between Otcl and C++
reference
Reference
  • Ns Manual- http://www.isi.edu/nsnam/ns/ns-documentation.html
  • Tcl

- uist course: http://www.cs.huji.ac.il/~uist

  • Otcl- http://www.isi.edu/nsnam/otcl/README.html
  • NS-2

- http://www.isi.edu/nsnam/ns/tutorial/index.html

- http://www.isi.edu/nsnam/ns/

  • Doxygen- http://www.stack.nl/~dimitri/doxygen/
  • Graphviz- http://www.research.att.com/sw/tools/graphviz/