Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
77d5d5efad | ||
|
|
4e26fa54fc | ||
|
|
4fc15d74ad | ||
|
|
786af4b8ce | ||
|
|
d2b42428d7 | ||
|
|
e07f9ce08d | ||
|
|
a946fff2a5 | ||
|
|
54e21fb887 | ||
|
|
1859d3cc23 | ||
|
|
9149c16d12 | ||
|
|
90187b9242 | ||
|
|
47fd265296 | ||
|
|
b01fb1cd09 | ||
|
|
4313d64e60 | ||
|
|
11d3c7a759 | ||
|
|
8eeda671b4 | ||
|
|
ff2a09dc05 | ||
|
|
171b77527b | ||
|
|
e6caaea0e0 | ||
|
|
62bc70ca4b | ||
|
|
fccb4d7020 | ||
|
|
8329459cc6 | ||
|
|
3604504faa | ||
|
|
9f735f106f | ||
|
|
2d42167353 | ||
|
|
bb665c1f32 | ||
|
|
54064bf48f | ||
|
|
ed3d22fc1c | ||
|
|
5358beed81 | ||
|
|
a0c026f0b8 | ||
|
|
b633d78c1e | ||
|
|
62e8cba857 | ||
|
|
ee175bbba7 | ||
|
|
d05b973015 | ||
|
|
caca9151c1 | ||
|
|
dfc3b875cf | ||
|
|
207b0bb8b1 | ||
|
|
0bd223f377 | ||
|
|
5eeea627e1 | ||
|
|
e5c1e134a4 | ||
|
|
735b9dd7b8 | ||
|
|
a2fd831cd3 | ||
|
|
159d9c5d9c | ||
|
|
7bf1354a48 | ||
|
|
deed64bf40 | ||
|
|
fc1413a133 | ||
|
|
074515d307 | ||
|
|
b108a54865 | ||
|
|
7ec47b8e85 | ||
|
|
e15c2605e7 | ||
|
|
a2a8494407 | ||
|
|
fb905b1676 | ||
|
|
392f8cf154 | ||
|
|
4ed212117a | ||
|
|
19930c4c7d | ||
|
|
98aebe2f16 | ||
|
|
b64d2671e6 | ||
|
|
d889f2685d | ||
|
|
f7e259cab5 | ||
|
|
e63073011e | ||
|
|
da5379e80a | ||
|
|
2ec7d91a92 | ||
|
|
ecbf3929cf | ||
|
|
8d2cbf62fb | ||
|
|
4fa10f3837 | ||
|
|
f70d4b28a5 | ||
|
|
4f489c8795 | ||
|
|
5ae94a37b4 | ||
|
|
64d086a823 | ||
|
|
afc5cbd384 | ||
|
|
57e441304c | ||
|
|
85869a362f | ||
|
|
9b25074177 | ||
|
|
7cc28756fc | ||
|
|
decce04a1f | ||
|
|
714fd8c535 | ||
|
|
d7efc67a04 | ||
|
|
a4b69cdcbc | ||
|
|
d604a15c1e | ||
|
|
029a151da4 | ||
|
|
2920e2e2f0 | ||
|
|
dfc903cb67 | ||
|
|
03ce821d48 | ||
|
|
5b0bb47174 | ||
|
|
006d0060ea | ||
|
|
845e45c1a1 | ||
|
|
2f87d0e0ad | ||
|
|
8a351520df | ||
|
|
f230b16e1d | ||
|
|
7e36fb5f33 | ||
|
|
810c0907b1 | ||
|
|
8a8b4f2a18 | ||
|
|
ee8c2b6b36 | ||
|
|
01ef3538cb | ||
|
|
06d9e19f22 | ||
|
|
17c8b9e989 | ||
|
|
b8caced971 | ||
|
|
487647b761 | ||
|
|
74dbc01404 | ||
|
|
00f2105449 | ||
|
|
b9d74d0fd9 | ||
|
|
a8671a21e5 | ||
|
|
8d18360a09 | ||
|
|
16b55bb2b4 | ||
|
|
4b5475ff89 | ||
|
|
3344539847 | ||
|
|
ae630e4752 | ||
|
|
1e9a5cf4fb | ||
|
|
028d9c2822 | ||
|
|
6ec8ef2ba3 | ||
|
|
43249dbe7b | ||
|
|
0a4f8914e5 | ||
|
|
29861e187e | ||
|
|
e51729fa70 | ||
|
|
a99693f747 | ||
|
|
053ee33bba | ||
|
|
17a68c2942 | ||
|
|
2660c1f9dd | ||
|
|
90ec1005cb | ||
|
|
56a19e020d | ||
|
|
850d745997 | ||
|
|
b9e091833d | ||
|
|
2b369e0d13 | ||
|
|
726d75a7ac | ||
|
|
649c3e24fc | ||
|
|
3e93356a64 | ||
|
|
241b8565ac | ||
|
|
06718d19a4 | ||
|
|
1ea9b521a6 | ||
|
|
13f4973b45 | ||
|
|
9089bc1d65 | ||
|
|
e8936dffe6 | ||
|
|
6fda6203a2 | ||
|
|
298b707723 | ||
|
|
96ae5e4c42 | ||
|
|
880e6148e9 | ||
|
|
fda813ec33 | ||
|
|
c498ece0e2 | ||
|
|
b8f6cc4dc0 | ||
|
|
72d0b8a0d4 | ||
|
|
94d96a83df | ||
|
|
80dcaec642 | ||
|
|
f6f16667c9 | ||
|
|
3c4c756bf7 | ||
|
|
7f2ecf85ce | ||
|
|
be66c766d8 | ||
|
|
6b374f0532 | ||
|
|
07330798c7 | ||
|
|
31a38fad1a | ||
|
|
29adc8404c | ||
|
|
0106318da8 | ||
|
|
ad3392a85d | ||
|
|
52bcbf9712 | ||
|
|
58cc2ad010 | ||
|
|
6401ac49b9 | ||
|
|
ba72597fd3 | ||
|
|
fc87d61e85 | ||
|
|
62da8e567f | ||
|
|
a6c01fba06 | ||
|
|
c8fa709e2a | ||
|
|
ec538fb681 | ||
|
|
e5392dbb92 | ||
|
|
3f4e7967eb | ||
|
|
2ec548b523 | ||
|
|
2a877b43aa | ||
|
|
1de1ab4fb1 | ||
|
|
a6afb8fc7e | ||
|
|
d29d359a63 | ||
|
|
51d286f501 | ||
|
|
0f4705a818 | ||
|
|
f7e4fba0b2 | ||
|
|
660371d08c | ||
|
|
77171cbbb2 | ||
|
|
6e88721aca | ||
|
|
c5c471f4f1 | ||
|
|
e3bc8c4f9e | ||
|
|
92bb097e5c | ||
|
|
24211d56ca | ||
|
|
8b1630d0de | ||
|
|
d8f0a089d2 | ||
|
|
0e04372504 | ||
|
|
09a196abdc | ||
|
|
2e8f12b4cb | ||
|
|
86e06ea1de | ||
|
|
387f201fb5 | ||
|
|
e298506b91 | ||
|
|
68a3b939df | ||
|
|
fa5017da03 | ||
|
|
9f84609b94 | ||
|
|
b0bbb640bb | ||
|
|
2889137217 | ||
|
|
541536d268 | ||
|
|
95b3698448 | ||
|
|
bf2e393ddb | ||
|
|
6e04c5de45 | ||
|
|
0bad8a4e48 | ||
|
|
96c91933b6 | ||
|
|
1e7a82441e | ||
|
|
ae3b58c5d9 | ||
|
|
045317f68a | ||
|
|
3069cff0ce | ||
|
|
d1ebaf4b05 | ||
|
|
7fb24e8ba4 | ||
|
|
456efd362f | ||
|
|
f6a89b13af | ||
|
|
b61089cc36 | ||
|
|
905707e11c | ||
|
|
26de040646 | ||
|
|
513e885310 | ||
|
|
60f803028a | ||
|
|
5ff7fc92b1 | ||
|
|
ec1fe253a9 | ||
|
|
7ac3e35365 | ||
|
|
41469d5091 | ||
|
|
776e205ed0 | ||
|
|
ae6c1d33da | ||
|
|
c3e84cd743 | ||
|
|
4ab8b91ba0 | ||
|
|
a3a67e3bda | ||
|
|
a7723b5fc4 | ||
|
|
22cdb0dbc2 | ||
|
|
30d4cf3ec0 | ||
|
|
71418237c0 | ||
|
|
e6be0abc52 | ||
|
|
7931f66b87 | ||
|
|
48f5d9e6d1 | ||
|
|
5c7db3ff21 | ||
|
|
f72d62f95a | ||
|
|
6b7e493d45 | ||
|
|
a0b446c67c | ||
|
|
837bdfe3c5 | ||
|
|
c59a170d9f | ||
|
|
3032a78de3 | ||
|
|
78f79fb65e | ||
|
|
8ad5daa0f5 | ||
|
|
ebb9273048 | ||
|
|
79a8817482 | ||
|
|
542581085a | ||
|
|
f64bb59b2f | ||
|
|
7e31c9b7e8 | ||
|
|
f19d9ab556 | ||
|
|
4b6d562c14 | ||
|
|
753aac3ff4 | ||
|
|
3370bd2438 | ||
|
|
1f4e8487a5 | ||
|
|
72a2c06604 | ||
|
|
b8a6fa098d | ||
|
|
10e4f3d999 | ||
|
|
334d9bd0e6 | ||
|
|
89c4a0817b | ||
|
|
8164ff3414 | ||
|
|
a07739229d | ||
|
|
94ff30eeb1 | ||
|
|
cd7d3ddf59 | ||
|
|
be0091a41c | ||
|
|
83bdec77d9 | ||
|
|
44b353c5f7 | ||
|
|
6f2486de60 | ||
|
|
294ffd4484 | ||
|
|
ae29e75745 | ||
|
|
7acbc23ef8 | ||
|
|
cea6f4eae2 | ||
|
|
2f04a912c1 | ||
|
|
014b6de66f | ||
|
|
64da5501bb | ||
|
|
256a5ab766 | ||
|
|
20e98779c0 | ||
|
|
535cf66706 | ||
|
|
f1560f18fd | ||
|
|
970314e9f9 | ||
|
|
a60e56f3d4 | ||
|
|
47ae583037 | ||
|
|
b89cf0a97e | ||
|
|
594383dbd3 | ||
|
|
2a9246aca0 | ||
|
|
14a62d02a7 | ||
|
|
83de5af56b | ||
|
|
396e660418 | ||
|
|
dea51fdd30 | ||
|
|
322d73be50 | ||
|
|
db787f66ee | ||
|
|
41f6dfdfbe | ||
|
|
94a6aa6ce7 | ||
|
|
58854e49fa | ||
|
|
e1c07db9a2 | ||
|
|
379fbb21c7 | ||
|
|
36c66dab53 | ||
|
|
84a9327aa9 | ||
|
|
47a4b78927 | ||
|
|
3ecbd431f9 | ||
|
|
3e0fdcda99 | ||
|
|
c7643cf50f | ||
|
|
92f085c07d | ||
|
|
a73b0a4226 | ||
|
|
2025568c98 | ||
|
|
242a0d1b58 | ||
|
|
502852a67b | ||
|
|
0fcbfbe38b | ||
|
|
87ad3830f5 | ||
|
|
24fe59cfbb | ||
|
|
50f298b400 | ||
|
|
8cd6c25962 | ||
|
|
d5a2afddb0 | ||
|
|
b6d1afd1a4 | ||
|
|
a482fe425d | ||
|
|
f36fa545a6 | ||
|
|
612a08373c | ||
|
|
758db9e80e | ||
|
|
c92f0d4ef2 | ||
|
|
ec0a3e97a3 | ||
|
|
6a9d3c3775 | ||
|
|
005105dba2 | ||
|
|
1ea941a255 | ||
|
|
ef6cc4a65b | ||
|
|
c517bf47f0 | ||
|
|
b8e7dff8c0 | ||
|
|
8d0cf0776c | ||
|
|
dbbed882fe | ||
|
|
55d5a5b453 | ||
|
|
50d0743753 | ||
|
|
ed5a456de3 | ||
|
|
9c5fa96fb4 | ||
|
|
bda125fd86 | ||
|
|
42b662fd58 | ||
|
|
0e858f92ed | ||
|
|
3b09edc3e2 | ||
|
|
a0c7d6ea8d | ||
|
|
d3bb3718d0 | ||
|
|
80663034e3 | ||
|
|
90d5128cf1 | ||
|
|
e074bdd6f3 | ||
|
|
3fcb3c137d | ||
|
|
64d9ce9d8c | ||
|
|
e0918edc18 | ||
|
|
8707b44da8 | ||
|
|
8b0c038a18 | ||
|
|
325391b2c1 | ||
|
|
187c0545c1 | ||
|
|
58ee410b57 | ||
|
|
4b8be66974 | ||
|
|
c676335377 | ||
|
|
e7c0afe5e5 | ||
|
|
8b28540d92 | ||
|
|
6c211e7e5c | ||
|
|
a20a9caabe | ||
|
|
7d8f7dd996 | ||
|
|
106c576196 | ||
|
|
849a90f971 | ||
|
|
77380392cf | ||
|
|
64e82a023d | ||
|
|
81cb56e46a | ||
|
|
dfb40dc4cb | ||
|
|
9dc8ecb9a0 | ||
|
|
f53ab9af93 | ||
|
|
a18362e172 | ||
|
|
a1691e1b69 | ||
|
|
fa82eaff5c | ||
|
|
eaff2fa44f | ||
|
|
c2b6158832 | ||
|
|
445ee176cd | ||
|
|
db3b60236f | ||
|
|
b75cfdb282 | ||
|
|
ebef75d829 | ||
|
|
a910b44885 | ||
|
|
9059a313c5 | ||
|
|
f4fd6cb251 | ||
|
|
b7f55c4113 | ||
|
|
4bd5fec04f | ||
|
|
2676e25b9c | ||
|
|
0663c95245 | ||
|
|
ccef6ed845 | ||
|
|
2f3a4f31e2 | ||
|
|
3709c6e261 | ||
|
|
c3b5e54573 | ||
|
|
9e21481b8d | ||
|
|
de95c9b10f | ||
|
|
bdf540e8a7 | ||
|
|
c61ed36fbc | ||
|
|
483bddbd77 | ||
|
|
ac452a8808 | ||
|
|
d9f7e14c5a | ||
|
|
b301836c07 | ||
|
|
976d97b4ee | ||
|
|
ab6feba375 | ||
|
|
e7c25f9c3c | ||
|
|
13674a7bda | ||
|
|
521bc21456 | ||
|
|
92244ae188 | ||
|
|
03f1934de7 | ||
|
|
d071049665 | ||
|
|
19af32a6e3 | ||
|
|
be602d0271 | ||
|
|
cb8a465692 | ||
|
|
3306567d57 | ||
|
|
2d6ad0b37f | ||
|
|
eeb22f032e | ||
|
|
ef64362351 | ||
|
|
55b1e38d9b | ||
|
|
4c0a1cc3c1 | ||
|
|
6ee8f5b891 | ||
|
|
83dd97c451 | ||
|
|
18947ae628 | ||
|
|
f8b97d44a6 | ||
|
|
a9b9e503b9 | ||
|
|
2e6e133380 | ||
|
|
002252d0e4 | ||
|
|
06c6a5275b | ||
|
|
ae5a8f9c88 | ||
|
|
5c672f786b | ||
|
|
e30e6d6a47 | ||
|
|
e772a5f06c | ||
|
|
10d39194f9 | ||
|
|
183eca1dd8 | ||
|
|
7868286d55 | ||
|
|
774d69fbc4 | ||
|
|
34694d32ae | ||
|
|
70c96e69ee | ||
|
|
b0a0d1924f | ||
|
|
2c27db0bdf | ||
|
|
66f29d7ee6 | ||
|
|
5228ad81d7 | ||
|
|
dd1879c2e0 |
No files matched your search
@@ -45,5 +45,4 @@ massif.*
|
||||
\#[^\#/]+\#$
|
||||
.lock-wscript
|
||||
.lock-wafbuild
|
||||
*~
|
||||
\#*\#
|
||||
|
||||
@@ -20,15 +20,15 @@
|
||||
\.pcap$
|
||||
\.mob$
|
||||
\.routes$
|
||||
^doc/manual/build
|
||||
^doc/tutorial/build
|
||||
^doc/testing/build
|
||||
^doc/models/build
|
||||
^doc/doxygen.log$
|
||||
^doc/doxygen.warnings.log$
|
||||
^doc/(manual|models|tutorial|tutorial-pt-br)/build
|
||||
^doc/(manual|models|tutorial|tutorial-pt-br)/figures/.*\.(eps|pdf|png)$
|
||||
^doc/models/source-temp
|
||||
^doc/manual/figures/.*eps
|
||||
^doc/manual/figures/.*pdf
|
||||
^doc/manual/figures/.*png
|
||||
^doc/ns3_html_theme/static/ns3_version.js$
|
||||
^src/.*/doc/build
|
||||
^src/.*/doc/source/figures/.*\.(eps|pdf)$
|
||||
^src/.*/doc/.*\.png
|
||||
^bindings/python/pybindgen/
|
||||
ms_print.*
|
||||
massif.*
|
||||
@@ -36,3 +36,4 @@ massif.*
|
||||
\.diff$
|
||||
\.tr$
|
||||
\#[^\#/]+\#$
|
||||
syntax: glob
|
||||
@@ -61,3 +61,6 @@ e48ed3aabca6ad71c8c49e4604c0f83345eda6a8 ns-3.11-RC3
|
||||
19c9e2b33b4a53f200be80cd49810bdfecf76770 ns-3.12-RC1
|
||||
167fc2274f53d4d89fdd769e4a7683ad7b6b7157 ns-3.12
|
||||
9007193fbb8d18b69a1feb6aec16501dcf138b6f ns-3.13
|
||||
ae540de68a2534213342c5e0b12afb47d7518a90 ns-3.14
|
||||
26a511d6dbad7284e66de0f3b2ad5bebe6b76405 ns-3.15
|
||||
49d343e55caec257bb01e400eef6c14522f37e1b ns-3.16
|
||||
@@ -1,14 +1,15 @@
|
||||
Alexander Afanasyev <alexander.afanasyev@ucla.edu>
|
||||
Alexander Afanasyev (alexander.afanasyev@ucla.edu)
|
||||
Rohit Agarwal (mindprince@gmail.com)
|
||||
Kirill Andreev (andreev@iitp.ru)
|
||||
Dean Armstrong (deanarm@gmail.com)
|
||||
Nicola Baldo (nbaldo@cttc.es)
|
||||
Mirko Banchi (mk.banchi@gmail.com)
|
||||
Peter D. Barnes, Jr. (barnes26@llnl.gov)
|
||||
Ramon Bauza (monbauza@gmail.com)
|
||||
Mehdi Benamor (mehdi.benamor@telecom-bretagne.eu)
|
||||
Raj Bhattacharjea (raj.b@gatech.edu)
|
||||
Timo Bingmann (timo.bingmann@student.kit.edu)
|
||||
Julien Boite <juboite@gmail.com>
|
||||
Julien Boite (juboite@gmail.com)
|
||||
Elena Borovkova (borokovaes@iitp.ru)
|
||||
Pavel Boyko (boyko@iitp.ru)
|
||||
Dan Broyles (muxman@sbcglobal.net)
|
||||
@@ -22,22 +23,26 @@ Andrey Churin (aachurin@gmail.com)
|
||||
Salva Climent (jocliba@gmail.com)
|
||||
Luis Cortes (cortes@gatech.edu)
|
||||
Luca Costantino (luca.costantino@gmail.com)
|
||||
Alexander D'souza (moijes12@gmail.com)
|
||||
Craig Dowell (craigdo@ee.washington.edu)
|
||||
Denis Fakhriev (fakhriev@iitp.ru)
|
||||
Jahanzeb Farooq (Jahanzeb.Farooq@inria.fr, Jahanzeb.Farooq@gmail.com)
|
||||
Juliana Freitag Borin (juliana.freitag@gmail.com)
|
||||
Eric Gamess (egamess@gmail.com)
|
||||
Thomas Geithner (thomas.geithner@dai-labor.de)
|
||||
Martin Giachino (martin.giachino@gmail.com,giachino@fing.edu.uy)
|
||||
Charline Taibi Guguen (charline.guguen@gmail.com)
|
||||
Tom Goff (tgoff@tgoff.net)
|
||||
David Gross (gdavid.devel@gmail.com)
|
||||
Maja Grubišić (maja.grubisic@live.com)
|
||||
Charline Taibi Guguen (charline.guguen@gmail.com)
|
||||
Daniel Halperin (daniel@halper.in)
|
||||
Bruno Haick (bghaick@hotmail.com)
|
||||
Frank Helbert (frank@ime.usp.br)
|
||||
Tom Henderson (tomhend@u.washington.edu)
|
||||
Blake Hurd (naimorai@gmail.com)
|
||||
ishan <ishan.chhabra@gmail.com>
|
||||
ishan (ishan.chhabra@gmail.com)
|
||||
Mohamed Amine Ismail (amine.ismail@inria.fr, iamine@udcast.com)
|
||||
Atishay Jain <atishayjain25@gmail.com>
|
||||
Atishay Jain (atishayjain25@gmail.com)
|
||||
Sascha Alexander Jopen (jopen@informatik.uni-bonn.de)
|
||||
Sam Jansen (sam.jansen@gmail.com)
|
||||
Liu Jian (liujatp@gmail.com)
|
||||
@@ -46,6 +51,7 @@ Flavio Kobuta (flaviokubota@gmail.com)
|
||||
Aleksey Kovalenko (kovalenko@iitp.ru)
|
||||
Mathieu Lacage (mathieu.lacage@inria.fr)
|
||||
Emmanuelle Laprise (emmmanuelle.laprise@bluekazoo.ca)
|
||||
Daniel Lertpratchya (nikkipui@gmail.com)
|
||||
Björn Lichtblau (lichtbla@informatik.hu-berlin.de)
|
||||
Keith Ma (keith.nwsuaf@gmail.com)
|
||||
Federico Maguolo (maguolof@dei.unipd.it)
|
||||
@@ -66,11 +72,11 @@ Duy Nguyen (duy@soe.ucsc.edu)
|
||||
Tommaso Pecorella (tommaso.pecorella@unifi.it)
|
||||
Vikas Pushkar (vikaskupushkar@gmail.com)
|
||||
Josh Pelkey (jpelkey@gatech.edu)
|
||||
Colin Perkins <csp@csperkins.org>
|
||||
Colin Perkins (csp@csperkins.org)
|
||||
Giuseppe Piro (g.piro@poliba.it)
|
||||
Yana Podkosova (yanapdk@rambler.ru)
|
||||
Guangyu Pei (guangyu.pei@boeing.com)
|
||||
Andrea Ranieri <andreran@uno.it>
|
||||
Andrea Ranieri (andreran@uno.it)
|
||||
Bruno Ranieri (Yrrsinn@googlemail.com)
|
||||
Ken Renard (kenneth.renard@arl.army.mil)
|
||||
Manuel Requena (mrequena@cttc.es)
|
||||
@@ -83,11 +89,12 @@ Florian Schmidt (Florian.Schmidt@cs.rwth-aachen.de)
|
||||
Guillaume Seguin (guillaume.seguin@inria.fr)
|
||||
Kulin Shah (m.kulin@gmail.com)
|
||||
Phillip Sitbon (phillip.sitbon@gmail.com)
|
||||
Anirudh Sivaraman <sk.anirudh@gmail.com>
|
||||
Anirudh Sivaraman (sk.anirudh@gmail.com)
|
||||
Ewgenij Starostin (estar@cs.tu-berlin.de)
|
||||
YunQiang Su <wzssyqa@gmail.com>
|
||||
YunQiang Su (wzssyqa@gmail.com)
|
||||
Brian Swenson (bswenson3@gatech.edu)
|
||||
Lalith Suresh (suresh.lalith@gmail.com)
|
||||
Marcos Talau <talau@users.sourceforge.net>
|
||||
Marcos Talau (talau@users.sourceforge.net)
|
||||
Adrian S. W. Tam (adrian.sw.tam@gmail.com)
|
||||
Hajime Tazaki (tazaki@sfc.wide.ad.jp)
|
||||
Wilson Thong (wilsonwk@ee.cityu.edu.hk)
|
||||
@@ -103,3 +110,4 @@ Mitch Watrous (watrous@u.washington.edu)
|
||||
Florian Westphal (fw@strlen.de)
|
||||
He Wu (mdzz@u.washington.edu)
|
||||
Yoshihiko Yazawa (yoshiyaz@gmail.com)
|
||||
Dizhi Zhou (dizhi.zhou@gmail.com)
|
||||
@@ -23,6 +23,13 @@ the impact of these changes on users by documenting these changes in a
|
||||
single place (this file), and not by providing a temporary or permanent
|
||||
backward-compatibility software layer. </p>
|
||||
<p>
|
||||
A related file is the RELEASE_NOTES file in the top level directory.
|
||||
This file complements RELEASE_NOTES by focusing on API and behavioral
|
||||
changes that users upgrading from one release to the next may encounter.
|
||||
RELEASE_NOTES attempts to comprehensively list all of the changes
|
||||
that were made. There is generally some overlap in the information
|
||||
contained in RELEASE_NOTES and this file. </p>
|
||||
<p>
|
||||
The goal is that users who encounter a problem when trying to use older
|
||||
code with newer code should be able to consult this file to find
|
||||
guidance as to how to fix the problem. For instance, if a method name
|
||||
@@ -44,7 +51,105 @@ to this file based on your experience, please contribute a patch or drop
|
||||
us a note on ns-developers mailing list.</p>
|
||||
|
||||
<hr>
|
||||
<h1>Changes from ns-3.13 to ns-3-dev</h1>
|
||||
<h1>Changes from ns-3.16 to ns-3.17</h1>
|
||||
|
||||
<h2>New API:</h2>
|
||||
<ul>
|
||||
<li></li>
|
||||
</ul>
|
||||
|
||||
<h2>Changes to existing API:</h2>
|
||||
<ul>
|
||||
<li></li>
|
||||
</ul>
|
||||
|
||||
<h2>Changes to build system:</h2>
|
||||
<ul>
|
||||
<li></li>
|
||||
</ul>
|
||||
|
||||
<h2>Changed behavior:</h2>
|
||||
<ul>
|
||||
<li></li>
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
<h1>Changes from ns-3.15 to ns-3.16</h1>
|
||||
|
||||
<h2>New API:</h2>
|
||||
<ul>
|
||||
<li>In the Socket class, the following functions were added:
|
||||
<ul>
|
||||
<li>(Set/Get)IpTos - sets IP Type of Service field in the IP headers.</li>
|
||||
<li>(Set/Is)IpRecvTos - tells the socket to pass information about IP ToS up the stack (by adding SocketIpTosTag to the packet).</li>
|
||||
<li>(Set/Get)IpTtl - sets IP Time to live field in the IP headers.</li>
|
||||
<li>(Set/Is)RecvIpTtl - tells the socket to pass information about IP TTL up the stack (by adding SocketIpTtlTag to the packet).</li>
|
||||
<li>(Set/Is)Ipv6Tclass - sets Traffic Class field in the IPv6 headers.</li>
|
||||
<li>(Set/Is)Ipv6RecvTclass - tells the socket to pass information about IPv6 TCLASS up the stack (by adding SocketIpv6TclassTag to the packet).</li>
|
||||
<li>(Set/Get)Ipv6HopLimit - sets Hop Limit field in the IPv6 headers.</li>
|
||||
<li>(Set/Is)Ipv6RecvHopLimit - tells the socket to pass information about IPv6 HOPLIMIT up the stack (by adding SocketIpv6HoplimitTag to the packet).</li>
|
||||
</ul>
|
||||
A user can call these functions to set/get the corresponding socket option. See examples/socket/socket-options-ipv4.cc and examples/socket/socket-options-ipv6.cc for examples.
|
||||
</ul>
|
||||
|
||||
<h2>Changes to existing API:</h2>
|
||||
<ul>
|
||||
<li>In the MobilityHelper class, the functions EnableAscii () and EnableAsciiAll () were changed to use output stream wrappers rather than standard C++ ostreams. The purpose of this change was to make them behave analogously to other helpers in ns-3 that generate ascii traces. Now, the file stream that is open in MobilityHelper is closed nicely upon asserts and program exits.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Changes to build system:</h2>
|
||||
<ul>
|
||||
<li>It's now possible to use distcc when building ns-3. See tutorial for details.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Changed behavior:</h2>
|
||||
<ul>
|
||||
<li>Sending a packet through Ipv4RawSocket now supports checksum in the Ipv4Header. It is still not possible to manually put in arbitrary checksum as the checksum is automatically calculated at Ipv4L3Protocol. The user has to enable checksum globally for this to work. Simply calling Ipv4Header::EnableChecksum() for a single Ipv4Header will not work.</li>
|
||||
<li>Now MultiModelSpectrumChannel allows a SpectrumPhy instance to change SpectrumModel at runtime by issuing a call to MultiModelSpectrumChannel::AddRx (). Previously, MultiModelSpectrumChannel required each SpectrumPhy instance to stick with the same SpectrumModel for the whole simulation.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
<h1>Changes from ns-3.14 to ns-3.15</h1>
|
||||
|
||||
<h2>New API:</h2>
|
||||
<ul>
|
||||
<li>A RandomVariableStreamHelper has been introduced to assist with
|
||||
using the Config subsystem path names to assign fixed stream numbers
|
||||
to RandomVariableStream objects.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Changes to existing API:</h2>
|
||||
<ul>
|
||||
<li>Derived classes of RandomVariable (i.e. the random variable
|
||||
implementations) have been ported to a new RandomVariableStream base class.
|
||||
<li>For a given distribution DistributionVariable (such as UniformVariable),
|
||||
the new class name is DistributionRandomVariable (such as
|
||||
UniformRandomVariable). </li>
|
||||
<li>The new implementations are also derived from class ns3::Object and
|
||||
are handled using the ns-3 smart pointer (Ptr) class. </li>
|
||||
<li>The new variable classes also have a new attributed called "Stream"
|
||||
which allows them to be assigned to a fix stream index when assigned
|
||||
to the underlying pseudo-random stream of numbers.</li>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>Changes to build system:</h2>
|
||||
<ul>
|
||||
<li></li>
|
||||
</ul>
|
||||
|
||||
<h2>Changed behavior:</h2>
|
||||
<ul>
|
||||
<li>Programs using random variables or models that include random variables
|
||||
may exhibit changed output for a given run number or seed, due to a possible
|
||||
change in the order in which random variables are assigned to underlying
|
||||
pseudo-random sequences. Consult the manual for more information regarding
|
||||
this.</li>
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
<h1>Changes from ns-3.13 to ns-3.14</h1>
|
||||
|
||||
<h2>New API:</h2>
|
||||
<ul>
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
Note:
|
||||
|
||||
This is a custom and unsupported fork of NS-3 simulator (http://www.nsnam.org/).
|
||||
|
||||
**The code in this repository is frequently rebased on top of the latest ns-3-dev branch**
|
||||
|
||||
|
||||
The Network Simulator, Version 3
|
||||
--------------------------------
|
||||
|
||||
@@ -9,36 +9,204 @@ http://www.nsnam.org including tutorials: http://www.nsnam.org/tutorials.html
|
||||
Consult the file CHANGES.html for more detailed information about changed
|
||||
API and behavior across ns-3 releases.
|
||||
|
||||
Release 3-dev
|
||||
=============
|
||||
|
||||
Availability
|
||||
------------
|
||||
This release is not yet available.
|
||||
|
||||
Supported platforms
|
||||
-------------------
|
||||
To be determined
|
||||
|
||||
New user-visible features
|
||||
-------------------------
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
|
||||
Known issues
|
||||
------------
|
||||
In general, known issues are tracked on the project tracker available
|
||||
at http://www.nsnam.org/bugzilla/
|
||||
|
||||
Release 3.16
|
||||
============
|
||||
|
||||
Availability
|
||||
------------
|
||||
This release is available from:
|
||||
http://www.nsnam.org/release/ns-allinone-3.16.tar.bz2
|
||||
|
||||
Supported platforms
|
||||
-------------------
|
||||
- Fedora Core 17 (32/64 bit) with g++-4.7.0
|
||||
- Fedora Core 15 (64 bit) with g++-4.6.3
|
||||
- Ubuntu 12.10 (32/64 bit) with g++-4.6.3
|
||||
- Ubuntu 12.04 (32/64 bit) with g++-4.6.3
|
||||
- Ubuntu 10.04.4 LTS (64 bit) with g++-4.4.3
|
||||
- OS X Mountain Lion 10.8.3 with g++-4.2.1
|
||||
- FreeBSD 8.2 (32 bit) with g++-4.2.1
|
||||
- Cygwin 1.7.9-1 with g++-4.5.3
|
||||
|
||||
New user-visible features
|
||||
-------------------------
|
||||
- Support several new LTE MAC schedulers developed in GSoC 2012 project.
|
||||
Those schedulers include FD-MT, TD-MT, TTA, FD-BET, TD-BET, FD-TBFQ,
|
||||
TD-TBFQ, PSS. Here, FD and TD mean frequency domain and time domain
|
||||
respectively.
|
||||
- It's now possible to use distcc when building ns-3 by using
|
||||
$ CXX='distcc g++' ./waf configure
|
||||
$ ./waf build
|
||||
- Support topology generation with the (external) BRITE topology generation
|
||||
tool
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
- bug 555 - DCF immediate access
|
||||
- bug 976 - wifi-wired-bridging regression test fails because of
|
||||
rounding errors in mobility model
|
||||
- bug 1055: Wrong UAN's Thorp absorption loss model formula
|
||||
- bug 1284 - ./test.py performance tests do not exist
|
||||
- bug 1324 - ns3tcp-cwnd-test-suite.cc test failing
|
||||
- bug 1340 - ns3tcp-loss-suite.cc tests failing
|
||||
- bug 1342 - ns3tcp-cwnd-test-suite.cc tests failing
|
||||
- bug 1345 - ns-3 builds with clang compiler >= 3.0
|
||||
- bug 1359 - TCP cannot receive ICMP
|
||||
- bug 1361 - Set TOS from Application level (sockets)
|
||||
- bug 1463 - ./test.py --example should automatically detect the path
|
||||
- bug 1479 - When the Ipv4RawSocket "IpHeaderInclude" Attribute set true,
|
||||
Ip Checksum error
|
||||
- bug 1485 - Setting global properties in config file (raw text) does
|
||||
not have any effect
|
||||
- bug 1493 - test.py --list should show the test type default tip
|
||||
- bug 1493 - test.py --list should show the test type
|
||||
- bug 1494 - test.py --constrain doesn't work
|
||||
- bug 1495 - test.py claims test passed when no test was run
|
||||
- bug 1506: TCP data segment piggybacking acknowledgment
|
||||
- bug 1509 - RttEstimator returns invalid value in presence of errors
|
||||
- bug 1516 - GtkConfigStore does not show read-only attributes
|
||||
- bug 1520 - Config paths not fully documented (partial fix)
|
||||
- bug 1524 - Fragmentation Threshold equals to Packet Size at MAC Layer
|
||||
(Data + IP + UDP) crash the reception
|
||||
- bug 1525 - Linker error with mpi on Mac 10.8
|
||||
- bug 1526: Wrong calculation of pathloss within
|
||||
UanPropModelThorp::GetPathLossDb
|
||||
- bug 1527 - Ipv4RawSocket's BindToNetDevice not working
|
||||
- bug 1528 - BindToNetDevice not working for IPv6 sockets
|
||||
- bug 1531 - Crash when using NS_LOG in destructors of static objects
|
||||
- bug 1532 - unimplemented LTE Scheduler methods
|
||||
|
||||
Known issues
|
||||
------------
|
||||
In general, known issues are tracked on the project tracker available
|
||||
at http://www.nsnam.org/bugzilla/
|
||||
|
||||
Release 3.15
|
||||
============
|
||||
|
||||
Availability
|
||||
------------
|
||||
This release is available from:
|
||||
http://www.nsnam.org/release/ns-allinone-3.15.tar.bz2
|
||||
|
||||
Supported platforms
|
||||
-------------------
|
||||
- Fedora Core 17 (32/64 bit) with g++-4.7.0
|
||||
- Fedora Core 15 (64 bit) with g++-4.6.3
|
||||
- Ubuntu 12.04 (32/64 bit) with g++-4.6.3
|
||||
- Ubuntu 10.04.4 LTS (64 bit) with g++-4.4.3
|
||||
- OS X Mountain Lion 10.7.4 with g++-4.2.1
|
||||
- OS X Snow Leopard 10.6.8 with g++-4.2.1
|
||||
- FreeBSD 8.2 (32 bit) with g++-4.2.1
|
||||
- Cygwin 1.7.9-1 with g++-4.5.3
|
||||
|
||||
New user-visible features
|
||||
-------------------------
|
||||
- A new random variable base class called 'RandomVariableStream', has been
|
||||
introduced. This base class derives from ns3::Object, unlike the current
|
||||
'RandomVariable' class which is a special type of object in the ns-3
|
||||
system to date. By making this class derive from ns3::Object, it can be
|
||||
handled with the Ptr class, can carry attributes, and can have its parameters
|
||||
and initial state saved in the config-store subsystem. A new attribute
|
||||
called "Stream" has been introduced for this class, to allow users to
|
||||
better control the assignment of underlying pseudo-random sequences to
|
||||
the RandomVariableStream objects (bug 101).
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
- bug 101 - random variable initialization
|
||||
- bug 1256 - Unnecessary SND.NXT advance, missing ACK for Out of Order segments
|
||||
- bug 1308 - Nix-vector; do not process packets to self
|
||||
- bug 1386 - assert if PositionAllocator not provided to
|
||||
RandomWaypointMobilityModel
|
||||
- bug 1399 - TCP not backing off retransmissions properly
|
||||
- bug 1441 - IPv4 header length handling
|
||||
- bug 1464 - ConfigStore Save + Load => Could not set default value
|
||||
for ns3::UdpSocketImpl::IcmpCallback
|
||||
- bug 1470 - define default parameter for constructor in .h file
|
||||
- bug 1473 - GetQueue/SetQueue missing from Csma python bindings
|
||||
- bug 1475 - "test.py --list" should sort the output
|
||||
- bug 1476 - TestCase::GetName () should not be private
|
||||
- bug 1477 - Click doesn't work with raw sockets
|
||||
- bug 1481 - Openflow example doesn't run
|
||||
- bug 1486 - Segfaults in nix-vector-routing with bridges
|
||||
- bug 1489 - Jakes Log component is missing
|
||||
- fixed bug with multiple LCs in UL BSR
|
||||
- fixed bug with lena-dual-stripe crashes with --homeUesHomeEnbRatio=2
|
||||
|
||||
Known issues
|
||||
------------
|
||||
In general, known issues are tracked on the project tracker available
|
||||
at http://www.nsnam.org/bugzilla/
|
||||
|
||||
Release 3.14.1
|
||||
==============
|
||||
|
||||
Availability
|
||||
------------
|
||||
This release is available from:
|
||||
http://www.nsnam.org/release/ns-allinone-3.14.1.tar.bz2
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
This hotfix release contains a fix for the PyViz visualizer and makes it
|
||||
easier to add PyViz support to examples; otherwise it is the same as the
|
||||
ns-3.14 release.
|
||||
|
||||
Release 3.14
|
||||
============
|
||||
|
||||
Availability
|
||||
------------
|
||||
This release not yet available.
|
||||
This release is available from:
|
||||
http://www.nsnam.org/release/ns-allinone-3.14.tar.bz2
|
||||
|
||||
Supported platforms
|
||||
-------------------
|
||||
ns-3.14 has been tested on the following platforms. Not all features are
|
||||
available on all platforms; check the Installation page on the project wiki.
|
||||
|
||||
- Ubuntu 12.04 (32/64 bit) with g++-4.6.3
|
||||
- Ubuntu 10.04.4 LTS (64 bit) with g++-4.4.3
|
||||
- Fedora Core 17 (32/64 bit) with g++-4.7.0
|
||||
- Fedora Core 16 (32/64 bit) with g++-4.6.3
|
||||
- Fedora Core 15 (64 bit) with g++-4.6.3
|
||||
- Ubuntu 12.04 (32/64 bit) with g++-4.6.3
|
||||
- Ubuntu 11.10 (32 bit) with g++-4.6.1
|
||||
- OS X Lion with g++-4.2.1
|
||||
- OS X Snow Leopard with g++-4.2.1
|
||||
- Ubuntu 10.04.4 LTS (64 bit) with g++-4.4.3
|
||||
- OS X Lion 10.7.4 with g++-4.2.1
|
||||
- OS X Snow Leopard 10.6.8 with g++-4.2.1
|
||||
- FreeBSD 8.2 (32 bit) with g++-4.2.1
|
||||
- Cygwin 1.7.9-1 with g++-4.5.3
|
||||
|
||||
New user-visible features
|
||||
-------------------------
|
||||
- Transport protocol implementations (TCP, UDP) have been refactored to
|
||||
support also IPv6 connections. Dual-stacked IPv6 sockets are implemented.
|
||||
An IPv6 socket can accept an IPv4 connection, returning the senders
|
||||
An IPv6 socket can accept an IPv4 connection, returning the sender's
|
||||
address as an IPv4-mapped address (IPV6_V6ONLY socket option is not
|
||||
implemented).
|
||||
- The LTE code from the LENA project has been merged, bringin in a
|
||||
- The LTE code from the LENA project has been merged, bringing in a
|
||||
significant redesign of the LTE module as well as many new features.
|
||||
- An antenna module is now included, which includes different
|
||||
radiation pattern models. See the corresponding new section of the
|
||||
@@ -50,7 +218,7 @@ New user-visible features
|
||||
- The Dynamic Source Routing (DSR) MANET routing protocol for IPv4 was added.
|
||||
- A Random Early Detection (RED) queue model has been added.
|
||||
- Ipv6RoutingHelper is now in-line with Ipv4RoutingHelper concerning the RT
|
||||
print functions. Various minor changes made in Ipv6RoutingProtocol and
|
||||
print functions. Various minor changes were made in Ipv6RoutingProtocol and
|
||||
derived classes to make this possible.
|
||||
- New "SendIcmpv6Redirect" attribute (and getter/setter functions) to
|
||||
Ipv6L3Protocol. The behavior is similar to Linux's conf "send_redirects",
|
||||
@@ -58,12 +226,12 @@ New user-visible features
|
||||
- Longer and more descriptive names are used for error units in RateErrorModel
|
||||
class and queue mode in Queue class. Attributes in those classes are also
|
||||
changed for consistency. See API documentation for details.
|
||||
- The netanim animator is now included with the release.
|
||||
- The netanim animator is now bundled with the release.
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
- bug 631 - RealtimeSimulatorImpl does not handle Ctrl-C with python bindings
|
||||
- bug 603 - Simulator::Next is useless
|
||||
- bug 631 - RealtimeSimulatorImpl does not handle Ctrl-C with python bindings
|
||||
- bug 962 - list of paths to reach objects contains bogus entries
|
||||
- bug 1000 - Make RealtimeSimulatorImpl last until stop
|
||||
- bug 1053 - Need better error diagnostics in ns2-mobility-trace example
|
||||
@@ -103,10 +271,12 @@ Bugs fixed
|
||||
- bug 1393 - IPv6 Routing Helper RT Print functions
|
||||
- bug 1395 - AODV DeferredRouteOutputTag missing constructor
|
||||
- bug 1396 - ARP with hardware addresses longer than 6 bytes
|
||||
- bug 1399 - TCP not backing off retransmissions properly
|
||||
- bug 1404 - Bound user input in tutorial third.cc program
|
||||
- bug 1406 - waf exits with maximum recursion depth exceeded
|
||||
- bug 1415 - examples-to-run.py doesn't work with command line arguments
|
||||
- bug 1420 - bug 1420: no python bindings for csma-layout
|
||||
- bug 1420 - no python bindings for csma-layout
|
||||
- bug 1441 - IPv4 header length handling
|
||||
|
||||
Known issues
|
||||
------------
|
||||
|
||||
@@ -409,7 +409,6 @@ class python_scan_task_collector(Task.TaskBase):
|
||||
# can't cope with it, so we have to force the user to restart
|
||||
# WAF)
|
||||
self.bld.producer.stop = 1
|
||||
self.bld.producer.free_task_pool()
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Process doxygen.warnings.log to generate sorted list of top offenders
|
||||
|
||||
# Flag to skip running doxygen
|
||||
skipdoxy=${1:-""}
|
||||
|
||||
DIR=`dirname $0`
|
||||
ROOT=`hg root`
|
||||
# Final resting place for the log file
|
||||
log=$DIR/doxygen.warnings.log
|
||||
|
||||
|
||||
# First, we have to modify doxygen.conf to generate all the warnings
|
||||
# (We also suppress dot graphs, so shorten the run time.)
|
||||
|
||||
if [ "$skipdoxy" == "" ]; then
|
||||
|
||||
conf=$DIR/doxygen.conf
|
||||
|
||||
sed -i.bak -E '/^EXTRACT_ALL |^HAVE_DOT |^WARNINGS /s/YES/no/' $conf
|
||||
rm -f $conf.bak
|
||||
|
||||
echo -n "Rebuilding doxygen docs with full errors..."
|
||||
(cd $ROOT && ./waf --doxygen >/dev/null 2>&1)
|
||||
status=$?
|
||||
|
||||
hg revert $conf
|
||||
|
||||
if [ "$status" = "0" ]; then
|
||||
echo "Done."
|
||||
else
|
||||
echo "FAILED."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mv $DIR/doxygen.log $log
|
||||
|
||||
else
|
||||
echo "Skipping doxygen run, using existing log file $log"
|
||||
fi
|
||||
|
||||
|
||||
# Analyze the log
|
||||
|
||||
# List of module directories (e.g, "src/core/model")
|
||||
undocmods=$( \
|
||||
grep "^$ROOT" "$log" | \
|
||||
cut -d ':' -f 1 | \
|
||||
sed "s|$ROOT||g" | \
|
||||
cut -d '/' -f 2-4 | \
|
||||
sort | \
|
||||
uniq -c | \
|
||||
sort -nr \
|
||||
)
|
||||
|
||||
|
||||
# Number of directories
|
||||
modcount=$( \
|
||||
echo "$undocmods" | \
|
||||
wc -l | \
|
||||
sed 's/^[ \t]*//;s/[ \t]*$//' \
|
||||
)
|
||||
|
||||
# For a function with multiple undocumented parameters,
|
||||
# Doxygen prints the additional parameters on separate lines,
|
||||
# so they don't show up in the totals above.
|
||||
# Rather than work too hard to get the exact number,
|
||||
# we just list the total here.
|
||||
addlparam=$( \
|
||||
grep -v "^$ROOT" $log | \
|
||||
grep -v "not generated, too many nodes" | \
|
||||
grep "^ parameter '" $log | \
|
||||
wc -l | \
|
||||
sed 's/^[ \t]*//;s/[ \t]*$//' \
|
||||
)
|
||||
|
||||
# Total number of warnings
|
||||
warncount=$(echo "$undocmods" | \
|
||||
awk '{total += $1}; END {print total}' )
|
||||
warncount=$((warncount + addlparam))
|
||||
|
||||
# List of files appearing in the log
|
||||
undocfiles=$( \
|
||||
grep "^$ROOT" "$log" | \
|
||||
cut -d ':' -f 1 | \
|
||||
sed "s|$ROOT||g" | \
|
||||
cut -d '/' -f 2- | \
|
||||
sort | \
|
||||
uniq -c | \
|
||||
sort -k 2 \
|
||||
)
|
||||
|
||||
# Total number of files
|
||||
filecount=$( \
|
||||
echo "$undocfiles" | \
|
||||
wc -l | \
|
||||
sed 's/^[ \t]*//;s/[ \t]*$//' \
|
||||
)
|
||||
|
||||
# Now we're ready to summarize the log
|
||||
|
||||
echo
|
||||
echo "Report of Doxygen warnings"
|
||||
echo "----------------------------------------"
|
||||
echo
|
||||
echo "(All counts are lower bounds.)"
|
||||
echo
|
||||
echo "Warnings by module/directory:"
|
||||
echo
|
||||
echo "Count Directory"
|
||||
echo "----- ----------------------------------"
|
||||
echo "$undocmods"
|
||||
echo " $addlparam additional undocumented parameters."
|
||||
echo "----------------------------------------"
|
||||
printf "%6d total warnings\n" $warncount
|
||||
printf "%6d directories with warnings\n" $modcount
|
||||
echo
|
||||
echo
|
||||
echo "Warnings by file"
|
||||
echo
|
||||
echo "Count File"
|
||||
echo "----- ----------------------------------"
|
||||
echo "$undocfiles"
|
||||
echo "----------------------------------------"
|
||||
printf "%6d files with warnings\n" $filecount
|
||||
echo
|
||||
echo
|
||||
echo "Doxygen Warnings Summary"
|
||||
echo "----------------------------------------"
|
||||
printf "%6d directories\n" $modcount
|
||||
printf "%6d files\n" $filecount
|
||||
printf "%6d warnings\n" $warncount
|
||||
@@ -31,7 +31,9 @@ IMAGES_TO_CLEAN = $(IMAGES_PNG_CONVERTED) $(IMAGES_PDF) $(IMAGES_EPS)
|
||||
%.eps : %.dia; $(DIA) -t eps $< -e $@
|
||||
%.png : %.dia; $(DIA) -t png $< -e $@
|
||||
%.png : %.eps; $(CONVERT) $< $@
|
||||
%.pdf : %.eps; $(EPSTOPDF) $< -o=$@; if test x$($@_width) != x; then TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi
|
||||
%.pdf : %.eps;
|
||||
$(EPSTOPDF) $< -o=$@
|
||||
if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi
|
||||
|
||||
|
||||
# You can set these variables from the command line.
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
TMPDIR=/tmp
|
||||
|
||||
TMPFILE=`mktemp`
|
||||
|
||||
echo "\documentclass{book}
|
||||
@@ -8,5 +10,5 @@ echo "\documentclass{book}
|
||||
\includepdf[width=${1},fitpaper]{${2}}
|
||||
\end{document}" >${TMPFILE}.tex
|
||||
pdflatex -output-directory /tmp ${TMPFILE}.tex >/dev/null 2>/dev/null
|
||||
cp ${TMPFILE}.pdf ${3}
|
||||
|
||||
cp ${TMPFILE}.pdf ${2}
|
||||
rm -f ${TMPFILE}{,.{tex,aux,log,pdf}}
|
||||
@@ -856,18 +856,25 @@ presentation.
|
||||
To use this feature, one must install libgtk and libgtk-dev; an example
|
||||
Ubuntu installation command is:::
|
||||
|
||||
sudo apt-get install libgtk2.0-0 libgtk2.0-dev
|
||||
sudo apt-get install libgtk2.0-0 libgtk2.0-dev
|
||||
|
||||
To check whether it is configured or not, check the output of the step:::
|
||||
./waf configure --enable-examples --enable-tests
|
||||
|
||||
---- Summary of optional NS-3 features:
|
||||
Threading Primitives : enabled
|
||||
Real Time Simulator : enabled
|
||||
GtkConfigStore : not enabled (library 'gtk+-2.0 >= 2.12' not found)
|
||||
./waf configure --enable-examples --enable-tests
|
||||
|
||||
---- Summary of optional NS-3 features:
|
||||
Python Bindings : enabled
|
||||
Python API Scanning Support : enabled
|
||||
NS-3 Click Integration : enabled
|
||||
GtkConfigStore : not enabled (library 'gtk+-2.0 >= 2.12' not found)
|
||||
|
||||
In the above example, it was not enabled, so it cannot be used until a suitable
|
||||
version is installed and ./waf configure --enable-examples --enable-tests; ./waf is rerun.
|
||||
version is installed and::
|
||||
|
||||
./waf configure --enable-examples --enable-tests
|
||||
./waf
|
||||
|
||||
is rerun.
|
||||
|
||||
Usage is almost the same as the non-GTK-based version, but there
|
||||
are no ConfigStore attributes involved:::
|
||||
|
||||
@@ -253,3 +253,333 @@ Here is an example of the usage::
|
||||
SpecificFunctor<A, int> sf(&a, &A::Hello);
|
||||
sf(5);
|
||||
}
|
||||
|
||||
.. note:: The previous code is not real ns-3 code. It is simplistic example
|
||||
code used only to illustrate the concepts involved and to help you understand
|
||||
the system more. Do not expect to find this code anywhere in the ns-3 tree.
|
||||
|
||||
Notice that there are two variables defined in the class above. The m_p
|
||||
variable is the object pointer and m_pmi is the variable containing the
|
||||
address of the function to execute.
|
||||
|
||||
Notice that when ``operator()`` is called, it in turn calls the method provided
|
||||
with the object pointer using the C++ PMI syntax.
|
||||
|
||||
To use this, one could then declare some model code that takes a generic functor
|
||||
as a parameter::
|
||||
|
||||
void LibraryFunction (Functor functor);
|
||||
|
||||
The code that will talk to the model would build a specific functor and pass it to ``LibraryFunction``::
|
||||
|
||||
MyClass myClass;
|
||||
SpecificFunctor<MyClass, int> functor (&myclass, MyClass::MyMethod);
|
||||
|
||||
When ``LibraryFunction`` is done, it executes the callback using the
|
||||
``operator()`` on the generic functor it was passed, and in this particular
|
||||
case, provides the integer argument::
|
||||
|
||||
void
|
||||
LibraryFunction (Functor functor)
|
||||
{
|
||||
// Execute the library function
|
||||
functor(1234);
|
||||
}
|
||||
|
||||
Notice that ``LibraryFunction`` is completely decoupled from the specific
|
||||
type of the client. The connection is made through the Functor polymorphism.
|
||||
|
||||
The Callback API in |ns3| implements object-oriented callbacks using
|
||||
the functor mechanism. This callback API, being based on C++ templates, is
|
||||
type-safe; that is, it performs static type checks to enforce proper signature
|
||||
compatibility between callers and callees. It is therefore more type-safe to
|
||||
use than traditional function pointers, but the syntax may look imposing at
|
||||
first. This section is designed to walk you through the Callback system so
|
||||
that you can be comfortable using it in |ns3|.
|
||||
|
||||
Using the Callback API
|
||||
**********************
|
||||
|
||||
The Callback API is fairly minimal, providing only two services:
|
||||
|
||||
1. callback type declaration: a way to declare a type of callback
|
||||
with a given signature, and,
|
||||
|
||||
2. callback instantiation: a way to instantiate a
|
||||
template-generated forwarding callback which can forward any calls
|
||||
to another C++ class member method or C++ function.
|
||||
|
||||
This is best observed via walking through an example, based on
|
||||
``samples/main-callback.cc``.
|
||||
|
||||
Using the Callback API with static functions
|
||||
++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
Consider a function::
|
||||
|
||||
static double
|
||||
CbOne (double a, double b)
|
||||
{
|
||||
std::cout << "invoke cbOne a=" << a << ", b=" << b << std::endl;
|
||||
return a;
|
||||
}
|
||||
|
||||
Consider also the following main program snippet::
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
// return type: double
|
||||
// first arg type: double
|
||||
// second arg type: double
|
||||
Callback<double, double, double> one;
|
||||
}
|
||||
|
||||
This is an example of a C-style callback -- one which does not include or need
|
||||
a ``this`` pointer. The function template ``Callback`` is essentially the
|
||||
declaration of the variable containing the pointer-to-function. In the example
|
||||
above, we explicitly showed a pointer to a function that returned an integer and
|
||||
took a single integer as a parameter, The ``Callback`` template function is
|
||||
a generic version of that -- it is used to declare the type of a callback.
|
||||
|
||||
.. note:: Readers unfamiliar with C++ templates may consult `<http://www.cplusplus.com/doc/tutorial/templates/>`_.
|
||||
|
||||
The ``Callback`` template requires one mandatory argument (the return type
|
||||
of the function to be assigned to this callback) and up to five optional
|
||||
arguments, which each specify the type of the arguments (if your particular
|
||||
callback function has more than five arguments, then this can be handled
|
||||
by extending the callback implementation).
|
||||
|
||||
So in the above example, we have a declared a callback named "one" that will
|
||||
eventually hold a function pointer. The signature of the function that it will
|
||||
hold must return double and must support two double arguments. If one tries
|
||||
to pass a function whose signature does not match the declared callback,
|
||||
a compilation error will occur. Also, if one tries to assign to a callback
|
||||
an incompatible one, compilation will succeed but a run-time
|
||||
NS_FATAL_ERROR will be raised. The sample program
|
||||
``src/core/examples/main-callback.cc`` demonstrates both of these error cases
|
||||
at the end of the ``main()`` program.
|
||||
|
||||
Now, we need to tie together this callback instance and the actual target function
|
||||
(CbOne). Notice above that CbOne has the same function signature types as the
|
||||
callback-- this is important. We can pass in any such properly-typed function
|
||||
to this callback. Let's look at this more closely::
|
||||
|
||||
static double CbOne (double a, double b) {}
|
||||
^ ^ ^
|
||||
| ---| ------|
|
||||
| | |
|
||||
Callback<double, double, double> one;
|
||||
|
||||
You can only bind a function to a callback if they have the matching signature.
|
||||
The first template argument is the return type, and the additional template
|
||||
arguments are the types of the arguments of the function signature.
|
||||
|
||||
Now, let's bind our callback "one" to the function that matches its signature::
|
||||
|
||||
// build callback instance which points to cbOne function
|
||||
one = MakeCallback (&CbOne);
|
||||
|
||||
This call to ``MakeCallback`` is, in essence, creating one of the specialized
|
||||
functors mentioned above. The variable declared using the ``Callback``
|
||||
template function is going to be playing the part of the generic functor. The
|
||||
assignment ``one = MakeCallback (&CbOne)`` is the cast that converts the
|
||||
specialized functor known to the callee to a generic functor known to the caller.
|
||||
|
||||
Then, later in the program, if the callback is needed, it can be used as follows::
|
||||
|
||||
NS_ASSERT (!one.IsNull ());
|
||||
|
||||
// invoke cbOne function through callback instance
|
||||
double retOne;
|
||||
retOne = one (10.0, 20.0);
|
||||
|
||||
The check for ``IsNull()`` ensures that the callback is not null -- that there
|
||||
is a function to call behind this callback. Then, ``one()`` executes the
|
||||
generic ``operator()`` which is really overloaded with a specific implementation
|
||||
of ``operator()`` and returns the same result as if ``CbOne()`` had been
|
||||
called directly.
|
||||
|
||||
Using the Callback API with member functions
|
||||
++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
Generally, you will not be calling static functions but instead public member
|
||||
functions of an object. In this case, an extra argument is needed to the
|
||||
MakeCallback function, to tell the system on which object the function should be
|
||||
invoked. Consider this example, also from main-callback.cc::
|
||||
|
||||
class MyCb {
|
||||
public:
|
||||
int CbTwo (double a) {
|
||||
std::cout << "invoke cbTwo a=" << a << std::endl;
|
||||
return -5;
|
||||
}
|
||||
};
|
||||
|
||||
int main ()
|
||||
{
|
||||
...
|
||||
// return type: int
|
||||
// first arg type: double
|
||||
Callback<int, double> two;
|
||||
MyCb cb;
|
||||
// build callback instance which points to MyCb::cbTwo
|
||||
two = MakeCallback (&MyCb::CbTwo, &cb);
|
||||
...
|
||||
}
|
||||
|
||||
Here, we pass an additional object pointer to the ``MakeCallback<>`` function.
|
||||
Recall from the background section above that ``Operator()`` will use the pointer to
|
||||
member syntax when it executes on an object::
|
||||
|
||||
virtual int operator() (ARG arg)
|
||||
{
|
||||
(*m_p.*m_pmi)(arg);
|
||||
}
|
||||
|
||||
And so we needed to provide the two variables (``m_p`` and ``m_pmi``) when
|
||||
we made the specific functor. The line::
|
||||
|
||||
two = MakeCallback (&MyCb::CbTwo, &cb);
|
||||
|
||||
does precisely that. In this case, when ``two ()`` is invoked::
|
||||
|
||||
int result = two (1.0);
|
||||
|
||||
will result in a call tothe ``CbTwo`` member function (method) on the object
|
||||
pointed to by ``&cb``.
|
||||
|
||||
Building Null Callbacks
|
||||
+++++++++++++++++++++++
|
||||
|
||||
It is possible for callbacks to be null; hence it may be wise to
|
||||
check before using them. There is a special construct for a null
|
||||
callback, which is preferable to simply passing "0" as an argument;
|
||||
it is the ``MakeNullCallback<>`` construct::
|
||||
|
||||
two = MakeNullCallback<int, double> ();
|
||||
NS_ASSERT (two.IsNull ());
|
||||
|
||||
Invoking a null callback is just like invoking a null function pointer: it will
|
||||
crash at runtime.
|
||||
|
||||
Bound Callbacks
|
||||
***************
|
||||
|
||||
A very useful extension to the functor concept is that of a Bound Callback.
|
||||
Previously it was mentioned that closures were originally function calls
|
||||
packaged up for later execution. Notice that in all of the Callback
|
||||
descriptions above, there is no way to package up any parameters for use
|
||||
later -- when the ``Callback`` is called via ``operator()``. All of
|
||||
the parameters are provided by the calling function.
|
||||
|
||||
What if it is desired to allow the client function (the one that provides the
|
||||
callback) to provide some of the parameters? `Alexandrescu <http://erdani.com/book/main.html>`_ calls the process of
|
||||
allowing a client to specify one of the parameters *"binding"*. One of the
|
||||
parameters of ``operator()`` has been bound (fixed) by the client.
|
||||
|
||||
Some of our pcap tracing code provides a nice example of this. There is a
|
||||
function that needs to be called whenever a packet is received. This function
|
||||
calls an object that actually writes the packet to disk in the pcap file
|
||||
format. The signature of one of these functions will be::
|
||||
|
||||
static void DefaultSink (Ptr<PcapFileWrapper> file, Ptr<const Packet> p);
|
||||
|
||||
The static keyword means this is a static function which does not need a
|
||||
``this`` pointer, so it will be using C-style callbacks. We don't want the
|
||||
calling code to have to know about anything but the Packet. What we want in
|
||||
the calling code is just a call that looks like::
|
||||
|
||||
m_promiscSnifferTrace (m_currentPkt);
|
||||
|
||||
What we want to do is to *bind* the ``Ptr<PcapFileWriter> file`` to the
|
||||
specific callback implementation when it is created and arrange for the
|
||||
``operator()`` of the Callback to provide that parameter for free.
|
||||
|
||||
We provide the ``MakeBoundCallback`` template function for that purpose. It
|
||||
takes the same parameters as the ``MakeCallback`` template function but also
|
||||
takes the parameters to be bound. In the case of the example above::
|
||||
|
||||
MakeBoundCallback (&DefaultSink, file);
|
||||
|
||||
will create a specific callback implementation that knows to add in the extra
|
||||
bound arguments. Conceptually, it extends the specific functor described above
|
||||
with one or more bound arguments::
|
||||
|
||||
template <typename T, typename ARG, typename BOUND_ARG>
|
||||
class SpecificFunctor : public Functor
|
||||
{
|
||||
public:
|
||||
SpecificFunctor(T* p, int (T::*_pmi)(ARG arg), BOUND_ARG boundArg)
|
||||
{
|
||||
m_p = p;
|
||||
m_pmi = pmi;
|
||||
m_boundArg = boundArg;
|
||||
}
|
||||
|
||||
virtual int operator() (ARG arg)
|
||||
{
|
||||
(*m_p.*m_pmi)(m_boundArg, arg);
|
||||
}
|
||||
private:
|
||||
void (T::*m_pmi)(ARG arg);
|
||||
T* m_p;
|
||||
BOUND_ARG m_boundArg;
|
||||
};
|
||||
|
||||
You can see that when the specific functor is created, the bound argument is saved
|
||||
in the functor / callback object itself. When the ``operator()`` is invoked with
|
||||
the single parameter, as in::
|
||||
|
||||
m_promiscSnifferTrace (m_currentPkt);
|
||||
|
||||
the implementation of ``operator()`` adds the bound parameter into the actual
|
||||
function call::
|
||||
|
||||
(*m_p.*m_pmi)(m_boundArg, arg);
|
||||
|
||||
Traced Callbacks
|
||||
****************
|
||||
*Placeholder subsection*
|
||||
|
||||
Callback locations in ns-3
|
||||
**************************
|
||||
|
||||
Where are callbacks frequently used in |ns3|? Here are some of the
|
||||
more visible ones to typical users:
|
||||
|
||||
* Socket API
|
||||
* Layer-2/Layer-3 API
|
||||
* Tracing subsystem
|
||||
* API between IP and routing subsystems
|
||||
|
||||
Implementation details
|
||||
**********************
|
||||
|
||||
The code snippets above are simplistic and only designed to illustrate the mechanism
|
||||
itself. The actual Callback code is quite complicated and very template-intense and
|
||||
a deep understanding of the code is not required. If interested, expert users may
|
||||
find the following useful.
|
||||
|
||||
The code was originally written based on the techniques described in
|
||||
`<http://www.codeproject.com/cpp/TTLFunction.asp>`_.
|
||||
It was subsequently rewritten to follow the architecture outlined in
|
||||
`Modern C++ Design, Generic Programming and Design Patterns Applied, Alexandrescu, chapter 5, Generalized Functors <http://www.moderncppdesign.com/book/main.html>`_.
|
||||
|
||||
This code uses:
|
||||
|
||||
* default template parameters to saves users from having to
|
||||
specify empty parameters when the number of parameters
|
||||
is smaller than the maximum supported number
|
||||
* the pimpl idiom: the Callback class is passed around by
|
||||
value and delegates the crux of the work to its pimpl pointer.
|
||||
* two pimpl implementations which derive from CallbackImpl
|
||||
FunctorCallbackImpl can be used with any functor-type
|
||||
while MemPtrCallbackImpl can be used with pointers to
|
||||
member functions.
|
||||
* a reference list implementation to implement the Callback's
|
||||
value semantics.
|
||||
|
||||
This code most notably departs from the Alexandrescu implementation in that it
|
||||
does not use type lists to specify and pass around the types of the callback
|
||||
arguments. Of course, it also does not use copy-destruction semantics and
|
||||
relies on a reference list rather than autoPtr to hold the pointer.
|
||||
@@ -91,7 +91,7 @@ pygments_style = 'sphinx'
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'default'
|
||||
html_theme = 'ns3_html_theme'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
@@ -99,11 +99,11 @@ html_theme = 'default'
|
||||
#html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = []
|
||||
html_theme_path = ['../..']
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = None
|
||||
html_title = 'Manual'
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
@@ -124,7 +124,7 @@ html_static_path = ['_static']
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
#html_last_updated_fmt = '%b %d, %Y'
|
||||
html_last_updated_fmt = '%b %d, %Y %H:%M'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
@@ -184,7 +184,7 @@ latex_documents = [
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
latex_logo = '../../ns3_html_theme/static/ns-3.png'
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
|
||||
@@ -0,0 +1,199 @@
|
||||
.. include:: replace.txt
|
||||
|
||||
.. heading hierarchy:
|
||||
------------- Chapter
|
||||
************* Section (#.#)
|
||||
============= Subsection (#.#.#)
|
||||
############# Paragraph (no number)
|
||||
|
||||
Events and Simulator
|
||||
--------------------
|
||||
|
||||
|ns3| is a discrete-event network simulator. Conceptually, the simulator
|
||||
keeps track of a number of events that are scheduled to execute at a
|
||||
specified simulation time. The job of the simulator is to execute the
|
||||
events in sequential time order. Once the completion of an event occurs,
|
||||
the simulator will move to the next event (or will exit if there are no
|
||||
more events in the event queue). If, for example, an event scheduled
|
||||
for simulation time "100 seconds" is executed, and the next event is not
|
||||
scheduled until "200 seconds", the simulator will immediately jump from
|
||||
100 seconds to 200 seconds (of simulation time) to execute the next event.
|
||||
This is what is meant by "discrete-event" simulator.
|
||||
|
||||
To make this all happen, the simulator needs a few things:
|
||||
|
||||
1) a simulator object that can access an event queue where events are
|
||||
stored and that can manage the execution of events
|
||||
2) a scheduler responsible for inserting and removing events from the queue
|
||||
3) a way to represent simulation time
|
||||
4) the events themselves
|
||||
|
||||
This chapter of the manual describes these fundamental objects
|
||||
(simulator, scheduler, time, event) and how they are used.
|
||||
|
||||
Event
|
||||
*****
|
||||
|
||||
*To be completed*
|
||||
|
||||
Simulator
|
||||
*********
|
||||
|
||||
The Simulator class is the public entry point to access event scheduling
|
||||
facilities. Once a couple of events have been scheduled to start the
|
||||
simulation, the user can start to execute them by entering the simulator
|
||||
main loop (call Simulator::Run). Once the main loop starts running, it
|
||||
will sequentially execute all scheduled events in order from oldest to
|
||||
most recent until there are either no more events left in the event
|
||||
queue or Simulator::Stop has been called.
|
||||
|
||||
To schedule events for execution by the simulator main loop, the
|
||||
Simulator class provides the Simulator::Schedule* family of functions.
|
||||
|
||||
1) Handling event handlers with different signatures
|
||||
|
||||
These functions are declared and implemented as C++ templates to handle
|
||||
automatically the wide variety of C++ event handler signatures used in
|
||||
the wild. For example, to schedule an event to execute 10 seconds in the
|
||||
future, and invoke a C++ method or function with specific arguments, you
|
||||
might write this:
|
||||
|
||||
::
|
||||
|
||||
void handler (int arg0, int arg1)
|
||||
{
|
||||
std::cout << "handler called with argument arg0=" << arg0 << " and
|
||||
arg1=" << arg1 << std::endl;
|
||||
}
|
||||
|
||||
Simulator::Schedule(Seconds(10), &handler, 10, 5);
|
||||
|
||||
Which will output:
|
||||
|
||||
::
|
||||
|
||||
handler called with argument arg0=10 and arg1=5
|
||||
|
||||
Of course, these C++ templates can also handle transparently member
|
||||
methods on C++ objects:
|
||||
|
||||
*To be completed: member method example*
|
||||
|
||||
Notes:
|
||||
|
||||
* the ns-3 Schedule methods recognize automatically functions and
|
||||
methods only if they take less than 5 arguments. If you need them to
|
||||
support more arguments, please, file a bug report.
|
||||
* Readers familiar with the term 'fully-bound functors' will recognize
|
||||
the Simulator::Schedule methods as a way to automatically construct such
|
||||
objects.
|
||||
|
||||
2) Common scheduling operations
|
||||
|
||||
The Simulator API was designed to make it really simple to schedule most
|
||||
events. It provides three variants to do so (ordered from most commonly
|
||||
used to least commonly used):
|
||||
|
||||
* Schedule methods which allow you to schedule an event in the future
|
||||
by providing the delay between the current simulation time and the
|
||||
expiration date of the target event.
|
||||
* ScheduleNow methods which allow you to schedule an event for the
|
||||
current simulation time: they will execute _after_ the current event is
|
||||
finished executing but _before_ the simulation time is changed for the
|
||||
next event.
|
||||
* ScheduleDestroy methods which allow you to hook in the shutdown
|
||||
process of the Simulator to cleanup simulation resources: every
|
||||
'destroy' event is executed when the user calls the Simulator::Destroy
|
||||
method.
|
||||
|
||||
3) Maintaining the simulation context
|
||||
|
||||
There are two basic ways to schedule events, with and without *context*.
|
||||
What does this mean?
|
||||
|
||||
::
|
||||
|
||||
Simulator::Schedule (Time const &time, MEM mem_ptr, OBJ obj);
|
||||
|
||||
vs.
|
||||
|
||||
::
|
||||
|
||||
Simulator::ScheduleWithContext (uint32_t context, Time const &time, MEM mem_ptr, OBJ obj);
|
||||
|
||||
Readers who invest time and effort in developing or using a non-trivial
|
||||
simulation model will know the value of the ns-3 logging framework to
|
||||
debug simple and complex simulations alike. One of the important
|
||||
features that is provided by this logging framework is the automatic
|
||||
display of the network node id associated with the 'currently' running
|
||||
event.
|
||||
|
||||
The node id of the currently executing network node is in fact tracked
|
||||
by the Simulator class. It can be accessed with the
|
||||
Simulator::GetContext method which returns the 'context' (a 32-bit
|
||||
integer) associated and stored in the currently-executing event. In some
|
||||
rare cases, when an event is not associated with a specific network
|
||||
node, its 'context' is set to 0xffffffff.
|
||||
|
||||
To associate a context to each event, the Schedule, and ScheduleNow
|
||||
methods automatically reuse the context of the currently-executing event
|
||||
as the context of the event scheduled for execution later.
|
||||
|
||||
In some cases, most notably when simulating the transmission of a packet
|
||||
from a node to another, this behavior is undesirable since the expected
|
||||
context of the reception event is that of the receiving node, not the
|
||||
sending node. To avoid this problem, the Simulator class provides a
|
||||
specific schedule method: ScheduleWithContext which allows one to
|
||||
provide explicitly the node id of the receiving node associated with
|
||||
the receive event.
|
||||
|
||||
*XXX: code example*
|
||||
|
||||
In some very rare cases, developers might need to modify or understand
|
||||
how the context (node id) of the first event is set to that of its
|
||||
associated node. This is accomplished by the NodeList class: whenever a
|
||||
new node is created, the NodeList class uses ScheduleWithContext to
|
||||
schedule a 'start' event for this node. The 'start' event thus executes
|
||||
with a context set to that of the node id and can use the normal variety
|
||||
of Schedule methods. It invokes the Node::Start method which propagates
|
||||
the 'start' event by calling the DoStart method for each object
|
||||
associated with the node. The DoStart method overridden in some of these
|
||||
objects (most notably in the Application base class) will schedule some
|
||||
events (most notably Application::StartApplication) which will in turn
|
||||
scheduling traffic generation events which will in turn schedule
|
||||
network-level events.
|
||||
|
||||
Notes:
|
||||
|
||||
* Users need to be careful to propagate DoStart methods across objects
|
||||
by calling Start explicitely on their member objects
|
||||
* The context id associated with each ScheduleWithContext method has
|
||||
other uses beyond logging: it is used by an experimental branch of ns-3
|
||||
to perform parallel simulation on multicore systems using
|
||||
multithreading.
|
||||
|
||||
The Simulator::* functions do not know what the context is: they
|
||||
merely make sure that whatever context you specify with
|
||||
ScheduleWithContext is available when the corresponding event executes
|
||||
with ::GetContext.
|
||||
|
||||
It is up to the models implemented on top of Simulator::* to interpret
|
||||
the context value. In ns-3, the network models interpret the context
|
||||
as the node id of the node which generated an event. This is why it is
|
||||
important to call ScheduleWithContext in ns3::Channel subclasses
|
||||
because we are generating an event from node i to node j and we want
|
||||
to make sure that the event which will run on node j has the right
|
||||
context.
|
||||
|
||||
Time
|
||||
****
|
||||
|
||||
*To be completed*
|
||||
|
||||
|
||||
Scheduler
|
||||
*********
|
||||
|
||||
*To be completed*
|
||||
|
||||
|
||||
@@ -11,10 +11,11 @@ be asked to contribute test code. Models that you contribute will be
|
||||
used for many years by other people, who probably have no idea upon
|
||||
first glance whether the model is correct. The test code that you
|
||||
write for your model will help to avoid future regressions in
|
||||
the output and will aid future users in understanding the validity
|
||||
the output and will aid future users in understanding the verification
|
||||
and bounds of applicability of your models.
|
||||
|
||||
There are many ways to test that a model is valid. In this chapter,
|
||||
There are many ways to verify the correctness of a model's implementation.
|
||||
In this section,
|
||||
we hope to cover some common cases that can be used as a guide to
|
||||
writing new tests.
|
||||
|
||||
@@ -31,15 +32,96 @@ TestSuite), these things need to be decided up front:
|
||||
separately in src/test/ directory). You will have to edit the wscript
|
||||
file in that directory to compile your new code, if it is a new file.
|
||||
|
||||
See the file ``src/template/test/sample-test-suite.cc`` and corresponding
|
||||
wscript file in that directory for a simple example, and see the directories
|
||||
under ``src/test`` for more complicated examples.
|
||||
A program called ``src/create-module.py`` is a good starting point.
|
||||
This program can be invoked such as ``create-module.py router`` for
|
||||
a hypothetical new module called ``router``. Once you do this, you
|
||||
will see a ``router`` directory, and a ``test/router-test-suite.cc``
|
||||
test suite. This file can be a starting point for your initial test.
|
||||
This is a working test suite, although the actual tests performed are
|
||||
trivial. Copy it over to your module's test directory, and do a global
|
||||
substitution of "Router" in that file for something pertaining to
|
||||
the model that you want to test. You can also edit things such as a
|
||||
more descriptive test case name.
|
||||
|
||||
*The rest of this chapter remains to be written*
|
||||
You also need to add a block into your wscript to get this test to
|
||||
compile:
|
||||
|
||||
::
|
||||
|
||||
module_test.source = [
|
||||
'test/router-test-suite.cc',
|
||||
]
|
||||
|
||||
Before you actually start making this do useful things, it may help
|
||||
to try to run the skeleton. Make sure that ns-3 has been configured with
|
||||
the "--enable-tests" option. Let's assume that your new test suite
|
||||
is called "router" such as here:
|
||||
|
||||
::
|
||||
|
||||
RouterTestSuite::RouterTestSuite ()
|
||||
: TestSuite ("router", UNIT)
|
||||
|
||||
Try this command:
|
||||
|
||||
::
|
||||
|
||||
./test.py -s router
|
||||
|
||||
Output such as below should be produced:
|
||||
|
||||
::
|
||||
|
||||
PASS: TestSuite router
|
||||
1 of 1 tests passed (1 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors)
|
||||
|
||||
See src/lte/test/test-lte-antenna.cc for a worked example.
|
||||
|
||||
Test macros
|
||||
***********
|
||||
|
||||
There are a number of macros available for checking test program
|
||||
output with expected output. These macros are defined in
|
||||
``src/core/model/test.h``.
|
||||
|
||||
The main set of macros that are used include the following:
|
||||
|
||||
::
|
||||
|
||||
NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
|
||||
NS_TEST_ASSERT_MSG_NE(actual, limit, msg)
|
||||
NS_TEST_ASSERT_MSG_LT(actual, limit, msg)
|
||||
NS_TEST_ASSERT_MSG_GT(actual, limit, msg)
|
||||
NS_TEST_ASSERT_MSG_EQ_TOL(actual, limit, tol, msg)
|
||||
|
||||
The first argument ``actual`` is the value under test, the second value
|
||||
``limit`` is the expected value (or the value to test against), and the
|
||||
last argument ``msg`` is the error message to print out if the test fails.
|
||||
|
||||
The first four macros above test for equality, inequality, less than, or
|
||||
greater than, respectively. The fifth macro above tests for equality,
|
||||
but within a certain tolerance. This variant is useful when testing
|
||||
floating point numbers for equality against a limit, where you want to
|
||||
avoid a test failure due to rounding errors.
|
||||
|
||||
Finally, there are variants of the above where the keyword ``ASSERT``
|
||||
is replaced by ``EXPECT``. These variants are designed specially for
|
||||
use in methods (especially callbacks) returning void. Reserve their
|
||||
use for callbacks that you use in your test programs; otherwise,
|
||||
use the ``ASSERT`` variants.
|
||||
|
||||
How to add an example program to the test suite
|
||||
***********************************************
|
||||
|
||||
One can "smoke test" that examples compile and run successfully
|
||||
to completion (without memory leaks) using the ``examples-to-run.py``
|
||||
script located in your module's test directory. Briefly, by including
|
||||
an instance of this file in your test directory, you can cause the
|
||||
test runner to execute the examples listed. It is usually best to make
|
||||
sure that you select examples that have reasonably short run times so as
|
||||
to not bog down the tests. See the example in ``src/lte/test/``
|
||||
directory.
|
||||
|
||||
Testing for boolean outcomes
|
||||
****************************
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ This document is written in `reStructuredText <http://docutils.sourceforge.net/r
|
||||
|
||||
organization
|
||||
random-variables
|
||||
events
|
||||
callbacks
|
||||
object-model
|
||||
attributes
|
||||
|
||||
@@ -1,7 +1,158 @@
|
||||
.. include:: replace.txt
|
||||
|
||||
.. heading hierarchy:
|
||||
------------- Chapter
|
||||
************* Section (#.#)
|
||||
============= Subsection (#.#.#)
|
||||
############# Paragraph (no number)
|
||||
|
||||
Logging
|
||||
-------
|
||||
|
||||
*This chapter not yet written. For now, the ns-3 tutorial contains logging
|
||||
information.*
|
||||
The |ns3| logging facility can be used to monitor or debug the progress
|
||||
of simulation programs. Logging output can be enabled by program statements
|
||||
in your ``main()`` program or by the use of the ``NS_LOG`` environment variable.
|
||||
|
||||
Logging statements are not compiled into optimized builds of |ns3|. To use
|
||||
logging, one must build the (default) debug build of |ns3|.
|
||||
|
||||
The project makes no guarantee about whether logging output will remain
|
||||
the same over time. Users are cautioned against building simulation output
|
||||
frameworks on top of logging code, as the output and the way the output
|
||||
is enabled may change over time.
|
||||
|
||||
Logging overview
|
||||
****************
|
||||
|
||||
|ns3| logging statements are typically used to log various program
|
||||
execution events, such as the occurrence of simulation events or the
|
||||
use of a particular function.
|
||||
|
||||
For example, this code snippet is from ``Ipv4L3Protocol::IsDestinationAddress()``:
|
||||
|
||||
::
|
||||
|
||||
if (address == iaddr.GetBroadcast ())
|
||||
{
|
||||
NS_LOG_LOGIC ("For me (interface broadcast address)");
|
||||
return true;
|
||||
}
|
||||
|
||||
If logging has been enabled for the ``Ipv4L3Protocol`` component at a level
|
||||
of ``LOGIC`` or above (see below about logging levels), the statement
|
||||
will be printed out; otherwise, it will be suppressed.
|
||||
|
||||
Logging levels
|
||||
==============
|
||||
|
||||
The following levels are defined; each level will enable the levels above
|
||||
it, with the ``ALL`` level being most verbose:
|
||||
|
||||
#. ``LOG_NONE``: the default, no logging
|
||||
#. ``LOG_ERROR``: serious error messages only
|
||||
#. ``LOG_WARN``: warning messages
|
||||
#. ``LOG_DEBUG``: for use in debugging
|
||||
#. ``LOG_FUNCTION``: function tracing
|
||||
#. ``LOG_LOGIC``: control flow tracing within functions
|
||||
#. ``LOG_ALL``: print everything
|
||||
|
||||
A special logging level will cause logging output to unconditionally
|
||||
appear on ``std::clog``, regardless of whether the user has explicitly enabled
|
||||
logging.
|
||||
This macro, ``NS_LOG_UNCOND()``, can be used like a kind of ``printf()`` in
|
||||
your code. An example can be found in ``scratch/scratch-simulator.cc``:
|
||||
|
||||
::
|
||||
|
||||
NS_LOG_UNCOND ("Scratch Simulator");
|
||||
|
||||
Logging prefixes
|
||||
================
|
||||
|
||||
This section still needs documentation; bug 1496 is open on this:
|
||||
|
||||
::
|
||||
|
||||
$ NS_LOG="*=all|prefix_all" ./waf --run scratch-simulator
|
||||
Scratch Simulator
|
||||
ScratchSimulator:main(): [ERROR] error message
|
||||
ScratchSimulator:main(): [WARN] warn message
|
||||
ScratchSimulator:main(): [DEBUG] debug message
|
||||
ScratchSimulator:main(): [INFO] info message
|
||||
ScratchSimulator:main(function)
|
||||
ScratchSimulator:main(): [LOGIC] logic message
|
||||
|
||||
Enabling logging output
|
||||
=======================
|
||||
|
||||
There are two ways that users typically control logging output. The
|
||||
first is by setting an ``NS_LOG`` environment variable; e.g.:
|
||||
|
||||
::
|
||||
|
||||
NS_LOG="*" ./waf --run first
|
||||
|
||||
will run the first tutorial program with all logging output. This can
|
||||
be made more granular by selecting individual components:
|
||||
|
||||
::
|
||||
|
||||
NS_LOG="Ipv4L3Protocol" ./waf --run first
|
||||
|
||||
The second way to enable this is to use explicit statements in your
|
||||
program, such as in the first tutorial program:
|
||||
|
||||
::
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
LogComponentEnable ("UdpEchoClientApplication", LOG_LEVEL_INFO);
|
||||
LogComponentEnable ("UdpEchoServerApplication", LOG_LEVEL_INFO);
|
||||
...
|
||||
|
||||
Some helpers have special methods to enable the logging of all components
|
||||
in a module (across different compilation units, but logically grouped
|
||||
together such as the |ns3| wifi code:
|
||||
|
||||
::
|
||||
|
||||
WifiHelper wifiHelper;
|
||||
wifiHelper.EnableLogComponents ();
|
||||
|
||||
|
||||
How to add logging to your code
|
||||
*******************************
|
||||
|
||||
To add logging to your code, please follow the below steps:
|
||||
|
||||
1) Put ``NS_LOG_COMPONENT_DEFINE`` macro outside of namespace ns3
|
||||
|
||||
Create a unique string identifier (usually based on the name of the file
|
||||
and/or class defined within the file) and register it with a macro call
|
||||
such as follows:
|
||||
|
||||
::
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("Ipv4L3Protocol");
|
||||
|
||||
namespace ns3 {
|
||||
...
|
||||
|
||||
The macro was carefully written to permit inclusion either within or
|
||||
outside of namespace ``ns3``, and usage will vary across the codebase, but
|
||||
the original intent was to register this *outside* of namespace ``ns3``.
|
||||
|
||||
2) Add logging statements to your functions and function bodies.
|
||||
|
||||
There are a couple of guidelines on this:
|
||||
|
||||
* Do *not* add function logging in operators or explicit copy constructors,
|
||||
since these will cause infinite recursion and stack overflow.
|
||||
* Use the ``NS_LOG_FUNCTION_NOARGS()`` variant for static methods *only*. When
|
||||
a non-static member function has no arguments, it should be logged by
|
||||
``NS_LOG_FUNCTION (this)`` macro.
|
||||
* Make sure that you test that your logging changes do not break the code;
|
||||
running some example programs with all log components turned on (e.g.
|
||||
``NS_LOG="*"``) is one way to test this.
|
||||
|
||||
@@ -174,7 +174,7 @@ sort, it makes sense to put it into the ``src/`` directory somewhere,
|
||||
particularly for ease of integrating with the build system.
|
||||
|
||||
In the case of the error model, it is very related to the packet class, so it
|
||||
makes sense to implement this in the ``src/network/model`` directory where |ns3|
|
||||
makes sense to implement this in the ``src/network/`` module where |ns3|
|
||||
packets are implemented.
|
||||
|
||||
waf and wscript
|
||||
@@ -394,15 +394,6 @@ test program 1
|
||||
Object Framework
|
||||
++++++++++++++++
|
||||
|
||||
::
|
||||
static const ClassId cid;
|
||||
|
||||
const InterfaceId ErrorModel::iid =
|
||||
MakeInterfaceId ("ErrorModel", Object::iid);
|
||||
|
||||
const ClassId ErrorModel::cid =
|
||||
MakeClassId<ErrorModel> ("ErrorModel", ErrorModel::iid);
|
||||
|
||||
Adding-a-sample-script
|
||||
**********************
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ Quick Overview
|
||||
**************
|
||||
|
||||
|ns3| random numbers are provided via instances of
|
||||
:cpp:class:`ns3::RandomVariable`.
|
||||
:cpp:class:`ns3::RandomVariableStream`.
|
||||
|
||||
* by default, |ns3| simulations use a fixed seed; if there is any randomness in
|
||||
the simulation, each run of the program will yield identical results unless
|
||||
@@ -21,13 +21,18 @@ Quick Overview
|
||||
* in *ns-3.3* and earlier, |ns3| simulations used a random seed by default; this
|
||||
marks a change in policy starting with *ns-3.4*.
|
||||
|
||||
* in *ns-3.14* and earlier, |ns3| simulations used a different wrapper class
|
||||
called :cpp:class:`ns3::RandomVariable`. As of *ns-3.15*, this class has been
|
||||
replaced by :cpp:class:`ns3::RandomVariableStream`; the underlying pseudo-random
|
||||
number generator has not changed.
|
||||
|
||||
* to obtain randomness across multiple simulation runs, you must either set the
|
||||
seed differently or set the run number differently. To set a seed, call
|
||||
:cpp:func:`ns3::SeedManager::SetSeed` at the beginning of the program; to set
|
||||
a run number with the same seed, call :cpp:func:`ns3::SeedManager::SetRun` at
|
||||
:cpp:func:`ns3::RngSeedManager::SetSeed` at the beginning of the program; to set
|
||||
a run number with the same seed, call :cpp:func:`ns3::RngSeedManager::SetRun` at
|
||||
the beginning of the program; see :ref:`seeding-and-independent-replications`.
|
||||
|
||||
* each RandomVariable used in |ns3| has a virtual random number generator
|
||||
* each RandomVariableStream used in |ns3| has a virtual random number generator
|
||||
associated with it; all random variables use either a fixed or random seed
|
||||
based on the use of the global seed (previous bullet);
|
||||
|
||||
@@ -82,14 +87,14 @@ period (*i.e.*, the number of random numbers before overlap) of
|
||||
:math:`7.6x10^{22}`. The period of the entire generator is :math:`3.1x10^{57}`.
|
||||
|
||||
|
||||
Class :cpp:class:`ns3::RandomVariable` is the public interface to this
|
||||
underlying random number generator. When users create new ``RandomVariables``
|
||||
(such as :cpp:class:`ns3::UniformVariable`,
|
||||
:cpp:class:`ns3::ExponentialVariable`, etc.), they create an object that uses
|
||||
Class :cpp:class:`ns3::RandomVariableStream` is the public interface to this
|
||||
underlying random number generator. When users create new random variables
|
||||
(such as :cpp:class:`ns3::UniformRandomVariable`,
|
||||
:cpp:class:`ns3::ExponentialRandomVariable`, etc.), they create an object that uses
|
||||
one of the distinct, independent streams of the random number generator.
|
||||
Therefore, each object of type :cpp:class:`ns3::RandomVariable` has,
|
||||
Therefore, each object of type :cpp:class:`ns3::RandomVariableStream` has,
|
||||
conceptually, its own "virtual" RNG. Furthermore, each
|
||||
:cpp:class:`ns3::RandomVariable` can be configured to use one of the set of
|
||||
:cpp:class:`ns3::RandomVariableStream` can be configured to use one of the set of
|
||||
substreams drawn from the main stream.
|
||||
|
||||
An alternate implementation would be to allow each RandomVariable to have its
|
||||
@@ -115,15 +120,15 @@ so as to compute statistics on a large number of independent runs. The user can
|
||||
either change the global seed and rerun the simulation, or can advance the
|
||||
substream state of the RNG, which is referred to as incrementing the run number.
|
||||
|
||||
A class :cpp:class:`ns3::SeedManager` provides an API to control the seeding and
|
||||
A class :cpp:class:`ns3::RngSeedManager` provides an API to control the seeding and
|
||||
run number behavior. This seeding and substream state setting must be called
|
||||
before any random variables are created; e.g::
|
||||
|
||||
SeedManager::SetSeed (3); // Changes seed from default of 1 to 3
|
||||
SeedManager::SetRun (7); // Changes run number from default of 1 to 7
|
||||
RngSeedManager::SetSeed (3); // Changes seed from default of 1 to 3
|
||||
RngSeedManager::SetRun (7); // Changes run number from default of 1 to 7
|
||||
// Now, create random variables
|
||||
UniformVariable x(0,10);
|
||||
ExponentialVariable y(2902);
|
||||
Ptr<UniformRandomVariable> x = CreateObject<UniformRandomVariable> ();
|
||||
Ptr<ExponentialRandomVariable> y = CreateObject<ExponentialRandomVarlable> ();
|
||||
...
|
||||
|
||||
Which is better, setting a new seed or advancing the substream state? There is
|
||||
@@ -154,16 +159,16 @@ or, if you are running programs directly outside of waf::
|
||||
The above command-line variants make it easy to run lots of different
|
||||
runs from a shell script by just passing a different RngRun index.
|
||||
|
||||
Class RandomVariable
|
||||
********************
|
||||
Class RandomVariableStream
|
||||
**************************
|
||||
|
||||
All random variables should derive from class :cpp:class:`RandomVariable`. This
|
||||
base class provides a few static methods for globally configuring the behavior
|
||||
base class provides a few methods for globally configuring the behavior
|
||||
of the random number generator. Derived classes provide API for drawing random
|
||||
variates from the particular distribution being supported.
|
||||
|
||||
Each RandomVariable created in the simulation is given a generator that is a new
|
||||
RNGStream from the underlying PRNG. Used in this manner, the L'Ecuyer
|
||||
Each RandomVariableStream created in the simulation is given a generator that is a
|
||||
new RNGStream from the underlying PRNG. Used in this manner, the L'Ecuyer
|
||||
implementation allows for a maximum of :math:`1.8x10^19` random variables. Each
|
||||
random variable in a single replication can produce up to :math:`7.6x10^22`
|
||||
random numbers before overlapping.
|
||||
@@ -171,7 +176,7 @@ random numbers before overlapping.
|
||||
Base class public API
|
||||
*********************
|
||||
|
||||
Below are excerpted a few public methods of class :cpp:class:`RandomVariable`
|
||||
Below are excerpted a few public methods of class :cpp:class:`RandomVariableStream`
|
||||
that access the next value in the substream.::
|
||||
|
||||
/**
|
||||
@@ -181,7 +186,7 @@ that access the next value in the substream.::
|
||||
double GetValue (void) const;
|
||||
|
||||
/**
|
||||
* \brief Returns a random integer integer from the underlying distribution
|
||||
* \brief Returns a random integer from the underlying distribution
|
||||
* \return Integer cast of ::GetValue()
|
||||
*/
|
||||
uint32_t GetInteger (void) const;
|
||||
@@ -193,36 +198,33 @@ Types of RandomVariables
|
||||
************************
|
||||
|
||||
The following types of random variables are provided, and are documented in the
|
||||
|ns3| Doxygen or by reading ``src/core/model/random-variable.h``. Users can also
|
||||
create their own custom random variables by deriving from class
|
||||
:cpp:class:`RandomVariable`.
|
||||
|ns3| Doxygen or by reading ``src/core/model/random-variable-stream.h``. Users
|
||||
can also create their own custom random variables by deriving from class
|
||||
:cpp:class:`RandomVariableStream`.
|
||||
|
||||
* class :cpp:class:`UniformVariable`
|
||||
* class :cpp:class:`ConstantVariable`
|
||||
* class :cpp:class:`SequentialVariable`
|
||||
* class :cpp:class:`ExponentialVariable`
|
||||
* class :cpp:class:`ParetoVariable`
|
||||
* class :cpp:class:`WeibullVariable`
|
||||
* class :cpp:class:`NormalVariable`
|
||||
* class :cpp:class:`EmpiricalVariable`
|
||||
* class :cpp:class:`IntEmpiricalVariable`
|
||||
* class :cpp:class:`DeterministicVariable`
|
||||
* class :cpp:class:`LogNormalVariable`
|
||||
* class :cpp:class:`TriangularVariable`
|
||||
* class :cpp:class:`GammaVariable`
|
||||
* class :cpp:class:`ErlangVariable`
|
||||
* class :cpp:class:`ZipfVariable`
|
||||
* class :cpp:class:`UniformRandomVariable`
|
||||
* class :cpp:class:`ConstantRandomVariable`
|
||||
* class :cpp:class:`SequentialRandomVariable`
|
||||
* class :cpp:class:`ExponentialRandomVariable`
|
||||
* class :cpp:class:`ParetoRandomVariable`
|
||||
* class :cpp:class:`WeibullRandomVariable`
|
||||
* class :cpp:class:`NormalRandomVariable`
|
||||
* class :cpp:class:`LogNormalRandomVariable`
|
||||
* class :cpp:class:`GammaRandomVariable`
|
||||
* class :cpp:class:`ErlangRandomVariable`
|
||||
* class :cpp:class:`TriangularRandomVariable`
|
||||
* class :cpp:class:`ZipfRandomVariable`
|
||||
* class :cpp:class:`ZetaRandomVariable`
|
||||
* class :cpp:class:`DeterministicRandomVariable`
|
||||
* class :cpp:class:`EmpiricalRandomVariable`
|
||||
|
||||
Semantics of RandomVariable objects
|
||||
***********************************
|
||||
Semantics of RandomVariableStream objects
|
||||
*****************************************
|
||||
|
||||
RandomVariable objects have value semantics. This means that they can be passed
|
||||
by value to functions. The can also be passed by reference to const.
|
||||
RandomVariables do not derive from :cpp:class:`ns3::Object` and we do not use
|
||||
smart pointers to manage them; they are either allocated on the stack or else
|
||||
users explicitly manage any heap-allocated RandomVariables.
|
||||
RandomVariableStream objects derive from :cpp:class:`ns3::Object` and are
|
||||
handled by smart pointers.
|
||||
|
||||
RandomVariable objects can also be used in |ns3| attributes, which means
|
||||
RandomVariableStream instances can also be used in |ns3| attributes, which means
|
||||
that values can be set for them through the |ns3| attribute system.
|
||||
An example is in the propagation models for WifiNetDevice:::
|
||||
|
||||
@@ -234,15 +236,15 @@ An example is in the propagation models for WifiNetDevice:::
|
||||
.AddConstructor<RandomPropagationDelayModel> ()
|
||||
.AddAttribute ("Variable",
|
||||
"The random variable which generates random delays (s).",
|
||||
RandomVariableValue (UniformVariable (0.0, 1.0)),
|
||||
MakeRandomVariableAccessor (&RandomPropagationDelayModel::m_variable),
|
||||
MakeRandomVariableChecker ())
|
||||
StringValue ("ns3::UniformRandomVariable"),
|
||||
MakePointerAccessor (&RandomPropagationDelayModel::m_variable),
|
||||
MakePointerChecker<RandomVariableStream> ())
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
|
||||
Here, the |ns3| user can change the default random variable for this
|
||||
delay model (which is a UniformVariable ranging from 0 to 1) through
|
||||
delay model (which is a UniformRandomVariable ranging from 0 to 1) through
|
||||
the attribute system.
|
||||
|
||||
Using other PRNG
|
||||
@@ -252,10 +254,56 @@ There is presently no support for substituting a different underlying
|
||||
random number generator (e.g., the GNU Scientific Library or the Akaroa
|
||||
package). Patches are welcome.
|
||||
|
||||
More advanced usage
|
||||
*******************
|
||||
Setting the stream number
|
||||
*************************
|
||||
|
||||
*To be completed.*
|
||||
The underlying MRG32k3a generator provides 2^64 independent streams.
|
||||
In ns-3, these are assigned sequentially starting from the first stream as
|
||||
new RandomVariableStream instances make their first call to GetValue().
|
||||
|
||||
As a result of how these RandomVariableStream objects are assigned to
|
||||
underlying streams, the assignment is sensitive to perturbations of
|
||||
the simulation configuration. The consequence is that if any aspect of the
|
||||
simulation configuration is changed, the mapping of RandomVariables to
|
||||
streams may (or may not) change.
|
||||
|
||||
As a concrete example, a user running a comparative study between routing
|
||||
protocols may find that the act of changing one routing protocol for another
|
||||
will notice that the underlying mobility pattern also changed.
|
||||
|
||||
Starting with ns-3.15, some control has been provided to users to allow
|
||||
users to optionally fix the assignment of selected RandomVariableStream
|
||||
objects to underlying streams. This is the ``Stream`` attribute, part
|
||||
of the base class RandomVariableStream.
|
||||
|
||||
By partitioning the existing sequence of streams from before:
|
||||
|
||||
::
|
||||
|
||||
<-------------------------------------------------------------------------->
|
||||
stream 0 stream (2^64 - 1)
|
||||
|
||||
into two equal-sized sets:
|
||||
|
||||
::
|
||||
|
||||
<--------------------------------------------------------------------------->
|
||||
^ ^^ ^
|
||||
| || |
|
||||
stream 0 stream (2^63 - 1) stream 2^63 stream (2^64 - 1)
|
||||
<- automatically assigned -----><-------- assigned by user----------->
|
||||
|
||||
The first 2^63 streams continue to be automatically assigned, while
|
||||
the last 2^63 are given stream indices starting with zero up to
|
||||
2^63-1.
|
||||
|
||||
The assignment of streams to a fixed stream number is optional; instances
|
||||
of RandomVariableStream that do not have a stream value assigned will
|
||||
be assigned the next one from the pool of automatic streams.
|
||||
|
||||
To fix a RandomVariableStream to a particular underlying stream, assign
|
||||
its ``Stream`` attribute to a non-negative integer (the default value
|
||||
of -1 means that a value will be automatically allocated).
|
||||
|
||||
Publishing your results
|
||||
***********************
|
||||
|
||||
@@ -115,7 +115,8 @@ if you run ``test.py --help`` you should see a command summary like:
|
||||
-c KIND, --constrain=KIND
|
||||
constrain the test-runner by kind of test
|
||||
-e EXAMPLE, --example=EXAMPLE
|
||||
specify a single example to run (with relative path)
|
||||
specify a single example to run (no relative path is
|
||||
needed)
|
||||
-g, --grind run the test suites and examples using valgrind
|
||||
-k, --kinds print the kinds of tests available
|
||||
-l, --list print the list of known tests
|
||||
@@ -165,6 +166,12 @@ to be specified. Running the command
|
||||
|
||||
./test.py --suite=ns3-wifi-propagation-loss-models
|
||||
|
||||
or equivalently
|
||||
|
||||
::
|
||||
|
||||
./test.py -s ns3-wifi-propagation-loss-models
|
||||
|
||||
results in that single test suite being run.
|
||||
|
||||
::
|
||||
@@ -279,12 +286,12 @@ Any of these listed suites can be selected to be run by itself using the
|
||||
|
||||
Similarly to test suites, one can run a single C++ example program
|
||||
using the ``--example`` option. Note that the relative path for the
|
||||
example must be included and that the executables built for C++
|
||||
examples do not have extensions. Entering
|
||||
example does not need to be included and that the executables built
|
||||
for C++ examples do not have extensions. Entering
|
||||
|
||||
::
|
||||
|
||||
./test.py --example=examples/udp/udp-echo
|
||||
./test.py --example=udp-echo
|
||||
|
||||
results in that single example being run.
|
||||
|
||||
@@ -297,7 +304,7 @@ You can specify the directory where ns-3 was built using the
|
||||
|
||||
::
|
||||
|
||||
./test.py --buildpath=/home/craigdo/repos/ns-3-allinone-test/ns-3-dev/build/debug --example=examples/wireless/wifi-simple-adhoc
|
||||
./test.py --buildpath=/home/craigdo/repos/ns-3-allinone-test/ns-3-dev/build/debug --example=wifi-simple-adhoc
|
||||
|
||||
One can run a single Python example program using the ``--pyexample``
|
||||
option. Note that the relative path for the example must be included
|
||||
@@ -457,10 +464,31 @@ Performance tests are those which exercise a particular part of the system
|
||||
and determine if the tests have executed to completion in a reasonable time.
|
||||
|
||||
Running Tests
|
||||
+++++++++++++
|
||||
*************
|
||||
|
||||
Tests are typically run using the high level ``test.py`` program. To get a list of the available command-line options, run ``test.py --help``
|
||||
|
||||
|
||||
The test program ``test.py`` will run both tests and those examples that
|
||||
have been added to the list to check. The difference between tests
|
||||
and examples is as follows. Tests generally check that specific simulation
|
||||
output or events conforms to expected behavior. In contrast, the output
|
||||
of examples is not checked, and the test program merely checks the exit
|
||||
status of the example program to make sure that it runs without error.
|
||||
|
||||
Briefly, to run all tests, first one must configure tests during configuration
|
||||
stage, and also (optionally) examples if examples are to be checked:
|
||||
|
||||
::
|
||||
|
||||
./waf --configure --enable-examples --enable-tests
|
||||
|
||||
Then, build ns-3, and after it is built, just run ``test.py``. ``test.py -h``
|
||||
will show a number of configuration options that modify the behavior
|
||||
of test.py.
|
||||
|
||||
The program ``test.py`` invokes, for C++ tests and examples, a lower-level
|
||||
C++ program called ``test-runner`` to actually run the tests. As discussed
|
||||
below, this ``test-runner`` can be a helpful way to debug tests.
|
||||
|
||||
Debugging Tests
|
||||
***************
|
||||
@@ -541,7 +569,10 @@ directory tree looking for a directory file with files named ``VERSION`` and
|
||||
``LICENSE.`` If it finds one, it assumes that must be the basedir and provides
|
||||
it for you.
|
||||
|
||||
Similarly, many test suites need to write temporary files (such as pcap files)
|
||||
Test output
|
||||
+++++++++++
|
||||
|
||||
Many test suites need to write temporary files (such as pcap files)
|
||||
in the process of running the tests. The tests then need a temporary directory
|
||||
to write to. The Python test utility (test.py) will provide a temporary file
|
||||
automatically, but if run stand-alone this temporary directory must be provided.
|
||||
@@ -563,6 +594,20 @@ The time is provided as a hint so that you can relatively easily reconstruct
|
||||
what directory was used if you need to go back and look at the files that were
|
||||
placed in that directory.
|
||||
|
||||
Another class of output is test output like pcap traces that are generated
|
||||
to compare to reference output. The test program will typically delete
|
||||
these after the test suites all run. To disable the deletion of test
|
||||
output, run ``test.py`` with the "retain" option:
|
||||
|
||||
::
|
||||
|
||||
./test.py -r
|
||||
|
||||
and test output can be found in the ``testpy-output/`` directory.
|
||||
|
||||
Reporting of test failures
|
||||
++++++++++++++++++++++++++
|
||||
|
||||
When you run a test suite using the test-runner it will run the test quietly
|
||||
by default. The only indication that you will get that the test passed is
|
||||
the *absence* of a message from ``waf`` saying that the program
|
||||
@@ -621,6 +666,41 @@ also not a complete XML file since test suites are designed to have their
|
||||
output appended to a master XML status file as described in the ``test.py``
|
||||
section.
|
||||
|
||||
Debugging test suite failures
|
||||
+++++++++++++++++++++++++++++
|
||||
|
||||
To debug test crashes, such as::
|
||||
|
||||
CRASH: TestSuite ns3-wifi-interference
|
||||
|
||||
You can access the underlying test-runner program via gdb as follows, and
|
||||
then pass the "--basedir=`pwd`" argument to run (you can also pass other
|
||||
arguments as needed, but basedir is the minimum needed)::
|
||||
|
||||
./waf --command-template="gdb %s" --run "test-runner"
|
||||
Waf: Entering directory `/home/tomh/hg/sep09/ns-3-allinone/ns-3-dev-678/build'
|
||||
Waf: Leaving directory `/home/tomh/hg/sep09/ns-3-allinone/ns-3-dev-678/build'
|
||||
'build' finished successfully (0.380s)
|
||||
GNU gdb 6.8-debian
|
||||
Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
L cense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
|
||||
and "show warranty" for details.
|
||||
This GDB was configured as "x86_64-linux-gnu"...
|
||||
(gdb) r --basedir=`pwd`
|
||||
Starting program: <..>/build/debug/utils/test-runner --basedir=`pwd`
|
||||
[Thread debugging using libthread_db enabled]
|
||||
assert failed. file=../src/core/model/type-id.cc, line=138, cond="uid <= m_information.size () && uid != 0"
|
||||
...
|
||||
|
||||
Here is another example of how to use valgrind to debug a memory problem
|
||||
such as::
|
||||
|
||||
VALGR: TestSuite devices-mesh-dot11s-regression
|
||||
|
||||
./waf --command-template="valgrind %s --basedir=`pwd` --suite=devices-mesh-dot11s-regression" --run test-runner
|
||||
|
||||
Class TestRunner
|
||||
****************
|
||||
|
||||
@@ -706,7 +786,7 @@ case a name and override the ``DoRun`` method to run the test.
|
||||
}
|
||||
|
||||
Utilities
|
||||
+++++++++
|
||||
*********
|
||||
|
||||
There are a number of utilities of various kinds that are also part of the
|
||||
testing framework. Examples include a generalized pcap file useful for
|
||||
@@ -714,37 +794,6 @@ storing test vectors; a generic container useful for transient storage of
|
||||
test vectors during test execution; and tools for generating presentations
|
||||
based on validation and verification testing results.
|
||||
|
||||
Debugging test suite failures
|
||||
+++++++++++++++++++++++++++++
|
||||
|
||||
To debug test crashes, such as::
|
||||
|
||||
CRASH: TestSuite ns3-wifi-interference
|
||||
|
||||
You can access the underlying test-runner program via gdb as follows, and
|
||||
then pass the "--basedir=`pwd`" argument to run (you can also pass other
|
||||
arguments as needed, but basedir is the minimum needed)::
|
||||
|
||||
./waf --command-template="gdb %s" --run "test-runner"
|
||||
Waf: Entering directory `/home/tomh/hg/sep09/ns-3-allinone/ns-3-dev-678/build'
|
||||
Waf: Leaving directory `/home/tomh/hg/sep09/ns-3-allinone/ns-3-dev-678/build'
|
||||
'build' finished successfully (0.380s)
|
||||
GNU gdb 6.8-debian
|
||||
Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
L cense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
|
||||
and "show warranty" for details.
|
||||
This GDB was configured as "x86_64-linux-gnu"...
|
||||
(gdb) r --basedir=`pwd`
|
||||
Starting program: <..>/build/debug/utils/test-runner --basedir=`pwd`
|
||||
[Thread debugging using libthread_db enabled]
|
||||
assert failed. file=../src/core/model/type-id.cc, line=138, cond="uid <= m_information.size () && uid != 0"
|
||||
...
|
||||
|
||||
Here is another example of how to use valgrind to debug a memory problem
|
||||
such as::
|
||||
|
||||
VALGR: TestSuite devices-mesh-dot11s-regression
|
||||
|
||||
./waf --command-template="valgrind %s --basedir=`pwd` --suite=devices-mesh-dot11s-regression" --run test-runner
|
||||
These utilities are not documented here, but for example, please see
|
||||
how the TCP tests found in ``src/test/ns3tcp/`` use pcap files and reference
|
||||
output.
|
||||
@@ -26,7 +26,7 @@ output, as in, ::
|
||||
int main ()
|
||||
{
|
||||
...
|
||||
std::cout << ``The value of x is `` << x << std::endl;
|
||||
std::cout << "The value of x is " << x << std::endl;
|
||||
...
|
||||
}
|
||||
|
||||
@@ -109,11 +109,11 @@ The Simplest Example
|
||||
|
||||
It will be useful to go walk a quick example just to reinforce what we've
|
||||
said.::
|
||||
|
||||
#include ``ns3/object.h''
|
||||
#include ``ns3/uinteger.h''
|
||||
#include ``ns3/traced-value.h''
|
||||
#include ``ns3/trace-source-accessor.h''
|
||||
|
||||
#include "ns3/object.h"
|
||||
#include "ns3/uinteger.h"
|
||||
#include "ns3/traced-value.h""
|
||||
#include "ns3/trace-source-accessor.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@@ -167,7 +167,7 @@ callback process.::
|
||||
void
|
||||
IntTrace (Int oldValue, Int newValue)
|
||||
{
|
||||
std::cout << ``Traced `` << oldValue << `` to `` << newValue << std::endl;
|
||||
std::cout << "Traced " << oldValue << " to " << newValue << std::endl;
|
||||
}
|
||||
|
||||
This is the definition of the trace sink. It corresponds directly to a callback
|
||||
@@ -199,7 +199,7 @@ context for now since it is not important yet.
|
||||
|
||||
Finally, the line,::
|
||||
|
||||
myObject->m_myInt = 1234;
|
||||
myObject->m_myInt = 1234;
|
||||
|
||||
should be interpreted as an invocation of ``operator=`` on the member variable
|
||||
``m_myInt`` with the integer :math:`1234` passed as a parameter. It turns out
|
||||
|
||||
@@ -24,6 +24,7 @@ SOURCES = \
|
||||
$(SRC)/aodv/doc/aodv.rst \
|
||||
$(SRC)/applications/doc/applications.rst \
|
||||
$(SRC)/bridge/doc/bridge.rst \
|
||||
$(SRC)/brite/doc/brite.rst \
|
||||
$(SRC)/buildings/doc/source/buildings.rst \
|
||||
$(SRC)/buildings/doc/source/buildings-design.rst \
|
||||
$(SRC)/buildings/doc/source/buildings-user.rst \
|
||||
@@ -49,6 +50,7 @@ SOURCES = \
|
||||
$(SRC)/network/doc/packets.rst \
|
||||
$(SRC)/network/doc/sockets-api.rst \
|
||||
$(SRC)/network/doc/simple.rst \
|
||||
$(SRC)/network/doc/queue.rst \
|
||||
$(SRC)/internet/doc/internet-stack.rst \
|
||||
$(SRC)/internet/doc/ipv4.rst \
|
||||
$(SRC)/internet/doc/ipv6.rst \
|
||||
@@ -87,20 +89,19 @@ SOURCEFIGS = \
|
||||
$(SRC)/wifi/doc/WifiArchitecture.dia \
|
||||
$(SRC)/wifi/doc/snir.dia \
|
||||
$(SRC)/wimax/doc/WimaxArchitecture.dia \
|
||||
$(SRC)/lte/doc/source/figures/ff-mac-saps.dia \
|
||||
$(SRC)/lte/doc/source/figures/ff-example.dia \
|
||||
$(SRC)/lte/doc/source/figures/lte-enb-architecture.dia \
|
||||
$(SRC)/lte/doc/source/figures/lte-ue-architecture.dia \
|
||||
$(SRC)/lte/doc/source/figures/epc-profiling-scenario.dia \
|
||||
$(SRC)/lte/doc/source/figures/eutran-profiling-scenario.dia \
|
||||
$(SRC)/lte/doc/source/figures/lte-interference-test-scenario.dia \
|
||||
$(SRC)/lte/doc/source/figures/epc-topology.dia \
|
||||
$(SRC)/lte/doc/source/figures/epc-data-flow-dl.dia \
|
||||
$(SRC)/lte/doc/source/figures/epc-data-flow-ul.dia \
|
||||
$(SRC)/lte/doc/source/figures/epc-profiling-scenario.dia \
|
||||
$(SRC)/lte/doc/source/figures/epc-topology.dia \
|
||||
$(SRC)/lte/doc/source/figures/eutran-profiling-scenario.dia \
|
||||
$(SRC)/lte/doc/source/figures/ff-example.dia \
|
||||
$(SRC)/lte/doc/source/figures/ff-mac-saps.dia \
|
||||
$(SRC)/lte/doc/source/figures/lte-arch-data-rrc-pdcp-rlc.dia \
|
||||
$(SRC)/lte/doc/source/figures/lte-enb-architecture.dia \
|
||||
$(SRC)/lte/doc/source/figures/lte-epc-e2e-data-protocol-stack.dia \
|
||||
$(SRC)/lte/doc/source/figures/MCS_2_test.eps \
|
||||
$(SRC)/lte/doc/source/figures/MCS_12_test.eps \
|
||||
$(SRC)/lte/doc/source/figures/lte-interference-test-scenario.dia \
|
||||
$(SRC)/lte/doc/source/figures/lte-ue-architecture.dia \
|
||||
$(SRC)/lte/doc/source/figures/lte-subframe-structure.dia \
|
||||
$(SRC)/lte/doc/source/figures/lena-dual-stripe.eps \
|
||||
$(SRC)/lte/doc/source/figures/lte-mcs-index.eps \
|
||||
$(SRC)/lte/doc/source/figures/lenaThrTestCase1.eps \
|
||||
@@ -151,6 +152,8 @@ SOURCEFIGS = \
|
||||
$(SRC)/lte/doc/source/figures/helpers.pdf \
|
||||
$(SRC)/lte/doc/source/figures/miesm_scheme.pdf \
|
||||
$(SRC)/lte/doc/source/figures/miesm_scheme.png \
|
||||
$(SRC)/lte/doc/source/figures/lte-phy-interference.seqdiag \
|
||||
$(SRC)/lte/doc/source/figures/helpers.seqdiag \
|
||||
$(SRC)/uan/doc/auvmobility-classes.dia \
|
||||
$(SRC)/stats/doc/Stat-framework-arch.png \
|
||||
$(SRC)/stats/doc/Wifi-default.png \
|
||||
@@ -194,20 +197,19 @@ IMAGES_EPS = \
|
||||
$(FIGURES)/WifiArchitecture.eps \
|
||||
$(FIGURES)/snir.eps \
|
||||
$(FIGURES)/WimaxArchitecture.eps \
|
||||
$(FIGURES)/ff-mac-saps.eps \
|
||||
$(FIGURES)/ff-example.eps \
|
||||
$(FIGURES)/lte-enb-architecture.eps \
|
||||
$(FIGURES)/lte-ue-architecture.eps \
|
||||
$(FIGURES)/epc-profiling-scenario.eps \
|
||||
$(FIGURES)/eutran-profiling-scenario.eps \
|
||||
$(FIGURES)/lte-interference-test-scenario.eps \
|
||||
$(FIGURES)/epc-topology.eps \
|
||||
$(FIGURES)/epc-data-flow-dl.eps \
|
||||
$(FIGURES)/epc-data-flow-ul.eps \
|
||||
$(FIGURES)/epc-profiling-scenario.eps \
|
||||
$(FIGURES)/epc-topology.eps \
|
||||
$(FIGURES)/eutran-profiling-scenario.eps \
|
||||
$(FIGURES)/ff-example.eps \
|
||||
$(FIGURES)/ff-mac-saps.eps \
|
||||
$(FIGURES)/lte-arch-data-rrc-pdcp-rlc.eps \
|
||||
$(FIGURES)/lte-enb-architecture.eps \
|
||||
$(FIGURES)/lte-epc-e2e-data-protocol-stack.eps \
|
||||
$(FIGURES)/MCS_2_test.eps \
|
||||
$(FIGURES)/MCS_12_test.eps \
|
||||
$(FIGURES)/lte-interference-test-scenario.eps \
|
||||
$(FIGURES)/lte-ue-architecture.eps \
|
||||
$(FIGURES)/lte-subframe-structure.eps \
|
||||
$(FIGURES)/lena-dual-stripe.eps \
|
||||
$(FIGURES)/lte-mcs-index.eps \
|
||||
$(FIGURES)/lenaThrTestCase1.eps \
|
||||
@@ -224,7 +226,7 @@ IMAGES_EPS = \
|
||||
$(FIGURES)/lte-rlc-data-retx-dl.eps \
|
||||
$(FIGURES)/lte-rlc-data-txon-ul.eps \
|
||||
$(FIGURES)/lte-rlc-data-retx-ul.eps \
|
||||
$(FIGURES)/auvmobility-classes.eps \
|
||||
$(FIGURES)/auvmobility-classes.eps \
|
||||
|
||||
# rescale pdf figures as necessary
|
||||
$(FIGURES)/testbed.pdf_width = 5in
|
||||
@@ -250,6 +252,7 @@ $(FIGURES)/lte-rlc-data-txon-dl.pdf_width = 10cm
|
||||
$(FIGURES)/lte-rlc-data-txon-ul.pdf_width = 10cm
|
||||
$(FIGURES)/lte-rlc-data-retx-ul.pdf_width = 10cm
|
||||
$(FIGURES)/lte-phy-interference.pdf_width = 12cm
|
||||
$(FIGURES)/lte-subframe-structure.pdf_width = 2in
|
||||
$(FIGURES)/auvmobility-classes.pdf_width = 10cm
|
||||
|
||||
IMAGES_PNG = ${IMAGES_EPS:.eps=.png}
|
||||
@@ -260,7 +263,9 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF)
|
||||
%.eps : %.dia; $(DIA) -t eps $< -e $@
|
||||
%.png : %.dia; $(DIA) -t png $< -e $@
|
||||
%.png : %.eps; $(CONVERT) $< $@
|
||||
%.pdf : %.eps; $(EPSTOPDF) $< -o=$@; if test x$($@_width) != x; then TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi
|
||||
%.pdf : %.eps
|
||||
$(EPSTOPDF) $< -o=$@
|
||||
if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
TMPDIR=/tmp
|
||||
|
||||
TMPFILE=`mktemp`
|
||||
|
||||
echo "\documentclass{book}
|
||||
@@ -8,5 +10,5 @@ echo "\documentclass{book}
|
||||
\includepdf[width=${1},fitpaper]{${2}}
|
||||
\end{document}" >${TMPFILE}.tex
|
||||
pdflatex -output-directory /tmp ${TMPFILE}.tex >/dev/null 2>/dev/null
|
||||
cp ${TMPFILE}.pdf ${3}
|
||||
|
||||
cp ${TMPFILE}.pdf ${2}
|
||||
rm -f ${TMPFILE}{,.{tex,aux,log,pdf}}
|
||||
@@ -91,7 +91,7 @@ pygments_style = 'sphinx'
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'default'
|
||||
html_theme = 'ns3_html_theme'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
@@ -99,14 +99,14 @@ html_theme = 'default'
|
||||
#html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = []
|
||||
html_theme_path = ['../..']
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = None
|
||||
html_title = 'Model Library'
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
html_short_title = 'Models'
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
@@ -124,7 +124,7 @@ html_static_path = ['_static']
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
#html_last_updated_fmt = '%b %d, %Y'
|
||||
html_last_updated_fmt = '%b %d, %Y %H:%M'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
@@ -184,7 +184,7 @@ latex_documents = [
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
latex_logo = '../../ns3_html_theme/static/ns-3.png'
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
|
||||
@@ -22,6 +22,7 @@ This document is written in `reStructuredText <http://docutils.sourceforge.net/r
|
||||
aodv
|
||||
applications
|
||||
bridge
|
||||
brite
|
||||
buildings
|
||||
click
|
||||
csma
|
||||
@@ -40,7 +41,6 @@ This document is written in `reStructuredText <http://docutils.sourceforge.net/r
|
||||
openflow-switch
|
||||
point-to-point
|
||||
propagation
|
||||
simple
|
||||
statistics
|
||||
topology
|
||||
uan
|
||||
|
||||
@@ -7,3 +7,4 @@ Network Module
|
||||
network-overview
|
||||
sockets-api
|
||||
simple
|
||||
queue
|
||||
@@ -0,0 +1,85 @@
|
||||
.. ns3-theme documentation master file, created by
|
||||
sphinx-quickstart on Fri Jun 15 12:53:37 2012.
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
|
||||
The files in this directory customize the Doxygen and Sphinx
|
||||
layout and rendering to give a common look.
|
||||
|
||||
|
||||
Design
|
||||
------
|
||||
|
||||
The basic color scheme is taken from the ns3 homepage, http://www.nsnam.org/
|
||||
|
||||
Since Sphinx provides more flexible layout and configuration control,
|
||||
the Doxygen layout and images are used as the basis.
|
||||
|
||||
The top bar design is derived from Doxygen's default when a logo,
|
||||
project name and description are given in the Doxygen configuration file.
|
||||
The files ``layout.html`` and ``ns3_doxy_header.html`` should kept in sync.
|
||||
|
||||
|
||||
Sphinx Files
|
||||
------------
|
||||
|
||||
``layout.html`` (:ref:`static filename <sphinx-static-filenames>`)
|
||||
Augments the default page layout, including the top bar.
|
||||
|
||||
``theme.conf`` (:ref:`static filename <sphinx-static-filenames>`)
|
||||
Configuration parameters for ``layout.html`` and ``default.css_t``.
|
||||
|
||||
``static/bc_s.png``
|
||||
Angle bracket in Sphinx relbar, taken from the Doxygen html output.
|
||||
|
||||
``static/default.css_t`` (:ref:`static filename <sphinx-static-filenames>`)
|
||||
Default Sphinx CSS template, copied from the default theme.
|
||||
|
||||
``static/nav_f.png``
|
||||
Background image for headings, taken from the Doxygen html output.
|
||||
|
||||
``static/sidebar.js`` (:ref:`static filename <sphinx-static-filenames>`)
|
||||
Sidebar script, copied from the default theme.
|
||||
|
||||
``static/tab_b.png``
|
||||
Background image for the Sphinx relbar, taken from the Doxygen html output.
|
||||
|
||||
.. _sphinx-static-filenames:
|
||||
.. note:: **Static Filenames**
|
||||
|
||||
Sphinx uses hard-coded file names (and the ``static`` directory name).
|
||||
The files referenced above can't be renamed.
|
||||
|
||||
|
||||
Doxygen Files
|
||||
-------------
|
||||
|
||||
``ns3_doxy_footer.html``
|
||||
Defines the page footer.
|
||||
|
||||
``ns3_doxy_header.html``
|
||||
Defines the page header, including the top bar.
|
||||
|
||||
``static/doxygen.css``
|
||||
Default Doxygen CSS file, obtained by the ``doxygen -w html ...``
|
||||
command.
|
||||
|
||||
Shared Files
|
||||
------------
|
||||
|
||||
``README.rst``
|
||||
This file, not used by Doxygen or Sphinx.
|
||||
|
||||
``static/bar-top.png``
|
||||
Background image for the top bar, resized from the ns-3 homepage.
|
||||
|
||||
``static/favicon.ico``
|
||||
Browser location bar favicon, referenced in ``layout.html`` and
|
||||
``ns3_doxy_header.html``, taken from the ns-3 homepage.
|
||||
|
||||
``static/ns-3-inverted-notext-small.png``
|
||||
Logo used in the top bar, taken from the ns-3 media kit.
|
||||
|
||||
``static/ns3_stylesheet.css``
|
||||
Style customizations for both Doxygen and Sphinx.
|
||||
@@ -0,0 +1,214 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Get the current repo name and version
|
||||
# to format urls appropriately via Javascript
|
||||
# variables for inclusion in html files.
|
||||
|
||||
# Use cases:
|
||||
# 1. Hosted on nsnam.org, tagged release.
|
||||
# 2. Hosted on nsnam.org, ns-3-dev.
|
||||
# 3. User repo, modified from a tagged release (or ns-3-dev).
|
||||
# 4. User repo, at a release tag.
|
||||
# 5. User repo, at a private tag.
|
||||
# 6. Private web host, at a tag (or ns-3-dev, or local mod).
|
||||
#
|
||||
# For case 1 and 2, we want the links to point to the nsnam.org
|
||||
# publicly hosted pages. For all other cases, we want to point
|
||||
# to the built pages in the repo itself.
|
||||
#
|
||||
# For robustness, we attempt to identify cases 1 & 2
|
||||
# automatically. (There is also an explicit switch '-p'
|
||||
# to force us into the public case.)
|
||||
#
|
||||
# The approach to identify cases 1 & 2 is to test:
|
||||
# a. We're on nsnam.org (actually, nsnam.ece.gatech.edu), and
|
||||
# b. We're in the tmp build directory, /tmp/daily-nsnam/
|
||||
# (This is the directory used by the update-* scripts
|
||||
# run by cron jobs.)
|
||||
#
|
||||
# If both a and b are true, we're building for public urls.
|
||||
# (The newer update-docs script (through waf) sets
|
||||
# NS3_WWW_URLS=public explicitly.)
|
||||
#
|
||||
# The repo version is either a tag name or a commit (short) id.
|
||||
#
|
||||
# If we're building for nsnam.org, and at a tag, we use just
|
||||
# the tag as the repo name/version string, e.g. 'ns-3.14'.
|
||||
# Otherwise, we're building for ns-3-dev, and we use, e.g,
|
||||
# 'ns-3-dev @ fd0f27a10eff'.
|
||||
#
|
||||
# If we're *not* building for nsnam.org, we use the repo
|
||||
# directory name as the repo name. (This will typically be
|
||||
# a name meaningful to the user doing the build, perhaps a
|
||||
# shorthand for the feature they are working on.) For
|
||||
# example, this script was developed in a repo named
|
||||
# 'docs'. We always use the repo version, resulting
|
||||
# in document version strings like 'docs @ ns-3.15' or
|
||||
# 'docs @ fd0f27a10eff'
|
||||
#
|
||||
|
||||
me=`basename $0`
|
||||
function say
|
||||
{
|
||||
echo "$me: $*"
|
||||
}
|
||||
|
||||
function usage
|
||||
{
|
||||
cat <<-EOF
|
||||
Usage: $me [-p] normal versioning
|
||||
$me [-n] [-d] [-t] test options
|
||||
-p build public urls, NS3_WWW_URLS=public is an alternative
|
||||
|
||||
Testing options:
|
||||
-n pretend we are on nsnam.org
|
||||
-d pretend we are in the automated build directory
|
||||
-t pretend we are at a repo tag
|
||||
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
# script arguments
|
||||
say
|
||||
public=0
|
||||
nsnam=0
|
||||
daily=0
|
||||
tag=0
|
||||
|
||||
while getopts :pndth option ; do
|
||||
case $option in
|
||||
(p) public=1 ;;
|
||||
(n) nsnam=1 ;;
|
||||
|
||||
(d) daily=1 ;;
|
||||
|
||||
(t) tag=1 ;;
|
||||
|
||||
(h) usage ;;
|
||||
(:) say "Missing argument to -$OPTARG" ; usage ;;
|
||||
(\?) say "Invalid option: -$OPTARG" ; usage ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Hostname, fully qualified, e.g. nsnam.ece.gatech.edu
|
||||
HOST=`hostname`
|
||||
NSNAM="nsnam.ece.gatech.edu"
|
||||
|
||||
# Build directory
|
||||
DAILY="^/tmp/daily-nsnam/"
|
||||
|
||||
if [ $nsnam -eq 1 ]; then
|
||||
HOST=$NSNAM
|
||||
say "-n forcing HOST = $HOST"
|
||||
fi
|
||||
|
||||
if [ $daily -eq 1 ] ; then
|
||||
OLDPWD=$PWD
|
||||
PWD=/tmp/daily-nsnam/foo
|
||||
say "-d forcing PWD = $PWD"
|
||||
fi
|
||||
|
||||
if [ $tag -eq 1 ]; then
|
||||
version="ns-3.14"
|
||||
say "-t forcing tagged version = $version"
|
||||
fi
|
||||
|
||||
if ((nsnam + daily + tag > 0)) ; then
|
||||
say
|
||||
fi
|
||||
|
||||
if [[ ($public == 1) || \
|
||||
("${NS3_WWW_URLS:-}" == "public") || \
|
||||
( ($HOST == $NSNAM) && ($PWD =~ $DAILY) ) ]] ; then
|
||||
PUBLIC=1
|
||||
say "building public docs for nsnam.org"
|
||||
else
|
||||
PUBLIC=0
|
||||
say "building private docs"
|
||||
fi
|
||||
|
||||
if [ $daily -eq 1 ]; then
|
||||
PWD=$OLDPWD
|
||||
fi
|
||||
|
||||
# Destination javascript file
|
||||
outf="doc/ns3_html_theme/static/ns3_version.js"
|
||||
|
||||
# Distance from last tag
|
||||
# Zero distance means we're at the tag
|
||||
distance=`hg log -r tip --template '{latesttagdistance}'`
|
||||
|
||||
if [ $distance -eq 1 ]; then
|
||||
version=`hg log -r tip --template '{latesttag}'`
|
||||
say "at tag $version"
|
||||
|
||||
elif [ $tag -eq 1 ]; then
|
||||
distance=1
|
||||
# version previously set
|
||||
vers_href=
|
||||
|
||||
else
|
||||
version=`hg log -r tip --template '{node|short}'`
|
||||
# Check for uncommitted changes
|
||||
hg summary | grep -q 'commit: (clean)'
|
||||
if [ ! $? ] ; then
|
||||
say "beyond latest tag, last commit: $version, dirty"
|
||||
dirty="(+)"
|
||||
else
|
||||
say "beyond latest tag, last commit: $version, clean"
|
||||
dirty=
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $PUBLIC -eq 1 ]; then
|
||||
echo "// ns3_version.js: automatically generated" > $outf
|
||||
echo "// public urls" >> $outf
|
||||
# Generate URL relative to server root
|
||||
echo "var ns3_host = \"/\";" >> $outf
|
||||
|
||||
if [ $distance -eq 1 ]; then
|
||||
# Like "http://www.nsnam.org/ns-3-14"
|
||||
vers_href="http://www.nsnam.org/ns-3-${version#ns-3.}"
|
||||
vers_href="<a href=\\\"$vers_href\\\">$version$dirty</a>"
|
||||
|
||||
echo "var ns3_version = \"Release $vers_href\";" >> $outf
|
||||
echo "var ns3_release = \"docs/release/${version#ns-}/\";" >> $outf
|
||||
else
|
||||
# Like "http://code.nsnam.org/ns-3-dev/rev/<hash>"
|
||||
vers_href="http://code.nsnam.org/ns-3-dev/rev/$version"
|
||||
version="<a href=\\\"$vers_href\\\">$version$dirty</a>"
|
||||
|
||||
echo "var ns3_version = \"ns-3-dev @ $version\";" >> $outf
|
||||
echo "var ns3_release = \"docs/\";" >> $outf
|
||||
fi
|
||||
echo "var ns3_local = \"\";" >> $outf
|
||||
echo "var ns3_doxy = \"doxygen/\";" >> $outf
|
||||
|
||||
else
|
||||
repo=`basename $PWD`
|
||||
echo "// ns3_version.js: automatically generated" > $outf
|
||||
echo "// private urls" >> $outf
|
||||
echo "var ns3_host = \"file://$PWD/\";" > $outf
|
||||
echo "var ns3_version = \"$repo @ $version$dirty\";" >> $outf
|
||||
echo "var ns3_release = \"doc/\";" >> $outf
|
||||
echo "var ns3_local = \"build/\";" >> $outf
|
||||
echo "var ns3_doxy = \"html/\";" >> $outf
|
||||
fi
|
||||
|
||||
# Copy to html directories
|
||||
# This seems not always done automatically
|
||||
# by Sphinx when rebuilding
|
||||
cd doc 2>&1 >/dev/null
|
||||
for d in {manual,models,tutorial{,-pt-br}}/build/{single,}html/_static/ ; do
|
||||
# expect the copy to fail if the destination dir
|
||||
# hasn't been created by a prior doc build
|
||||
cp ns3_html_theme/static/ns3_version.js $d
|
||||
done
|
||||
cd - 2>&1 >/dev/null
|
||||
|
||||
# Show what was done
|
||||
say
|
||||
say "outf = $outf:"
|
||||
cat -n $outf
|
||||
say Done.
|
||||
@@ -0,0 +1,121 @@
|
||||
{#
|
||||
ns-3/layout.html
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Sphinx layout template for ns-3.
|
||||
|
||||
:copyright: Copyright 2012 by ns-3, see AUTHORS.
|
||||
:license: GPL, see LICENSE for details.
|
||||
#}
|
||||
{% extends "basic/layout.html" %}
|
||||
|
||||
{% set reldelim1 = '<span class="navelem"> </span>' %}
|
||||
{# set reldelim1 = ' @' #}
|
||||
|
||||
{%- block extrahead %}
|
||||
{%- if theme_customstylesheet %}
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="{{ pathto('_static/'+theme_customstylesheet, 1) }}" />
|
||||
{%- endif %}
|
||||
|
||||
{%- if theme_favicon %}
|
||||
<link rel="icon" type="image/ico"
|
||||
href="{{ pathto('_static/'+theme_favicon, 1) }}" />
|
||||
{%- endif %}
|
||||
|
||||
<script type="text/javascript" src="_static/drop-down-menu.js"></script>
|
||||
<script type="text/javascript" src="_static/ns3_version.js"></script>
|
||||
<script type="text/javascript">var ns3_builder="{{builder}}";</script>
|
||||
<script type="text/javascript" src="_static/ns3_links.js"></script>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0" width="100%">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo">
|
||||
<a id="ns3_home1"
|
||||
href="http://www.nsnam.org/">
|
||||
<img alt="ns-3 Logo"
|
||||
src="{{ pathto('_static/' + theme_logo, 1)}}"/>
|
||||
</a>
|
||||
</td>
|
||||
<td id="projecttext">
|
||||
<div id="projectbrief">A Discrete-Event Network Simulator</div>
|
||||
<span id="projectnumber"><script type="text/javascript">document.write(ns3_version)</script></span>
|
||||
</td>
|
||||
|
||||
<td id="ns3-menu">
|
||||
<div class="menu">
|
||||
<ul >
|
||||
<li><a id="ns3_home2"
|
||||
href="http://www.nsnam.org/"
|
||||
> Home</a>
|
||||
</li>
|
||||
<li><span
|
||||
onmouseover="mopen('mTuts')"
|
||||
onmouseout="mclosetime()"
|
||||
>Tutorials ▼</span>
|
||||
<div id="mTuts"
|
||||
onmouseover="mcancelclosetime()"
|
||||
onmouseout="mclosetime()">
|
||||
<a id="ns3_tut"
|
||||
href="/docs/tutorial/html/index.html"
|
||||
>English</a><br/>
|
||||
<a id="ns3_ptbr"
|
||||
href="/docs/tutorial-pt-br/html/index.html"
|
||||
>Portuguese</a><br/>
|
||||
</li>
|
||||
<li><span
|
||||
onmouseover="mopen('mDocs')"
|
||||
onmouseout="mclosetime()"
|
||||
>Docs ▼</span>
|
||||
<div id="mDocs"
|
||||
onmouseover="mcancelclosetime()"
|
||||
onmouseout="mclosetime()">
|
||||
<a id="ns3_wiki"
|
||||
href="http://www.nsnam.org/wiki"
|
||||
>Wiki</a><br/>
|
||||
<a id="ns3_man"
|
||||
href="/docs/manual/html/index.html"
|
||||
>Manual</a><br/>
|
||||
<a id="ns3_mod"
|
||||
href="/docs/models/html/index.html"
|
||||
>Models</a><br/>
|
||||
</li>
|
||||
<li><span
|
||||
onmouseover="mopen('mDev')"
|
||||
onmouseout="mclosetime()"
|
||||
>Develop ▼</span>
|
||||
<div id="mDev"
|
||||
onmouseover="mcancelclosetime()"
|
||||
onmouseout="mclosetime()">
|
||||
<a id="ns3_api"
|
||||
href="/docs/doxygen/html/index.html"
|
||||
>API</a><br/>
|
||||
<a id="ns3_bugs"
|
||||
href="http://www.nsnam.org/bugzilla/">Bugs</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td id="projectsection">
|
||||
<span style="margin-right:10px">{{ shorttitle }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<script type="text/javascript">ns3_write_links()</script>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block rootrellink %}
|
||||
<li class="navelem"><a href="{{ theme_homepage }}">{{ theme_projectname }}</a><span class="navelem"> </span></li>
|
||||
{{ super() }}
|
||||
{% endblock %}
|
||||
|
||||
{% if theme_collapsiblesidebar|tobool %}
|
||||
{% set script_files = script_files + ['_static/sidebar.js'] %}
|
||||
{% endif %}
|
||||
@@ -0,0 +1,20 @@
|
||||
<!-- start footer part -->
|
||||
<!--BEGIN GENERATE_TREEVIEW-->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
$navpath
|
||||
<li class="footer">$generatedby
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="$relpath$doxygen.png" alt="doxygen"/></a> $doxygenversion </li>
|
||||
</ul>
|
||||
</div>
|
||||
<!--END GENERATE_TREEVIEW-->
|
||||
<!--BEGIN !GENERATE_TREEVIEW-->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
$generatedby  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="$relpath$doxygen.png" alt="doxygen"/>
|
||||
</a> $doxygenversion
|
||||
</small></address>
|
||||
<!--END !GENERATE_TREEVIEW-->
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,105 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"></meta>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"></meta>
|
||||
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
|
||||
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
|
||||
<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"></link>
|
||||
<script type="text/javascript" src="$relpath$jquery.js"></script>
|
||||
<script type="text/javascript" src="$relpath$dynsections.js"></script>
|
||||
$treeview
|
||||
$search
|
||||
$mathjax
|
||||
<link href="$relpath$doxygen.css" rel="stylesheet" type="text/css"></link>
|
||||
<link href="$relpath$ns3_stylesheet.css" rel="stylesheet" type="text/css"></link>
|
||||
<link href="$relpath$favicon.ico" rel="shortcut icon" type="image/ico"></link>
|
||||
<script type="text/javascript" src="$relpath$drop-down-menu.js"></script>
|
||||
<script type="text/javascript" src="$relpath$ns3_version.js"></script>
|
||||
<script type="text/javascript" src="$relpath$ns3_links.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
|
||||
<!--BEGIN TITLEAREA-->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0" width="100%">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo">
|
||||
<a id="ns3_home1"
|
||||
href="http://www.nsnam.org/">
|
||||
<img alt="ns-3 Logo"
|
||||
src="$relpath$$projectlogo"/>
|
||||
</a>
|
||||
</td>
|
||||
<td id="projecttext">
|
||||
<div id="projectbrief">A Discrete-Event Network Simulator</div>
|
||||
<span id="projectnumber"><script type="text/javascript">document.write(ns3_version)</script></span>
|
||||
|
||||
</td>
|
||||
<td id="ns3-menu">
|
||||
<div class="menu">
|
||||
<ul >
|
||||
<li><a id="ns3_home2"
|
||||
href="http://www.nsnam.org/"
|
||||
> Home</a>
|
||||
</li>
|
||||
<li><span
|
||||
onmouseover="mopen('mTuts')"
|
||||
onmouseout="mclosetime()"
|
||||
>Tutorials ▼</span>
|
||||
<div id="mTuts"
|
||||
onmouseover="mcancelclosetime()"
|
||||
onmouseout="mclosetime()">
|
||||
<a id="ns3_tut"
|
||||
href="/docs/tutorial/html/index.html"
|
||||
>English</a><br/>
|
||||
<a id="ns3_ptbr"
|
||||
href="/docs/tutorial-pt-br/html/index.html"
|
||||
>Portuguese</a><br/>
|
||||
</li>
|
||||
<li><span
|
||||
onmouseover="mopen('mDocs')"
|
||||
onmouseout="mclosetime()"
|
||||
>Docs ▼</span>
|
||||
<div id="mDocs"
|
||||
onmouseover="mcancelclosetime()"
|
||||
onmouseout="mclosetime()">
|
||||
<a id="ns3_wiki"
|
||||
href="http://www.nsnam.org/wiki"
|
||||
>Wiki</a><br/>
|
||||
<a id="ns3_man"
|
||||
href="/docs/manual/html/index.html"
|
||||
>Manual</a><br/>
|
||||
<a id="ns3_mod"
|
||||
href="/docs/models/html/index.html"
|
||||
>Models</a><br/>
|
||||
</li>
|
||||
<li><span
|
||||
onmouseover="mopen('mDev')"
|
||||
onmouseout="mclosetime()"
|
||||
>Develop ▼</span>
|
||||
<div id="mDev"
|
||||
onmouseover="mcancelclosetime()"
|
||||
onmouseout="mclosetime()">
|
||||
<a id="ns3_api"
|
||||
href="/docs/doxygen/index.html"
|
||||
>API</a><br/>
|
||||
<a id="ns3_bugs"
|
||||
href="http://www.nsnam.org/bugzilla/">Bugs</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td id="projectsection">
|
||||
<span style="margin-right:10px">API</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<script type="text/javascript">ns3_write_links()</script>
|
||||
</div>
|
||||
<!--END TITLEAREA-->
|
||||
<!-- end header part -->
|
||||
|
After Width: | Height: | Size: 362 B |
|
After Width: | Height: | Size: 635 B |
@@ -0,0 +1,310 @@
|
||||
/*
|
||||
* default.css_t
|
||||
* ~~~~~~~~~~~~~
|
||||
*
|
||||
* Sphinx stylesheet -- default theme.
|
||||
*
|
||||
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
@import url("basic.css");
|
||||
|
||||
/* -- page layout ----------------------------------------------------------- */
|
||||
|
||||
body {
|
||||
font-family: {{ theme_bodyfont }};
|
||||
font-size: 100%;
|
||||
background-color: {{ theme_footerbgcolor }};
|
||||
color: #000;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
div.document {
|
||||
background-color: {{ theme_sidebarbgcolor }};
|
||||
}
|
||||
|
||||
div.documentwrapper {
|
||||
float: left;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.bodywrapper {
|
||||
margin: 0 0 0 {{ theme_sidebarwidth|toint }}px;
|
||||
}
|
||||
|
||||
div.body {
|
||||
background-color: {{ theme_bgcolor }};
|
||||
color: {{ theme_textcolor }};
|
||||
padding: 0 20px 30px 20px;
|
||||
}
|
||||
|
||||
{%- if theme_rightsidebar|tobool %}
|
||||
div.bodywrapper {
|
||||
margin: 0 {{ theme_sidebarwidth|toint }}px 0 0;
|
||||
}
|
||||
{%- endif %}
|
||||
|
||||
div.footer {
|
||||
color: {{ theme_footertextcolor }};
|
||||
width: 100%;
|
||||
padding: 9px 0 9px 0;
|
||||
text-align: center;
|
||||
font-size: 75%;
|
||||
}
|
||||
|
||||
div.footer a {
|
||||
color: {{ theme_footertextcolor }};
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
div.related {
|
||||
background-color: {{ theme_relbarbgcolor }};
|
||||
line-height: 30px;
|
||||
color: {{ theme_relbartextcolor }};
|
||||
}
|
||||
|
||||
div.related a {
|
||||
color: {{ theme_relbarlinkcolor }};
|
||||
}
|
||||
|
||||
div.sphinxsidebar {
|
||||
{%- if theme_stickysidebar|tobool %}
|
||||
top: 30px;
|
||||
bottom: 0;
|
||||
margin: 0;
|
||||
position: fixed;
|
||||
overflow: auto;
|
||||
height: auto;
|
||||
{%- endif %}
|
||||
{%- if theme_rightsidebar|tobool %}
|
||||
float: right;
|
||||
{%- if theme_stickysidebar|tobool %}
|
||||
right: 0;
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
}
|
||||
|
||||
{%- if theme_stickysidebar|tobool %}
|
||||
/* this is nice, but it it leads to hidden headings when jumping
|
||||
to an anchor */
|
||||
/*
|
||||
div.related {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
div.documentwrapper {
|
||||
margin-top: 30px;
|
||||
}
|
||||
*/
|
||||
{%- endif %}
|
||||
|
||||
div.sphinxsidebar h3 {
|
||||
font-family: {{ theme_headfont }};
|
||||
color: {{ theme_sidebartextcolor }};
|
||||
font-size: 1.4em;
|
||||
font-weight: normal;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
div.sphinxsidebar h3 a {
|
||||
color: {{ theme_sidebartextcolor }};
|
||||
}
|
||||
|
||||
div.sphinxsidebar h4 {
|
||||
font-family: {{ theme_headfont }};
|
||||
color: {{ theme_sidebartextcolor }};
|
||||
font-size: 1.3em;
|
||||
font-weight: normal;
|
||||
margin: 5px 0 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
div.sphinxsidebar p {
|
||||
color: {{ theme_sidebartextcolor }};
|
||||
}
|
||||
|
||||
div.sphinxsidebar p.topless {
|
||||
margin: 5px 10px 10px 10px;
|
||||
}
|
||||
|
||||
div.sphinxsidebar ul {
|
||||
margin: 10px;
|
||||
padding: 0;
|
||||
color: {{ theme_sidebartextcolor }};
|
||||
}
|
||||
|
||||
div.sphinxsidebar a {
|
||||
color: {{ theme_sidebarlinkcolor }};
|
||||
}
|
||||
|
||||
div.sphinxsidebar input {
|
||||
border: 1px solid {{ theme_sidebarlinkcolor }};
|
||||
font-family: sans-serif;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
{% if theme_collapsiblesidebar|tobool %}
|
||||
/* for collapsible sidebar */
|
||||
div#sidebarbutton {
|
||||
background-color: {{ theme_sidebarbtncolor }};
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
/* -- hyperlink styles ------------------------------------------------------ */
|
||||
|
||||
a {
|
||||
color: {{ theme_linkcolor }};
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: {{ theme_visitedlinkcolor }};
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
{% if theme_externalrefs|tobool %}
|
||||
a.external {
|
||||
text-decoration: none;
|
||||
border-bottom: 1px dashed {{ theme_linkcolor }};
|
||||
}
|
||||
|
||||
a.external:hover {
|
||||
text-decoration: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
a.external:visited {
|
||||
text-decoration: none;
|
||||
border-bottom: 1px dashed {{ theme_visitedlinkcolor }};
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
/* -- body styles ----------------------------------------------------------- */
|
||||
|
||||
div.body h1,
|
||||
div.body h2,
|
||||
div.body h3,
|
||||
div.body h4,
|
||||
div.body h5,
|
||||
div.body h6 {
|
||||
font-family: {{ theme_headfont }};
|
||||
background-color: {{ theme_headbgcolor }};
|
||||
font-weight: normal;
|
||||
color: {{ theme_headtextcolor }};
|
||||
border-bottom: 1px solid #ccc;
|
||||
margin: 20px -20px 10px -20px;
|
||||
padding: 3px 0 3px 10px;
|
||||
}
|
||||
|
||||
div.body h1 { margin-top: 0; font-size: 200%; }
|
||||
div.body h2 { font-size: 160%; }
|
||||
div.body h3 { font-size: 140%; }
|
||||
div.body h4 { font-size: 120%; }
|
||||
div.body h5 { font-size: 110%; }
|
||||
div.body h6 { font-size: 100%; }
|
||||
|
||||
a.headerlink {
|
||||
color: {{ theme_headlinkcolor }};
|
||||
font-size: 0.8em;
|
||||
padding: 0 4px 0 4px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.headerlink:hover {
|
||||
background-color: {{ theme_headlinkcolor }};
|
||||
color: white;
|
||||
}
|
||||
|
||||
div.body p, div.body dd, div.body li {
|
||||
text-align: justify;
|
||||
line-height: 130%;
|
||||
}
|
||||
|
||||
div.admonition p.admonition-title + p {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
div.admonition p {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
div.admonition pre {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
div.admonition ul, div.admonition ol {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
div.note {
|
||||
background-color: #eee;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
div.seealso {
|
||||
background-color: #ffc;
|
||||
border: 1px solid #ff6;
|
||||
}
|
||||
|
||||
div.topic {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
div.warning {
|
||||
background-color: #ffe4e4;
|
||||
border: 1px solid #f66;
|
||||
}
|
||||
|
||||
p.admonition-title {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
p.admonition-title:after {
|
||||
content: ":";
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 5px;
|
||||
background-color: {{ theme_codebgcolor }};
|
||||
color: {{ theme_codetextcolor }};
|
||||
line-height: 120%;
|
||||
border: 1px solid #ac9;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
tt {
|
||||
background-color: #ecf0f3;
|
||||
padding: 0 1px 0 1px;
|
||||
font-size: 0.95em;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #ede;
|
||||
}
|
||||
|
||||
.warning tt {
|
||||
background: #efc2c2;
|
||||
}
|
||||
|
||||
.note tt {
|
||||
background: #d6d6d6;
|
||||
}
|
||||
|
||||
.viewcode-back {
|
||||
font-family: {{ theme_bodyfont }};
|
||||
}
|
||||
|
||||
div.viewcode-block:target {
|
||||
background-color: #f4debf;
|
||||
border-top: 1px solid #ac9;
|
||||
border-bottom: 1px solid #ac9;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
// Copyright 2006-2007 javascript-array.com
|
||||
// http://javascript-array.com/scripts/simple_drop_down_menu/
|
||||
|
||||
var timeout = 250;
|
||||
var closetimer = 0;
|
||||
var ddmenuitem = 0;
|
||||
|
||||
// open hidden layer
|
||||
function mopen(id)
|
||||
{
|
||||
// cancel close timer
|
||||
mcancelclosetime();
|
||||
|
||||
// close old layer
|
||||
if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
|
||||
|
||||
// get new layer and show it
|
||||
ddmenuitem = document.getElementById(id);
|
||||
ddmenuitem.style.visibility = 'visible';
|
||||
|
||||
}
|
||||
// close showed layer
|
||||
function mclose()
|
||||
{
|
||||
if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
|
||||
}
|
||||
|
||||
// go close timer
|
||||
function mclosetime()
|
||||
{
|
||||
closetimer = window.setTimeout(mclose, timeout);
|
||||
}
|
||||
|
||||
// cancel close timer
|
||||
function mcancelclosetime()
|
||||
{
|
||||
if(closetimer)
|
||||
{
|
||||
window.clearTimeout(closetimer);
|
||||
closetimer = null;
|
||||
}
|
||||
}
|
||||
|
||||
// close layer when click-out
|
||||
document.onclick = mclose;
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 134 B |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 13 KiB |
@@ -0,0 +1,58 @@
|
||||
// nsnam.org links, independent of version
|
||||
var ns3_site = "http://www.nsnam.org/";
|
||||
var ns3_home = ns3_site + "";
|
||||
var ns3_wiki = ns3_site + "wiki";
|
||||
var ns3_bugs = ns3_site + "bugzilla";
|
||||
|
||||
// Links that depend on version:
|
||||
// Defined in ns3_version.js:
|
||||
|
||||
// ns3_host = "//" file://$PWD
|
||||
// ns3_version = "3.14" "3.14
|
||||
// = "ns-3-dev @ 12345abcde "repo @ 12345abcde
|
||||
// ns3_release = "docs/release/3.14/" "repo/"
|
||||
// ns3_local = "" "build/"
|
||||
//
|
||||
// This lets us build several kinds of links:
|
||||
// http://www.nsnam.org/docs/manual/html/index.html
|
||||
// http://www.nsnam.org/docs/release/3.14/manual/html/index.html
|
||||
// file:///.../doc/manual/build/html/index.html
|
||||
//
|
||||
// with the appropriate version string.
|
||||
|
||||
var ns3_index = "index.html";
|
||||
var ns3_rel = ns3_host + ns3_release;
|
||||
var ns3_api = ns3_rel + ns3_doxy + ns3_index;
|
||||
|
||||
// The Sphinx layout template defines
|
||||
// var ns3_builder = "html", or "singlehtml"
|
||||
// so we can condition the links on single/multi-page view.
|
||||
if (typeof ns3_builder != 'undefined') {
|
||||
if (ns3_builder == "singlehtml") {
|
||||
ns3_index = ns3_local + "singlehtml/" + ns3_index;
|
||||
} else {
|
||||
ns3_index = ns3_local + "html/" + ns3_index;
|
||||
}
|
||||
}
|
||||
else {
|
||||
ns3_index = ns3_local + "html/" + ns3_index;
|
||||
}
|
||||
|
||||
|
||||
var ns3_man = ns3_rel + "manual/" + ns3_index;
|
||||
var ns3_mod = ns3_rel + "models/" + ns3_index;
|
||||
var ns3_tut = ns3_rel + "tutorial/" + ns3_index;
|
||||
var ns3_ptbr = ns3_rel + "tutorial-pt-br/" + ns3_index;
|
||||
|
||||
function ns3_write_links() {
|
||||
document.getElementById("ns3_home1").href = ns3_home;
|
||||
document.getElementById("ns3_home2").href = ns3_home;
|
||||
document.getElementById("ns3_wiki" ).href = ns3_wiki;
|
||||
document.getElementById("ns3_bugs" ).href = ns3_bugs;
|
||||
|
||||
document.getElementById("ns3_api" ).href = ns3_api;
|
||||
document.getElementById("ns3_man" ).href = ns3_man;
|
||||
document.getElementById("ns3_mod" ).href = ns3_mod;
|
||||
document.getElementById("ns3_tut" ).href = ns3_tut;
|
||||
document.getElementById("ns3_ptbr" ).href = ns3_ptbr;
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
/* ns-3 changes to the default CSS from Doxygen and Sphinx */
|
||||
|
||||
body,
|
||||
table,
|
||||
div,
|
||||
p,
|
||||
dl {
|
||||
color: black;
|
||||
font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #91A501;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Sphinx headings */
|
||||
div.body h1,
|
||||
div.body h2,
|
||||
div.body h3,
|
||||
div.body h4,
|
||||
div.body h5,
|
||||
div.body h6 {
|
||||
background-image: url('nav_f.png');
|
||||
}
|
||||
|
||||
/* Doxygen side bar */
|
||||
#nav-tree {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#nav-tree a {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* Sphinx nav links bar (relbar) */
|
||||
div.related {
|
||||
background-image:url('tab_b.png')
|
||||
}
|
||||
|
||||
div.related h3 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.related a {
|
||||
color: #91A501;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.related li {
|
||||
background-image: url('bc_s.png');
|
||||
background-position: 100% 40%;
|
||||
background-repeat: no-repeat;
|
||||
padding-left: 10px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
div.related li.right {
|
||||
background-image: none;
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
}
|
||||
|
||||
/* Sphinx side bar */
|
||||
div.sphinxsidebar {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
div.sphinxsidebar a {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
|
||||
/* Title bar elements */
|
||||
|
||||
#titlearea {
|
||||
background-image:url('bar-top.png');
|
||||
background-repeat:repeat;
|
||||
border-bottom: 1px solid #5B5B5B;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#projectlogo {
|
||||
color: white;
|
||||
margin: 10px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
#projecttext {
|
||||
align: left;
|
||||
font-color:white;
|
||||
padding-left: 2em;
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
#projectbrief {
|
||||
color: white;
|
||||
font: 120% Tahoma, Arial,sans-serif;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
#projectnumber {
|
||||
color: white;
|
||||
font: 100% Tahoma, Arial,sans-serif;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
#projectsection {
|
||||
color: white;
|
||||
font: 24pt Aldo, Tahoma, Arial,sans-serif;
|
||||
margin-right: 10px;
|
||||
margin: 10px;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/*
|
||||
ns-3 Main-menu, based on WordPress site
|
||||
|
||||
Drop down menu based on Simple Javascript Drop-Down Menu v2.0
|
||||
http://javascript-array.com/scripts/simple_drop_down_menu/
|
||||
*/
|
||||
|
||||
#ns3-menu .menu {
|
||||
background-image: url('menu-bgr-400.png');
|
||||
/* background-origin: padding-box; */
|
||||
/* background-position: -10px 0; */
|
||||
background-repeat: no-repeat;
|
||||
display: table-cell;
|
||||
float:left;
|
||||
height: 40px;
|
||||
margin: 0px 0px 0px 0px;
|
||||
overflow: hidden;
|
||||
padding:0px 0px 0px 0px;
|
||||
vertical-align: middle;
|
||||
width: 450px;
|
||||
}
|
||||
|
||||
|
||||
#ns3-menu .menu ul {
|
||||
/* float:left; */
|
||||
height: 40;
|
||||
list-style:none;
|
||||
margin:0px 0px 0px -2px;
|
||||
/* overflow:hidden; */
|
||||
padding:0px 0px 0px 0px;
|
||||
z-index: 30;
|
||||
}
|
||||
|
||||
#ns3-menu .menu ul li {
|
||||
background-image: url('ver.png');
|
||||
background-origin: padding-box;
|
||||
background-position: 0 11px;
|
||||
background-repeat: no-repeat;
|
||||
color:#ffffff;
|
||||
float:left;
|
||||
font-family: Aldo, Tahoma, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
/* height:40px; */
|
||||
margin:0px 0px 0px 0px;
|
||||
/* overflow:hidden; */
|
||||
padding:11px 13px 0px 12px;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
|
||||
#ns3-menu .menu ul li a {
|
||||
color:#ffffff;
|
||||
/* cursor: pointer; */
|
||||
display:block;
|
||||
float:left;
|
||||
font-weight: normal; /* default anchors are bold */
|
||||
text-decoration:none; /* default anchors are underlined */
|
||||
}
|
||||
|
||||
#ns3-menu .menu ul li a:hover {
|
||||
color:#cadc48;
|
||||
text-decoration:none; /* don't add underline on hover */
|
||||
}
|
||||
|
||||
#ns3-menu .menu div {
|
||||
background: #94A901;
|
||||
background-size: 100%; 100%
|
||||
color:#ffffff;
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#ns3-menu .menu div a {
|
||||
position: relative;
|
||||
display: block;
|
||||
float: left;
|
||||
font-family: Aldo, Tahoma, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
padding: 5px 10px;
|
||||
text-align: left;
|
||||
width: auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#ns3-menu .menu div a:hover {
|
||||
color:#cadc48;
|
||||
text-decoration:none; /* don't add underline on hover */
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
* sidebar.js
|
||||
* ~~~~~~~~~~
|
||||
*
|
||||
* This script makes the Sphinx sidebar collapsible.
|
||||
*
|
||||
* .sphinxsidebar contains .sphinxsidebarwrapper. This script adds
|
||||
* in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton
|
||||
* used to collapse and expand the sidebar.
|
||||
*
|
||||
* When the sidebar is collapsed the .sphinxsidebarwrapper is hidden
|
||||
* and the width of the sidebar and the margin-left of the document
|
||||
* are decreased. When the sidebar is expanded the opposite happens.
|
||||
* This script saves a per-browser/per-session cookie used to
|
||||
* remember the position of the sidebar among the pages.
|
||||
* Once the browser is closed the cookie is deleted and the position
|
||||
* reset to the default (expanded).
|
||||
*
|
||||
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
$(function() {
|
||||
// global elements used by the functions.
|
||||
// the 'sidebarbutton' element is defined as global after its
|
||||
// creation, in the add_sidebar_button function
|
||||
var bodywrapper = $('.bodywrapper');
|
||||
var sidebar = $('.sphinxsidebar');
|
||||
var sidebarwrapper = $('.sphinxsidebarwrapper');
|
||||
|
||||
// for some reason, the document has no sidebar; do not run into errors
|
||||
if (!sidebar.length) return;
|
||||
|
||||
// original margin-left of the bodywrapper and width of the sidebar
|
||||
// with the sidebar expanded
|
||||
var bw_margin_expanded = bodywrapper.css('margin-left');
|
||||
var ssb_width_expanded = sidebar.width();
|
||||
|
||||
// margin-left of the bodywrapper and width of the sidebar
|
||||
// with the sidebar collapsed
|
||||
var bw_margin_collapsed = '.8em';
|
||||
var ssb_width_collapsed = '.8em';
|
||||
|
||||
// colors used by the current theme
|
||||
var dark_color = $('.related').css('background-color');
|
||||
var light_color = $('.document').css('background-color');
|
||||
|
||||
function sidebar_is_collapsed() {
|
||||
return sidebarwrapper.is(':not(:visible)');
|
||||
}
|
||||
|
||||
function toggle_sidebar() {
|
||||
if (sidebar_is_collapsed())
|
||||
expand_sidebar();
|
||||
else
|
||||
collapse_sidebar();
|
||||
}
|
||||
|
||||
function collapse_sidebar() {
|
||||
sidebarwrapper.hide();
|
||||
sidebar.css('width', ssb_width_collapsed);
|
||||
bodywrapper.css('margin-left', bw_margin_collapsed);
|
||||
sidebarbutton.css({
|
||||
'margin-left': '0',
|
||||
'height': bodywrapper.height()
|
||||
});
|
||||
sidebarbutton.find('span').text('»');
|
||||
sidebarbutton.attr('title', _('Expand sidebar'));
|
||||
document.cookie = 'sidebar=collapsed';
|
||||
}
|
||||
|
||||
function expand_sidebar() {
|
||||
bodywrapper.css('margin-left', bw_margin_expanded);
|
||||
sidebar.css('width', ssb_width_expanded);
|
||||
sidebarwrapper.show();
|
||||
sidebarbutton.css({
|
||||
'margin-left': ssb_width_expanded-12,
|
||||
'height': bodywrapper.height()
|
||||
});
|
||||
sidebarbutton.find('span').text('«');
|
||||
sidebarbutton.attr('title', _('Collapse sidebar'));
|
||||
document.cookie = 'sidebar=expanded';
|
||||
}
|
||||
|
||||
function add_sidebar_button() {
|
||||
sidebarwrapper.css({
|
||||
'float': 'left',
|
||||
'margin-right': '0',
|
||||
'width': ssb_width_expanded - 28
|
||||
});
|
||||
// create the button
|
||||
sidebar.append(
|
||||
'<div id="sidebarbutton"><span>«</span></div>'
|
||||
);
|
||||
var sidebarbutton = $('#sidebarbutton');
|
||||
light_color = sidebarbutton.css('background-color');
|
||||
// find the height of the viewport to center the '<<' in the page
|
||||
var viewport_height;
|
||||
if (window.innerHeight)
|
||||
viewport_height = window.innerHeight;
|
||||
else
|
||||
viewport_height = $(window).height();
|
||||
sidebarbutton.find('span').css({
|
||||
'display': 'block',
|
||||
'margin-top': (viewport_height - sidebar.position().top - 20) / 2
|
||||
});
|
||||
|
||||
sidebarbutton.click(toggle_sidebar);
|
||||
sidebarbutton.attr('title', _('Collapse sidebar'));
|
||||
sidebarbutton.css({
|
||||
'color': '#FFFFFF',
|
||||
'border-left': '1px solid ' + dark_color,
|
||||
'font-size': '1.2em',
|
||||
'cursor': 'pointer',
|
||||
'height': bodywrapper.height(),
|
||||
'padding-top': '1px',
|
||||
'margin-left': ssb_width_expanded - 12
|
||||
});
|
||||
|
||||
sidebarbutton.hover(
|
||||
function () {
|
||||
$(this).css('background-color', dark_color);
|
||||
},
|
||||
function () {
|
||||
$(this).css('background-color', light_color);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function set_position_from_cookie() {
|
||||
if (!document.cookie)
|
||||
return;
|
||||
var items = document.cookie.split(';');
|
||||
for(var k=0; k<items.length; k++) {
|
||||
var key_val = items[k].split('=');
|
||||
var key = key_val[0];
|
||||
if (key == 'sidebar') {
|
||||
var value = key_val[1];
|
||||
if ((value == 'collapsed') && (!sidebar_is_collapsed()))
|
||||
collapse_sidebar();
|
||||
else if ((value == 'expanded') && (sidebar_is_collapsed()))
|
||||
expand_sidebar();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
add_sidebar_button();
|
||||
var sidebarbutton = $('#sidebarbutton');
|
||||
set_position_from_cookie();
|
||||
});
|
||||
|
After Width: | Height: | Size: 146 B |
|
After Width: | Height: | Size: 938 B |
@@ -0,0 +1,50 @@
|
||||
[theme]
|
||||
inherit = basic
|
||||
stylesheet = default.css
|
||||
pygments_style = sphinx
|
||||
|
||||
[options]
|
||||
projectname = ns-3
|
||||
|
||||
homepage =
|
||||
|
||||
customstylesheet = ns3_stylesheet.css
|
||||
logo = ns-3-inverted-notext-small.png
|
||||
logoalt = ns-3 Logo
|
||||
last_updated_fmt = '%%b %%d, %%Y'
|
||||
|
||||
favicon = favicon.ico
|
||||
docstitle = Documentation
|
||||
|
||||
rightsidebar = false
|
||||
stickysidebar = false
|
||||
collapsiblesidebar = false
|
||||
externalrefs = false
|
||||
|
||||
bgcolor = white
|
||||
textcolor = black
|
||||
linkcolor = #91A501
|
||||
visitedlinkcolor = #91A501
|
||||
|
||||
headbgcolor = #E3E3E3
|
||||
headtextcolor = #373737
|
||||
headlinkcolor = #91A501
|
||||
|
||||
relbarbgcolor = #D5D5D5
|
||||
relbarlinkcolor = #373737
|
||||
relbartextcolor = #373737
|
||||
|
||||
sidebarbgcolor = #FAFAFA
|
||||
sidebartextcolor = #373737
|
||||
sidebarlinkcolor = #91A501
|
||||
sidebarbtncolor = #D5D5D5
|
||||
|
||||
footerbgcolor = #D5D5D5
|
||||
footertextcolor = #364D7C
|
||||
|
||||
codebgcolor = ##FBFCFD
|
||||
codetextcolor = black
|
||||
|
||||
bodyfont = 'Lucida Grande', Verdana, Geneva, Arial, sans-serif
|
||||
headfont = 'Lucida Grande', Verdana, Geneva, Arial, sans-serif
|
||||
|
||||
@@ -1,93 +1,89 @@
|
||||
Steps in doing an ns-3 release
|
||||
|
||||
ns-3-dev preparation
|
||||
--------------------
|
||||
We typically post release candidates for testing at the following URL:
|
||||
https://www.nsnam.org/release/ns-allinone-3.X.rcX.tar.bz2
|
||||
|
||||
1. check out a clean ns-3-dev somewhere using ns-3-allinone (you will need it)
|
||||
- hg clone http://code.nsnam.org/ns-3-allinone
|
||||
- ./download.py
|
||||
- ./build.py --enable-examples --enable-tests
|
||||
- try building static, optimized, and debug versions
|
||||
This overview covers the following release stages:
|
||||
1) new feature additions and bug fixing
|
||||
2) preparing release candidates for testing
|
||||
3) making the actual release
|
||||
4) maintaining the release
|
||||
|
||||
1) new feature additions and bug fixing
|
||||
---------------------------------------
|
||||
|
||||
During the software development phase, it is important for the release
|
||||
manager to try to maintain the following files with updated information:
|
||||
- AUTHORS
|
||||
- RELEASE_NOTES
|
||||
- CHANGES.html
|
||||
|
||||
otherwise, this becomes painful to edit (and things are forgotten)
|
||||
when the release is imminent.
|
||||
|
||||
2) preparing release candidates for testing
|
||||
-------------------------------------------
|
||||
|
||||
This step presumes that you have a reasonably solid ns-3-dev that you
|
||||
and/or the buildbots have been testing
|
||||
- building static, optimized, and debug versions
|
||||
- try Python visualizer (not tested by buildbots)
|
||||
-- ./waf --pyrun src/flow-monitor/examples/wifi-olsr-flowmon.py --vis
|
||||
- cd ns-3-dev
|
||||
- ensure that tests pass (./test.py -g) and make sure that the buildbots
|
||||
are reporting greens based on the tip of the repository
|
||||
|
||||
2. prepare the source files
|
||||
- revise and check in AUTHORS, if needed
|
||||
- revise and check in RELEASE_NOTES. Make sure to edit the Availability
|
||||
section if this is a final release.
|
||||
- DO NOT change VERSION at this time
|
||||
are reporting blue based on the tip of the repository
|
||||
- revise and check in AUTHORS, RELEASE_NOTES, and CHANGES.html
|
||||
- required versions for related libraries (nsc, netanim, pybindgen)
|
||||
are correct
|
||||
- confirm that Doxygen builds cleanly (./waf doxygen),
|
||||
and check in any necessary changes. Currently, doxygen does not build
|
||||
cleanly, we need to fix this over time.
|
||||
- confirm all documents build: './waf docs' and check outputs
|
||||
|
||||
At this point, the ns-3-dev should be ready, except for changing the
|
||||
name of this repo from "3-dev" to the numbered release. That will come
|
||||
in subsequent steps.
|
||||
|
||||
ns-allinone-3.X.tar.bz2 dry run
|
||||
-------------------------------
|
||||
|
||||
This phase is optional to dry-run a tarball before tagging. You may skip
|
||||
to the next phase if you are ready to just make the release or release
|
||||
candidate.
|
||||
|
||||
1. check out a clean ns-3-allinone again
|
||||
- change into the allinone directory
|
||||
Check out a clean ns-3-dev somewhere using ns-3-allinone
|
||||
- hg clone http://code.nsnam.org/ns-3-allinone
|
||||
- ./download.py
|
||||
- cd ns-3-dev
|
||||
- change VERSION to the appropriate string, either "3.X" (for a release) or
|
||||
"3.X.RC1" Do not commit this VERSION change to ns-3-dev. It is used
|
||||
by dist.py script to name the directory properly.
|
||||
- cd into allinone directory and type "./dist.py"; you should see something
|
||||
like this:
|
||||
- edit VERSION such as "ns-3.14.rc1" (DO NOT commit this change to ns-3-dev)
|
||||
- cd ..
|
||||
- ./dist.py
|
||||
|
||||
NS-3 version: '3.12'
|
||||
Adding ns-3-dev as ns-allinone-3.12/ns-3.12
|
||||
Adding pybindgen as ns-allinone-3.12/pybindgen-0.15.0.795
|
||||
Adding nsc as ns-allinone-3.12/nsc-0.5.2
|
||||
Adding the build script files
|
||||
This should yield a compressed tarfile, such as: ns-allinone-3.14.rc1.tar.bz2
|
||||
Test this, and when satisfied, upload it to
|
||||
www.nsnam.org:/var/www/html/releases/ (with apache:apache file ownership)
|
||||
|
||||
This will create an ns-allinone-3.X.tar.bz2 tarball
|
||||
Announce it to ns-developers as:
|
||||
https://www.nsnam.org/release/ns-allinone-3.14.rc1.tar.bz2
|
||||
|
||||
2. test tarball on release platforms
|
||||
- optimized, debug, and static builds
|
||||
- ./test.py -g
|
||||
- make latexpdf in the doc/manual, doc/models, and doc/tutorial directories
|
||||
- ./waf --doxygen
|
||||
Iterate the above as needed during the release testing phase.
|
||||
|
||||
Note, in the past we have added mercurial tags to ns-3-dev to denote
|
||||
release candidates, but lately we have not been bothering with this.
|
||||
If you would like to tag a release candidate, follow these steps
|
||||
-- hg tag "ns-3.X.rcX" (for the appropriate version numbers)
|
||||
-- hg push ssh://code@code.nsnam.org/repos/ns-3-dev
|
||||
|
||||
3) making the release
|
||||
---------------------
|
||||
|
||||
Follow similar steps for creating the release candidate tarballs, except
|
||||
we will work off of a release repository.
|
||||
|
||||
At this point, you are ready for final packaging and repository/site work
|
||||
|
||||
tagging ns-3-dev and creating ns-3.X repositories
|
||||
-------------------------------------------------
|
||||
|
||||
The steps here involve tagging ns-3-dev, copying over ns-3-dev to ns-3.X
|
||||
on code.nsnam.org, cloning it locally, making changes from "3-dev" to "3.X"
|
||||
in various places, and checking in those changes to the new ns-3.X repository.
|
||||
We'll refer to the release number as "X" or "x" below. The steps here
|
||||
involve tagging ns-3-dev, copying over ns-3-dev to ns-3.X on code.nsnam.org,
|
||||
cloning it locally, making changes from "3-dev" to "3.X" in various places,
|
||||
and checking in those changes to the new ns-3.X repository.
|
||||
|
||||
1. once you are happy with the tarball, tag ns-3-dev
|
||||
1. once you are happy with the most recent release candidate tarball and
|
||||
do not plan to further touch ns-3-dev, tag ns-3-dev
|
||||
- cd into ns-3-dev
|
||||
- if release candidate
|
||||
-- hg tag "ns-3.x-RCy"
|
||||
-- hg push ssh://code@code.nsnam.org//home/code/repos/ns-3-dev
|
||||
- else if final release
|
||||
-- hg tag "ns-3.x"
|
||||
-- hg push ssh://code@code.nsnam.org//home/code/repos/ns-3-dev
|
||||
|
||||
2. copy the tagged ns-3-dev and place it on the repository
|
||||
- ssh code.nsnam.org; sudo bash; su code;
|
||||
- if release candidate
|
||||
-- cp -r /home/code/repos/ns-3-dev /home/code/repos/ns-3.x-RCy
|
||||
-- cd /home/code/repos/ns-3.x-RCy/.hg and edit the hgrc appropriately:
|
||||
[paths]
|
||||
default = /home/code/repos/ns-3.x-RCy
|
||||
[web]
|
||||
description = ns-3.x-RCy release
|
||||
name = ns-3.x-RCy
|
||||
contact = <ns-developers@isi.edu>
|
||||
- else if final release
|
||||
-- cp -r /home/code/repos/ns-3-dev /home/code/repos/ns-3.x
|
||||
-- cd /home/code/repos/ns-3.x/.hg and edit the hgrc appropriately:
|
||||
[paths]
|
||||
@@ -97,21 +93,20 @@ in various places, and checking in those changes to the new ns-3.X repository.
|
||||
name = ns-3.x
|
||||
contact = <ns-developers@isi.edu>
|
||||
|
||||
3. If this is a final release (not RC)
|
||||
- move (mv) ns-3.x RCs in /home/code/archived-repos
|
||||
3. check out a clean version of the new release (ns-3.x)
|
||||
to a scratch directory on your local machine
|
||||
- hg clone http://code.nsnam.org/ns-3.x
|
||||
|
||||
4. check out a clean version of the new release (ns-3.x) or (ns-3.x-RCy)
|
||||
to your local machine
|
||||
- hg clone http://code.nsnam.org/ns-3.x or (-RCy)
|
||||
|
||||
5. Update the VERSION for this new release
|
||||
5. Update the VERSION for this new release, in the ns-3.x directory (i.e.
|
||||
NOT in ns-3-dev)
|
||||
- change the string 3-dev in the VERSION file to the real version
|
||||
(e.g. 3.7 or 3.7-RC1) This must agree with the version name you chose in the clone.
|
||||
(e.g. 3.14) This must agree with the version name you chose in the clone.
|
||||
- change the version and release string for the documentation in
|
||||
doc/manual/source, doc/tutorial/source, and doc/models/source conf.py files
|
||||
doc/manual/source, doc/tutorial/source, doc/tutorial-pt/source,
|
||||
and doc/models/source conf.py files
|
||||
This should hopefully be updated in the future to simply pull from the
|
||||
VERSION file.
|
||||
- hg commit -m "update VERSION to ns-3.x" or (-RCy), you get the point
|
||||
- hg commit -m "update VERSION to ns-3.x"
|
||||
- hg push ssh://code@code.nsnam.org//home/code/repos/ns-3.x
|
||||
|
||||
creating the distribution tarball
|
||||
@@ -145,9 +140,7 @@ preparing the documentation
|
||||
|
||||
1. If final release, build release documentation
|
||||
- sudo bash; su nsnam; cd /home/nsnam/bin
|
||||
./update-doxygen-release ns-3.x
|
||||
./update-manual-release ns-3.x
|
||||
./update-tutorial-release ns-3.x
|
||||
./update-docs -r http://code.nsnam.org/ns-3.x -R
|
||||
|
||||
2. Check if these new files are available on the website
|
||||
|
||||
@@ -171,7 +164,7 @@ Documentation)
|
||||
4. The main page http://www.nsnam.org should point to
|
||||
ns-3.x in the "Download" and "Documentation" boxes
|
||||
|
||||
5. Create blog entry to announce release
|
||||
5. Create a blog entry to announce release
|
||||
|
||||
ns-3 wiki edits
|
||||
---------------
|
||||
@@ -198,3 +191,24 @@ Announcing
|
||||
|
||||
2. announce to ns-developers and ns-3-users, with summary of release notes
|
||||
|
||||
|
||||
4) maintaining the release
|
||||
--------------------------
|
||||
|
||||
First, create skeletal sections in CHANGES.html and RELEASE_NOTES to
|
||||
start collecting inputs for the ns-3.(x+1) release.
|
||||
|
||||
The project may decide to make incremental, bug-fix releases from
|
||||
time to time, with a minor version number (e.g. ns-3.7.1). To do
|
||||
this, changesets may be cherry-picked from ns-3-dev and added to
|
||||
ns-3.x repository. Do not move over changesets that pertain to
|
||||
adding new features, but documentation fixes and bug fixes are good
|
||||
changesets to make available in a minor release. The same steps
|
||||
above for making a release are generally followed, although one
|
||||
does not need to create a separate repository, but instead just tags
|
||||
the existing ns-3-dev and ns-3.x repositories with a "ns-3.x.1" type
|
||||
of tag.
|
||||
|
||||
Also, on the main website, make sure that "latest release" points to
|
||||
the right page. See how it was handled for ns-3.12 (which made
|
||||
a minor release): https://www.nsnam.org/ns-3.12/
|
||||
@@ -56,7 +56,7 @@ release = 'ns-3-dev'
|
||||
|
||||
# The language for content autogenerated by . Refer to babel documentation
|
||||
# for a list of supported languages.
|
||||
language = 'pt-br'
|
||||
language = 'pt_BR'
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
@@ -93,7 +93,7 @@ pygments_style = 'sphinx'
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'default'
|
||||
html_theme = 'ns3_html_theme'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
@@ -101,11 +101,11 @@ html_theme = 'default'
|
||||
#html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = []
|
||||
html_theme_path = ['../..']
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = None
|
||||
html_title = 'Rastreamento'
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
@@ -126,7 +126,7 @@ html_static_path = ['_static']
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
#html_last_updated_fmt = '%b %d, %Y'
|
||||
html_last_updated_fmt = '%b %d, %Y %H:%M'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
@@ -180,13 +180,13 @@ htmlhelp_basename = 'ns-3doc'
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass [howto/manual]).
|
||||
latex_documents = [
|
||||
('index', 'ns-3-tutorial.tex', u'ns-3 Tutorial',
|
||||
('index', 'ns-3-tutorial.tex', u'ns-3 Rastreamento',
|
||||
u'ns-3 project', 'manual'),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
latex_logo = '../../ns3_html_theme/static/ns-3.png'
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
|
||||
@@ -18,7 +18,7 @@ ns-3 Tutorial
|
||||
This is the *ns-3 Tutorial*. Primary documentation for the ns-3 project is
|
||||
available in five forms:
|
||||
|
||||
Este é o *Tutorial do ns-3* baseado no *ns-3 Tutorial* (inglês). A documentação para o projeto ns-3 esta disponível da seguinte forma:
|
||||
Este é o *Tutorial do ns-3* baseado no *ns-3 Tutorial* (inglês), versão 3.14. A documentação para o projeto ns-3 esta disponível da seguinte forma:
|
||||
|
||||
..
|
||||
* `ns-3 Doxygen <http://www.nsnam.org/doxygen/index.html>`_: Documentation of the public APIs of the simulator
|
||||
|
||||
@@ -57,7 +57,7 @@ Alguns pontos importantes para se observar:
|
||||
project will continue to maintain ns-2 while |ns3| is being built,
|
||||
and will study transition and integration mechanisms.
|
||||
|
||||
* O |ns3| não é uma extensão do `ns-2 <http://www.isi.edu/nsnam/ns>`_; O |ns3| é um simulador novo. Ambos são escritos em C++, mas o |ns3| é totalmente novo e não suporta as APIs da versão anterior. Algumas funcionalidades do ns-2 já foram portadas para o |ns3|. O projeto continuará mantendo o ns-2 enquanto o |ns3| estiver em fase de desenvolvimento e formas de integração e transição estão em estudo.
|
||||
* O |ns3| não é uma extensão do ns-2; O |ns3| é um simulador novo. Ambos são escritos em C++, mas o |ns3| é totalmente novo e não suporta as APIs da versão anterior. Algumas funcionalidades do ns-2 já foram portadas para o |ns3|. O projeto continuará mantendo o ns-2 enquanto o |ns3| estiver em fase de desenvolvimento e formas de integração e transição estão em estudo.
|
||||
|
||||
..
|
||||
* |ns3| is open-source, and the project strives to maintain an
|
||||
|
||||
@@ -148,7 +148,7 @@ do |ns3|, al
|
||||
there is no log message for the no ack case. You could simply add one,
|
||||
changing the code from:
|
||||
|
||||
Vamos analisar um exemplo, adicionando mais informações de registro ao `socket` TCP do arquivo ``tcp-socket-base.cc``, para isto vamos acrescentando uma nova mensagem de registro na implementação. Observe que em ``TcpSocketBase::ReceivedAck()`` não existem mensagem de registro para casos sem o *ACK*, então vamos adicionar uma da seguinte forma:
|
||||
Vamos analisar um exemplo, adicionando mais informações de registro ao `socket` TCP do arquivo ``tcp-socket-base.cc``, para isto vamos acrescentando uma nova mensagem de registro na implementação. Observe que em ``TcpSocketBase::ReceivedAck()`` não existem mensagem de registro para casos sem o ACK, então vamos adicionar uma da seguinte forma:
|
||||
|
||||
::
|
||||
|
||||
@@ -2491,7 +2491,17 @@ no in
|
||||
interesting behaviors of the congestion window.
|
||||
|
||||
|
||||
Nas próximas linhas, temos um código com algumas informações novas. Se nós rastrearmos uma conexão que comporta-se perfeitamente, terminamos com um janela de congestionamento que aumenta monoliticamente. Para observarmos um comportamento interessante, introduzimos erros que causarão perda de pacotes, duplicação de `ACK`s e assim, introduz comportamentos mais interessantes a janela de congestionamento.
|
||||
Nas próximas linhas, temos um código com algumas informações novas. Se nós
|
||||
|
||||
rastrearmos uma conexão que comporta-se perfeitamente, terminamos com um
|
||||
|
||||
janela de congestionamento que aumenta monoliticamente. Para observarmos um
|
||||
|
||||
comportamento interessante, introduzimos erros que causarão perda de pacotes,
|
||||
|
||||
duplicação de ACK's e assim, introduz comportamentos mais interessantes a
|
||||
|
||||
janela de congestionamento.
|
||||
|
||||
|
||||
..
|
||||
|
||||
@@ -267,7 +267,7 @@ leftmost point-to-point node seen in the topology illustration.
|
||||
|
||||
UdpEchoClientHelper echoClient (csmaInterfaces.GetAddress (nCsma), 9);
|
||||
echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
|
||||
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.)));
|
||||
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
|
||||
echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
|
||||
|
||||
ApplicationContainer clientApps = echoClient.Install (p2pNodes.Get (0));
|
||||
@@ -1124,7 +1124,7 @@ the server on the CSMA network. We have also seen similar operations before.
|
||||
|
||||
UdpEchoClientHelper echoClient (csmaInterfaces.GetAddress (nCsma), 9);
|
||||
echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
|
||||
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.)));
|
||||
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
|
||||
echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
|
||||
|
||||
ApplicationContainer clientApps =
|
||||
|
||||
@@ -313,7 +313,7 @@ section, so go ahead and expand that documentation node. Now, expand the
|
||||
``Debugging`` book and then select the ``Logging`` page.
|
||||
|
||||
You should now be looking at the Doxygen documentation for the Logging module.
|
||||
In the list of ``#define``s at the top of the page you will see the entry
|
||||
In the list of ``#define``'s at the top of the page you will see the entry
|
||||
for ``NS_LOG_COMPONENT_DEFINE``. Before jumping in, it would probably be
|
||||
good to look for the "Detailed Description" of the logging module to get a
|
||||
feel for the overall operation. You can either scroll down or select the
|
||||
@@ -636,7 +636,7 @@ that is managed by an ``UdpEchoClientHelper``.
|
||||
|
||||
UdpEchoClientHelper echoClient (interfaces.GetAddress (1), 9);
|
||||
echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
|
||||
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.)));
|
||||
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
|
||||
echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
|
||||
|
||||
ApplicationContainer clientApps = echoClient.Install (nodes.Get (0));
|
||||
|
||||
@@ -24,7 +24,7 @@ who want to learn more are encouraged to read the following additional
|
||||
documentation:
|
||||
|
||||
* The |ns3| manual
|
||||
* The |ns3| model library documentatio
|
||||
* The |ns3| model library documentation
|
||||
* The |ns3| Doxygen (API documentation)
|
||||
* The |ns3| wiki
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ pygments_style = 'sphinx'
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'default'
|
||||
html_theme = 'ns3_html_theme'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
@@ -99,11 +99,11 @@ html_theme = 'default'
|
||||
#html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = []
|
||||
html_theme_path = ['../..']
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = None
|
||||
html_title = 'Tutorial'
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
@@ -124,7 +124,7 @@ html_static_path = ['_static']
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
#html_last_updated_fmt = '%b %d, %Y'
|
||||
html_last_updated_fmt = '%b %d, %Y %H:%M'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
@@ -184,7 +184,7 @@ latex_documents = [
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
latex_logo = '../../ns3_html_theme/static/ns-3.png'
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
|
||||
@@ -9,7 +9,7 @@ Downloading ns-3
|
||||
|
||||
The |ns3| system as a whole is a fairly complex system and has a
|
||||
number of dependencies on other components. Along with the systems you will
|
||||
most likely deal with every day (the GNU toolchain, Mercurial, you programmer
|
||||
most likely deal with every day (the GNU toolchain, Mercurial, a text
|
||||
editor) you will need to ensure that a number of additional libraries are
|
||||
present on your system before proceeding. |ns3| provides a wiki
|
||||
for your reading pleasure that includes pages with many useful hints and tips.
|
||||
@@ -53,6 +53,7 @@ that approach, you can get a copy of ``ns-3-allinone`` by typing the
|
||||
following into your Linux shell (assuming you have installed Mercurial):
|
||||
|
||||
::
|
||||
|
||||
cd
|
||||
mkdir repos
|
||||
cd repos
|
||||
@@ -220,7 +221,7 @@ have to pick a release, download it and decompress it.
|
||||
As mentioned above, one practice is to create a directory called ``repos``
|
||||
in one's home directory under which one can keep local Mercurial repositories.
|
||||
One could also keep a ``tarballs`` directory. *Hint: the tutorial
|
||||
will assume you downloaded into a ``repos`` directory, so remember the
|
||||
will assume you downloaded into a* ``repos`` *directory, so remember the
|
||||
placekeeper.* If you adopt the ``tarballs`` directory approach, you can
|
||||
get a copy of a release by typing the following into your Linux shell
|
||||
(substitute the appropriate version numbers, of course):
|
||||
@@ -298,6 +299,22 @@ following magic words:
|
||||
topology-read uan virtual-net-device
|
||||
visualizer wifi wimax
|
||||
|
||||
Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3.13/build'
|
||||
'build' finished successfully (2m30.586s)
|
||||
|
||||
You may also see something like:
|
||||
|
||||
::
|
||||
|
||||
Modules not built (see ns-3 tutorial for explanation):
|
||||
click openflow visualizer
|
||||
|
||||
This just means that some ns-3 modules that have dependencies on
|
||||
outside libraries may not have been built, or that the configuration
|
||||
specifically asked not to build them. It does not mean that the
|
||||
simulator did not build successfully or that it will provide wrong
|
||||
results for the modules listed as being built.
|
||||
|
||||
Once the project has built, you can stop working with the
|
||||
``ns-3-allinone`` scripts. You got what you needed from them and will now
|
||||
interact directly with Waf and we do it in the |ns3| directory,
|
||||
@@ -454,6 +471,28 @@ the ``-o`` option to configure; e.g.
|
||||
This allows users to work with multiple builds rather than always
|
||||
overwriting the last build.
|
||||
|
||||
In the examples above, waf uses GCC C++ compiler, command ``g++``, for
|
||||
building ns-3. However, it's possible to change C++ compiler used by waf.
|
||||
Say one wants to use Clang C++ compiler, command ``clang++``; it's done by
|
||||
|
||||
::
|
||||
|
||||
CXX="clang++" ./waf configure
|
||||
./waf build
|
||||
|
||||
One can also set up waf to do distributed compilation with ``distcc`` in
|
||||
a similar way:
|
||||
|
||||
::
|
||||
|
||||
CXX="distcc g++" ./waf configure
|
||||
./waf build
|
||||
|
||||
More info on distcc and distributed compilation can be found on it's
|
||||
`project page
|
||||
<http://code.google.com/p/distcc/>`_
|
||||
under Documentation section.
|
||||
|
||||
Testing ns-3
|
||||
************
|
||||
|
||||
@@ -541,7 +580,7 @@ produces the following output.
|
||||
|
||||
*What do I do if I don't see the output?*
|
||||
|
||||
If you don't see ``waf`` messages indicating that the build was
|
||||
If you see ``waf`` messages indicating that the build was
|
||||
completed successfully, but do not see the "Hello Simulator" output,
|
||||
chances are that you have switched your build mode to "optimized" in
|
||||
the "Building with Waf" section, but have missed the change back to
|
||||
|
||||
@@ -85,7 +85,7 @@ potentially be useful to other people as a patch to the existing core.
|
||||
Let's pick a random example. If you wanted to add more logging to the
|
||||
|ns3| TCP socket (``tcp-socket-base.cc``) you could just add a new
|
||||
message down in the implementation. Notice that in TcpSocketBase::ReceivedAck()
|
||||
there is no log message for the no ack case. You could simply add one,
|
||||
there is no log message for the no ACK case. You could simply add one,
|
||||
changing the code from:
|
||||
|
||||
::
|
||||
@@ -1298,7 +1298,7 @@ when the ``main`` function of your script is running, but before
|
||||
executing the simulation, ``Simulator::Run`` will return control back to
|
||||
the ``main`` function. When this happens, the script enters what can be
|
||||
called "Teardown Time," which is when the structures and objects created
|
||||
during setup and taken apart and released.
|
||||
during setup are taken apart and released.
|
||||
|
||||
Perhaps the most common mistake made in trying to use the tracing system is
|
||||
assuming that entities constructed dynamically during simulation time are
|
||||
@@ -1816,17 +1816,12 @@ to introduce errors into a ``Channel`` at a given *rate*.
|
||||
|
||||
::
|
||||
|
||||
Ptr<RateErrorModel> em = CreateObjectWithAttributes<RateErrorModel> (
|
||||
"RanVar", RandomVariableValue (UniformVariable (0., 1.)),
|
||||
"ErrorRate", DoubleValue (0.00001));
|
||||
Ptr<RateErrorModel> em = CreateObject<RateErrorModel> ();
|
||||
em->SetAttribute ("ErrorRate", DoubleValue (0.00001));
|
||||
devices.Get (1)->SetAttribute ("ReceiveErrorModel", PointerValue (em));
|
||||
|
||||
The above code instantiates a ``RateErrorModel`` Object. Rather than
|
||||
using the two-step process of instantiating it and then setting Attributes,
|
||||
we use the convenience function ``CreateObjectWithAttributes`` which
|
||||
allows us to do both at the same time. We set the "RanVar"
|
||||
``Attribute`` to a random variable that generates a uniform distribution
|
||||
from 0 to 1. We also set the "ErrorRate" ``Attribute``.
|
||||
The above code instantiates a ``RateErrorModel`` Object, and
|
||||
we set the "ErrorRate" ``Attribute`` to the desired value.
|
||||
We then set the resulting instantiated ``RateErrorModel`` as the error
|
||||
model used by the point-to-point ``NetDevice``. This will give us some
|
||||
retransmissions and make our plot a little more interesting.
|
||||
@@ -2347,7 +2342,7 @@ must implement a single virtual method inherited from this class.
|
||||
|
||||
The signature of this method reflects the device-centric view of the situation
|
||||
at this level. All of the public methods inherited from class
|
||||
2``PcapUserHelperForDevice`` reduce to calling this single device-dependent
|
||||
``PcapUserHelperForDevice`` reduce to calling this single device-dependent
|
||||
implementation method. For example, the lowest level pcap method,
|
||||
|
||||
::
|
||||
|
||||
@@ -37,18 +37,32 @@ easily get a quick message out of your scripts or models.
|
||||
There are currently seven levels of log messages of increasing verbosity
|
||||
defined in the system.
|
||||
|
||||
* NS_LOG_ERROR --- Log error messages;
|
||||
* NS_LOG_WARN --- Log warning messages;
|
||||
* NS_LOG_DEBUG --- Log relatively rare, ad-hoc debugging messages;
|
||||
* NS_LOG_INFO --- Log informational messages about program progress;
|
||||
* NS_LOG_FUNCTION --- Log a message describing each function called;
|
||||
* NS_LOG_LOGIC -- Log messages describing logical flow within a function;
|
||||
* NS_LOG_ALL --- Log everything.
|
||||
* LOG_ERROR --- Log error messages (associated macro: NS_LOG_ERROR);
|
||||
* LOG_WARN --- Log warning messages (associated macro: NS_LOG_WARN);
|
||||
* LOG_DEBUG --- Log relatively rare, ad-hoc debugging messages
|
||||
(associated macro: NS_LOG_DEBUG);
|
||||
* LOG_INFO --- Log informational messages about program progress
|
||||
(associated macro: NS_LOG_INFO);
|
||||
* LOG_FUNCTION --- Log a message describing each function called
|
||||
(two associated macros: NS_LOG_FUNCTION, used for member functions,
|
||||
and NS_LOG_FUNCTION_NOARGS, used for static functions);
|
||||
* LOG_LOGIC -- Log messages describing logical flow within a function
|
||||
(associated macro: NS_LOG_LOGIC);
|
||||
* LOG_ALL --- Log everything mentioned above (no associated macro).
|
||||
|
||||
We also provide an unconditional logging level that is always displayed,
|
||||
For each LOG_TYPE there is also LOG_LEVEL_TYPE that, if used, enables
|
||||
logging of all the levels above it in addition to it's level. (As a
|
||||
consequence of this, LOG_ERROR and LOG_LEVEL_ERROR and also LOG_ALL
|
||||
and LOG_LEVEL_ALL are functionally equivalent.) For example,
|
||||
enabling LOG_INFO will only enable messages provided by NS_LOG_INFO macro,
|
||||
while enabling LOG_LEVEL_INFO will also enable messages provided by
|
||||
NS_LOG_DEBUG, NS_LOG_WARN and NS_LOG_ERROR macros.
|
||||
|
||||
We also provide an unconditional logging macro that is always displayed,
|
||||
irrespective of logging levels or component selection.
|
||||
|
||||
* NS_LOG_UNCOND -- Log the associated message unconditionally.
|
||||
* NS_LOG_UNCOND -- Log the associated message unconditionally (no associated
|
||||
log level).
|
||||
|
||||
Each level can be requested singly or cumulatively; and logging can be set
|
||||
up using a shell environment variable (NS_LOG) or by logging system function
|
||||
@@ -143,10 +157,12 @@ system will pick up the change and you should see the following output:
|
||||
|
||||
The additional debug information provided by the application is from
|
||||
the NS_LOG_FUNCTION level. This shows every time a function in the application
|
||||
is called during script execution. Note that there are no requirements in the
|
||||
|ns3| system that models must support any particular logging
|
||||
functionality. The decision regarding how much information is logged
|
||||
is left to the individual model developer. In the case of the echo
|
||||
is called during script execution. Generally, use of (at least)
|
||||
NS_LOG_FUNCTION(this) in member functions is preferred. Use
|
||||
NS_LOG_FUNCTION_NOARGS() only in static functions. Note, however, that there
|
||||
are no requirements in the |ns3| system that models must support any particular
|
||||
logging functionality. The decision regarding how much information is logged
|
||||
is left to the individual model developer. In the case of the echo
|
||||
applications, a good deal of log output is available.
|
||||
|
||||
You can now see a log of the function calls that were made to the application.
|
||||
|
||||
@@ -116,9 +116,7 @@ main (int argc, char *argv[])
|
||||
|
||||
OnOffHelper onoff ("ns3::UdpSocketFactory",
|
||||
Address (InetSocketAddress (i3i2.GetAddress (1), port)));
|
||||
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
|
||||
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
|
||||
|
||||
onoff.SetConstantRate (DataRate ("448kb/s"));
|
||||
ApplicationContainer apps = onoff.Install (c.Get (0));
|
||||
apps.Start (Seconds (1.0));
|
||||
apps.Stop (Seconds (10.0));
|
||||
@@ -149,8 +147,8 @@ main (int argc, char *argv[])
|
||||
//
|
||||
// Create an ErrorModel based on the implementation (constructor)
|
||||
// specified by the default classId
|
||||
Ptr<RateErrorModel> em = CreateObjectWithAttributes<RateErrorModel> ("RanVar", RandomVariableValue (UniformVariable (0.0, 1.0)),
|
||||
"ErrorRate", DoubleValue (0.001));
|
||||
Ptr<RateErrorModel> em = CreateObject<RateErrorModel> ();
|
||||
em->SetAttribute ("ErrorRate", DoubleValue (0.001));
|
||||
d3d2.Get (0)->SetAttribute ("ReceiveErrorModel", PointerValue (em));
|
||||
|
||||
// Now, let's use the ListErrorModel and explicitly force a loss
|
||||
|
||||
@@ -243,15 +243,16 @@ int main (int argc, char *argv[])
|
||||
// same time. This rn is added to AppStartTime to have the sources
|
||||
// start at different time, however they will still send at the same rate.
|
||||
|
||||
UniformVariable x (0,1);
|
||||
double rn = x.GetValue ();
|
||||
Ptr<UniformRandomVariable> x = CreateObject<UniformRandomVariable> ();
|
||||
x->SetAttribute ("Min", DoubleValue (0));
|
||||
x->SetAttribute ("Max", DoubleValue (1));
|
||||
double rn = x->GetValue ();
|
||||
Ptr<Node> n = nodes.Get (j);
|
||||
Ptr<Ipv4> ipv4 = n->GetObject<Ipv4> ();
|
||||
Ipv4InterfaceAddress ipv4_int_addr = ipv4->GetAddress (1, 0);
|
||||
Ipv4Address ip_addr = ipv4_int_addr.GetLocal ();
|
||||
OnOffHelper onoff ("ns3::UdpSocketFactory", InetSocketAddress (ip_addr, port)); // traffic flows from node[i] to node[j]
|
||||
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
|
||||
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
|
||||
onoff.SetConstantRate (DataRate (AppPacketRate));
|
||||
ApplicationContainer apps = onoff.Install (nodes.Get (i)); // traffic sources are installed on all nodes
|
||||
apps.Start (Seconds (AppStartTime + rn));
|
||||
apps.Stop (Seconds (AppStopTime));
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
exec "`dirname "$0"`"/../../waf "$@"
|
||||
@@ -1,6 +0,0 @@
|
||||
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
|
||||
|
||||
def build(bld):
|
||||
obj = bld.create_ns3_program('ns2-mobility-trace', ['internet', 'mobility', 'wifi', 'mesh', 'applications'])
|
||||
obj.source = 'ns2-mobility-trace.cc'
|
||||
|
||||
@@ -151,9 +151,7 @@ main (int argc, char *argv[])
|
||||
uint16_t port = 9; // Discard port (RFC 863)
|
||||
OnOffHelper onoff ("ns3::UdpSocketFactory",
|
||||
InetSocketAddress (i5i6.GetAddress (1), port));
|
||||
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
|
||||
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
|
||||
onoff.SetAttribute ("DataRate", StringValue ("2kbps"));
|
||||
onoff.SetConstantRate (DataRate ("2kbps"));
|
||||
onoff.SetAttribute ("PacketSize", UintegerValue (50));
|
||||
|
||||
ApplicationContainer apps = onoff.Install (c.Get (1));
|
||||
@@ -164,8 +162,8 @@ main (int argc, char *argv[])
|
||||
// 210 bytes at a rate of 448 Kb/s
|
||||
OnOffHelper onoff2 ("ns3::UdpSocketFactory",
|
||||
InetSocketAddress (i1i6.GetAddress (1), port));
|
||||
onoff2.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
|
||||
onoff2.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
|
||||
onoff2.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
|
||||
onoff2.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
|
||||
onoff2.SetAttribute ("DataRate", StringValue ("2kbps"));
|
||||
onoff2.SetAttribute ("PacketSize", UintegerValue (50));
|
||||
|
||||
|
||||
@@ -136,9 +136,7 @@ main (int argc, char *argv[])
|
||||
uint16_t port = 9; // Discard port (RFC 863)
|
||||
OnOffHelper onoff ("ns3::UdpSocketFactory",
|
||||
Address (InetSocketAddress (ifInAddrC.GetLocal (), port)));
|
||||
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
|
||||
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
|
||||
onoff.SetAttribute ("DataRate", DataRateValue (DataRate (6000)));
|
||||
onoff.SetConstantRate (DataRate (6000));
|
||||
ApplicationContainer apps = onoff.Install (nA);
|
||||
apps.Start (Seconds (1.0));
|
||||
apps.Stop (Seconds (10.0));
|
||||
|
||||
@@ -107,9 +107,7 @@ main (int argc, char *argv[])
|
||||
uint16_t port = 9; // Discard port (RFC 863)
|
||||
OnOffHelper onoff ("ns3::UdpSocketFactory",
|
||||
Address (InetSocketAddress (ifInAddrC.GetLocal (), port)));
|
||||
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
|
||||
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
|
||||
onoff.SetAttribute ("DataRate", DataRateValue (DataRate (6000)));
|
||||
onoff.SetConstantRate (DataRate (6000));
|
||||
ApplicationContainer apps = onoff.Install (nA);
|
||||
apps.Start (Seconds (1.0));
|
||||
apps.Stop (Seconds (10.0));
|
||||
|
||||
@@ -122,22 +122,24 @@ RoutingExperiment::RoutingExperiment ()
|
||||
std::string
|
||||
PrintReceivedPacket (Ptr<Socket> socket, Ptr<Packet> packet)
|
||||
{
|
||||
Ptr<const SocketAddressTag> tag = packet->PeekPacketTag<SocketAddressTag> ();
|
||||
SocketAddressTag tag;
|
||||
bool found;
|
||||
found = packet->PeekPacketTag (tag);
|
||||
std::ostringstream oss;
|
||||
|
||||
oss << Simulator::Now ().GetSeconds () << " " << socket->GetNode ()->GetId ();
|
||||
|
||||
if (tag != 0)
|
||||
{
|
||||
InetSocketAddress addr = InetSocketAddress::ConvertFrom (tag->GetAddress ());
|
||||
if (found)
|
||||
{
|
||||
InetSocketAddress addr = InetSocketAddress::ConvertFrom (tag.GetAddress ());
|
||||
oss << " received one packet from " << addr.GetIpv4 ();
|
||||
}
|
||||
else
|
||||
{
|
||||
oss << " received one packet!";
|
||||
}
|
||||
return oss.str ();
|
||||
}
|
||||
else
|
||||
{
|
||||
oss << " received one packet!";
|
||||
}
|
||||
return oss.str ();
|
||||
}
|
||||
|
||||
void
|
||||
RoutingExperiment::ReceivePacket (Ptr<Socket> socket)
|
||||
@@ -148,7 +150,7 @@ RoutingExperiment::ReceivePacket (Ptr<Socket> socket)
|
||||
bytesTotal += packet->GetSize ();
|
||||
packetsReceived += 1;
|
||||
NS_LOG_UNCOND (PrintReceivedPacket (socket, packet));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@@ -268,19 +270,27 @@ RoutingExperiment::Run (int nSinks, double txp, std::string CSVfileName)
|
||||
NetDeviceContainer adhocDevices = wifi.Install (wifiPhy, wifiMac, adhocNodes);
|
||||
|
||||
MobilityHelper mobilityAdhoc;
|
||||
int64_t streamIndex = 0; // used to get consistent mobility across scenarios
|
||||
|
||||
ObjectFactory pos;
|
||||
pos.SetTypeId ("ns3::RandomRectanglePositionAllocator");
|
||||
pos.Set ("X", RandomVariableValue (UniformVariable (0.0, 300.0)));
|
||||
pos.Set ("Y", RandomVariableValue (UniformVariable (0.0, 1500.0)));
|
||||
pos.Set ("X", StringValue ("ns3::UniformRandomVariable[Min=0.0|Max=300.0]"));
|
||||
pos.Set ("Y", StringValue ("ns3::UniformRandomVariable[Min=0.0|Max=1500.0]"));
|
||||
|
||||
Ptr<PositionAllocator> taPositionAlloc = pos.Create ()->GetObject<PositionAllocator> ();
|
||||
streamIndex += taPositionAlloc->AssignStreams (streamIndex);
|
||||
|
||||
std::stringstream ssSpeed;
|
||||
ssSpeed << "ns3::UniformRandomVariable[Min=0.0|Max=" << nodeSpeed << "]";
|
||||
std::stringstream ssPause;
|
||||
ssPause << "ns3::ConstantRandomVariable[Constant=" << nodePause << "]";
|
||||
mobilityAdhoc.SetMobilityModel ("ns3::RandomWaypointMobilityModel",
|
||||
"Speed", RandomVariableValue (UniformVariable (0.0, nodeSpeed)),
|
||||
"Pause", RandomVariableValue (ConstantVariable (nodePause)),
|
||||
"Speed", StringValue (ssSpeed.str ()),
|
||||
"Pause", StringValue (ssPause.str ()),
|
||||
"PositionAllocator", PointerValue (taPositionAlloc));
|
||||
mobilityAdhoc.SetPositionAllocator (taPositionAlloc);
|
||||
mobilityAdhoc.Install (adhocNodes);
|
||||
streamIndex += mobilityAdhoc.AssignStreams (adhocNodes, streamIndex);
|
||||
|
||||
AodvHelper aodv;
|
||||
OlsrHelper olsr;
|
||||
@@ -330,8 +340,8 @@ RoutingExperiment::Run (int nSinks, double txp, std::string CSVfileName)
|
||||
adhocInterfaces = addressAdhoc.Assign (adhocDevices);
|
||||
|
||||
OnOffHelper onoff1 ("ns3::UdpSocketFactory",Address ());
|
||||
onoff1.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
|
||||
onoff1.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
|
||||
onoff1.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1.0]"));
|
||||
onoff1.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0.0]"));
|
||||
|
||||
for (int i = 0; i <= nSinks - 1; i++)
|
||||
{
|
||||
@@ -340,9 +350,9 @@ RoutingExperiment::Run (int nSinks, double txp, std::string CSVfileName)
|
||||
AddressValue remoteAddress (InetSocketAddress (adhocInterfaces.GetAddress (i), port));
|
||||
onoff1.SetAttribute ("Remote", remoteAddress);
|
||||
|
||||
UniformVariable var;
|
||||
Ptr<UniformRandomVariable> var = CreateObject<UniformRandomVariable> ();
|
||||
ApplicationContainer temp = onoff1.Install (adhocNodes.Get (i + nSinks));
|
||||
temp.Start (Seconds (var.GetValue (100.0,101.0)));
|
||||
temp.Start (Seconds (var->GetValue (100.0,101.0)));
|
||||
temp.Stop (Seconds (TotalTime));
|
||||
}
|
||||
|
||||
@@ -368,9 +378,8 @@ RoutingExperiment::Run (int nSinks, double txp, std::string CSVfileName)
|
||||
//AsciiTraceHelper ascii;
|
||||
//Ptr<OutputStreamWrapper> osw = ascii.CreateFileStream ( (tr_name + ".tr").c_str());
|
||||
//wifiPhy.EnableAsciiAll (osw);
|
||||
std::ofstream os;
|
||||
os.open ((tr_name + ".mob").c_str ());
|
||||
MobilityHelper::EnableAsciiAll (os);
|
||||
AsciiTraceHelper ascii;
|
||||
MobilityHelper::EnableAsciiAll (ascii.CreateFileStream (tr_name + ".mob"));
|
||||
|
||||
//Ptr<FlowMonitor> flowmon;
|
||||
//FlowMonitorHelper flowmonHelper;
|
||||
|
||||
@@ -113,9 +113,7 @@ main (int argc, char *argv[])
|
||||
uint16_t port = 9; // Discard port (RFC 863)
|
||||
OnOffHelper onoff ("ns3::UdpSocketFactory",
|
||||
InetSocketAddress (i5i6.GetAddress (1), port));
|
||||
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
|
||||
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
|
||||
onoff.SetAttribute ("DataRate", StringValue ("300bps"));
|
||||
onoff.SetConstantRate (DataRate ("300bps"));
|
||||
onoff.SetAttribute ("PacketSize", UintegerValue (50));
|
||||
|
||||
ApplicationContainer apps = onoff.Install (c.Get (0));
|
||||
|
||||
@@ -140,8 +140,7 @@ main (int argc, char *argv[])
|
||||
// Create a flow from n3 to n1, starting at time 1.1 seconds
|
||||
OnOffHelper onoff ("ns3::UdpSocketFactory",
|
||||
Address (InetSocketAddress (i1i2.GetAddress (0), port)));
|
||||
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
|
||||
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
|
||||
onoff.SetConstantRate (DataRate ("300b/s"));
|
||||
|
||||
ApplicationContainer apps = onoff.Install (c.Get (3));
|
||||
apps.Start (Seconds (1.1));
|
||||
|
||||
@@ -120,8 +120,7 @@ main (int argc, char *argv[])
|
||||
uint16_t port = 9; // Discard port (RFC 863)
|
||||
OnOffHelper onoff ("ns3::UdpSocketFactory",
|
||||
Address (InetSocketAddress (i3i2.GetAddress (0), port)));
|
||||
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
|
||||
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
|
||||
onoff.SetConstantRate (DataRate ("448kb/s"));
|
||||
ApplicationContainer apps = onoff.Install (c.Get (0));
|
||||
apps.Start (Seconds (1.0));
|
||||
apps.Stop (Seconds (10.0));
|
||||
|
||||
@@ -112,9 +112,7 @@ main (int argc, char *argv[])
|
||||
uint16_t port = 9; // Discard port (RFC 863)
|
||||
OnOffHelper onoff ("ns3::UdpSocketFactory",
|
||||
Address (InetSocketAddress (ifInAddrC.GetLocal (), port)));
|
||||
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
|
||||
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
|
||||
onoff.SetAttribute ("DataRate", DataRateValue (DataRate (6000)));
|
||||
onoff.SetConstantRate (DataRate (6000));
|
||||
ApplicationContainer apps = onoff.Install (nA);
|
||||
apps.Start (Seconds (1.0));
|
||||
apps.Stop (Seconds (10.0));
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
// Network topology
|
||||
//
|
||||
// n0 n1
|
||||
// | |
|
||||
// =================
|
||||
// LAN
|
||||
//
|
||||
// - UDP flows from n0 to n1
|
||||
|
||||
#include <fstream>
|
||||
#include "ns3/core-module.h"
|
||||
#include "ns3/csma-module.h"
|
||||
#include "ns3/applications-module.h"
|
||||
#include "ns3/internet-module.h"
|
||||
#include "ns3/network-module.h"
|
||||
|
||||
using namespace ns3;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("SocketOptionsIpv4");
|
||||
|
||||
void ReceivePacket (Ptr<Socket> socket)
|
||||
{
|
||||
NS_LOG_INFO ("Received one packet!");
|
||||
Ptr<Packet> packet = socket->Recv ();
|
||||
SocketIpTosTag tosTag;
|
||||
if (packet->RemovePacketTag (tosTag))
|
||||
{
|
||||
NS_LOG_INFO (" TOS = " << (uint32_t)tosTag.GetTos ());
|
||||
}
|
||||
SocketIpTtlTag ttlTag;
|
||||
if (packet->RemovePacketTag (ttlTag))
|
||||
{
|
||||
NS_LOG_INFO (" TTL = " << (uint32_t)ttlTag.GetTtl ());
|
||||
}
|
||||
}
|
||||
|
||||
static void SendPacket (Ptr<Socket> socket, uint32_t pktSize,
|
||||
uint32_t pktCount, Time pktInterval )
|
||||
{
|
||||
if (pktCount > 0)
|
||||
{
|
||||
socket->Send (Create<Packet> (pktSize));
|
||||
Simulator::Schedule (pktInterval, &SendPacket,
|
||||
socket, pktSize,pktCount - 1, pktInterval);
|
||||
}
|
||||
else
|
||||
{
|
||||
socket->Close ();
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
//
|
||||
// Allow the user to override any of the defaults and the above Bind() at
|
||||
// run-time, via command-line arguments
|
||||
//
|
||||
uint32_t packetSize = 1024;
|
||||
uint32_t packetCount = 10;
|
||||
double packetInterval = 1.0;
|
||||
|
||||
//Socket options for IPv4, currently TOS, TTL, RECVTOS, and RECVTTL
|
||||
uint32_t ipTos = 0;
|
||||
bool ipRecvTos = true;
|
||||
uint32_t ipTtl = 0;
|
||||
bool ipRecvTtl = true;
|
||||
|
||||
CommandLine cmd;
|
||||
cmd.AddValue ("PacketSize", "Packet size in bytes", packetSize);
|
||||
cmd.AddValue ("PacketCount", "Number of packets to send", packetCount);
|
||||
cmd.AddValue ("Interval", "Interval between packets", packetInterval);
|
||||
cmd.AddValue ("IP_TOS", "IP_TOS", ipTos);
|
||||
cmd.AddValue ("IP_RECVTOS", "IP_RECVTOS", ipRecvTos);
|
||||
cmd.AddValue ("IP_TTL", "IP_TTL", ipTtl);
|
||||
cmd.AddValue ("IP_RECVTTL", "IP_RECVTTL", ipRecvTtl);
|
||||
cmd.Parse (argc, argv);
|
||||
|
||||
NS_LOG_INFO ("Create nodes.");
|
||||
NodeContainer n;
|
||||
n.Create (2);
|
||||
|
||||
InternetStackHelper internet;
|
||||
internet.Install (n);
|
||||
|
||||
Address serverAddress;
|
||||
|
||||
NS_LOG_INFO ("Create channels.");
|
||||
CsmaHelper csma;
|
||||
csma.SetChannelAttribute ("DataRate", DataRateValue (DataRate (5000000)));
|
||||
csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2)));
|
||||
csma.SetDeviceAttribute ("Mtu", UintegerValue (1400));
|
||||
NetDeviceContainer d = csma.Install (n);
|
||||
|
||||
|
||||
NS_LOG_INFO ("Assign IP Addresses.");
|
||||
Ipv4AddressHelper ipv4;
|
||||
ipv4.SetBase ("10.1.1.0", "255.255.255.0");
|
||||
Ipv4InterfaceContainer i = ipv4.Assign (d);
|
||||
serverAddress = Address(i.GetAddress (1));
|
||||
|
||||
NS_LOG_INFO ("Create sockets.");
|
||||
//Receiver socket on n1
|
||||
TypeId tid = TypeId::LookupByName ("ns3::UdpSocketFactory");
|
||||
Ptr<Socket> recvSink = Socket::CreateSocket (n.Get (1), tid);
|
||||
InetSocketAddress local = InetSocketAddress (Ipv4Address::GetAny (), 4477);
|
||||
recvSink->SetIpRecvTos (ipRecvTos);
|
||||
recvSink->SetIpRecvTtl (ipRecvTtl);
|
||||
recvSink->Bind (local);
|
||||
recvSink->SetRecvCallback (MakeCallback (&ReceivePacket));
|
||||
|
||||
//Sender socket on n0
|
||||
Ptr<Socket> source = Socket::CreateSocket (n.Get (0), tid);
|
||||
InetSocketAddress remote = InetSocketAddress (i.GetAddress (1), 4477);
|
||||
|
||||
//Set socket options, it is also possible to set the options after the socket has been created/connected.
|
||||
if (ipTos > 0)
|
||||
{
|
||||
source->SetIpTos (ipTos);
|
||||
}
|
||||
|
||||
if (ipTtl > 0)
|
||||
{
|
||||
source->SetIpTtl (ipTtl);
|
||||
}
|
||||
source->Connect (remote);
|
||||
|
||||
AsciiTraceHelper ascii;
|
||||
csma.EnableAsciiAll (ascii.CreateFileStream ("socket-options-ipv4.tr"));
|
||||
csma.EnablePcapAll ("socket-options-ipv4", false);
|
||||
|
||||
//Schedule SendPacket
|
||||
Time interPacketInterval = Seconds (packetInterval);
|
||||
Simulator::ScheduleWithContext (source->GetNode ()->GetId (),
|
||||
Seconds (1.0), &SendPacket,
|
||||
source, packetSize, packetCount, interPacketInterval);
|
||||
|
||||
NS_LOG_INFO ("Run Simulation.");
|
||||
Simulator::Run ();
|
||||
Simulator::Destroy ();
|
||||
NS_LOG_INFO ("Done.");
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
// Network topology
|
||||
//
|
||||
// n0 n1
|
||||
// | |
|
||||
// =================
|
||||
// LAN
|
||||
//
|
||||
// - UDP flows from n0 to n1
|
||||
|
||||
#include <fstream>
|
||||
#include "ns3/core-module.h"
|
||||
#include "ns3/csma-module.h"
|
||||
#include "ns3/applications-module.h"
|
||||
#include "ns3/internet-module.h"
|
||||
#include "ns3/network-module.h"
|
||||
|
||||
using namespace ns3;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("SocketOptionsIpv6");
|
||||
|
||||
void ReceivePacket (Ptr<Socket> socket)
|
||||
{
|
||||
NS_LOG_INFO ("Received one packet!");
|
||||
Ptr<Packet> packet = socket->Recv ();
|
||||
SocketIpv6TclassTag tclassTag;
|
||||
if (packet->RemovePacketTag (tclassTag))
|
||||
{
|
||||
NS_LOG_INFO (" TCLASS = " << (uint32_t)tclassTag.GetTclass ());
|
||||
}
|
||||
SocketIpv6HopLimitTag hoplimitTag;
|
||||
if (packet->RemovePacketTag (hoplimitTag))
|
||||
{
|
||||
NS_LOG_INFO (" HOPLIMIT = " << (uint32_t)hoplimitTag.GetHopLimit ());
|
||||
}
|
||||
}
|
||||
|
||||
static void SendPacket (Ptr<Socket> socket, uint32_t pktSize,
|
||||
uint32_t pktCount, Time pktInterval )
|
||||
{
|
||||
if (pktCount > 0)
|
||||
{
|
||||
socket->Send (Create<Packet> (pktSize));
|
||||
Simulator::Schedule (pktInterval, &SendPacket,
|
||||
socket, pktSize,pktCount - 1, pktInterval);
|
||||
}
|
||||
else
|
||||
{
|
||||
socket->Close ();
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
//
|
||||
// Allow the user to override any of the defaults and the above Bind() at
|
||||
// run-time, via command-line arguments
|
||||
//
|
||||
uint32_t packetSize = 1024;
|
||||
uint32_t packetCount = 10;
|
||||
double packetInterval = 1.0;
|
||||
|
||||
//Socket options for IPv6, currently TCLASS, HOPLIMIT, RECVTCLASS, and RECVHOPLIMIT
|
||||
uint32_t ipv6Tclass = 0;
|
||||
bool ipv6RecvTclass = true;
|
||||
uint32_t ipv6Hoplimit = 0;
|
||||
bool ipv6RecvHoplimit = true;
|
||||
|
||||
CommandLine cmd;
|
||||
cmd.AddValue ("PacketSize", "Packet size in bytes", packetSize);
|
||||
cmd.AddValue ("PacketCount", "Number of packets to send", packetCount);
|
||||
cmd.AddValue ("Interval", "Interval between packets", packetInterval);
|
||||
cmd.AddValue ("IPV6_TCLASS", "IPV6_TCLASS", ipv6Tclass);
|
||||
cmd.AddValue ("IPV6_RECVTCLASS", "IPV6_RECVTCLASS", ipv6RecvTclass);
|
||||
cmd.AddValue ("IPV6_HOPLIMIT", "IPV6_HOPLIMIT", ipv6Hoplimit);
|
||||
cmd.AddValue ("IPV6_RECVHOPLIMIT", "IPV6_RECVHOPLIMIT", ipv6RecvHoplimit);
|
||||
cmd.Parse (argc, argv);
|
||||
|
||||
NS_LOG_INFO ("Create nodes.");
|
||||
NodeContainer n;
|
||||
n.Create (2);
|
||||
|
||||
InternetStackHelper internet;
|
||||
internet.Install (n);
|
||||
|
||||
Address serverAddress;
|
||||
|
||||
NS_LOG_INFO ("Create channels.");
|
||||
CsmaHelper csma;
|
||||
csma.SetChannelAttribute ("DataRate", DataRateValue (DataRate (5000000)));
|
||||
csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2)));
|
||||
csma.SetDeviceAttribute ("Mtu", UintegerValue (1400));
|
||||
NetDeviceContainer d = csma.Install (n);
|
||||
|
||||
|
||||
NS_LOG_INFO ("Assign IP Addresses.");
|
||||
Ipv6AddressHelper ipv6;
|
||||
ipv6.SetBase ("2001:0000:f00d:cafe::", Ipv6Prefix (64));
|
||||
Ipv6InterfaceContainer i6 = ipv6.Assign (d);
|
||||
serverAddress = Address(i6.GetAddress (1,1));
|
||||
|
||||
NS_LOG_INFO ("Create sockets.");
|
||||
//Receiver socket on n1
|
||||
TypeId tid = TypeId::LookupByName ("ns3::UdpSocketFactory");
|
||||
Ptr<Socket> recvSink = Socket::CreateSocket (n.Get (1), tid);
|
||||
Inet6SocketAddress local = Inet6SocketAddress (Ipv6Address::GetAny (), 4477);
|
||||
recvSink->SetIpv6RecvTclass (ipv6RecvTclass);
|
||||
recvSink->SetIpv6RecvHopLimit (ipv6RecvHoplimit);
|
||||
recvSink->Bind (local);
|
||||
recvSink->SetRecvCallback (MakeCallback (&ReceivePacket));
|
||||
|
||||
//Sender socket on n0
|
||||
Ptr<Socket> source = Socket::CreateSocket (n.Get (0), tid);
|
||||
Inet6SocketAddress remote = Inet6SocketAddress (i6.GetAddress (1,1), 4477);
|
||||
//Set socket options, it is also possible to set the options after the socket has been created/connected.
|
||||
if (ipv6Tclass != 0)
|
||||
{
|
||||
source->SetIpv6Tclass (ipv6Tclass);
|
||||
}
|
||||
|
||||
if (ipv6Hoplimit > 0)
|
||||
{
|
||||
source->SetIpv6HopLimit (ipv6Hoplimit);
|
||||
}
|
||||
source->Connect (remote);
|
||||
|
||||
AsciiTraceHelper ascii;
|
||||
csma.EnableAsciiAll (ascii.CreateFileStream ("socket-options-ipv6.tr"));
|
||||
csma.EnablePcapAll ("socket-options-ipv6", false);
|
||||
|
||||
//Schedule SendPacket
|
||||
Time interPacketInterval = Seconds (packetInterval);
|
||||
Simulator::ScheduleWithContext (source->GetNode ()->GetId (),
|
||||
Seconds (1.0), &SendPacket,
|
||||
source, packetSize, packetCount, interPacketInterval);
|
||||
|
||||
NS_LOG_INFO ("Run Simulation.");
|
||||
Simulator::Run ();
|
||||
Simulator::Destroy ();
|
||||
NS_LOG_INFO ("Done.");
|
||||
}
|
||||
@@ -6,3 +6,9 @@ def build(bld):
|
||||
|
||||
obj = bld.create_ns3_program('socket-bound-tcp-static-routing', ['network', 'csma', 'point-to-point', 'internet'])
|
||||
obj.source = 'socket-bound-tcp-static-routing.cc'
|
||||
|
||||
obj = bld.create_ns3_program('socket-options-ipv4', ['network', 'csma', 'point-to-point', 'internet'])
|
||||
obj.source = 'socket-options-ipv4.cc'
|
||||
|
||||
obj = bld.create_ns3_program('socket-options-ipv6', ['network', 'csma', 'point-to-point', 'internet'])
|
||||
obj.source = 'socket-options-ipv6.cc'
|
||||
@@ -62,9 +62,9 @@ Sender::GetTypeId (void)
|
||||
MakeUintegerAccessor (&Sender::m_numPkts),
|
||||
MakeUintegerChecker<uint32_t>(1))
|
||||
.AddAttribute ("Interval", "Delay between transmissions.",
|
||||
RandomVariableValue (ConstantVariable (0.5)),
|
||||
MakeRandomVariableAccessor (&Sender::m_interval),
|
||||
MakeRandomVariableChecker ())
|
||||
StringValue ("ns3::ConstantRandomVariable[Constant=0.5]"),
|
||||
MakePointerAccessor (&Sender::m_interval),
|
||||
MakePointerChecker <RandomVariableStream>())
|
||||
.AddTraceSource ("Tx", "A new packet is created and is sent",
|
||||
MakeTraceSourceAccessor (&Sender::m_txTrace))
|
||||
;
|
||||
@@ -75,6 +75,7 @@ Sender::GetTypeId (void)
|
||||
Sender::Sender()
|
||||
{
|
||||
NS_LOG_FUNCTION_NOARGS ();
|
||||
m_interval = CreateObject<ConstantRandomVariable> ();
|
||||
m_socket = 0;
|
||||
}
|
||||
|
||||
@@ -139,7 +140,7 @@ void Sender::SendPacket ()
|
||||
m_txTrace (packet);
|
||||
|
||||
if (++m_count < m_numPkts) {
|
||||
m_sendEvent = Simulator::Schedule (Seconds (m_interval.GetValue ()),
|
||||
m_sendEvent = Simulator::Schedule (Seconds (m_interval->GetValue ()),
|
||||
&Sender::SendPacket, this);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ private:
|
||||
uint32_t m_pktSize;
|
||||
Ipv4Address m_destAddr;
|
||||
uint32_t m_destPort;
|
||||
RandomVariable m_interval;
|
||||
Ptr<ConstantRandomVariable> m_interval;
|
||||
uint32_t m_numPkts;
|
||||
|
||||
Ptr<Socket> m_socket;
|
||||
|
||||
@@ -88,8 +88,8 @@ main (int argc, char *argv[])
|
||||
// Create OnOff applications to send TCP to the hub, one on each spoke node.
|
||||
//
|
||||
OnOffHelper onOffHelper ("ns3::TcpSocketFactory", Address ());
|
||||
onOffHelper.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
|
||||
onOffHelper.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
|
||||
onOffHelper.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
|
||||
onOffHelper.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
|
||||
|
||||
ApplicationContainer spokeApps;
|
||||
|
||||
|
||||
@@ -101,11 +101,10 @@ int main (int argc, char *argv[])
|
||||
Ipv4InterfaceContainer ipv4Interfaces = ipv4.Assign (p2pInterfaces);
|
||||
|
||||
DoubleValue rate (errRate);
|
||||
RandomVariableValue u01 (UniformVariable (0.0, 1.0));
|
||||
Ptr<RateErrorModel> em1 =
|
||||
CreateObjectWithAttributes<RateErrorModel> ("RanVar", u01, "ErrorRate", rate);
|
||||
CreateObjectWithAttributes<RateErrorModel> ("RanVar", StringValue ("ns3::UniformRandomVariable[Min=0.0,Max=1.0]"), "ErrorRate", rate);
|
||||
Ptr<RateErrorModel> em2 =
|
||||
CreateObjectWithAttributes<RateErrorModel> ("RanVar", u01, "ErrorRate", rate);
|
||||
CreateObjectWithAttributes<RateErrorModel> ("RanVar", StringValue ("ns3::UniformRandomVariable[Min=0.0,Max=1.0]"), "ErrorRate", rate);
|
||||
|
||||
// This enables the specified errRate on both link endpoints.
|
||||
p2pInterfaces.Get (0)->SetAttribute ("ReceiveErrorModel", PointerValue (em1));
|
||||
@@ -125,8 +124,8 @@ int main (int argc, char *argv[])
|
||||
{
|
||||
Address remoteAddress (InetSocketAddress (ipv4Interfaces.GetAddress (i), servPort));
|
||||
OnOffHelper clientHelper ("ns3::TcpSocketFactory", remoteAddress);
|
||||
clientHelper.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
|
||||
clientHelper.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
|
||||
clientHelper.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
|
||||
clientHelper.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
|
||||
ApplicationContainer clientApp = clientHelper.Install (n.Get (j));
|
||||
clientApp.Start (Seconds (1.0 + i));
|
||||
clientApp.Stop (Seconds (runtime + 1.0 + i));
|
||||
|
||||
@@ -126,9 +126,9 @@ int main (int argc, char *argv[])
|
||||
Address remoteAddress (InetSocketAddress (ipv4Interfaces.GetAddress (j), servPort));
|
||||
OnOffHelper clientHelper ("ns3::TcpSocketFactory", remoteAddress);
|
||||
clientHelper.SetAttribute
|
||||
("OnTime", RandomVariableValue (ConstantVariable (1)));
|
||||
("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
|
||||
clientHelper.SetAttribute
|
||||
("OffTime", RandomVariableValue (ConstantVariable (0)));
|
||||
("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
|
||||
ApplicationContainer clientApp = clientHelper.Install (n.Get (i));
|
||||
clientApp.Start (Seconds (j)); /* delay startup depending on node number */
|
||||
clientApp.Stop (Seconds (j + runtime));
|
||||
|
||||
@@ -136,10 +136,9 @@ main (int argc, char *argv[])
|
||||
|
||||
// Create the OnOff applications to send TCP to the server
|
||||
OnOffHelper clientHelper ("ns3::TcpSocketFactory", Address ());
|
||||
clientHelper.SetAttribute
|
||||
("OnTime", RandomVariableValue (ConstantVariable (1)));
|
||||
clientHelper.SetAttribute
|
||||
("OffTime", RandomVariableValue (ConstantVariable (0)));
|
||||
clientHelper.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
|
||||
clientHelper.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
|
||||
|
||||
//normally wouldn't need a loop here but the server IP address is different
|
||||
//on each p2p subnet
|
||||
ApplicationContainer clientApps;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
def build(bld):
|
||||
obj = bld.create_ns3_program('tcp-large-transfer',
|
||||
['visualizer', 'point-to-point', 'applications', 'internet'])
|
||||
['point-to-point', 'applications', 'internet'])
|
||||
obj.source = 'tcp-large-transfer.cc'
|
||||
|
||||
obj = bld.create_ns3_program('tcp-nsc-lfn',
|
||||
|
||||
@@ -185,9 +185,8 @@ main (int argc, char *argv[])
|
||||
NetDeviceContainer devices;
|
||||
devices = pointToPoint.Install (nodes);
|
||||
|
||||
Ptr<RateErrorModel> em = CreateObjectWithAttributes<RateErrorModel> (
|
||||
"RanVar", RandomVariableValue (UniformVariable (0., 1.)),
|
||||
"ErrorRate", DoubleValue (0.00001));
|
||||
Ptr<RateErrorModel> em = CreateObject<RateErrorModel> ();
|
||||
em->SetAttribute ("ErrorRate", DoubleValue (0.00001));
|
||||
devices.Get (1)->SetAttribute ("ReceiveErrorModel", PointerValue (em));
|
||||
|
||||
InternetStackHelper stack;
|
||||
|
||||
@@ -97,7 +97,7 @@ main (int argc, char *argv[])
|
||||
|
||||
UdpEchoClientHelper echoClient (csmaInterfaces.GetAddress (nCsma), 9);
|
||||
echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
|
||||
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.)));
|
||||
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
|
||||
echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
|
||||
|
||||
ApplicationContainer clientApps = echoClient.Install (p2pNodes.Get (0));
|
||||
|
||||
@@ -187,9 +187,8 @@ main (int argc, char *argv[])
|
||||
NetDeviceContainer devices;
|
||||
devices = pointToPoint.Install (nodes);
|
||||
|
||||
Ptr<RateErrorModel> em = CreateObjectWithAttributes<RateErrorModel> (
|
||||
"RanVar", RandomVariableValue (UniformVariable (0., 1.)),
|
||||
"ErrorRate", DoubleValue (0.00001));
|
||||
Ptr<RateErrorModel> em = CreateObject<RateErrorModel> ();
|
||||
em->SetAttribute ("ErrorRate", DoubleValue (0.00001));
|
||||
devices.Get (1)->SetAttribute ("ReceiveErrorModel", PointerValue (em));
|
||||
|
||||
InternetStackHelper stack;
|
||||
|
||||
@@ -157,7 +157,7 @@ main (int argc, char *argv[])
|
||||
|
||||
UdpEchoClientHelper echoClient (csmaInterfaces.GetAddress (nCsma), 9);
|
||||
echoClient.SetAttribute ("MaxPackets", UintegerValue (1));
|
||||
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.)));
|
||||
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
|
||||
echoClient.SetAttribute ("PacketSize", UintegerValue (1024));
|
||||
|
||||
ApplicationContainer clientApps =
|
||||
|
||||
@@ -192,8 +192,8 @@ main (int argc, char *argv[])
|
||||
mobility.SetPositionAllocator (positionAlloc);
|
||||
mobility.SetMobilityModel ("ns3::RandomDirection2dMobilityModel",
|
||||
"Bounds", RectangleValue (Rectangle (0, 20, 0, 20)),
|
||||
"Speed", RandomVariableValue (ConstantVariable (2)),
|
||||
"Pause", RandomVariableValue (ConstantVariable (0.2)));
|
||||
"Speed", StringValue ("ns3::ConstantRandomVariable[Constant=2]"),
|
||||
"Pause", StringValue ("ns3::ConstantRandomVariable[Constant=0.2]"));
|
||||
mobility.Install (backbone);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -318,8 +318,8 @@ main (int argc, char *argv[])
|
||||
mobility.SetPositionAllocator (subnetAlloc);
|
||||
mobility.SetMobilityModel ("ns3::RandomDirection2dMobilityModel",
|
||||
"Bounds", RectangleValue (Rectangle (-10, 10, -10, 10)),
|
||||
"Speed", RandomVariableValue (ConstantVariable (3)),
|
||||
"Pause", RandomVariableValue (ConstantVariable (0.4)));
|
||||
"Speed", StringValue ("ns3::ConstantRandomVariable[Constant=3]"),
|
||||
"Pause", StringValue ("ns3::ConstantRandomVariable[Constant=0.4]"));
|
||||
mobility.Install (infra);
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -363,8 +363,8 @@ main (int argc, char *argv[])
|
||||
|
||||
OnOffHelper onoff ("ns3::UdpSocketFactory",
|
||||
Address (InetSocketAddress (remoteAddr, port)));
|
||||
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
|
||||
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
|
||||
onoff.SetConstantRate (DataRate ("10kb/s"));
|
||||
|
||||
ApplicationContainer apps = onoff.Install (appSource);
|
||||
apps.Start (Seconds (3.0));
|
||||
apps.Stop (Seconds (20.0));
|
||||
|
||||
@@ -160,8 +160,8 @@ def main(argv):
|
||||
mobility.SetPositionAllocator(positionAlloc)
|
||||
mobility.SetMobilityModel("ns3::RandomDirection2dMobilityModel",
|
||||
"Bounds", ns.mobility.RectangleValue(ns.mobility.Rectangle(0, 1000, 0, 1000)),
|
||||
"Speed", ns.core.RandomVariableValue(ns.core.ConstantVariable(2000)),
|
||||
"Pause", ns.core.RandomVariableValue(ns.core.ConstantVariable(0.2)))
|
||||
"Speed", ns.core.StringValue ("ns3::ConstantRandomVariable[Constant=2000]"),
|
||||
"Pause", ns.core.StringValue ("ns3::ConstantRandomVariable[Constant=0.2]"))
|
||||
mobility.Install(backbone)
|
||||
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # /
|
||||
@@ -277,8 +277,8 @@ def main(argv):
|
||||
mobility.SetPositionAllocator(subnetAlloc)
|
||||
mobility.SetMobilityModel("ns3::RandomDirection2dMobilityModel",
|
||||
"Bounds", ns.mobility.RectangleValue(ns.mobility.Rectangle(-25, 25, -25, 25)),
|
||||
"Speed", ns.core.RandomVariableValue(ns.core.ConstantVariable(30)),
|
||||
"Pause", ns.core.RandomVariableValue(ns.core.ConstantVariable(0.4)))
|
||||
"Speed", ns.core.StringValue ("ns3::ConstantRandomVariable[Constant=30]"),
|
||||
"Pause", ns.core.StringValue ("ns3::ConstantRandomVariable[Constant=0.4]"))
|
||||
mobility.Install(infra)
|
||||
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # /
|
||||
@@ -301,8 +301,7 @@ def main(argv):
|
||||
|
||||
onoff = ns.applications.OnOffHelper("ns3::UdpSocketFactory",
|
||||
ns.network.Address(ns.network.InetSocketAddress(remoteAddr, port)))
|
||||
onoff.SetAttribute("OnTime", ns.core.RandomVariableValue(ns.core.ConstantVariable(1)))
|
||||
onoff.SetAttribute("OffTime", ns.core.RandomVariableValue(ns.core.ConstantVariable(0)))
|
||||
onoff.SetConstantRate (ns.network.DataRate ("10kb/s"))
|
||||
apps = onoff.Install(ns.network.NodeContainer(appSource))
|
||||
apps.Start(ns.core.Seconds(3.0))
|
||||
apps.Stop(ns.core.Seconds(20.0))
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
#include "ns3/applications-module.h"
|
||||
#include "ns3/mobility-module.h"
|
||||
#include "ns3/tools-module.h"
|
||||
#include "ns3/random-variable.h"
|
||||
#include "ns3/random-variable-stream.h"
|
||||
#include "ns3/wifi-module.h"
|
||||
#include "ns3/internet-module.h"
|
||||
#include "ns3/flow-monitor-helper.h"
|
||||
@@ -253,12 +253,16 @@ void
|
||||
Experiment::SelectSrcDest (NodeContainer c)
|
||||
{
|
||||
uint32_t totalNodes = c.GetN ();
|
||||
UniformVariable uvSrc (0, totalNodes/2 -1);
|
||||
UniformVariable uvDest (totalNodes/2, totalNodes);
|
||||
Ptr<UniformRandomVariable> uvSrc = CreateObject<UniformRandomVariable> ();
|
||||
uvSrc->SetAttribute ("Min", DoubleValue (0));
|
||||
uvSrc->SetAttribute ("Max", DoubleValue (totalNodes/2 -1));
|
||||
Ptr<UniformRandomVariable> uvDest = CreateObject<UniformRandomVariable> ();
|
||||
uvDest->SetAttribute ("Min", DoubleValue (totalNodes/2));
|
||||
uvDest->SetAttribute ("Max", DoubleValue (totalNodes));
|
||||
|
||||
for (uint32_t i=0; i < totalNodes/3; i++)
|
||||
{
|
||||
ApplicationSetup (c.Get (uvSrc.RandomVariable::GetInteger ()), c.Get (uvDest.RandomVariable::GetInteger ()), 0, totalTime);
|
||||
ApplicationSetup (c.Get (uvSrc->GetInteger ()), c.Get (uvDest->GetInteger ()), 0, totalTime);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -272,22 +276,26 @@ void
|
||||
Experiment::SendMultiDestinations (Ptr<Node> sender, NodeContainer c)
|
||||
{
|
||||
|
||||
// UniformVariable params: (Xrange, Yrange)
|
||||
UniformVariable uv (0, c.GetN ());
|
||||
// UniformRandomVariable params: (Xrange, Yrange)
|
||||
Ptr<UniformRandomVariable> uv = CreateObject<UniformRandomVariable> ();
|
||||
uv->SetAttribute ("Min", DoubleValue (0));
|
||||
uv->SetAttribute ("Max", DoubleValue (c.GetN ()));
|
||||
|
||||
// ExponentialVariable params: (mean, upperbound)
|
||||
ExponentialVariable ev (expMean, totalTime);
|
||||
// ExponentialRandomVariable params: (mean, upperbound)
|
||||
Ptr<ExponentialRandomVariable> ev = CreateObject<ExponentialRandomVariable> ();
|
||||
ev->SetAttribute ("Mean", DoubleValue (expMean));
|
||||
ev->SetAttribute ("Bound", DoubleValue (totalTime));
|
||||
|
||||
double start=0.0, stop=totalTime;
|
||||
uint32_t destIndex;
|
||||
|
||||
for (uint32_t i=0; i < c.GetN (); i++)
|
||||
{
|
||||
stop = start + ev.GetValue ();
|
||||
stop = start + ev->GetValue ();
|
||||
NS_LOG_DEBUG ("Start=" << start << " Stop=" << stop);
|
||||
|
||||
do {
|
||||
destIndex = (uint32_t) uv.GetValue ();
|
||||
destIndex = (uint32_t) uv->GetValue ();
|
||||
} while ( (c.Get (destIndex))->GetId () == sender->GetId ());
|
||||
|
||||
ApplicationSetup (sender, c.Get (destIndex), start, stop);
|
||||
@@ -347,9 +355,7 @@ Experiment::ApplicationSetup (Ptr<Node> client, Ptr<Node> server, double start,
|
||||
|
||||
// Equipping the source node with OnOff Application used for sending
|
||||
OnOffHelper onoff ("ns3::UdpSocketFactory", Address (InetSocketAddress (Ipv4Address ("10.0.0.1"), port)));
|
||||
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
|
||||
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
|
||||
onoff.SetAttribute ("DataRate", DataRateValue (DataRate (60000000)));
|
||||
onoff.SetConstantRate (DataRate (60000000));
|
||||
onoff.SetAttribute ("PacketSize", UintegerValue (packetSize));
|
||||
onoff.SetAttribute ("Remote", AddressValue (InetSocketAddress (ipv4AddrServer, port)));
|
||||
|
||||
@@ -420,8 +426,8 @@ Experiment::Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy,
|
||||
//Rectangle (xMin, xMax, yMin, yMax)
|
||||
mobil.SetMobilityModel ("ns3::RandomDirection2dMobilityModel",
|
||||
"Bounds", RectangleValue (Rectangle (0, 500, 0, 500)),
|
||||
"Speed", RandomVariableValue (ConstantVariable (10)),
|
||||
"Pause", RandomVariableValue (ConstantVariable (0.2)));
|
||||
"Speed", StringValue ("ns3::ConstantRandomVariable[Constant=10]"),
|
||||
"Pause", StringValue ("ns3::ConstantRandomVariable[Constant=0.2]"));
|
||||
}
|
||||
mobil.Install (c);
|
||||
|
||||
|
||||
@@ -143,9 +143,7 @@ Experiment::Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy,
|
||||
socket.SetProtocol (1);
|
||||
|
||||
OnOffHelper onoff ("ns3::PacketSocketFactory", Address (socket));
|
||||
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (250)));
|
||||
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
|
||||
onoff.SetAttribute ("DataRate", DataRateValue (DataRate (60000000)));
|
||||
onoff.SetConstantRate (DataRate (60000000));
|
||||
onoff.SetAttribute ("PacketSize", UintegerValue (2000));
|
||||
|
||||
ApplicationContainer apps = onoff.Install (c.Get (0));
|
||||
|
||||
@@ -170,8 +170,7 @@ int main (int argc, char *argv[])
|
||||
socket.SetProtocol (1);
|
||||
|
||||
OnOffHelper onoff ("ns3::PacketSocketFactory", Address (socket));
|
||||
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (42)));
|
||||
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
|
||||
onoff.SetConstantRate (DataRate ("500kb/s"));
|
||||
|
||||
ApplicationContainer apps = onoff.Install (stas.Get (0));
|
||||
apps.Start (Seconds (0.5));
|
||||
|
||||
@@ -150,8 +150,7 @@ def main(argv):
|
||||
socket.SetProtocol(1)
|
||||
|
||||
onoff = ns.applications.OnOffHelper("ns3::PacketSocketFactory", ns.network.Address(socket))
|
||||
onoff.SetAttribute("OnTime", ns.core.RandomVariableValue(ns.core.ConstantVariable(42)))
|
||||
onoff.SetAttribute("OffTime", ns.core.RandomVariableValue(ns.core.ConstantVariable(0)))
|
||||
onoff.SetConstantRate (ns.network.DataRate ("500kb/s"))
|
||||
|
||||
apps = onoff.Install(ns.network.NodeContainer(stas.Get(0)))
|
||||
apps.Start(ns.core.Seconds(0.5))
|
||||
|
||||
@@ -121,8 +121,8 @@ int main (int argc, char const* argv[])
|
||||
DataRate dataRate ("1Mb/s");
|
||||
OnOffHelper onOff ("ns3::UdpSocketFactory", Address (InetSocketAddress (apIf.GetAddress (0), port)));
|
||||
onOff.SetAttribute ("DataRate", DataRateValue (dataRate));
|
||||
onOff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (0.01)));
|
||||
onOff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (8)));
|
||||
onOff.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=0.01]"));
|
||||
onOff.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=8]"));
|
||||
onOff.SetAttribute ("PacketSize", UintegerValue (50));
|
||||
|
||||
ApplicationContainer staApps = onOff.Install (sta);
|
||||
|
||||
@@ -100,8 +100,8 @@ void experiment (bool enableCtsRts)
|
||||
uint16_t cbrPort = 12345;
|
||||
OnOffHelper onOffHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address ("10.0.0.2"), cbrPort));
|
||||
onOffHelper.SetAttribute ("PacketSize", UintegerValue (200));
|
||||
onOffHelper.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
|
||||
onOffHelper.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
|
||||
onOffHelper.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
|
||||
onOffHelper.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
|
||||
|
||||
// flow 1: node 0 -> node 1
|
||||
onOffHelper.SetAttribute ("DataRate", StringValue ("3000000bps"));
|
||||
|
||||
@@ -143,7 +143,7 @@ int main (int argc, char *argv[])
|
||||
mobility.SetMobilityModel ("ns3::RandomWalk2dMobilityModel",
|
||||
"Mode", StringValue ("Time"),
|
||||
"Time", StringValue ("2s"),
|
||||
"Speed", StringValue ("Constant:1.0"),
|
||||
"Speed", StringValue ("ns3::ConstantRandomVariable[Constant=1.0]"),
|
||||
"Bounds", RectangleValue (Rectangle (wifiX, wifiX+5.0,0.0, (nStas+1)*5.0)));
|
||||
mobility.Install (sta);
|
||||
wifiMac.SetType ("ns3::StaWifiMac",
|
||||
@@ -180,8 +180,7 @@ int main (int argc, char *argv[])
|
||||
}
|
||||
|
||||
OnOffHelper onoff = OnOffHelper (protocol, dest);
|
||||
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
|
||||
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
|
||||
onoff.SetConstantRate (DataRate ("500kb/s"));
|
||||
ApplicationContainer apps = onoff.Install (staNodes[0].Get (0));
|
||||
apps.Start (Seconds (0.5));
|
||||
apps.Stop (Seconds (3.0));
|
||||
@@ -191,9 +190,8 @@ int main (int argc, char *argv[])
|
||||
|
||||
if (writeMobility)
|
||||
{
|
||||
std::ofstream os;
|
||||
os.open ("wifi-wired-bridging.mob");
|
||||
MobilityHelper::EnableAsciiAll (os);
|
||||
AsciiTraceHelper ascii;
|
||||
MobilityHelper::EnableAsciiAll (ascii.CreateFileStream ("wifi-wired-bridging.mob"));
|
||||
}
|
||||
|
||||
Simulator::Stop (Seconds (5.0));
|
||||
|
||||
@@ -8,16 +8,16 @@ def build(bld):
|
||||
bld.register_ns3_script('mixed-wireless.py', ['core', 'mobility', 'wifi', 'applications', 'point-to-point',
|
||||
'internet', 'csma', 'olsr'])
|
||||
|
||||
obj = bld.create_ns3_program('wifi-adhoc', ['core', 'mobility', 'wifi', 'applications', 'tools', 'visualizer'])
|
||||
obj = bld.create_ns3_program('wifi-adhoc', ['core', 'mobility', 'wifi', 'applications', 'tools'])
|
||||
obj.source = 'wifi-adhoc.cc'
|
||||
|
||||
obj = bld.create_ns3_program('wifi-clear-channel-cmu', ['internet', 'mobility', 'wifi', 'tools'])
|
||||
obj.source = 'wifi-clear-channel-cmu.cc'
|
||||
|
||||
obj = bld.create_ns3_program('wifi-ap', ['core', 'mobility', 'wifi', 'applications', 'config-store', 'tools', 'visualizer'])
|
||||
obj = bld.create_ns3_program('wifi-ap', ['core', 'mobility', 'wifi', 'applications', 'config-store', 'tools'])
|
||||
obj.source = 'wifi-ap.cc'
|
||||
|
||||
bld.register_ns3_script('wifi-ap.py', ['core', 'mobility', 'wifi', 'applications', 'config-store', 'tools', 'visualizer'])
|
||||
bld.register_ns3_script('wifi-ap.py', ['core', 'mobility', 'wifi', 'applications', 'config-store', 'tools'])
|
||||
|
||||
obj = bld.create_ns3_program('wifi-wired-bridging', ['internet', 'mobility', 'wifi', 'csma', 'bridge', 'applications'])
|
||||
obj.source = 'wifi-wired-bridging.cc'
|
||||
@@ -28,16 +28,16 @@ def build(bld):
|
||||
obj = bld.create_ns3_program('multirate', ['internet', 'mobility', 'wifi', 'tools', 'flow-monitor', 'olsr', 'applications', 'point-to-point'])
|
||||
obj.source = 'multirate.cc'
|
||||
|
||||
obj = bld.create_ns3_program('wifi-simple-adhoc', ['internet', 'mobility', 'wifi', 'config-store', 'tools', 'visualizer'])
|
||||
obj = bld.create_ns3_program('wifi-simple-adhoc', ['internet', 'mobility', 'wifi', 'config-store', 'tools'])
|
||||
obj.source = 'wifi-simple-adhoc.cc'
|
||||
|
||||
obj = bld.create_ns3_program('wifi-simple-adhoc-grid', ['internet', 'mobility', 'wifi', 'olsr', 'config-store', 'tools', 'point-to-point', 'visualizer'])
|
||||
obj = bld.create_ns3_program('wifi-simple-adhoc-grid', ['internet', 'mobility', 'wifi', 'olsr', 'config-store', 'tools', 'point-to-point'])
|
||||
obj.source = 'wifi-simple-adhoc-grid.cc'
|
||||
|
||||
obj = bld.create_ns3_program('wifi-simple-infra', ['internet', 'mobility', 'wifi','config-store', 'visualizer'])
|
||||
obj = bld.create_ns3_program('wifi-simple-infra', ['internet', 'mobility', 'wifi','config-store'])
|
||||
obj.source = 'wifi-simple-infra.cc'
|
||||
|
||||
obj = bld.create_ns3_program('wifi-simple-interference', ['internet', 'mobility', 'wifi', 'config-store', 'tools', 'visualizer'])
|
||||
obj = bld.create_ns3_program('wifi-simple-interference', ['internet', 'mobility', 'wifi', 'config-store', 'tools'])
|
||||
obj.source = 'wifi-simple-interference.cc'
|
||||
|
||||
obj = bld.create_ns3_program('wifi-blockack', ['internet', 'mobility', 'wifi', 'applications'])
|
||||
|
||||
@@ -23,7 +23,9 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF)
|
||||
%.eps : %.dia; $(DIA) -t eps $< -e $@
|
||||
%.png : %.dia; $(DIA) -t png $< -e $@
|
||||
%.png : %.eps; $(CONVERT) $< $@
|
||||
%.pdf : %.eps; $(EPSTOPDF) $< -o=$@; if test x$($@_width) != x; then TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi
|
||||
%.pdf : %.eps
|
||||
$(EPSTOPDF) $< -o=$@
|
||||
if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi
|
||||
|
||||
GRAPHS_PNG = ${GRAPHS_EPS:.eps=.png}
|
||||
GRAPHS_PDF = ${GRAPHS_EPS:.eps=.pdf}
|
||||
@@ -31,7 +33,9 @@ GRAPHS_PDF = ${GRAPHS_EPS:.eps=.pdf}
|
||||
GRAPHS = $(GRAPHS_EPS) $(GRAPHS_PNG) $(GRAPHS_PDF)
|
||||
|
||||
%.png : %.eps; $(CONVERT) $< $@
|
||||
%.pdf : %.eps; $(EPSTOPDF) $< -o=$@; if test x$($@_width) != x; then TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi
|
||||
%.pdf : %.eps
|
||||
$(EPSTOPDF) $< -o=$@
|
||||
if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
TMPDIR=/tmp
|
||||
|
||||
TMPFILE=`mktemp`
|
||||
|
||||
echo "\documentclass{book}
|
||||
@@ -8,5 +10,5 @@ echo "\documentclass{book}
|
||||
\includepdf[width=${1},fitpaper]{${2}}
|
||||
\end{document}" >${TMPFILE}.tex
|
||||
pdflatex -output-directory /tmp ${TMPFILE}.tex >/dev/null 2>/dev/null
|
||||
cp ${TMPFILE}.pdf ${3}
|
||||
|
||||
cp ${TMPFILE}.pdf ${2}
|
||||
rm -f ${TMPFILE}{,.{tex,aux,log,pdf}}
|
||||