GSOC2013PatchRequirement: Difference between revisions

From Nsnam
Jump to navigation Jump to search
mNo edit summary
Line 48: Line 48:


* A patch atop the above provided files that achieves the said objective. In your application, point us to a publicly available URL where you've hosted the patch (like a "gist" on github.com for instance).  See also some guidelines [http://www.nsnam.org/developers/contributing-code/submit/ here] about formatting patches for review.  If you need help with this step, contact the ns-3 Org Admin (Lalith Suresh) for advice.
* A patch atop the above provided files that achieves the said objective. In your application, point us to a publicly available URL where you've hosted the patch (like a "gist" on github.com for instance).  See also some guidelines [http://www.nsnam.org/developers/contributing-code/submit/ here] about formatting patches for review.  If you need help with this step, contact the ns-3 Org Admin (Lalith Suresh) for advice.
[[Category:GSoC]]

Revision as of 23:07, 1 June 2013

As part of their Google Summer of Code 2013 applications to ns-3, we require that students produce a patch for ns-3. This will allow us to gauge your ability to dive into source code, understand it, make a modification, and proceed to build and verify if your modification works.

A patch in this regard can be at least one of the following:

  • Pick a bug in our Bugzilla and try to fix it.
  • If you already have contributed a patch for ns-3, point us to the relevant commits in our code repository.
  • If not the above, complete the minimum requirement test given below.

Note, a patch here does not have to be merged for you to qualify. It only serves to show us how comfortable you are with diving into and hacking on a large code base. The more prowess you demonstrate through the patch, the higher your chances of being accepted.


Minimum requirement patch

Setting up the environment

Perform the following steps:

  • Clone ns-3-dev:
 $: hg clone http://code.nsnam.org/ns-3-dev
  • Apply the ns-3 GSOC patch for the test
 $: cd ns-3-dev
 $: git clone https://gist.github.com/5186251.git gsoc-patch/
 $: patch -p1 < gsoc-patch/ns3-gsoc-patch-test
  • Verify if you can build ns-3 and run the test script
 $: ./waf configure --disable-python --enable-examples
 $: ./waf build
 $: ./waf --run testapp-sim

Objective

The patch you applied above adds the following:

  • An ns-3 application with the classname TestApplication. The corresponding files are src/applications/model/testapp.{cc ,.h}.
  • A simulation script scratch/testapp-sim.cc

Your objective is to fill up the missing sections in the TestApplication class and testapp-sim.cc in order to be able to:

  • Have TestApplication print "Hello World!" when started and "Goodbye World!" when stopped. For this, you will need to implement two private methods provided by the "Application" base class (see the header file testapp.h). Also try looking at the code of other applications inside src/application/model/ for hints on what to do.
  • Within the testapp-sim.cc simulation script, add "TestApplication" to the single node that is initiated, and have it started and stopped at the first and second second of the simulation respectively. As a hint, look for public methods available within the "Node" and "Application" class. You can also look at other example scripts within the examples/ or src/*/examples/ folders for ideas.

What to submit

  • A patch atop the above provided files that achieves the said objective. In your application, point us to a publicly available URL where you've hosted the patch (like a "gist" on github.com for instance). See also some guidelines here about formatting patches for review. If you need help with this step, contact the ns-3 Org Admin (Lalith Suresh) for advice.