--- a/doc/tutorial/conceptual-overview.texi Tue Mar 24 00:51:10 2009 -0700
+++ b/doc/tutorial/conceptual-overview.texi Tue Mar 24 12:45:30 2009 -0700
@@ -362,21 +362,6 @@
INFO level for echo clients and servers. This will result in the application
printing out messages as packets are sent and received during the simulation.
-The next line of code is used to give a fixed seed to the random number
-generators so that they will generate repeatable results. In the example
-programs, it allows us to thouroughly document the output of the trace files
-in a consistent way. Having a fixed seed also allows us to use the examples
-in our regression testing framework.
-
-@verbatim
- RandomVariable::UseGlobalSeed (1, 1, 2, 3, 5, 8);
-@end verbatim
-
-Random variables are very important in understanding how to get repeatable
-results, so you are encouraged to read the Doxygen and manual sections to
-understand what is going on there. For us, the main concern is in making
-random backoff algorithms consistent across runs.
-
Now we will get directly to the business of creating a topology and running
a simulation. We use the topology helper objects to make this job as
easy as possible.
@@ -439,7 +424,7 @@
pointToPoint.SetChannelAttribute ("Delay", StringValue ("2ms"));
@end verbatim
-The first line
+The first line,
@verbatim
PointToPointHelper pointToPoint;
@@ -738,34 +723,46 @@
the @code{scratch} directory.
@verbatim
- ~/repos/ns-3-dev > cp examples/first.cc scratch/
+ ~/repos/ns-3-dev > cp examples/first.cc scratch/myfirst.cc
@end verbatim
-and then build it using waf,
+Warning: We use the file @code{first.cc} as one of our regression tests to
+verify that it works exactly as we expect. This means that an executable
+named @code{first} already exists in the project. If you want to execute
+what you compile, and not a previously compiled program, please do the
+renaming suggested below.)
+
+Now build your example using Waf:
@verbatim
- ~/repos/ns-3-dev > ./waf
- Entering directory `/home/craigdo/repos/ns-3-dev/build'
- [467/511] cxx: scratch/first.cc -> build/debug/scratch/first_1.o
- [468/511] cxx: scratch/multiple-sources/simple-main.cc -> build/debug/scratch/multiple-sources/simple-main_2.o
- [469/511] cxx: scratch/multiple-sources/simple-simulation.cc -> build/debug/scratch/multiple-sources/simple-simulation_2.o
- [470/511] cxx: scratch/simple.cc -> build/debug/scratch/simple_3.o
- [508/511] cxx_link: build/debug/scratch/first_1.o -> build/debug/scratch/first
- Compilation finished successfully
- ~/repos/ns-3-dev >
+ ./waf
+@end verbatim
+
+You should see messages reporting that your @code{myfirst} example was built
+successfully.
+
+@verbatim
+ Entering directory `/home/craigdo/repos/ns-3-allinone-dev/ns-3-dev/build'
+ [563/648] cxx: scratch/myfirst.cc -> build/debug/scratch/myfirst_3.o
+ [646/648] cxx_link: build/debug/scratch/myfirst_3.o -> build/debug/scratch/myfirst
+ Build finished successfully (00:00:02)
@end verbatim
You can now run the example (note that if you build your program in the scratch
directory you must run it out of the scratch directory):
@verbatim
- ~/repos/ns-3-dev > ./waf --run scratch/first
- Entering directory `/home/craigdo/repos/ns-3-dev/build'
- Compilation finished successfully
+ ./waf --run scratch/myfirst
+@end verbatim
+
+You should see some output:
+
+@verbatim
+ Entering directory `/home/craigdo/repos/ns-3-allinone-dev/ns-3-dev/build'
+ Build finished successfully (00:00:00)
Sent 1024 bytes to 10.1.1.2
Received 1024 bytes from 10.1.1.1
Received 1024 bytes from 10.1.1.2
- ~/repos/ns-3-dev >
@end verbatim
Here you see that the build system checks to make sure that the file has been
@@ -793,38 +790,42 @@
The top-level directory for one of our @emph{repositories} will look
something like:
+
@verbatim
-drwxr-xr-x [up]
-drwxr-xr-x doc manifest
-drwxr-xr-x examples manifest
-drwxr-xr-x ns3 manifest
-drwxr-xr-x regression manifest
-drwxr-xr-x samples manifest
-drwxr-xr-x scratch manifest
-drwxr-xr-x src manifest
-drwxr-xr-x tutorial manifest
-drwxr-xr-x utils manifest
--rw-r--r-- 135 .hgignore file | revisions | annotate
--rw-r--r-- 891 .hgtags file | revisions | annotate
--rw-r--r-- 441 AUTHORS file | revisions | annotate
--rw-r--r-- 17987 LICENSE file | revisions | annotate
--rw-r--r-- 4948 README file | revisions | annotate
--rw-r--r-- 4917 RELEASE_NOTES file | revisions | annotate
--rw-r--r-- 7 VERSION file | revisions | annotate
--rwxr-xr-x 99143 waf file | revisions | annotate
--rwxr-xr-x 28 waf.bat file | revisions | annotate
--rw-r--r-- 30584 wscript file | revisions | annotate
+drwxr-xr-x [up]
+drwxr-xr-x bindings python files
+drwxr-xr-x doc files
+drwxr-xr-x examples files
+drwxr-xr-x ns3 files
+drwxr-xr-x regression files
+drwxr-xr-x samples files
+drwxr-xr-x scratch files
+drwxr-xr-x src files
+drwxr-xr-x utils files
+-rw-r--r-- 2009-03-24 00:51 -0700 505 .hgignore file | revisions | annotate
+-rw-r--r-- 2009-03-24 00:51 -0700 1682 .hgtags file | revisions | annotate
+-rw-r--r-- 2009-03-24 00:51 -0700 686 AUTHORS file | revisions | annotate
+-rw-r--r-- 2009-03-24 00:51 -0700 14893 CHANGES.html file | revisions | annotate
+-rw-r--r-- 2009-03-24 00:51 -0700 17987 LICENSE file | revisions | annotate
+-rw-r--r-- 2009-03-24 00:51 -0700 3742 README file | revisions | annotate
+-rw-r--r-- 2009-03-24 00:51 -0700 13505 RELEASE_NOTES file | revisions | annotate
+-rw-r--r-- 2009-03-24 00:51 -0700 6 VERSION file | revisions | annotate
+-rw-r--r-- 2009-03-24 00:51 -0700 9257 regression.py file | revisions | annotate
+-rwxr-xr-x 2009-03-24 00:51 -0700 81285 waf file | revisions | annotate
+-rwxr-xr-x 2009-03-24 00:51 -0700 28 waf.bat file | revisions | annotate
+-rw-r--r-- 2009-03-24 00:51 -0700 26270 wscript file | revisions | annotate
+-rw-r--r-- 2009-03-24 00:51 -0700 6636 wutils.py file | revisions | annotate
@end verbatim
The source code is mainly in the @code{src} directory. You can view source
-code by clicking on the @code{manifest} link to the right of the directory
-name. If you click on the @code{manifest} link to the right of the src
-directory you will find a subdirectory. If you click on the @code{manifest}
-link next to the @code{core} subdirectory in under @code{src}, you will find
-a list of files. The first file you will find is @code{assert.h}. If you
-click on the @code{file} link, you will be sent to the source file for
-@code{assert.h}.
+code either by clicking on the directory name or by clicking on the @code{files}
+link to the right of the directory name. If you click on the @code{src}
+directory you be taken to the lising of the @code{src} subdirectories. If you
+click on @code{core} subdirectory, you will find a list of files. The first file
+you will find (as of this writing) is @code{abort.h}. If you
+click on @code{abort.h} link, you will be sent to the source file for @code{abort.h}.
Our example scripts are in the @code{examples} directory. The source code for
the helpers we have used in this chapter can be found in the
-@code{src/helpers} directory.
+@code{src/helpers} directory. Feel free to poke around in the directory tree to
+get a feel for what is there and the style of @command{ns-3} programs.