1 / 13

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. The Important Concepts in NS-2 The Very Progressive Source Analysis Tools (ref. WinCam demo) Starting from the Tcl Example

callie
Télécharger la présentation

Network Simulator 2 Source Code Analysis Method

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Network Simulator 2 Source Code Analysis Method SungKyunKwan-Univ Mobile Computing LAB(http://csn.skku.ac.kr) 안혜환hyehwan@ece.skku.ac.kr

  2. 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

  3. 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++

  4. 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

  5. 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

  6. 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

  7. 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

  8. 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

  9. 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

  10. 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

  11. 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++

  12. 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/

  13. Thank You For Your Interest Q & A

More Related