Including Your Modules into NS 2

Slides:



Advertisements
Similar presentations
1 NS-2 Tutorial COMP R2 University of Manitoba March 4, 2009.
Advertisements

Introduction to Network Simulator NS-2 Part I
SAPPHIRE NOW - One Voice Collateral October 2011.
Assembly 01. Outline Binary vs. Text Files Compiler vs. Assembler Mnemonic Assembly Process Development Process Debugging Example 1 this analogy will.
Coursework 2: getting started (4) – using PhoneGap to build mobile applications (optional) Chris Greenhalgh G54UBI /
Java Programming Working with TextPad. Using TextPad to Work with Java This text editor is designed for working with Java You can download a trial version.
OPNET. Starting OPNET Open a console To set up OPNET type: “source /import/app1/cshrc/opnet” at the command prompt This should create op_admin/ and op_models/
Course Introduction and Getting Started with C 1 USF - COP C for Engineers Summer 2008.
Guide To UNIX Using Linux Third Edition
Apache : Installation, Configuration, Basic Security Presented by, Sandeep K Thopucherela, ECE Department.
My Workspace Profile. Using the course menu, click on Profile.
Installing Apache There are several ways to install the Apache web server – in CIT 370, you probably installed it from the CentOS CD-ROM although in fact,
Downloading a COBOL program from CIS12 site! Please use speaker notes for additional information!
Editing Java programs with the BlueJ IDE. Working environments to develop (= write) programs There are 2 ways to develop (write) computer programs: 1.Using.
DUE: WEDNESDAY, FEBRUARY 29 PRESENTED BY: JAMES AHLUM CSE 348 AI Game Programming Project 2: Pathfinding in Games.
Digital Image Processing Lecture3: Introduction to MATLAB.
Agenda What is Computer Programming? The Programming Process
CSE 390a Editing and Moving Files
Introduction to NS2 -Network Simulator- -Prepared by Changyong Jung.
CprE 588 Embedded Computer Systems Prof. Joseph Zambreno Department of Electrical and Computer Engineering Iowa State University Lecture #7 – System-Level.
Vim Editor and Unix Command gcc compiler Computer Networks.
TAMU CSCE 313 (the basics). Basic Unix/Linux programming Accessing CS systems  PuTTY (putty.exe) – a Telnet and SSH client  Common hosts: unix.cs.tamu.edu.
Introduction to Engineering MATLAB – 6 Script Files - 1 Agenda Script files.
SQL Queries Relational database and SQL MySQL LAMP SQL queries A MySQL Tutorial and applications Database Building.
1 CSC204 – Programming I Lecture 2 Intro to OOP with Java.
Introduction to Java Programming with Forte Y. Daniel Liang.
NS2 - Appendix Ming-Feng Yang. 2 2 Outline NS2 Models NS2 Directory Structure Extending NS2 in OTcl Extending NS2 in C++ NS2 related links.
OSP Tutorial An Introduction. Getting to OSP  Obtain a CSE account  Recommend xming to remote log in from USF Website 
C Tutorial - Program Organization CS Introduction to Operating Systems.
Fall 08, Oct 31ELEC Lecture 8 (Updated) 1 Lecture 8: Design, Simulation Synthesis and Test Tools ELEC 2200: Digital Logic Circuits Nitin Yogi
Running Modflow with Batch Files. Dos basics cd = change directory (dOs Is NoT cAsE sEnSiTiVe) dir = shows you what is in the directory (It gives you.
1 Getting Started with C++. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Visual Studio 2008.
Shell Advanced Features. Module 8 Shell Advanced Features ♦ Introduction In Linux systems, the shells are often referred to as command line interfaces.
Installing BioPerl – how to add a repository to the PPM Start  All Programs  Active Perl…  Perl Package manager (If you don’t see a screen like the.
”Java and JMLfor Dummies” The Java source code is written in a text file using your favourite editor (Notepad) and is saved with extension.java. Be careful.
Java Programming, Second Edition Appendix A Working with Java SDK 1.4.
Makefiles CARYL RAHN. Separate compilation Large programs are generally separated into multiple files, e.g. main.c addmoney.c removemoney.c money.h With.
1 Installing Java on Your PC. Installing Java To develop Java programs on your PC: Install JDK (Java Development Kit) Add the directory where JDK was.
Lecture 8  make. Using make for compilation  With medium to large software projects containing many files, it’s difficult to: Type commands to compile.
1 Getting Started with C++ Part 1 Windows. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Microsoft.
Emacs, Compilation, and Makefile C151 Multi-User Operating Systems.
Java On the ENB 116 Computers The JDK is now available on the ENB 116 computers. You can use a classroom computer rather than your own laptop or CIRCE.
C code organization CSE 2451 Rong Shi. Topics C code organization Linking Header files Makefiles.
Exploring Spyder: An IDE for scientific computing
Network Simulator 2 Network Simulator 2 Practice SungKyunKwan-Univ Mobile Computing LAB ( 안혜환
UNIX Development: g++ and make CS 2204 Class meeting 8 Created by Doug Bowman, 2001 Modified by Mir Farooq Ali, 2002.
Tutorial for Modelsim 1 Installation Download the Modelsim Student Edition: Follow the.
1 COMP 3500 Introduction to Operating Systems Project 4 – Processes and System Calls Part 3: Adding System Calls to OS/161 Dr. Xiao Qin Auburn University.
Ns2 Installations and Basics Abdul Razaque. How to install Ubuntu on windows-7 & 8 Download the Ubuntu ISO file. You can get the ISO file from the Ubuntu.
Note: Some of the slides are repeated from Introduction to C++
Need support to Setup Eclipse Mars 2
Unity Application Generator
Relational database and SQL MySQL LAMP SQL queries
Makefiles Caryl Rahn.
Getting Started with TWB
CompSci 230 Software Construction
Chapter 2 Setup.
Name of your training course
Jose Almeida, BI Consultant
Data Structures and Programming Techniques
Chapter 3 – A Guided Tour Through Arena
Digital Image Processing
CSE 303 Concepts and Tools for Software Development
ILogic What’s New.
Using screens and adding two numbers - addda.cbl
Scripts In Matlab.
Java IDE Dwight Deugo Nesa Matic Portions of the notes for this lecture include excerpts from.
Homework K&R chapter 4.
Unity Application Generator
CSC 253 Lecture 15.
Presentation transcript:

Including Your Modules into NS 2 by Teerawat Issariyakul http://www.ns2ultimate.com March 2010 http://www.ns2ultimate.com

Assumptions and Objectives You have developed NS2 modules in one or more of the following 3 file types: What you would like to do is to incorporate these files into NS2 File type Example C++ file myfile.cc Header file myfile.h Tcl file myfile.tcl Tip: Add your own speaker notes here. http://www.ns2ultimate.com

Key step Go to your ns home directory (e.g., nsallinone-2.35-RC3/ns-2.35). Look for a file called “Makefile”. Use your favorite editor to edit the file (I will explain the details in the next slides). Run “make” at the command prompt under your ns home directory. You’re done. You should be able to invoke your new modules defined in .cc, .h, and .tcl from the NS prompt. Tip: Add your own speaker notes here. http://www.ns2ultimate.com

Modifying Makefile There are three places in Makefile you will have to modify OBJ_CC NS_TCL_LIB INCLUDE Suppose your new module are Stored in files myfile.h, myfile.cc, and myfile.tcl Stored under directory nsallinone-2.35- RC3/ns-2.35/myDir Tip: Add your own speaker notes here. http://www.ns2ultimate.com

1. C++ Modules Add “myDir/myfile.o \” to any line following this line OBJ_CC = \ Note: The extension must be “.o”, not “.cc” nor “.h” “.o” is an object file obtained by compiling “.cc” and “.h” Tip: Add your own speaker notes here.

1. C++ Modules: Example Tip: Add your own speaker notes here. http://www.ns2ultimate.com

2. Tcl Modules Add “myDir/myfile.tcl \” to any line following this line NS_TCL_LIB = \ Tip: Add your own speaker notes here.

3. Including Directory (Optional) Add “-I./myDir \” to any line following this line INCLUDES = \ This will include myDir into the compiling path. So that you don’t need to type the full path every time. Tip: Add your own speaker notes here.

Final step Just run “ make ” at the command prompt Done!! Tip: Add your own speaker notes here.

For more information about NS 2 Please see chapter 2 in this book from Springer T. Issaraiyakul and E. Hossain, “Introduction to Network Simulator NS2”, Springer 2009 http://www.ns2ultimate.com