Compare commits
414 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a3e26a68f4 | |||
| 937c3c388c | |||
| a64d062b49 | |||
| 2c66f4c020 | |||
| 4da74c6430 | |||
| cb9702a556 | |||
| d2e78ccb33 | |||
| 1cdf54260b | |||
| a22fb1ba66 | |||
| 5e112ceba3 | |||
| 55025b4713 | |||
| 8200d73066 | |||
| 7ce4e68e5e | |||
| f4014037e8 | |||
| 4b404bb9bb | |||
| 0ac1381146 | |||
| dd25de7e36 | |||
| 2d976ae200 | |||
| cb4770b9d2 | |||
| 8ab3d4ecc4 | |||
| e1fd51ee82 | |||
| 86e477e13b | |||
| a0c8acfa66 | |||
| 15c018ff25 | |||
| 4193a68e34 | |||
| f0773a150e | |||
| 0c20bbf621 | |||
| 117d21b1dd | |||
| ef9e955e6c | |||
| 174704abba | |||
| efabb7dcaa | |||
| dec52190b7 | |||
| 718d156554 | |||
| ebd742ba2d | |||
| be83597fd4 | |||
| 111035d3fa | |||
| bfb95b39dd | |||
| 1c7a870d29 | |||
| 5ebab00295 | |||
| 65b2e8d837 | |||
| 7e6ca121d6 | |||
| 134aadf85e | |||
| 34b3521638 | |||
| a9196fc0c6 | |||
| a7cb5fb195 | |||
| fee54949b1 | |||
| 3a690bd071 | |||
| 56dbc49aa3 | |||
| bc4d797dbf | |||
| 95ffc4d89b | |||
| c67535dc7a | |||
| de61c2f689 | |||
| d81c292aba | |||
| 6db467ef95 | |||
| 2704990f20 | |||
| 04a0f64427 | |||
| 686844f601 | |||
| 1723645d4e | |||
| c66070b52c | |||
| 3f1a93b68b | |||
| 292979e742 | |||
| 7fb26bfe59 | |||
| 19488ad7aa | |||
| 0afb4dcc80 | |||
| a32da6615b | |||
| 57fa7f7b9b | |||
| 2e0d44a130 | |||
| 35f4c249d4 | |||
| a623762bd9 | |||
| 8509f28877 | |||
| 6c4f5c7c79 | |||
| ded303057a | |||
| b62cf68711 | |||
| 01983101a6 | |||
| 6250c61bcf | |||
| fd74ac7616 | |||
| 3ae948f663 | |||
| b0577a2eac | |||
| 8f515dcc03 | |||
| def03785bf | |||
| 47d54736d4 | |||
| 8c21bdae76 | |||
| dabdc5f45b | |||
| f7311ec17a | |||
| 62eb723a6b | |||
| e5697f0c2c | |||
| 9b2f73e9ae | |||
| 1ad026d2bd | |||
| 871b92f377 | |||
| fd1bda1bb9 | |||
| e1a48462bc | |||
| 91a1e78dca | |||
| 0e5781ee97 | |||
| 885bb7e1cd | |||
| 62f72a7048 | |||
| 9e71fc449f | |||
| aa14800121 | |||
| d5be610a4d | |||
| 4d180f672c | |||
| 69dd251a0f | |||
| 39c2b005a4 | |||
| 715841d0b3 | |||
| cce40e5148 | |||
| c971b0de7d | |||
| cb8b2a5ad1 | |||
| 773bee35ac | |||
| 31211f8dc2 | |||
| bc89ea5288 | |||
| 368aa197c4 | |||
| 2f63edb779 | |||
| 559d337432 | |||
| 1b432fecac | |||
| c75d2fb8f5 | |||
| 34cde13d3f | |||
| 66f58aab5a | |||
| 7f8dc7e404 | |||
| f228c5c17b | |||
| 43051b28c0 | |||
| 5c99689061 | |||
| 8f11338195 | |||
| c489647301 | |||
| d3f916a917 | |||
| 3dc863a005 | |||
| b97b0de553 | |||
| fdcf89dd53 | |||
| ec3ff0953b | |||
| b4e765c5b6 | |||
| 5c66f6fa1f | |||
| dcdbc179fb | |||
| f612ebca1c | |||
| 93ce0ad194 | |||
| 1606c90844 | |||
| 173514d457 | |||
| 4ad1a2c90e | |||
| ac797fccec | |||
| 198428de10 | |||
| 425490bc54 | |||
| ce9e786d23 | |||
| 0ec7a3b9d4 | |||
| e43b4acbde | |||
| 051d5b1aa1 | |||
| 3d53962700 | |||
| b332bce32f | |||
| 270691c72d | |||
| 435859a64b | |||
| 3c4d250b4b | |||
| 1ffa01e505 | |||
| b7e891ccfa | |||
| a096ecca2f | |||
| 0d5fc14442 | |||
| 84452d7d9e | |||
| f1a1922cc0 | |||
| a944617f27 | |||
| 6cb06ce560 | |||
| 46297abcda | |||
| 9f10edb665 | |||
| 7567960935 | |||
| 412cf215b9 | |||
| d8c14885b2 | |||
| 9e70317df6 | |||
| cf45881bcc | |||
| 30c95658e9 | |||
| dfd965e6f8 | |||
| 0e03b5828f | |||
| 5a76830b73 | |||
| dc3667a937 | |||
| d8ee7fffa4 | |||
| 6433205b6c | |||
| 340437104d | |||
| 4146d77eaf | |||
| 2006e41baa | |||
| 5506d60922 | |||
| 8cfb0bf43f | |||
| 246166d593 | |||
| 46b7c2ac8a | |||
| 660756646a | |||
| cd0f4ad075 | |||
| 9ca914b2b3 | |||
| 34ca3a8c0b | |||
| 2c13d2dbe8 | |||
| 65f248403a | |||
| 560af5e3d8 | |||
| e6d5b2752d | |||
| b19606dc73 | |||
| 9080f150a6 | |||
| 40d10240cf | |||
| ecbd57326b | |||
| 569f1c2dce | |||
| 3109031c35 | |||
| 90806e1f2a | |||
| d74e9fdf30 | |||
| c5f127c193 | |||
| cbe83c6f5a | |||
| 8df0d04bbb | |||
| ba17f6168e | |||
| f47b9bce81 | |||
| d67ced0392 | |||
| 1420606fc6 | |||
| a2e0ed145a | |||
| d85ad22554 | |||
| ab88e121ca | |||
| 0ac6727a82 | |||
| c16fb42027 | |||
| 8bd7f62305 | |||
| ef49c036ec | |||
| af65a032f1 | |||
| 823d1b1642 | |||
| 5a7a4fff83 | |||
| 5dcc405843 | |||
| cc2d4e4c12 | |||
| e9c14c2b54 | |||
| 9ad27ed6ec | |||
| c16d0b97ac | |||
| 69e4cc6139 | |||
| 5545a7f224 | |||
| 9f88bd50f0 | |||
| eb4138894f | |||
| 9c250b48c9 | |||
| 13deae792b | |||
| dabc95ee4d | |||
| e1b0f8c2f1 | |||
| f5147ff55e | |||
| 06835eb89d | |||
| 7033e74a3f | |||
| 0ddd5c62b7 | |||
| 23f15b7afc | |||
| 3436e5f599 | |||
| 8628634ffa | |||
| 59b9e08aa2 | |||
| d9b4528ca1 | |||
| 72e8f65b8a | |||
| 98bf5861f3 | |||
| cc0ac11580 | |||
| d216402e96 | |||
| 097bbd8859 | |||
| c2e3f10058 | |||
| 64c6e1e1ad | |||
| 557c77fd8f | |||
| 6a91f578fa | |||
| 3bbda53949 | |||
| 5b0071da70 | |||
| b38935c93f | |||
| e04641af04 | |||
| 6976fb3247 | |||
| a195154331 | |||
| 5a7d7b1684 | |||
| 92d33e8c9e | |||
| 295d85e52f | |||
| 1d91a535e0 | |||
| da6dbe6141 | |||
| 94d1b71324 | |||
| c292a5853c | |||
| b1a22bb343 | |||
| 0970b68bc9 | |||
| 00676af822 | |||
| d9af1797dc | |||
| 3720eeeef9 | |||
| 27d57e4107 | |||
| 35f4f02b9d | |||
| d06cf0a82e | |||
| f2a7e5c36c | |||
| 3b2d0fa8ec | |||
| e31acccefc | |||
| 964748e197 | |||
| 8f0c89ea5f | |||
| 46584b732f | |||
| 2e4b36c82e | |||
| db17672017 | |||
| bfacdf5413 | |||
| 90784f5eef | |||
| 02d5a5ef6b | |||
| b34e8c4a0c | |||
| 0f2f1a7055 | |||
| 5ce6f9786a | |||
| 4d899db6d2 | |||
| d0ec938b42 | |||
| 60b507ccdf | |||
| 21bdddfaf0 | |||
| 6359554d59 | |||
| 2cdc197553 | |||
| 9656e972a2 | |||
| 3da098f018 | |||
| 4e5366f09f | |||
| ed20015f6d | |||
| 656edfa6d0 | |||
| 6a865108ab | |||
| 44ecc463dc | |||
| c044954bb4 | |||
| bf5ba0c085 | |||
| 3349e79085 | |||
| 65d00d330b | |||
| e0165db56c | |||
| dda924a53a | |||
| ba148aad49 | |||
| f195c26440 | |||
| db4eb7bbf2 | |||
| f0395aeec0 | |||
| c28ea66957 | |||
| 16a35c6e49 | |||
| e10195a6ec | |||
| 7e773082ae | |||
| 15b8c704a9 | |||
| 240f1f7891 | |||
| 0cccb3d7ac | |||
| 2c1627a2f1 | |||
| 95eb0e7adf | |||
| e3e8613a07 | |||
| 9fcf2037b0 | |||
| 1df9c273b8 | |||
| a4b5738b44 | |||
| 5b023387a4 | |||
| 3cadd60395 | |||
| a352d731a2 | |||
| 1714d7a450 | |||
| e1931bbd3a | |||
| 0e06d19022 | |||
| 089ae3ba9e | |||
| ed8b9eedfa | |||
| 36f51b8607 | |||
| 0596d0d97b | |||
| c1b59f5fbc | |||
| d861f430ad | |||
| c9f32caa50 | |||
| 7e795e2891 | |||
| 6c8d39f935 | |||
| 034b9777cd | |||
| 6b3f645a55 | |||
| 79e72f03fa | |||
| 4ae98b0b1e | |||
| 278855b4c1 | |||
| 2c53e2289a | |||
| 8613522840 | |||
| d4e9a7968e | |||
| 203a80dd73 | |||
| 5b1e6bd728 | |||
| 9cb3e2b28c | |||
| 651ef94645 | |||
| 76c94fb285 | |||
| 3ea8979c01 | |||
| f2705e06cf | |||
| 15e79488cd | |||
| d6975fd00e | |||
| adb81dc26d | |||
| 4096553768 | |||
| b2b25df074 | |||
| c00c55f933 | |||
| c4765573f9 | |||
| 9377247c1f | |||
| d503c92234 | |||
| cce8378466 | |||
| 5a78f132f2 | |||
| 7890ab6c2f | |||
| a1b74e3271 | |||
| 9984e96d5a | |||
| aed74121a3 | |||
| d99dc82675 | |||
| f58bbe717c | |||
| 8b5ec4b5ec | |||
| 47fe0d4747 | |||
| 368e8fcbf6 | |||
| 44d377e425 | |||
| 1d86e7edca | |||
| 6641331242 | |||
| 3eebe47911 | |||
| 447e418d6c | |||
| 4772204a59 | |||
| 7639d04f17 | |||
| b7142a8384 | |||
| c68cfb15ed | |||
| d8494dfb97 | |||
| 811962d3e0 | |||
| a25dbffd6f | |||
| 61c6d8227f | |||
| 08e3414452 | |||
| 70af4a402c | |||
| 47fdaa9927 | |||
| 78758da486 | |||
| d2b290924d | |||
| b04062ce08 | |||
| 7967235960 | |||
| 3edd12c191 | |||
| b27422fb2f | |||
| 0630f6dee9 | |||
| 17e5e203b3 | |||
| ac61b6229a | |||
| 2eb6010bb0 | |||
| 2aa44ad287 | |||
| 55a43bb5bc | |||
| 0e1d8c6f17 | |||
| 03154fb21f | |||
| 107b274009 | |||
| f1336f4f21 | |||
| ea8ccecfde | |||
| 845511f9ae | |||
| b38e12c90c | |||
| dd89970f66 | |||
| ddf4cc5bb2 | |||
| 6681ddceb8 | |||
| 91621686b4 | |||
| 39afbfc8c8 | |||
| eb3a9225fe | |||
| 8173067467 | |||
| dff5e13d77 | |||
| dbffc3a3ee | |||
| 3d75fe5639 | |||
| b6565284f7 | |||
| 8c0ee18262 | |||
| eda0bbade0 | |||
| bae86f8e78 | |||
| 6fbfd3ffd5 | |||
| b6569d7991 | |||
| 010b2ac109 | |||
| 5f90f383ce | |||
| 2608c9f98a |
+56
@@ -0,0 +1,56 @@
|
||||
*.pyc
|
||||
.waf*
|
||||
src/NDNabstraction
|
||||
build/
|
||||
doc/html/
|
||||
doc/latex/
|
||||
\.rej$
|
||||
\.orig$
|
||||
\.o$
|
||||
~$
|
||||
^build-dir
|
||||
^build
|
||||
^testpy-output
|
||||
^doc/html
|
||||
^doc/latex
|
||||
.lock-wscript
|
||||
doc/ns3-object.txt
|
||||
doc/introspected-doxygen.h
|
||||
.lock-waf_darwin_build
|
||||
.lock-waf_linux2_build
|
||||
.lock-waf_cygwin_build
|
||||
.lock-waf_freebsd7_build
|
||||
.lock-waf_freebsd8_build
|
||||
.lock-waf_freebsd9_build
|
||||
.waf
|
||||
^doc/introspected-doxygen\.h$
|
||||
.*\.py[co]$
|
||||
\.pcap$
|
||||
\.mob$
|
||||
\.routes$
|
||||
^doc/manual/build
|
||||
^doc/tutorial/build
|
||||
^doc/testing/build
|
||||
^doc/models/build
|
||||
^doc/models/source-temp
|
||||
^doc/manual/figures/.*eps
|
||||
^doc/manual/figures/.*pdf
|
||||
^doc/manual/figures/.*png
|
||||
^bindings/python/pybindgen/
|
||||
ms_print.*
|
||||
massif.*
|
||||
\.patch$
|
||||
\.diff$
|
||||
\.tr$
|
||||
\#[^\#/]+\#$
|
||||
.lock-wscript
|
||||
.lock-wafbuild
|
||||
src/ndnSIM
|
||||
configure
|
||||
toggle
|
||||
.ns3rc
|
||||
.cproject
|
||||
.project
|
||||
.settings/
|
||||
|
||||
|
||||
@@ -69,3 +69,5 @@ cfbc9491d7e7c9d346cc042fd35b8afb8836e81f ns-3.18
|
||||
322102df792e2be6c74df74f776b3470fb1db795 ns-3.19
|
||||
da0eb48df23f96335f32a37f047a6bc27e197c8d ns-3.20
|
||||
fa4be182ef17746cea50e89af557c79a28b76533 ns-3.21
|
||||
103f62fc7d586cf6d4d6fd9f5e488d2f7f8fe436 ns-3.22
|
||||
8ea92bc090cdc01e683a2116d7668ce745ae92e2 ns-3.23
|
||||
|
||||
@@ -28,9 +28,11 @@ Angelos Chatzipapas (chatzipa@ceid.upatras.gr)
|
||||
Eugene Chemeritskiy (echemeritskiy@arccn.ru)
|
||||
Yufei Cheng (yfcheng@ittc.ku.edu)
|
||||
Andrey Churin (aachurin@gmail.com)
|
||||
Benjamin Cizdziel (ben.cizdziel@gmail.com)
|
||||
Salva Climent (jocliba@gmail.com)
|
||||
Luis Cortes (cortes@gatech.edu)
|
||||
Luca Costantino (luca.costantino@gmail.com)
|
||||
Matthieu Coudron (matthieu.coudron@lip6.fr)
|
||||
Alexander D'souza (moijes12@gmail.com)
|
||||
Sébastien Deronne (sebastien.deronne@gmail.com)
|
||||
Craig Dowell (craigdo@ee.washington.edu)
|
||||
@@ -49,6 +51,7 @@ Thomas Geithner (thomas.geithner@dai-labor.de)
|
||||
Ashim Ghosh (ashim.atiit@gmail.com)
|
||||
Martin Giachino (martin.giachino@gmail.com,giachino@fing.edu.uy)
|
||||
Tom Goff (tgoff@tgoff.net)
|
||||
Mohit Goyal (mohit.bits@gmail.com)
|
||||
Juan C. Granda (jcgranda@uniovi.es)
|
||||
David Gross (gdavid.devel@gmail.com)
|
||||
Maja Grubišić (maja.grubisic@live.com)
|
||||
@@ -57,6 +60,7 @@ Daniel Halperin (daniel@halper.in)
|
||||
Bruno Haick (bghaick@hotmail.com)
|
||||
Frank Helbert (frank@ime.usp.br)
|
||||
Tom Henderson (tomhend@u.washington.edu)
|
||||
Christopher Hepner (hepner@hs-ulm.de)
|
||||
Budiarto Herman (budiarto.herman@magister.fi)
|
||||
Tom Hewer (tomhewer@mac.com)
|
||||
Kristian A. Hiorth (kristahi@ifi.uio.no)
|
||||
@@ -82,6 +86,7 @@ Mathieu Lacage (mathieu.lacage@inria.fr)
|
||||
Emmanuelle Laprise (emmmanuelle.laprise@bluekazoo.ca)
|
||||
Kristijan Lenković (k.lenkovic@me.com)
|
||||
Daniel Lertpratchya (nikkipui@gmail.com)
|
||||
Brett Levasseur (brettl20@gmail.com)
|
||||
Björn Lichtblau (lichtbla@informatik.hu-berlin.de)
|
||||
Timo Lindhorst (tlnd@online.de)
|
||||
Erwan Livolant (erwan.livolant@inria.fr)
|
||||
@@ -101,10 +106,12 @@ Faker Moatamri (faker.moatamri@inria.fr)
|
||||
Edvin Močibob (edvin.mocibob@gmail.com)
|
||||
Mike Moreton (mjvm_ns@hotmail.com)
|
||||
Michele Muccio (michelemuccio@virgilio.it)
|
||||
Esteban Municio (esteban.municio@urjc.es)
|
||||
Sidharth Nabar (snabar@uw.edu)
|
||||
Hemanth Narra (hemanth@ittc.ku.edu)
|
||||
Roman Naumann (naumann@informatik.hu-berlin.de)
|
||||
Ben Newton (bn@cs.unc.edu)
|
||||
Cecchi Niccolò (insa@igeek.it)
|
||||
Andreas Nilsson (andrnils@gmail.com)
|
||||
Jaume Nin (jnin@cttc.es)
|
||||
Michael Nowatkowski (nowatkom@gmail.com)
|
||||
|
||||
@@ -50,6 +50,58 @@ the cracks, unfortunately. If you, as a user, can suggest improvements
|
||||
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.23 to ns-3.24</h1>
|
||||
<h2>New API:</h2>
|
||||
<ul>
|
||||
</ul>
|
||||
<h2>Changes to existing API:</h2>
|
||||
<ul>
|
||||
<li> The signatures on several TcpHeader methods were changed to take const arguments.</li>
|
||||
<li> class TcpL4Protocol replaces Send() methods with SendPacket(), and adds new methods to AddSocket() and RemoveSocket() from a node. Also, a new PacketReceived() method was introduced to get the TCP header of an incoming packet and check its checksum.</li>
|
||||
<li> The CongestionWindow and SlowStartThreshold trace sources have been moved from the TCP subclasses such as NewReno, Reno, Tahoe, and Westwood to the TcpSocketBase class.</li>
|
||||
</ul>
|
||||
<h2>Changes to build system:</h2>
|
||||
<ul>
|
||||
</ul>
|
||||
<h2>Changed behavior:</h2>
|
||||
This section is for behavioral changes to the models that were not due to a bug fix.
|
||||
<ul>
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
<h1>Changes from ns-3.22 to ns-3.23</h1>
|
||||
<h2>New API:</h2>
|
||||
<ul>
|
||||
<li> The mobility module includes a GeographicPositions class used to
|
||||
convert geographic to cartesian coordinates, and to generate randomly
|
||||
distributed geographic coordinates.
|
||||
</li>
|
||||
<li> The spectrum module includes new TvSpectrumTransmitter classes and helpers to create television transmitter(s) that transmit PSD spectrums customized by attributes such as modulation type, power, antenna type, channel frequency, etc.
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Changes to existing API:</h2>
|
||||
<ul>
|
||||
<li> In LteSpectrumPhy, LtePhyTxEndCallback and the corresponding methods have been removed, since they were unused.
|
||||
</li>
|
||||
<li> In the DataRate class in the network module, CalculateTxTime has been declared deprecated. CalculateBytesTxTime and CalculateBitsTxTime are to be used instead. The return value is a Time, instead of a double.
|
||||
</li>
|
||||
<li> In the Wi-Fi InterferenceHelper, the interference event now takes the WifiTxVector as an input parameter, instead of the WifiMode. A similar change was made to the WifiPhy::RxOkCallback signature.
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Changes to build system:</h2>
|
||||
<ul>
|
||||
<li> None </li>
|
||||
</ul>
|
||||
<h2>Changed behavior:</h2>
|
||||
This section is for behavioral changes to the models that were not due to a bug fix.
|
||||
<ul>
|
||||
<li> In Wi-Fi, HT stations (802.11n) now support two-level aggregation. The InterferenceHelper now distinguishes between the PLCP and regular payload reception, for higher fidelity modeling. ACKs are now sent using legacy rates and preambles. Acces points now establish BSSBasicRateSet for control frame transmissions. PLCP header and PLCP payload reception have been decoupled to improve PHY layer modeling accuracy. RTS/CTS with A-MPDU is now fully supported.
|
||||
</li>
|
||||
<li> The mesh module was made more compliant to the IEEE 802.11s-2012 standard and packet traces are now parseable by Wireshark.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
<h1>Changes from ns-3.21 to ns-3.22</h1>
|
||||
<h2>New API:</h2>
|
||||
|
||||
@@ -5,7 +5,8 @@ all:
|
||||
|
||||
# free free to change this part to suit your requirements
|
||||
configure:
|
||||
./waf configure --enable-examples --enable-tests
|
||||
#./waf configure --enable-examples --enable-tests
|
||||
./waf configure -d optimized --enable-examples --disable-python --disable-tests
|
||||
|
||||
build:
|
||||
./waf build
|
||||
|
||||
@@ -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
|
||||
--------------------------------
|
||||
|
||||
+127
-4
@@ -10,7 +10,7 @@ Consult the file CHANGES.html for more detailed information about changed
|
||||
API and behavior across ns-3 releases.
|
||||
|
||||
Release 3-dev
|
||||
=============
|
||||
============
|
||||
|
||||
Availability
|
||||
------------
|
||||
@@ -19,6 +19,130 @@ This release is not yet available.
|
||||
Supported platforms
|
||||
-------------------
|
||||
|
||||
New user-visible features
|
||||
-------------------------
|
||||
- (network) SimpleChannel allows per-NetDevice blacklists, in order to do hidden terminal testcases.
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
- Bug 730 - Enabling fragmentation at run-time breaks simulation
|
||||
- Bug 1249 - doxygen comments on device-level SetMobility ()
|
||||
- Bug 1482 - mesh module was producing fatal error with ASCII and netanim traces
|
||||
- Bug 1736 - default dot11EDCATableMSDULifetime
|
||||
- Bug 1901 - mesh module producing malformed pcaps
|
||||
- Bug 1929 - TcpL4Protocol::Send must indicate the source address to routing (if known)
|
||||
- Bug 1982 - AODV and mesh modules use random variables before seeds can be set
|
||||
- Bug 2058 - TCP window update can shrink left edge of window
|
||||
- Bug 2063 - FdNetDevice::SendFrom assert does not account for headers correctly
|
||||
- Bug 2082: Empirical RV fails if value provided in CDF function is negative
|
||||
- Bug 2093 - MultiModelSpectrumChannel::GetDevice only works for 0-th index
|
||||
- Bug 2096 - Wrong pcap information when MPDU aggregation is used
|
||||
- Bug 2108 - Erroneous implementation in InterferenceHelper
|
||||
- Bug 2119 - Fix memory leaks in FdNetDevice test due to non-executed events
|
||||
- Bug 2124 - UdpSocketImpl::ShutdownRecv doesn't stop the Ipv[4,6]EndPointDemux
|
||||
- Bug 2125 - subclasses must chain up to base class NotifyNewAggregate
|
||||
- Bug 2126 - LrWpanNetDevice silently accepts no mobility on the node
|
||||
- Bug 2127 - Scheduler benchmark utility works in first run only
|
||||
- Bug 2130 - Allow SimpleChannel to simulate hidden terminals.
|
||||
- Bug 2135 - TCP doesn't honor the socket's output interface
|
||||
- Bug 2136 - The usage of tid in wifi and wave module shall be "if (tid > 7)" rather than "if (tid >= 7)"
|
||||
- Bug 2132 - TCP RST packets were incorrectly formatted if no endpoints matched
|
||||
- Bug 2138 - SimpleNetDevice could send overlapped packets
|
||||
- Bug 2148 - Ipv6Interface::SetUp doesn't re-create the Link-Local addresses
|
||||
- Bug 2153 - Incorrect power limits in wifi power control algorithms
|
||||
- Bug 2154 - Incorrect power calculation in wifi power adaptation examples
|
||||
- Bug 2156 - Duplicate packets when using two level aggregation
|
||||
|
||||
Known issues
|
||||
------------
|
||||
In general, known issues are tracked on the project tracker available
|
||||
at http://www.nsnam.org/bugzilla/
|
||||
|
||||
Release 3.23
|
||||
============
|
||||
|
||||
Availability
|
||||
------------
|
||||
This release is available from:
|
||||
http://www.nsnam.org/release/ns-allinone-3.23.tar.bz2
|
||||
|
||||
Supported platforms
|
||||
-------------------
|
||||
This release has been tested on the following platforms:
|
||||
- Ubuntu 15.04 (64 bit) with g++-4.9.2
|
||||
- Fedora Core 21 (64 bit) with g++-4.9.2
|
||||
- Ubuntu 14.04 (64 bit) with g++-4.8.2
|
||||
- Ubuntu 12.04.4 (32/64 bit) with g++-4.6.3
|
||||
- CentOS/RHEL 6.6 (64-bit) with g++-4.4.7
|
||||
- OS X Yosemite 10.10.3 with Xcode 6.3.1 and Apple LLVM version 6.1.0
|
||||
- FreeBSD 10.1-RELEASE (64 bit) with clang-3.4.1
|
||||
|
||||
New user-visible features
|
||||
-------------------------
|
||||
- (network) CalculateTxTime has been declared obsolete.
|
||||
CalculateBytesTxTime and CalculateBitsTxTime are to be used instead.
|
||||
The return value is a Time, instead of a double.
|
||||
- (mobility) Classes added for converting geographic to cartesian coordinates.
|
||||
- (spectrum) TvSpectrumTransmitter models added to create television
|
||||
transmitter(s) that transmit PSD spectrums customized by attributes such
|
||||
as modulation type, power, antenna type, channel frequency, etc.
|
||||
- (wifi) Several model improvements have been made. Access points now
|
||||
establish BSSBasicRateSet for control frame transmissions. PLCP header
|
||||
and payload reception have been decoupled for improved PHY modeling
|
||||
accuracy. RTS/CTS with A-MPDU is now fully supported, and 802.11n
|
||||
stations now support two-level aggregation.
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
- Bug 1757 - RLC AM not using NACK_SN
|
||||
- Bug 1974 - CalculateTxTime should return a Time, not a double
|
||||
- Bug 1982 - AODV and mesh use random variables before seed can be set
|
||||
- Bug 2004 - Wrong timeout calculation for 802.11n in WifiMac
|
||||
- Bug 2008 - (lr-wpan) Crash if ending rx while status change is in progress
|
||||
- Bug 2025 - (lr-wpan) Changing the channel doesn't affect the Tx params
|
||||
- Bug 2034 - (lr-wpan) CSMA-CA BackoffPeriod is too short
|
||||
- Bug 2054 - TCP window update can shrink the Left Edge of the window
|
||||
- Bug 2066 - A-MPDU reception should check for successful preamble
|
||||
- Bug 2067 - TCP performance when advertised window exceeds sender buffer size
|
||||
- Bug 2070 - Wrong report of Packets and Bytes stored in CoDeL
|
||||
- Bug 2073 - NDisc cache entries update timer might be stuck in a loop
|
||||
- Bug 2075 - A-MPDU using RTS/CTS behaves wrongly when MaxSsrc is reached
|
||||
- Bug 2076 - TCP MinRTO Attribute is not actually used
|
||||
- Bug 2077 - Icmpv6L4Protocol::HandleDestinationUnreachable must check the packet size, not its serialized size
|
||||
- Bug 2079 - mcs variable in ht-wifi-network example is confusing
|
||||
- Bug 2082 - Empirical RV fails if the value provided in the CDF member function is negative
|
||||
- Bug 2083 - BridgeNetDevice may send corrupted packets
|
||||
- Bug 2087 - Waf fails to build ns-3 if the path contains accented characters
|
||||
- Bug 2090 - (rip-ng) Routes may be added twice on interface activation
|
||||
- Bug 2093 - MultiModelSpectrumChannel::GetDevice only works for 0-th index
|
||||
- Bug 2095 - (wimax) Wrong values in default-traces.h for 16 QAM 3/4
|
||||
- Bug 2097 - ACKs should be sent using legacy rates and preambles in 802.11n
|
||||
- Bug 2103 - Ipv[4,6]RoutingHelper::PrintRoutingTableAll[At,Every] hangs if a node doesn't have IP
|
||||
|
||||
Known issues
|
||||
------------
|
||||
In general, known issues are tracked on the project tracker available
|
||||
at http://www.nsnam.org/bugzilla/
|
||||
|
||||
Release 3.22
|
||||
============
|
||||
|
||||
Availability
|
||||
------------
|
||||
This release is available from:
|
||||
http://www.nsnam.org/release/ns-allinone-3.22.tar.bz2
|
||||
|
||||
Supported platforms
|
||||
-------------------
|
||||
This release has been tested on the following platforms:
|
||||
- Fedora Core 21 (64 bit) with g++-4.9.2
|
||||
- Ubuntu 14.10 (32 bit) with g++-4.9.1
|
||||
- Ubuntu 14.04 (64 bit) with g++-4.8.2
|
||||
- Ubuntu 12.04.4 (32/64 bit) with g++-4.6.3
|
||||
- CentOS/RHEL 6.6 (64-bit) with g++-4.4.7
|
||||
- OS X Yosemite 10.10 with Xcode 6.1.1 and clang-600.0.56
|
||||
- FreeBSD 10.1-RELEASE (64 bit) with clang-3.4.1
|
||||
|
||||
New user-visible features
|
||||
-------------------------
|
||||
- (wifi) Support for MPDU aggregation has been added to the wifi model,
|
||||
@@ -28,7 +152,6 @@ New user-visible features
|
||||
wifi module to jointly control transmission power and data rate. Two use
|
||||
case examples (PowerAdaptationDistance and PowerAdaptationInterference)
|
||||
and a test case have also been added.
|
||||
- (wifi) PARF and APARF WiFi rate controls have been added to the wifi model.
|
||||
- (lte) In previous releases of the LTE module, the bearer release
|
||||
functionality was only partially supported. As an enhancement, a
|
||||
complete release bearer procedure is now implemented, which can be
|
||||
@@ -51,9 +174,9 @@ New user-visible features
|
||||
framework to traced values emitting Time objects
|
||||
- (documentation) the callback function signatures for all TraceSources
|
||||
is documented in Doxygen
|
||||
- print-introspected-doxygen.sh has had several enhancements;
|
||||
- (utils) print-introspected-doxygen.cc has had several enhancements;
|
||||
use -h to read the usage message for details.
|
||||
- TracedValue and TracedCallback function signatures are now documented,
|
||||
- (core) TracedValue and TracedCallback function signatures are now documented,
|
||||
which required changing the TypeId::AddTraceSource API.
|
||||
|
||||
Bugs fixed
|
||||
|
||||
+32
-21
@@ -12,8 +12,8 @@ from waflib.Errors import WafError
|
||||
# feature = TaskGen.feature
|
||||
# after = TaskGen.after
|
||||
|
||||
## https://launchpad.net/pybindgen/
|
||||
REQUIRED_PYBINDGEN_VERSION = (0, 17, 0, 886)
|
||||
# https://github.com/named-data-ndnSIM/pybindgen
|
||||
REQUIRED_PYBINDGEN_VERSION = '0.17.0.post45+ng4806e4f'
|
||||
REQUIRED_PYGCCXML_VERSION = (0, 9, 5)
|
||||
|
||||
RUN_ME=-3
|
||||
@@ -163,17 +163,26 @@ def configure(conf):
|
||||
"PyBindGen missing")
|
||||
return
|
||||
else:
|
||||
out = subprocess.Popen([conf.env['PYTHON'][0], "-c",
|
||||
"import pybindgen.version; "
|
||||
"print('.'.join([str(x) for x in pybindgen.version.__version__]))"],
|
||||
stdout=subprocess.PIPE).communicate()[0]
|
||||
pybindgen_version_str = out.strip()
|
||||
pybindgen_version = tuple([int(x) for x in pybindgen_version_str.split('.')])
|
||||
conf.msg('Checking for pybindgen version', pybindgen_version_str)
|
||||
def getVersion():
|
||||
out = subprocess.Popen([conf.env['PYTHON'][0], "-c",
|
||||
"try:\n"
|
||||
" import pybindgen.version\n"
|
||||
" print(pybindgen.__version__)\n"
|
||||
"except:\n"
|
||||
" pass"],
|
||||
stdout=subprocess.PIPE).communicate()[0]
|
||||
return out.strip()
|
||||
pybindgen_version = getVersion()
|
||||
if pybindgen_version == '': # version is not generated yet (e.g., cloned from git repo directly)
|
||||
subprocess.Popen([conf.env['PYTHON'][0], "setup.py", "--version"],
|
||||
cwd=conf.env['WITH_PYBINDGEN'],
|
||||
stdout=subprocess.PIPE).communicate()[0]
|
||||
pybindgen_version = getVersion()
|
||||
|
||||
conf.msg('Checking for pybindgen version', pybindgen_version)
|
||||
if not (pybindgen_version == REQUIRED_PYBINDGEN_VERSION):
|
||||
Logs.warn("pybindgen (found %s), (need %s)" %
|
||||
(pybindgen_version_str,
|
||||
'.'.join([str(x) for x in REQUIRED_PYBINDGEN_VERSION])))
|
||||
Logs.warn("pybindgen (found %r), (need %r)" %
|
||||
(pybindgen_version, REQUIRED_PYBINDGEN_VERSION))
|
||||
conf.report_optional_feature("python", "Python Bindings", False,
|
||||
"PyBindGen version not correct and newer version could not be retrieved")
|
||||
return
|
||||
@@ -192,13 +201,11 @@ int main ()
|
||||
''' % dict(type1=t1, type2=t2)
|
||||
|
||||
try:
|
||||
ret = conf.run_c_code(code=test_program,
|
||||
env=conf.env.derive(), compile_filename='test.cc',
|
||||
features='cxx cprogram', execute=False)
|
||||
ret = conf.check(compiler='cxx', fragment=test_program, features='cxx')
|
||||
except Errors.ConfigurationError:
|
||||
ret = 1
|
||||
ret = False
|
||||
conf.msg('Checking for types %s and %s equivalence' % (t1, t2), (ret and 'no' or 'yes'))
|
||||
return not ret
|
||||
return ret
|
||||
|
||||
uint64_is_long = test("uint64_t", "unsigned long")
|
||||
uint64_is_long_long = test("uint64_t", "unsigned long long")
|
||||
@@ -280,13 +287,17 @@ int main ()
|
||||
"gccxml missing")
|
||||
return
|
||||
|
||||
gccxml_version_line = os.popen(gccxml + " --version").readline().strip()
|
||||
gccxml_version_line = os.popen(gccxml[0] + " --version").readline().strip()
|
||||
m = re.match( "^GCC-XML version (\d\.\d(\.\d)?)$", gccxml_version_line)
|
||||
gccxml_version = m.group(1)
|
||||
gccxml_version_ok = ([int(s) for s in gccxml_version.split('.')] >= [0, 9])
|
||||
try:
|
||||
gccxml_version = m.group(1)
|
||||
gccxml_version_ok = ([int(s) for s in gccxml_version.split('.')] >= [0, 9])
|
||||
except AttributeError:
|
||||
gccxml_version = gccxml_version_line
|
||||
gccxml_version_ok = False
|
||||
conf.msg('Checking for gccxml version', gccxml_version)
|
||||
if not gccxml_version_ok:
|
||||
Logs.warn("gccxml too old, need version >= 0.9; automatic scanning of API definitions will not be possible")
|
||||
Logs.warn("gccxml version unknown or too old, need version >= 0.9; automatic scanning of API definitions will not be possible")
|
||||
conf.report_optional_feature("pygccxml", "Python API Scanning Support", False,
|
||||
"gccxml too old")
|
||||
return
|
||||
|
||||
+16
-2
@@ -245,6 +245,16 @@ ALIASES += pname{1}="<span class=\"params\"><span class=\"paramnam
|
||||
## Link to RFC's
|
||||
ALIASES += RFC{1}="<a href=\"http://datatracker.ietf.org/doc/rfc\1/\">RFC \1</a>"
|
||||
|
||||
## Highlight template parameter induction
|
||||
## Inferred template parameters are clear from the context:
|
||||
## template <typename T> void Func (T x);
|
||||
## Explicit template parameters must be given at the call site:
|
||||
## template <typename T> void Func (void);
|
||||
## which is called as
|
||||
## Func<MyClass> ();
|
||||
ALIASES += deduced="<span class=\"params\"><span class=\"paramdir\">[deduced] </span></span>"
|
||||
ALIASES += explicit="<span class=\"params\"><span class=\"paramdir\">[explicit]</span></span>"
|
||||
|
||||
# This tag can be used to specify a number of word-keyword mappings (TCL only).
|
||||
# A mapping has the form "name=value". For example adding "class=itcl::class"
|
||||
# will allow you to use the command class in the itcl::class meaning.
|
||||
@@ -546,7 +556,7 @@ SHOW_GROUPED_MEMB_INC = NO
|
||||
# files with double quotes in the documentation rather than with sharp brackets.
|
||||
# The default value is: NO.
|
||||
|
||||
FORCE_LOCAL_INCLUDES = NO
|
||||
FORCE_LOCAL_INCLUDES = YES
|
||||
|
||||
# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
|
||||
# documentation for inline members.
|
||||
@@ -857,6 +867,7 @@ EXAMPLE_PATH = src/aodv/examples \
|
||||
src/click/examples \
|
||||
src/config-store/examples \
|
||||
src/core/examples \
|
||||
src/core/doc \
|
||||
src/csma/examples \
|
||||
src/csma-layout/examples \
|
||||
src/dsdv/examples \
|
||||
@@ -2066,7 +2077,10 @@ PREDEFINED = NS3_ASSERT_ENABLE \
|
||||
NS3_LOG_ENABLE \
|
||||
NS_LOG_COMPONENT_DEFINE()=1 \
|
||||
NS_LOG_COMPONENT_DEFINE_MASK()=1 \
|
||||
NS_OBJECT_ENSURE_REGISTERED()=1
|
||||
NS_OBJECT_ENSURE_REGISTERED()=1 \
|
||||
NS3_BUILD_PROFILE_DEBUG \
|
||||
NS3_BUILD_PROFILE_RELEASE \
|
||||
NS3_BUILD_PROFILE_OPTIMIZED
|
||||
|
||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
||||
# tag can be used to specify a list of macro names that should be expanded. The
|
||||
|
||||
@@ -165,6 +165,7 @@ This is defined in the ``node.cc`` file as follows::
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::Node")
|
||||
.SetParent<Object> ()
|
||||
.SetGroupName ("Network")
|
||||
.AddConstructor<Node> ()
|
||||
.AddAttribute ("DeviceList",
|
||||
"The list of devices associated to this Node.",
|
||||
@@ -300,6 +301,7 @@ registrations are moved into the :cpp:class:`TypeId` class; *e.g*.::
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::DropTailQueue")
|
||||
.SetParent<Queue> ()
|
||||
.SetGroupName ("Network")
|
||||
.AddConstructor<DropTailQueue> ()
|
||||
.AddAttribute ("MaxPackets",
|
||||
"The maximum number of packets accepted by this DropTailQueue.",
|
||||
|
||||
@@ -38,7 +38,8 @@ Documenting with Sphinx
|
||||
We use Sphinx_ to generate expository chapters describing
|
||||
the design and usage of each module. Right now you are reading the
|
||||
:doc:`Documentation <documentation>` Chapter.
|
||||
The `Show Source <_sources/documentation.txt>`_ link in the sidebar
|
||||
If you are reading the html version, the
|
||||
`Show Source <_sources/documentation.txt>`_ link in the sidebar
|
||||
will show you the reStructuredText source for this chapter.
|
||||
|
||||
Adding New Chapters
|
||||
@@ -59,7 +60,7 @@ top-level document for the module. The ``src/create-module.py`` script
|
||||
will create this file for you.
|
||||
|
||||
Some models require several ``.rst`` files, and figures; these should
|
||||
all go in the ``src/foo/doc/`` directory. The docs are actually build
|
||||
all go in the ``src/foo/doc/`` directory. The docs are actually built
|
||||
by a Sphinx Makefile. For especially involved
|
||||
documentation, it may be helpful to have a local ``Makefile``
|
||||
in the ``src/foo/doc/`` directory to
|
||||
@@ -137,7 +138,7 @@ To build just the Models documentation:
|
||||
|
||||
.. sourcecode:: bash
|
||||
|
||||
$ make -C doc/models
|
||||
$ make -C doc/models html
|
||||
|
||||
To see the generated documentation point your browser at
|
||||
``doc/models/build/html``.
|
||||
@@ -260,7 +261,7 @@ provides a number of useful features:
|
||||
|
||||
* Summary table of all class members.
|
||||
* Graphs of inheritance and collaboration for all classes.
|
||||
* Links to the source code imlementing each function.
|
||||
* Links to the source code implementing each function.
|
||||
* Links to every place a member is used.
|
||||
* Links to every object used in implementing a function.
|
||||
* Grouping of related classes, such as all the classes related to
|
||||
@@ -273,6 +274,7 @@ for every class
|
||||
* Documentation for any ``Attributes``, including ``Attributes``
|
||||
defined in parent classes.
|
||||
* Documentation for any ``Trace`` sources defined by the class.
|
||||
* The memory footprint for each class.
|
||||
|
||||
Doxygen operates by scaning the source code, looking for
|
||||
specially marked comments. It also creates a cross reference,
|
||||
@@ -300,8 +302,11 @@ The preferred style for Doxygen comments is the JavaDoc style::
|
||||
* \note Note any limitations or gotchas.
|
||||
*
|
||||
* (For functions with arguments or return valued:)
|
||||
* \param foo Brief noun phrase describing this argument.
|
||||
* \param bar Note Sentence case, and terminating period.
|
||||
* \param [in] foo Brief noun phrase describing this argument. Note
|
||||
* that we indicate if the argument is input,
|
||||
* output, or both.
|
||||
* \param [in,out] bar Note Sentence case, and terminating period.
|
||||
* \param [in] baz Indicate boolean values with \c true or \c false.
|
||||
* \return Brief noun phrase describing the value.
|
||||
*
|
||||
* \internal
|
||||
@@ -310,7 +315,7 @@ The preferred style for Doxygen comments is the JavaDoc style::
|
||||
* Understanding this material shouldn't be necessary to using
|
||||
* the class or method.
|
||||
*/
|
||||
class Example
|
||||
void ExampleFunction (const int foo, double & bar, const bool baz);
|
||||
|
||||
In this style the Doxygen comment block begins with two \`*' characters:
|
||||
``/**``, and precedes the item being documented.
|
||||
@@ -368,91 +373,100 @@ Building the Doxygen documentation is pretty simple:
|
||||
|
||||
$ ./waf doxygen
|
||||
|
||||
This builds using the default configuration, which generates documentation
|
||||
sections for *all* items, even if they do not have explicit comment
|
||||
documentation blocks. This has the effect of suppressing warnings for
|
||||
undocumented items, but makes sure everything appears in the generated
|
||||
output.
|
||||
This builds using the default configuration, which generates
|
||||
documentation sections for *all* items, even if they do not have
|
||||
explicit comment documentation blocks. This has the effect of
|
||||
suppressing warnings for undocumented items, but makes sure everything
|
||||
appears in the generated output, which is usually what you want for
|
||||
general use. Note that we generate documentation even for modules
|
||||
which are disabled, to make it easier to see all the features
|
||||
available in |ns3|.
|
||||
|
||||
When writing documentation, it's often more useful to see which items
|
||||
are generating warnings, typically about missing documentation.
|
||||
To see the full warnings list, use the ``doc/doxygen.warnings.report.sh``
|
||||
are generating warnings, typically about missing documentation. To
|
||||
see the full warnings list, use the ``doc/doxygen.warnings.report.sh``
|
||||
script:
|
||||
|
||||
.. sourcecode:: bash
|
||||
|
||||
$ doc/doxygen.warnings.report.sh
|
||||
Waf: Entering directory `build'
|
||||
...
|
||||
Waf: Leaving directory `build'
|
||||
'build' finished successfully (3m24.094s)
|
||||
|
||||
Rebuilding doxygen docs with full errors...Done.
|
||||
$ doc/doxygen.warnings.report.sh
|
||||
|
||||
doxygen.warnings.report.sh:
|
||||
Building and running print-introspected-doxygen...done.
|
||||
Rebuilding doxygen (v1.8.10) docs with full errors...done.
|
||||
|
||||
|
||||
Report of Doxygen warnings
|
||||
----------------------------------------
|
||||
Report of Doxygen warnings
|
||||
----------------------------------------
|
||||
|
||||
(All counts are lower bounds.)
|
||||
(All counts are lower bounds.)
|
||||
|
||||
Warnings by module/directory:
|
||||
Warnings by module/directory:
|
||||
|
||||
Count Directory
|
||||
----- ----------------------------------
|
||||
3844 src/lte/model
|
||||
1718 src/wimax/model
|
||||
1423 src/core/model
|
||||
....
|
||||
138 additional undocumented parameters.
|
||||
----------------------------------------
|
||||
15765 total warnings
|
||||
126 directories with warnings
|
||||
Count Directory
|
||||
----- ----------------------------------
|
||||
3414 src/lte/model
|
||||
1532 src/wimax/model
|
||||
825 src/lte/test
|
||||
....
|
||||
1 src/applications/test
|
||||
97 additional undocumented parameters.
|
||||
----------------------------------------
|
||||
12460 total warnings
|
||||
100 directories with warnings
|
||||
|
||||
|
||||
Warnings by file (alphabetical)
|
||||
Warnings by file (alphabetical)
|
||||
|
||||
Count File
|
||||
----- ----------------------------------
|
||||
17 doc/introspected-doxygen.h
|
||||
15 examples/routing/manet-routing-compare.cc
|
||||
26 examples/stats/wifi-example-apps.h
|
||||
....
|
||||
----------------------------------------
|
||||
967 files with warnings
|
||||
Count File
|
||||
----- ----------------------------------
|
||||
15 examples/routing/manet-routing-compare.cc
|
||||
26 examples/stats/wifi-example-apps.h
|
||||
12 examples/tutorial/fifth.cc
|
||||
....
|
||||
17 utils/python-unit-tests.py
|
||||
----------------------------------------
|
||||
771 files with warnings
|
||||
|
||||
|
||||
Warnings by file (numerical)
|
||||
Warnings by file (numerical)
|
||||
|
||||
Count File
|
||||
----- ----------------------------------
|
||||
374 src/lte/model/lte-asn1-header.h
|
||||
280 src/lte/model/lte-rrc-sap.h
|
||||
262 src/lte/model/lte-rrc-header.h
|
||||
....
|
||||
----------------------------------------
|
||||
967 files with warnings
|
||||
Count File
|
||||
----- ----------------------------------
|
||||
273 src/lte/model/lte-rrc-sap.h
|
||||
272 src/core/model/simulator.h
|
||||
221 src/netanim/model/animation-interface.h
|
||||
....
|
||||
1 src/wimax/model/ul-job.cc
|
||||
----------------------------------------
|
||||
771 files with warnings
|
||||
|
||||
|
||||
Doxygen Warnings Summary
|
||||
----------------------------------------
|
||||
126 directories
|
||||
967 files
|
||||
15765 warnings
|
||||
Doxygen Warnings Summary
|
||||
----------------------------------------
|
||||
100 directories
|
||||
771 files
|
||||
12460 warnings
|
||||
|
||||
The script modifies the configuration to show all warnings, and
|
||||
to shorten the run time. As you can see, at this writing we have
|
||||
*a lot* of undocumented items. The report summarizes warnings
|
||||
by module ``src/*/*``, and by file, in alphabetically and numerical
|
||||
order.
|
||||
(This snippet has *a lot* of lines suppressed!)
|
||||
|
||||
The script has a few options to pare things down and make this more
|
||||
The script modifies the configuration to show all warnings, and to
|
||||
shorten the run time. (It shortens the run time primarily by
|
||||
disabling creation of diagrams, such as call trees, and doesn't
|
||||
generate documentation for undocumented items, in order to trigger the
|
||||
warnings.) As you can see, at this writing we have *a lot* of
|
||||
undocumented items. The report summarizes warnings by module
|
||||
``src/*/*``, and by file, in alphabetically and numerical order.
|
||||
|
||||
The script has a few options to pare things down and make the output more
|
||||
manageable. For help, use the ``-h`` option. Having run it once
|
||||
to do the Doxygen build and generate the full warnings log,
|
||||
you can reprocess the log file with various "filters,"
|
||||
without having to do the full Doxygen build by,
|
||||
again using the ``-s`` option. You can exclude warnings
|
||||
without having to do the full Doxygen build again by
|
||||
using the ``-s`` option. You can exclude warnings
|
||||
from ``*/examples/*`` files (``-e`` option), and/or ``*/test/*`` files
|
||||
(``-t``).
|
||||
(``-t``). Just to be clear, all of the filter options do the complete
|
||||
fast doxygen build; they just filter doxygen log and warnings output.
|
||||
|
||||
Perhaps the most useful option when writing documentation comments
|
||||
is ``-m <module>``, which will limit the report to just files matching
|
||||
@@ -486,6 +500,13 @@ urgent in a single module:
|
||||
src/mesh/helper/mesh-helper.h:119: warning: parameters of member ns3::MeshHelper::SetStandard are not (all) documented
|
||||
|
||||
|
||||
Finally, note that undocumented items (classes, methods, functions,
|
||||
typedefs, *etc.* won't produce documentation when you build with
|
||||
``doxygen.warnings.report.sh``, and only the outermost item
|
||||
will produce a warning. As a result, if you don't see documentation
|
||||
for a class method in the generated documentation, the class itself
|
||||
probably needs documentation.
|
||||
|
||||
Now it's just a matter of understanding the code, and writing some
|
||||
docs!
|
||||
|
||||
@@ -508,24 +529,45 @@ usage for |ns3|.
|
||||
|
||||
/**
|
||||
* \defgroup foo Foo protocol.
|
||||
* Implemenation of the Foo protocol.
|
||||
*/
|
||||
|
||||
Mark each associated class as belonging to the group::
|
||||
The symbol ``foo`` is how other items can add themselves to this group.
|
||||
The string following that will be the title for the group. Any futher
|
||||
text will be the detailed description for the group page.
|
||||
|
||||
* Document each file, assigning it to the relevant group. In a header file::
|
||||
|
||||
/**
|
||||
* \file
|
||||
* \ingroup foo
|
||||
* Class Foo declaration.
|
||||
*/
|
||||
|
||||
or in the corresponding ``.cc`` file::
|
||||
|
||||
/**
|
||||
* \file
|
||||
* \ingroup foo
|
||||
* Class FooBar implementation.
|
||||
*/
|
||||
|
||||
* Mark each associated class as belonging to the group::
|
||||
|
||||
/**
|
||||
* \ingroup foo
|
||||
*
|
||||
* Foo packet type.
|
||||
* FooBar packet type.
|
||||
*/
|
||||
class Foo
|
||||
class FooBar
|
||||
|
||||
* Did you know ``typedefs`` can have formal arguments? This enables
|
||||
documentation of function pointer signatures::
|
||||
|
||||
/**
|
||||
* Bar callback function signature.
|
||||
* Bar callback function signature.
|
||||
*
|
||||
* \param ale The size of a pint of ale, in Imperial ounces.
|
||||
* \param ale The size of a pint of ale, in Imperial ounces.
|
||||
*/
|
||||
typedef void (* BarCallback)(const int ale);
|
||||
|
||||
@@ -534,12 +576,38 @@ usage for |ns3|.
|
||||
|
||||
* ``\bugid{298}`` will create a link to bug 298 in our Bugzilla.
|
||||
|
||||
* ``\pname{foo}`` in a description will format ``foo``
|
||||
as a ``\param foo`` parameter, making it clear that you
|
||||
* ``\p foo`` in a description will format ``foo``
|
||||
the same as the ``\param foo`` parameter, making it clear that you
|
||||
are referring to an actual argument.
|
||||
|
||||
* ``\RFC{301}`` will create a link to RFC 301.
|
||||
|
||||
* Document the direction of function arguments with ``\param [in]``, *etc*.
|
||||
The allowed values of the direction token are ``[in]``, ``[out]``, and
|
||||
``[in,out]`` (note the explicit square brackets), as discussed in the
|
||||
Doxygen docs for ``\param``.
|
||||
|
||||
* Document template arguments with ``\tparam``, just as you use ``\param``
|
||||
for function arguments.
|
||||
|
||||
* For template arguments, indicate if they will be deduced or must be given
|
||||
explicitly::
|
||||
|
||||
/**
|
||||
* A templated function.
|
||||
* \tparam T \explicit The return type.
|
||||
* \tparam U \deduced The argument type.
|
||||
* \param [in] a The argument.
|
||||
*/
|
||||
template <typename T, typename U> T Function (U a);
|
||||
|
||||
* Use ``\tparam U \deduced`` because the type ``U`` can be deduced at
|
||||
the site where the template is invoked. Basically deduction can only
|
||||
be done for function arguments.
|
||||
|
||||
* Use ``\tparam T \explicit`` because the type ``T`` can't be deduced;
|
||||
it must be given explicitly at the invocation site.
|
||||
|
||||
* ``\internal`` should be used only to set off a discussion of implementation
|
||||
details, not to mark ``private`` functions (they are already marked,
|
||||
as ``private``!)
|
||||
|
||||
@@ -341,6 +341,7 @@ file.::
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::ErrorModel")
|
||||
.SetParent<Object> ()
|
||||
.SetGroupName ("Network")
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
@@ -359,6 +360,7 @@ file.::
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::RateErrorModel")
|
||||
.SetParent<ErrorModel> ()
|
||||
.SetGroupName ("Network")
|
||||
.AddConstructor<RateErrorModel> ()
|
||||
;
|
||||
return tid;
|
||||
@@ -556,6 +558,7 @@ and setting the Parent to ErrorModel::
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::RateErrorModel")
|
||||
.SetParent<ErrorModel> ()
|
||||
.SetGroupName ("Network")
|
||||
.AddConstructor<RateErrorModel> ()
|
||||
...
|
||||
|
||||
|
||||
@@ -277,6 +277,7 @@ An example is in the propagation models for WifiNetDevice::
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::RandomPropagationDelayModel")
|
||||
.SetParent<PropagationDelayModel> ()
|
||||
.SetGroupName ("Propagation")
|
||||
.AddConstructor<RandomPropagationDelayModel> ()
|
||||
.AddAttribute ("Variable",
|
||||
"The random variable which generates random delays (s).",
|
||||
|
||||
@@ -4,58 +4,51 @@
|
||||
Testing framework
|
||||
-----------------
|
||||
|
||||
ns-3 consists of a simulation core engine, a set of models, example programs,
|
||||
|ns3| consists of a simulation core engine, a set of models, example programs,
|
||||
and tests. Over time, new contributors contribute models, tests, and
|
||||
examples. A Python test program ``test.py`` serves as the test
|
||||
execution manager; ``test.py`` can run test code and examples to
|
||||
look for regressions, can output the results into a number of forms, and
|
||||
can manage code coverage analysis tools. On top of this, we layer
|
||||
*Buildbots* that are automated build robots that perform
|
||||
*buildslaves* that are automated build robots that perform
|
||||
robustness testing by running the test framework on different systems
|
||||
and with different configuration options.
|
||||
|
||||
BuildBots
|
||||
*********
|
||||
Buildslaves
|
||||
***********
|
||||
|
||||
At the highest level of ns-3 testing are the buildbots (build robots).
|
||||
At the highest level of |ns3| testing are the buildslaves (build robots).
|
||||
If you are unfamiliar with
|
||||
this system look at `<http://djmitche.github.com/buildbot/docs/0.7.11/>`_.
|
||||
this system look at `<https://ns-buildmaster.ee.washington.edu:8010/>`_.
|
||||
This is an open-source automated system that allows |ns3| to be rebuilt
|
||||
and tested each time something has changed. By running the buildbots on a number
|
||||
and tested daily. By running the buildbots on a number
|
||||
of different systems we can ensure that |ns3| builds and executes
|
||||
properly on all of its supported systems.
|
||||
|
||||
Users (and developers) typically will not interact with the buildbot system other
|
||||
Users (and developers) typically will not interact with the buildslave system other
|
||||
than to read its messages regarding test results. If a failure is detected in
|
||||
one of the automated build and test jobs, the buildbot will send an email to the
|
||||
*ns-developers* mailing list. This email will look something like
|
||||
*ns-commits* mailing list. This email will look something like
|
||||
|
||||
.. sourcecode: text
|
||||
|
||||
The Buildbot has detected a new failure of osx-ppc-g++-4.2 on NsNam.
|
||||
Full details are available at:
|
||||
http://ns-regression.ee.washington.edu:8010/builders/osx-ppc-g%2B%2B-4.2/builds/0
|
||||
|
||||
Buildbot URL: http://ns-regression.ee.washington.edu:8010/
|
||||
|
||||
Buildslave for this Build: darwin-ppc
|
||||
|
||||
Build Reason: The web-page 'force build' button was pressed by 'ww': ww
|
||||
|
||||
Build Source Stamp: HEAD
|
||||
Blamelist:
|
||||
|
||||
BUILD FAILED: failed shell_5 shell_6 shell_7 shell_8 shell_9 shell_10 shell_11 shell_12
|
||||
|
||||
sincerely,
|
||||
-The Buildbot
|
||||
[Ns-commits] Build failed in Jenkins: daily-ubuntu-without-valgrind » Ubuntu-64-15.04 #926
|
||||
|
||||
In the full details URL shown in the email, one can search for the keyword
|
||||
``failed`` and select the ``stdio`` link for the corresponding step to see
|
||||
the reason for the failure.
|
||||
...
|
||||
281 of 285 tests passed (281 passed, 3 skipped, 1 failed, 0 crashed, 0 valgrind errors)
|
||||
List of SKIPped tests:
|
||||
ns3-tcp-cwnd
|
||||
ns3-tcp-interoperability
|
||||
nsc-tcp-loss
|
||||
List of FAILed tests:
|
||||
random-variable-stream-generators
|
||||
+ exit 1
|
||||
Build step 'Execute shell' marked build as failure
|
||||
|
||||
The buildbot will do its job quietly if there are no errors, and the system will
|
||||
undergo build and test cycles every day to verify that all is well.
|
||||
In the full details URL shown in the email, one can find links to the detailed test output.
|
||||
|
||||
The buildslave system will do its job quietly if there are no errors, and the
|
||||
system will undergo build and test cycles every day to verify that all is well.
|
||||
|
||||
Test.py
|
||||
*******
|
||||
@@ -73,7 +66,7 @@ have been built by doing the following
|
||||
::
|
||||
|
||||
$ ./waf configure --enable-examples --enable-tests
|
||||
$ ./waf
|
||||
$ ./waf build
|
||||
|
||||
By default, ``test.py`` will run all available tests and report status
|
||||
back in a very concise form. Running the command
|
||||
@@ -90,7 +83,7 @@ indications followed by the kind of test that was run and its display name.
|
||||
Waf: Entering directory `/home/craigdo/repos/ns-3-allinone-test/ns-3-dev/build'
|
||||
Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone-test/ns-3-dev/build'
|
||||
'build' finished successfully (0.939s)
|
||||
FAIL: TestSuite ns3-wifi-propagation-loss-models
|
||||
FAIL: TestSuite propagation-loss-model
|
||||
PASS: TestSuite object-name-service
|
||||
PASS: TestSuite pcap-file-object
|
||||
PASS: TestSuite ns3-tcp-cwnd
|
||||
@@ -120,6 +113,17 @@ if you run ``test.py --help`` you should see a command summary like:
|
||||
-e EXAMPLE, --example=EXAMPLE
|
||||
specify a single example to run (no relative path is
|
||||
needed)
|
||||
-d, --duration print the duration of each test suite and example
|
||||
-e EXAMPLE, --example=EXAMPLE
|
||||
specify a single example to run (no relative path is
|
||||
needed)
|
||||
-u, --update-data If examples use reference data files, get them to re-
|
||||
generate them
|
||||
-f FULLNESS, --fullness=FULLNESS
|
||||
choose the duration of tests to run: QUICK, EXTENSIVE,
|
||||
or TAKES_FOREVER, where EXTENSIVE includes QUICK and
|
||||
TAKES_FOREVER includes QUICK and EXTENSIVE (only QUICK
|
||||
tests are run by default)
|
||||
-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
|
||||
@@ -167,25 +171,25 @@ to be specified. Running the command
|
||||
|
||||
::
|
||||
|
||||
$ ./test.py --suite=ns3-wifi-propagation-loss-models
|
||||
$ ./test.py --suite=propagation-loss-model
|
||||
|
||||
or equivalently
|
||||
|
||||
::
|
||||
|
||||
$ ./test.py -s ns3-wifi-propagation-loss-models
|
||||
$ ./test.py -s propagation-loss-model
|
||||
|
||||
results in that single test suite being run.
|
||||
|
||||
.. sourcecode:: text
|
||||
|
||||
FAIL: TestSuite ns3-wifi-propagation-loss-models
|
||||
FAIL: TestSuite propagation-loss-model
|
||||
|
||||
To find detailed information regarding the failure, one must specify the kind
|
||||
of output desired. For example, most people will probably be interested in
|
||||
a text file::
|
||||
|
||||
$ ./test.py --suite=ns3-wifi-propagation-loss-models --text=results.txt
|
||||
$ ./test.py --suite=propagation-loss-model --text=results.txt
|
||||
|
||||
This will result in that single test suite being run with the test status written to
|
||||
the file ''results.txt''.
|
||||
@@ -194,7 +198,7 @@ You should find something similar to the following in that file
|
||||
|
||||
.. sourcecode:: text
|
||||
|
||||
FAIL: Test Suite ''ns3-wifi-propagation-loss-models'' (real 0.02 user 0.01 system 0.00)
|
||||
FAIL: Test Suite ''propagation-loss-model'' (real 0.02 user 0.01 system 0.00)
|
||||
PASS: Test Case "Check ... Friis ... model ..." (real 0.01 user 0.00 system 0.00)
|
||||
FAIL: Test Case "Check ... Log Distance ... model" (real 0.01 user 0.01 system 0.00)
|
||||
Details:
|
||||
@@ -271,31 +275,39 @@ will result in a list of the test suite being displayed, similar to
|
||||
Waf: Entering directory `/home/craigdo/repos/ns-3-allinone-test/ns-3-dev/build'
|
||||
Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone-test/ns-3-dev/build'
|
||||
'build' finished successfully (0.939s)
|
||||
histogram
|
||||
ns3-wifi-interference
|
||||
ns3-tcp-cwnd
|
||||
ns3-tcp-interoperability
|
||||
sample
|
||||
devices-mesh-flame
|
||||
devices-mesh-dot11s
|
||||
devices-mesh
|
||||
|
||||
Test Type Test Name
|
||||
--------- ---------
|
||||
performance many-uniform-random-variables-one-get-value-call
|
||||
performance one-uniform-random-variable-many-get-value-calls
|
||||
performance type-id-perf
|
||||
system buildings-pathloss-test
|
||||
system buildings-shadowing-test
|
||||
system devices-mesh-dot11s-regression
|
||||
system devices-mesh-flame-regression
|
||||
system epc-gtpu
|
||||
...
|
||||
unit wimax-phy-layer
|
||||
unit wimax-service-flow
|
||||
unit wimax-ss-mac-layer
|
||||
unit wimax-tlv
|
||||
example adhoc-aloha-ideal-phy
|
||||
example adhoc-aloha-ideal-phy-matrix-propagation-loss-model
|
||||
example adhoc-aloha-ideal-phy-with-microwave-oven
|
||||
example aodv
|
||||
...
|
||||
object-name-service
|
||||
callback
|
||||
attributes
|
||||
config
|
||||
global-value
|
||||
command-line
|
||||
basic-random-number
|
||||
object
|
||||
|
||||
Any of these listed suites can be selected to be run by itself using the
|
||||
``--suite`` option as shown above.
|
||||
``--suite`` option as shown above. Examples are handled differently.
|
||||
|
||||
Similarly to test suites, one can run a single C++ example program
|
||||
using the ``--example`` option. Note that the relative path for the
|
||||
example does not need to be included and that the executables built
|
||||
for C++ examples do not have extensions. Entering
|
||||
for C++ examples do not have extensions. Furthermore, the example
|
||||
must be registered as an example to the test framework; it is not
|
||||
sufficient to create an example and run it through test.py; it must
|
||||
be added to the relevant ``examples-to-run.py`` file, explained below.
|
||||
Entering
|
||||
|
||||
::
|
||||
|
||||
@@ -307,7 +319,7 @@ results in that single example being run.
|
||||
|
||||
PASS: Example examples/udp/udp-echo
|
||||
|
||||
You can specify the directory where ns-3 was built using the
|
||||
You can specify the directory where |ns3| was built using the
|
||||
``--buildpath`` option as follows.
|
||||
|
||||
::
|
||||
@@ -329,7 +341,7 @@ results in that single example being run.
|
||||
PASS: Example examples/tutorial/first.py
|
||||
|
||||
Because Python examples are not built, you do not need to specify the
|
||||
directory where ns-3 was built to run them.
|
||||
directory where |ns3| was built to run them.
|
||||
|
||||
Normally when example programs are executed, they write a large amount of trace
|
||||
file data. This is normally saved to the base directory of the distribution
|
||||
@@ -358,12 +370,12 @@ will result in a list of the currently built test suites being displayed, simila
|
||||
|
||||
.. sourcecode:: text
|
||||
|
||||
ns3-wifi-propagation-loss-models
|
||||
propagation-loss-model
|
||||
ns3-tcp-cwnd
|
||||
ns3-tcp-interoperability
|
||||
pcap-file-object
|
||||
pcap-file
|
||||
object-name-service
|
||||
random-number-generators
|
||||
random-variable-stream-generators
|
||||
|
||||
Note the absence of the ``Waf`` build messages.
|
||||
|
||||
@@ -399,7 +411,7 @@ and examples. Select verbose in the following way::
|
||||
$ ./test.py --verbose
|
||||
|
||||
All of these options can be mixed and matched. For example, to run all of the
|
||||
ns-3 core test suites under valgrind, in verbose mode, while generating an HTML
|
||||
|ns3| core test suites under valgrind, in verbose mode, while generating an HTML
|
||||
output file, one would do::
|
||||
|
||||
$ ./test.py --verbose --grind --constrain=core --html=results.html
|
||||
@@ -417,14 +429,32 @@ kinds of testing that need to be done.
|
||||
* Examples
|
||||
* Performance Tests
|
||||
|
||||
Moreover, each test is further classified according to the expected time needed to
|
||||
run it. Tests are classified as:
|
||||
|
||||
* QUICK
|
||||
* EXTENSIVE
|
||||
* TAKES_FOREVER
|
||||
|
||||
Note that specifying EXTENSIVE fullness will also run tests in QUICK category.
|
||||
Specifying TAKES_FOREVER will run tests in EXTENSIVE and QUICK categories.
|
||||
By default, only QUICK tests are ran.
|
||||
|
||||
As a rule of thumb, tests that must be run to ensure |ns3| coherence should be
|
||||
QUICK (i.e., take a few seconds). Tests that could be skipped, but are nice to do
|
||||
can be EXTENSIVE; these are tests that typically need minutes. TAKES_FOREVER is
|
||||
left for tests that take a really long time, in the order of several minutes.
|
||||
The main classification goal is to be able to run the buildbots in a reasonable
|
||||
time, and still be able to perform more extensive tests when needed.
|
||||
|
||||
BuildVerificationTests
|
||||
++++++++++++++++++++++
|
||||
|
||||
These are relatively simple tests that are built along with the distribution
|
||||
and are used to make sure that the build is pretty much working. Our
|
||||
current unit tests live in the source files of the code they test and are
|
||||
built into the ns-3 modules; and so fit the description of BVTs. BVTs live
|
||||
in the same source code that is built into the ns-3 code. Our current tests
|
||||
built into the |ns3| modules; and so fit the description of BVTs. BVTs live
|
||||
in the same source code that is built into the |ns3| code. Our current tests
|
||||
are examples of this kind of test.
|
||||
|
||||
Unit Tests
|
||||
@@ -432,10 +462,10 @@ Unit Tests
|
||||
|
||||
Unit tests are more involved tests that go into detail to make sure that a
|
||||
piece of code works as advertised in isolation. There is really no reason
|
||||
for this kind of test to be built into an ns-3 module. It turns out, for
|
||||
for this kind of test to be built into an |ns3| module. It turns out, for
|
||||
example, that the unit tests for the object name service are about the same
|
||||
size as the object name service code itself. Unit tests are tests that
|
||||
check a single bit of functionality that are not built into the ns-3 code,
|
||||
check a single bit of functionality that are not built into the |ns3| code,
|
||||
but live in the same directory as the code it tests. It is possible that
|
||||
these tests check integration of multiple implementation files in a module
|
||||
as well. The file src/core/test/names-test-suite.cc is an example of this kind
|
||||
@@ -451,11 +481,11 @@ have lots of this kind of test running in our current regression framework,
|
||||
but they are typically overloaded examples. We provide a new place
|
||||
for this kind of test in the directory ``src/test``. The file
|
||||
src/test/ns3tcp/ns3-interop-test-suite.cc is an example of this kind of
|
||||
test. It uses NSC TCP to test the ns-3 TCP implementation. Often there
|
||||
test. It uses NSC TCP to test the |ns3| TCP implementation. Often there
|
||||
will be test vectors required for this kind of test, and they are stored in
|
||||
the directory where the test lives. For example,
|
||||
ns3tcp-interop-response-vectors.pcap is a file consisting of a number of TCP
|
||||
headers that are used as the expected responses of the ns-3 TCP under test
|
||||
headers that are used as the expected responses of the |ns3| TCP under test
|
||||
to a stimulus generated by the NSC TCP which is used as a ''known good''
|
||||
implementation.
|
||||
|
||||
@@ -492,7 +522,7 @@ 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``
|
||||
Then, build |ns3|, 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.
|
||||
|
||||
@@ -503,12 +533,19 @@ below, this ``test-runner`` can be a helpful way to debug tests.
|
||||
Debugging Tests
|
||||
***************
|
||||
|
||||
The debugging of the test programs is best performed running the low-level test-runner program. The test-runner is the bridge from generic Python code to |ns3| code. It is written in C++ and uses the automatic test discovery process in the
|
||||
|ns3| code to find and allow execution of all of the various tests.
|
||||
The debugging of the test programs is best performed running the low-level
|
||||
test-runner program. The test-runner is the bridge from generic Python
|
||||
code to |ns3| code. It is written in C++ and uses the automatic test
|
||||
discovery process in the |ns3| code to find and allow execution of all
|
||||
of the various tests.
|
||||
|
||||
The main reason why ``test.py`` is not suitable for debugging is that it is not allowed for logging to be turned on using the ``NS_LOG`` environmental variable when test.py runs. This limitation does not apply to the test-runner executable. Hence, if you want to see logging output from your tests, you have to run them using the test-runner directly.
|
||||
The main reason why ``test.py`` is not suitable for debugging is that it is
|
||||
not allowed for logging to be turned on using the ``NS_LOG`` environmental
|
||||
variable when test.py runs. This limitation does not apply to the test-runner
|
||||
executable. Hence, if you want to see logging output from your tests, you
|
||||
have to run them using the test-runner directly.
|
||||
|
||||
In order to execute the test-runner, you run it like any other ns-3 executable
|
||||
In order to execute the test-runner, you run it like any other |ns3| executable
|
||||
-- using ``waf``. To get a list of available options, you can type::
|
||||
|
||||
$ ./waf --run "test-runner --help"
|
||||
@@ -517,19 +554,35 @@ You should see something like the following
|
||||
|
||||
.. sourcecode:: text
|
||||
|
||||
Waf: Entering directory `/home/craigdo/repos/ns-3-allinone-test/ns-3-dev/build'
|
||||
Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone-test/ns-3-dev/build'
|
||||
'build' finished successfully (0.353s)
|
||||
--assert: Tell tests to segfault (like assert) if an error is detected
|
||||
--basedir=dir: Set the base directory (where to find src) to ''dir''
|
||||
--tempdir=dir: Set the temporary directory (where to find data files) to ''dir''
|
||||
--constrain=test-type: Constrain checks to test suites of type ''test-type''
|
||||
--help: Print this message
|
||||
--kinds: List all of the available kinds of tests
|
||||
--list: List all of the test suites (optionally constrained by test-type)
|
||||
--out=file-name: Set the test status output file to ''file-name''
|
||||
--suite=suite-name: Run the test suite named ''suite-name''
|
||||
--verbose: Turn on messages in the run test suites
|
||||
Usage: /home/craigdo/repos/ns-3-allinone-test/ns-3-dev/build/utils/ns3-dev-test-runner-debug [OPTIONS]
|
||||
|
||||
Options:
|
||||
--help : print these options
|
||||
--print-test-name-list : print the list of names of tests available
|
||||
--list : an alias for --print-test-name-list
|
||||
--print-test-types : print the type of tests along with their names
|
||||
--print-test-type-list : print the list of types of tests available
|
||||
--print-temp-dir : print name of temporary directory before running
|
||||
the tests
|
||||
--test-type=TYPE : process only tests of type TYPE
|
||||
--test-name=NAME : process only test whose name matches NAME
|
||||
--suite=NAME : an alias (here for compatibility reasons only)
|
||||
for --test-name=NAME
|
||||
--assert-on-failure : when a test fails, crash immediately (useful
|
||||
when running under a debugger
|
||||
--stop-on-failure : when a test fails, stop immediately
|
||||
--fullness=FULLNESS : choose the duration of tests to run: QUICK,
|
||||
EXTENSIVE, or TAKES_FOREVER, where EXTENSIVE
|
||||
includes QUICK and TAKES_FOREVER includes
|
||||
QUICK and EXTENSIVE (only QUICK tests are
|
||||
run by default)
|
||||
--verbose : print details of test execution
|
||||
--xml : format test run output as xml
|
||||
--tempdir=DIR : set temp dir for tests to store output files
|
||||
--datadir=DIR : set data dir for tests to read reference files
|
||||
--out=FILE : send test result to FILE instead of standard output
|
||||
--append=FILE : append test result to FILE instead of standard output
|
||||
|
||||
|
||||
There are a number of things available to you which will be familiar to you if
|
||||
you have looked at ``test.py``. This should be expected since the test-
|
||||
@@ -539,7 +592,7 @@ the examples are really not |ns3| tests. ``test.py`` runs them
|
||||
as if they were to present a unified testing environment, but they are really
|
||||
completely different and not to be found here.
|
||||
|
||||
The first new option that appears here, but not in test.py is the ``--assert``
|
||||
The first new option that appears here, but not in test.py is the ``--assert-on-failure``
|
||||
option. This option is useful when debugging a test case when running under a
|
||||
debugger like ``gdb``. When selected, this option tells the underlying
|
||||
test case to cause a segmentation violation if an error is detected. This has
|
||||
@@ -550,36 +603,23 @@ option something like,
|
||||
::
|
||||
|
||||
$ ./waf shell
|
||||
$ cd build/debug/utils
|
||||
$ gdb test-runner
|
||||
$ run --suite=global-value --assert
|
||||
$ cd build/utils
|
||||
$ gdb ns3-dev-test-runner-debug
|
||||
$ run --suite=global-value --assert-on-failure
|
||||
|
||||
If an error is then found in the global-value test suite, a segfault would be
|
||||
generated and the (source level) debugger would stop at the ``NS_TEST_ASSERT_MSG``
|
||||
that detected the error.
|
||||
|
||||
Another new option that appears here is the ``--basedir`` option. It turns out
|
||||
that some tests may need to reference the source directory of the |ns3|
|
||||
distribution to find local data, so a base directory is always required to run
|
||||
a test.
|
||||
To run one of the tests directly from the test-runner
|
||||
using ``waf``, you will need to specify the test suite to run.
|
||||
So you could use the shell and do::
|
||||
|
||||
If you run a test from test.py, the Python program will provide the basedir
|
||||
option for you. To run one of the tests directly from the test-runner
|
||||
using ``waf``, you will need to specify the test suite to run along with
|
||||
the base directory. So you could use the shell and do::
|
||||
$ ./waf --run "test-runner --suite=pcap-file"
|
||||
|
||||
$ ./waf --run "test-runner --basedir=`pwd` --suite=pcap-file-object"
|
||||
|ns3| logging is available when you run it this way, such as:
|
||||
|
||||
Note the ''backward'' quotation marks on the ``pwd`` command.
|
||||
|
||||
If you are running the test suite out of a debugger, it can be quite painful
|
||||
to remember and constantly type the absolute path of the distribution base
|
||||
directory.
|
||||
Because of this, if you omit the basedir, the test-runner will try to figure one
|
||||
out for you. It begins in the current working directory and walks up the
|
||||
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.
|
||||
$ NS_LOG="Packet" ./waf --run "test-runner --suite=pcap-file"
|
||||
|
||||
Test output
|
||||
+++++++++++
|
||||
@@ -588,7 +628,7 @@ 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.
|
||||
Just as in the basedir case, it can be annoying to continually have to provide
|
||||
It can be annoying to continually have to provide
|
||||
a ``--tempdir``, so the test runner will figure one out for you if you don't
|
||||
provide one. It first looks for environment variables named ``TMP`` and
|
||||
``TEMP`` and uses those. If neither ``TMP`` nor ``TEMP`` are defined
|
||||
@@ -620,63 +660,15 @@ 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
|
||||
returned something other than a zero exit code. To get some output from the
|
||||
test, you need to specify an output file to which the tests will write their
|
||||
XML status using the ``--out`` option. You need to be careful interpreting
|
||||
the results because the test suites will *append* results onto this file.
|
||||
When you run a test suite using the test-runner it will run the test
|
||||
and report PASS or FAIL.
|
||||
To run more quietly, you need to specify an output file to which the tests will write their status using the ``--out`` option.
|
||||
Try,
|
||||
|
||||
::
|
||||
|
||||
$ ./waf --run "test-runner --basedir=`pwd` --suite=pcap-file-object --out=myfile.xml"
|
||||
$ ./waf --run "test-runner --suite=pcap-file --out=myfile.txt"
|
||||
|
||||
If you look at the file ``myfile.xml`` you should see something like,
|
||||
|
||||
.. sourcecode:: xml
|
||||
|
||||
<TestSuite>
|
||||
<SuiteName>pcap-file-object</SuiteName>
|
||||
<TestCase>
|
||||
<CaseName>Check to see that PcapFile::Open with mode ''w'' works</CaseName>
|
||||
<CaseResult>PASS</CaseResult>
|
||||
<CaseTime>real 0.00 user 0.00 system 0.00</CaseTime>
|
||||
</TestCase>
|
||||
<TestCase>
|
||||
<CaseName>Check to see that PcapFile::Open with mode ''r'' works</CaseName>
|
||||
<CaseResult>PASS</CaseResult>
|
||||
<CaseTime>real 0.00 user 0.00 system 0.00</CaseTime>
|
||||
</TestCase>
|
||||
<TestCase>
|
||||
<CaseName>Check to see that PcapFile::Open with mode ''a'' works</CaseName>
|
||||
<CaseResult>PASS</CaseResult>
|
||||
<CaseTime>real 0.00 user 0.00 system 0.00</CaseTime>
|
||||
</TestCase>
|
||||
<TestCase>
|
||||
<CaseName>Check to see that PcapFileHeader is managed correctly</CaseName>
|
||||
<CaseResult>PASS</CaseResult>
|
||||
<CaseTime>real 0.00 user 0.00 system 0.00</CaseTime>
|
||||
</TestCase>
|
||||
<TestCase>
|
||||
<CaseName>Check to see that PcapRecordHeader is managed correctly</CaseName>
|
||||
<CaseResult>PASS</CaseResult>
|
||||
<CaseTime>real 0.00 user 0.00 system 0.00</CaseTime>
|
||||
</TestCase>
|
||||
<TestCase>
|
||||
<CaseName>Check to see that PcapFile can read out a known good pcap file</CaseName>
|
||||
<CaseResult>PASS</CaseResult>
|
||||
<CaseTime>real 0.00 user 0.00 system 0.00</CaseTime>
|
||||
</TestCase>
|
||||
<SuiteResult>PASS</SuiteResult>
|
||||
<SuiteTime>real 0.00 user 0.00 system 0.00</SuiteTime>
|
||||
</TestSuite>
|
||||
|
||||
If you are familiar with XML this should be fairly self-explanatory. It is
|
||||
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
|
||||
+++++++++++++++++++++++++++++
|
||||
@@ -702,8 +694,8 @@ arguments as needed, but basedir is the minimum needed)::
|
||||
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`
|
||||
(gdb) r --suite=
|
||||
Starting program: <..>/build/utils/ns3-dev-test-runner-debug --suite=ns3-wifi-interference
|
||||
[Thread debugging using libthread_db enabled]
|
||||
assert failed. file=../src/core/model/type-id.cc, line=138, cond="uid <= m_information.size () && uid != 0"
|
||||
...
|
||||
@@ -713,7 +705,7 @@ such as::
|
||||
|
||||
VALGR: TestSuite devices-mesh-dot11s-regression
|
||||
|
||||
$ ./waf --command-template="valgrind %s --basedir=`pwd` --suite=devices-mesh-dot11s-regression" --run test-runner
|
||||
$ ./waf --command-template="valgrind %s --suite=devices-mesh-dot11s-regression" --run test-runner
|
||||
|
||||
Class TestRunner
|
||||
****************
|
||||
@@ -761,14 +753,21 @@ as a ''unit'' test with the display name, ``my-test-suite-name``.
|
||||
MyTestSuite::MyTestSuite ()
|
||||
: TestSuite ("my-test-suite-name", UNIT)
|
||||
{
|
||||
AddTestCase (new MyTestCase);
|
||||
AddTestCase (new MyTestCase, TestCase::QUICK);
|
||||
}
|
||||
|
||||
MyTestSuite myTestSuite;
|
||||
static MyTestSuite myTestSuite;
|
||||
|
||||
The base class takes care of all of the registration and reporting required to
|
||||
be a good citizen in the test framework.
|
||||
|
||||
Avoid putting initialization logic into the test suite or test case
|
||||
constructors. This is
|
||||
because an instance of the test suite is created at run time
|
||||
(due to the static variable above) regardless of whether the test is being
|
||||
run or not. Instead, the TestCase provides a virtual ``DoSetup`` method
|
||||
that can be specialized to perform setup before ``DoRun`` is called.
|
||||
|
||||
Test Case
|
||||
*********
|
||||
|
||||
@@ -778,13 +777,15 @@ Mixtures of these models may be used.
|
||||
|
||||
In order to create a new test case in the system, all one has to do is to inherit
|
||||
from the ``TestCase`` base class, override the constructor to give the test
|
||||
case a name and override the ``DoRun`` method to run the test.
|
||||
case a name and override the ``DoRun`` method to run the test. Optionally,
|
||||
override also the ``DoSetup`` method.
|
||||
|
||||
.. sourcecode:: cpp
|
||||
|
||||
class MyTestCase : public TestCase
|
||||
{
|
||||
MyTestCase ();
|
||||
virtual void DoSetup (void);
|
||||
virtual void DoRun (void);
|
||||
};
|
||||
|
||||
|
||||
@@ -3,16 +3,11 @@
|
||||
Overview
|
||||
--------
|
||||
|
||||
This document is concerned with the testing and validation of |ns3| software.
|
||||
This chapter is concerned with the testing and validation of |ns3| software.
|
||||
|
||||
This document provides
|
||||
This chapter provides
|
||||
|
||||
* background about terminology and software testing (Chapter 2);
|
||||
* a description of the ns-3 testing framework (Chapter 3);
|
||||
* a guide to model developers or new model contributors for how to write tests (Chapter 4);
|
||||
* background about terminology and software testing
|
||||
* a description of the ns-3 testing framework
|
||||
* a guide to model developers or new model contributors for how to write tests
|
||||
|
||||
In brief, the first three chapters should be read by ns developers and
|
||||
contributors who need to understand how to contribute test code and
|
||||
validated programs, and
|
||||
the remainder of the document provides space for people to report on what
|
||||
aspects of selected models have been validated.
|
||||
|
||||
+13
-4
@@ -38,7 +38,7 @@ SOURCES = \
|
||||
$(SRC)/energy/doc/energy.rst \
|
||||
$(SRC)/fd-net-device/doc/fd-net-device.rst \
|
||||
$(SRC)/tap-bridge/doc/tap.rst \
|
||||
$(SRC)/mesh/doc/mesh.rst \
|
||||
$(SRC)/mesh/doc/source/mesh.rst \
|
||||
$(SRC)/lte/doc/source/lte.rst \
|
||||
$(SRC)/lte/doc/source/lte-user.rst \
|
||||
$(SRC)/lte/doc/source/lte-design.rst \
|
||||
@@ -62,7 +62,11 @@ SOURCES = \
|
||||
$(SRC)/olsr/doc/olsr.rst \
|
||||
$(SRC)/openflow/doc/openflow-switch.rst \
|
||||
$(SRC)/point-to-point/doc/point-to-point.rst \
|
||||
$(SRC)/wifi/doc/wifi.rst \
|
||||
$(SRC)/wifi/doc/source/wifi.rst \
|
||||
$(SRC)/wifi/doc/source/wifi-design.rst \
|
||||
$(SRC)/wifi/doc/source/wifi-user.rst \
|
||||
$(SRC)/wifi/doc/source/wifi-testing.rst \
|
||||
$(SRC)/wifi/doc/source/wifi-references.rst \
|
||||
$(SRC)/wimax/doc/wimax.rst \
|
||||
$(SRC)/uan/doc/uan.rst \
|
||||
$(SRC)/topology-read/doc/topology.rst \
|
||||
@@ -99,8 +103,8 @@ SOURCEFIGS = \
|
||||
$(SRC)/internet/doc/internet-node-recv.dia \
|
||||
$(SRC)/internet/doc/routing.dia \
|
||||
$(SRC)/internet/doc/routing-specialization.dia \
|
||||
$(SRC)/wifi/doc/WifiArchitecture.dia \
|
||||
$(SRC)/wifi/doc/snir.dia \
|
||||
$(SRC)/wifi/doc/source/figures/WifiArchitecture.dia \
|
||||
$(SRC)/wifi/doc/source/figures/snir.dia \
|
||||
$(SRC)/wimax/doc/WimaxArchitecture.dia \
|
||||
$(SRC)/lte/doc/source/figures/epc-ctrl-arch.dia \
|
||||
$(SRC)/lte/doc/source/figures/epc-data-flow-dl.dia \
|
||||
@@ -250,6 +254,9 @@ SOURCEFIGS = \
|
||||
$(SRC)/spectrum/doc/spectrum-channel-phy-interface.png \
|
||||
$(SRC)/spectrum/doc/spectrum-channel-phy-interface.pdf \
|
||||
$(SRC)/spectrum/doc/spectrum-analyzer-example.eps \
|
||||
$(SRC)/spectrum/doc/spectrum-tv-rand-geo-points.eps \
|
||||
$(SRC)/spectrum/doc/spectrum-tv-8vsb.png \
|
||||
$(SRC)/spectrum/doc/spectrum-tv-cofdm.png \
|
||||
$(SRC)/lr-wpan/doc/lr-wpan-arch.dia \
|
||||
$(SRC)/lr-wpan/doc/lr-wpan-data-example.dia \
|
||||
$(SRC)/lr-wpan/doc/lr-wpan-primitives.dia \
|
||||
@@ -335,6 +342,7 @@ IMAGES_EPS = \
|
||||
$(FIGURES)/lte-strongest-cell-handover-algorithm.eps \
|
||||
$(FIGURES)/auvmobility-classes.eps \
|
||||
$(FIGURES)/spectrum-analyzer-example.eps \
|
||||
$(FIGURES)/spectrum-tv-rand-geo-points.eps \
|
||||
$(FIGURES)/lr-wpan-primitives.eps \
|
||||
$(FIGURES)/lr-wpan-data-example.eps \
|
||||
$(FIGURES)/lr-wpan-arch.eps \
|
||||
@@ -390,6 +398,7 @@ $(FIGURES)/mac-random-access-noncontention.pdf_width = 15cm
|
||||
$(FIGURES)/helpers.pdf_width = 8cm
|
||||
$(FIGURES)/auvmobility-classes.pdf_width = 10cm
|
||||
$(FIGURES)/spectrum-analyzer-example.pdf_width = 15cm
|
||||
$(FIGURES)/spectrum-tv-rand-geo-points.pdf_width = 8cm
|
||||
$(FIGURES)/lr-wpan-primitives.pdf_width = 3in
|
||||
$(FIGURES)/lr-wpan-arch.pdf_width = 2in
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ elif [ $tag -eq 1 ]; then
|
||||
else
|
||||
version=`hg log -r tip --template '{node|short}'`
|
||||
# Check for uncommitted changes
|
||||
hg summary | grep -q 'commit: (clean)'
|
||||
hg summary | grep 'commit:' | grep -q '(clean)'
|
||||
if [ ! $? ] ; then
|
||||
say "beyond latest tag, last commit: $version, dirty"
|
||||
dirty="(+)"
|
||||
|
||||
@@ -24,7 +24,7 @@ point-to-point topologies, we will see equivalent CSMA topology helpers in
|
||||
this section. The appearance and operation of these helpers should look
|
||||
quite familiar to you.
|
||||
|
||||
We provide an example script in our examples/tutorial} directory. This script
|
||||
We provide an example script in our ``examples/tutorial`` directory. This script
|
||||
builds on the ``first.cc`` script and adds a CSMA network to the
|
||||
point-to-point simulation we've already considered. Go ahead and open
|
||||
``examples/tutorial/second.cc`` in your favorite editor. You will have already seen
|
||||
@@ -524,7 +524,7 @@ Lastly, you can look back at the node that originated the echo
|
||||
|
||||
$ tcpdump -nn -tt -r second-0-0.pcap
|
||||
|
||||
and see that the echoed packet arrives back at the source at 2.007602 seconds,
|
||||
and see that the echoed packet arrives back at the source at 2.017607 seconds,
|
||||
|
||||
.. sourcecode:: text
|
||||
|
||||
@@ -884,7 +884,7 @@ that we will connect via the point-to-point link.
|
||||
Next, we see an old friend. We instantiate a ``PointToPointHelper`` and
|
||||
set the associated default ``Attributes`` so that we create a five megabit
|
||||
per second transmitter on devices created using the helper and a two millisecond
|
||||
delay on channels created by the helper. We then ``Intall`` the devices
|
||||
delay on channels created by the helper. We then ``Install`` the devices
|
||||
on the nodes and the channel between them.
|
||||
|
||||
::
|
||||
@@ -1261,7 +1261,7 @@ probably understand what is going on and find the IP echo request and response
|
||||
packets in this trace. We leave it as an exercise to completely parse the
|
||||
trace dump.
|
||||
|
||||
Now, look at the pcap file of the right side of the point-to-point link,
|
||||
Now, look at the pcap file of the left side of the point-to-point link,
|
||||
|
||||
.. sourcecode:: bash
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ access* communication medium. This gives us Ethernet-like functionality.
|
||||
|
||||
Net Device
|
||||
++++++++++
|
||||
It used to be the case that if you wanted to connect a computers to a network,
|
||||
It used to be the case that if you wanted to connect a computer to a network,
|
||||
you had to buy a specific kind of network cable and a hardware device called
|
||||
(in PC terminology) a *peripheral card* that needed to be installed in
|
||||
your computer. If the peripheral card implemented some networking function,
|
||||
|
||||
@@ -321,6 +321,7 @@ the data out of the probed Packet object:
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::Ipv6PacketProbe")
|
||||
.SetParent<Probe> ()
|
||||
.SetGroupName ("Stats")
|
||||
.AddConstructor<Ipv6PacketProbe> ()
|
||||
.AddTraceSource ( "Output",
|
||||
"The packet plus its IPv6 object and interface that serve as the output for this probe",
|
||||
|
||||
@@ -96,15 +96,15 @@ get a copy of a release by typing the following into your Linux shell
|
||||
$ cd
|
||||
$ mkdir workspace
|
||||
$ cd workspace
|
||||
$ wget http://www.nsnam.org/release/ns-allinone-3.22.tar.bz2
|
||||
$ tar xjf ns-allinone-3.22.tar.bz2
|
||||
$ wget http://www.nsnam.org/release/ns-allinone-3.23.tar.bz2
|
||||
$ tar xjf ns-allinone-3.23.tar.bz2
|
||||
|
||||
If you change into the directory ``ns-allinone-3.22`` you should see a
|
||||
If you change into the directory ``ns-allinone-3.23`` you should see a
|
||||
number of files::
|
||||
|
||||
$ ls
|
||||
bake constants.py ns-3.22 README
|
||||
build.py netanim-3.105 pybindgen-0.16.0.886 util.py
|
||||
bake constants.py ns-3.23 README
|
||||
build.py netanim-3.106 pybindgen-0.17.0.886 util.py
|
||||
|
||||
You are now ready to build the base |ns3| distribution.
|
||||
|
||||
@@ -163,10 +163,10 @@ distribution of your choice.
|
||||
|
||||
There are a few configuration targets available:
|
||||
|
||||
1. ``ns-3.22``: the module corresponding to the release; it will download
|
||||
1. ``ns-3.23``: the module corresponding to the release; it will download
|
||||
components similar to the release tarball.
|
||||
2. ``ns-3-dev``: a similar module but using the development code tree
|
||||
3. ``ns-allinone-3.22``: the module that includes other optional features
|
||||
3. ``ns-allinone-3.23``: the module that includes other optional features
|
||||
such as click routing, openflow for |ns3|, and the Network Simulation
|
||||
Cradle
|
||||
4. ``ns-3-allinone``: similar to the released version of the allinone
|
||||
@@ -184,7 +184,7 @@ code either by inspection of the repository list or by going to the
|
||||
`"ns-3 Releases"
|
||||
<http://www.nsnam.org/releases>`_
|
||||
web page and clicking on the latest release link. We'll proceed in
|
||||
this tutorial example with ``ns-3.22``.
|
||||
this tutorial example with ``ns-3.23``.
|
||||
|
||||
We are now going to use the bake tool to pull down the various pieces of
|
||||
|ns3| you will be using. First, we'll say a word about running bake.
|
||||
@@ -210,7 +210,7 @@ full builds of ns-3-allinone (with the optional packages) typically do.
|
||||
|
||||
Step into the workspace directory and type the following into your shell::
|
||||
|
||||
$ ./bake.py configure -e ns-3.22
|
||||
$ ./bake.py configure -e ns-3.23
|
||||
|
||||
Next, we'l ask bake to check whether we have enough tools to download
|
||||
various components. Type::
|
||||
@@ -256,17 +256,17 @@ should yield something like::
|
||||
>> Searching for system dependency pygoocanvas - OK
|
||||
>> Searching for system dependency python-dev - OK
|
||||
>> Searching for system dependency pygraphviz - OK
|
||||
>> Downloading pybindgen-0.16.0.886 - OK
|
||||
>> Downloading pybindgen-0.17.0.886 - OK
|
||||
>> Searching for system dependency g++ - OK
|
||||
>> Searching for system dependency qt4 - OK
|
||||
>> Downloading netanim-3.105 - OK
|
||||
>> Downloading ns-3.22 - OK
|
||||
>> Downloading netanim-3.106 - OK
|
||||
>> Downloading ns-3.23 - OK
|
||||
|
||||
The above suggests that three sources have been downloaded. Check the
|
||||
``source`` directory now and type ``ls``; one should see::
|
||||
|
||||
$ ls
|
||||
netanim-3.105 ns-3.22 pybindgen-0.16.0.886
|
||||
netanim-3.106 ns-3.23 pybindgen-0.17.0.886
|
||||
|
||||
You are now ready to build the |ns3| distribution.
|
||||
|
||||
@@ -285,7 +285,7 @@ native |ns3| build system, Waf, to be introduced later in this tutorial.
|
||||
|
||||
If you downloaded
|
||||
using a tarball you should have a directory called something like
|
||||
``ns-allinone-3.22`` under your ``~/workspace`` directory.
|
||||
``ns-allinone-3.23`` under your ``~/workspace`` directory.
|
||||
Type the following::
|
||||
|
||||
$ ./build.py --enable-examples --enable-tests
|
||||
@@ -301,7 +301,7 @@ You will see lots of typical compiler output messages displayed as the build
|
||||
script builds the various pieces you downloaded. Eventually you should see the
|
||||
following::
|
||||
|
||||
Waf: Leaving directory `/path/to/workspace/ns-allinone-3.22/ns-3.22/build'
|
||||
Waf: Leaving directory `/path/to/workspace/ns-allinone-3.23/ns-3.23/build'
|
||||
'build' finished successfully (6m25.032s)
|
||||
|
||||
Modules built:
|
||||
@@ -323,7 +323,7 @@ following::
|
||||
brite click openflow
|
||||
visualizer
|
||||
|
||||
Leaving directory `./ns-3.22'
|
||||
Leaving directory `./ns-3.23'
|
||||
|
||||
Regarding the portion about modules not built::
|
||||
|
||||
@@ -349,9 +349,9 @@ may continue to use it to build |ns3|. Type
|
||||
|
||||
and you should see something like::
|
||||
|
||||
>> Building pybindgen-0.16.0.886 - OK
|
||||
>> Building netanim-3.105 - OK
|
||||
>> Building ns-3.22 - OK
|
||||
>> Building pybindgen-0.17.0.886 - OK
|
||||
>> Building netanim-3.106 - OK
|
||||
>> Building ns-3.23 - OK
|
||||
|
||||
*Hint: you can also perform both steps, download and build by calling 'bake.py deploy'.*
|
||||
|
||||
@@ -554,6 +554,38 @@ We already saw how you can configure Waf for ``debug`` or ``optimized`` builds::
|
||||
There is also an intermediate build profile, ``release``. ``-d`` is a
|
||||
synonym for ``--build-profile``.
|
||||
|
||||
The build profile controls the use of logging, assertions, and compiler optimization:
|
||||
|
||||
+--------------------+---------------------------------+-----------------------------------------------------------------+
|
||||
| Feature | Build Profile |
|
||||
+ +---------------------------------+-------------------------------+---------------------------------+
|
||||
| | ``debug`` | ``release`` | ``optimized`` |
|
||||
+====================+=================================+===============================+=================================+
|
||||
| Enabled Features | | ``NS3_BUILD_PROFILE_DEBUG`` | ``NS3_BUILD_PROFILE_RELEASE`` | ``NS3_BUILD_PROFILE_OPTIMIZED`` |
|
||||
| | | ``NS_LOG...`` | | |
|
||||
| | | ``NS_ASSERT...`` | | |
|
||||
+--------------------+---------------------------------+-------------------------------+---------------------------------+
|
||||
| Code Wrapper Macro | ``NS_BUILD_DEBUG(code)`` | ``NS_BUILD_RELEASE(code)`` | ``NS_BUILD_OPTIMIZED(code)`` |
|
||||
+--------------------+---------------------------------+-------------------------------+---------------------------------+
|
||||
| Compiler Flags | ``-O0 -ggdb -g3`` | ``-O3 -g0`` | ``-O3 -g`` |
|
||||
| | | ``-fomit-frame-pointer`` | ``-fstrict-overflow`` |
|
||||
| | | | ``-march=native`` |
|
||||
+--------------------+---------------------------------+-------------------------------+---------------------------------+
|
||||
|
||||
As you can see, logging and assertions are only available in debug builds.
|
||||
Recommended practice is to develop your scenario in debug mode, then
|
||||
conduct repetitive runs (for statistics or changing parameters) in
|
||||
optimized build profile.
|
||||
|
||||
If you have code that should only run in specific build profiles,
|
||||
use the indicated Code Wrapper macro:
|
||||
|
||||
.. sourcecode:: cpp
|
||||
|
||||
NS_BUILD_DEBUG (std::cout << "Part of an output line..." << std::flush; timer.Start ());
|
||||
DoLongInvolvedComputation ();
|
||||
NS_BUILD_DEBUG (timer.Stop (); std::cout << "Done: " << timer << std::endl;)
|
||||
|
||||
By default Waf puts the build artifacts in the ``build`` directory.
|
||||
You can specify a different output directory with the ``--out``
|
||||
option, e.g.
|
||||
@@ -590,8 +622,8 @@ to define some environment variables to help you avoid mistakes::
|
||||
$ ./waf configure $NS3CONFIG $NS3OPT
|
||||
$ ./waf build
|
||||
|
||||
Compilers
|
||||
=========
|
||||
Compilers and Flags
|
||||
===================
|
||||
|
||||
In the examples above, Waf uses the GCC C++ compiler, ``g++``, for
|
||||
building |ns3|. However, it's possible to change the C++ compiler used by Waf
|
||||
@@ -614,6 +646,9 @@ More info on ``distcc`` and distributed compilation can be found on it's
|
||||
<http://code.google.com/p/distcc/>`_
|
||||
under Documentation section.
|
||||
|
||||
To add compiler flags, use the ``CXXFLAGS_EXTRA`` environment variable when
|
||||
you configure |ns3|.
|
||||
|
||||
Install
|
||||
=======
|
||||
|
||||
@@ -664,7 +699,7 @@ remember where you are, and invoke Waf like this::
|
||||
|
||||
$ ../../../waf ...
|
||||
|
||||
but that get's tedious, and error prone, and there are better solutions.
|
||||
but that gets tedious, and error prone, and there are better solutions.
|
||||
|
||||
If you have the full |ns3| repository this little gem is a start::
|
||||
|
||||
@@ -848,7 +883,7 @@ debugger::
|
||||
Working Directory
|
||||
+++++++++++++++++
|
||||
|
||||
Waf needs to run from it's location at the top of the |ns3| tree.
|
||||
Waf needs to run from its location at the top of the |ns3| tree.
|
||||
This becomes the working directory where output files will be written.
|
||||
But what if you want to keep those ouf to the |ns3| source tree? Use
|
||||
the ``--cwd`` argument::
|
||||
|
||||
@@ -365,6 +365,7 @@ simple Object we can work with.
|
||||
{
|
||||
static TypeId tid = TypeId ("MyObject")
|
||||
.SetParent (Object::GetTypeId ())
|
||||
.SetGroupName ("MyGroup")
|
||||
.AddConstructor<MyObject> ()
|
||||
.AddTraceSource ("MyInteger",
|
||||
"An integer value to trace.",
|
||||
|
||||
@@ -632,6 +632,46 @@ end up looking something like,
|
||||
--ns3::PointToPointChannel::Delay=2ms
|
||||
--ns3::UdpEchoClient::MaxPackets=2"
|
||||
|
||||
A natural question to arise at this point is how to learn about the existence
|
||||
of all of these attributes. Again, the command line help facility has
|
||||
a feature for this. If we ask for command line help we should see:
|
||||
|
||||
.. sourcecode:: bash
|
||||
|
||||
$ ./waf --run "scratch/myfirst --PrintHelp"
|
||||
myfirst [Program Arguments] [General Arguments]
|
||||
|
||||
General Arguments:
|
||||
--PrintGlobals: Print the list of globals.
|
||||
--PrintGroups: Print the list of groups.
|
||||
--PrintGroup=[group]: Print all TypeIds of group.
|
||||
--PrintTypeIds: Print all TypeIds.
|
||||
--PrintAttributes=[typeid]: Print all attributes of typeid.
|
||||
--PrintHelp: Print this help message.
|
||||
|
||||
If you select the "PrintGroups" argument, you should see a list of all
|
||||
registered TypeId groups. The group names are aligned with the module names
|
||||
in the source directory (although with a leading capital letter). Printing
|
||||
out all of the information at once would be too much, so a further filter
|
||||
is available to print information on a per-group basis. So, focusing
|
||||
again on the point-to-point module:
|
||||
|
||||
.. sourcecode:: bash
|
||||
|
||||
./waf --run "scratch/myfirst --PrintGroup=PointToPoint"
|
||||
TypeIds in group PointToPoint:
|
||||
ns3::PointToPointChannel
|
||||
ns3::PointToPointNetDevice
|
||||
ns3::PointToPointRemoteChannel
|
||||
ns3::PppHeader
|
||||
|
||||
and from here, one can find the possible TypeId names to search for
|
||||
attributes, such as in the ``--PrintAttributes=ns3::PointToPointChannel``
|
||||
example shown above.
|
||||
|
||||
Another way to find out about attributes is through the ns-3 Doxygen; there
|
||||
is a page that lists out all of the registered attributes in the simulator.
|
||||
|
||||
Hooking Your Own Values
|
||||
+++++++++++++++++++++++
|
||||
You can also add your own hooks to the command line system. This is done
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
|
||||
|
||||
def build(bld):
|
||||
obj = bld.create_ns3_program('realtime-udp-echo', ['csma', 'internet', 'applications'])
|
||||
obj.source = 'realtime-udp-echo.cc'
|
||||
if bld.env["ENABLE_REAL_TIME"]:
|
||||
obj = bld.create_ns3_program('realtime-udp-echo', ['csma', 'internet', 'applications'])
|
||||
obj.source = 'realtime-udp-echo.cc'
|
||||
|
||||
bld.register_ns3_script('realtime-udp-echo.py', ['csma', 'internet', 'applications'])
|
||||
bld.register_ns3_script('realtime-udp-echo.py', ['csma', 'internet', 'applications'])
|
||||
|
||||
@@ -26,10 +26,15 @@ using namespace ns3;
|
||||
class MyObject : public Object
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Register this type.
|
||||
* \return The TypeId.
|
||||
*/
|
||||
static TypeId GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("MyObject")
|
||||
.SetParent (Object::GetTypeId ())
|
||||
.SetParent<Object> ()
|
||||
.SetGroupName ("Tutorial")
|
||||
.AddConstructor<MyObject> ()
|
||||
.AddTraceSource ("MyInteger",
|
||||
"An integer value to trace.",
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
# -*- Mode: Python; -*-
|
||||
# /*
|
||||
# * 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
|
||||
# *
|
||||
# * Ported to Python by Mohit P. Tahiliani
|
||||
# */
|
||||
|
||||
import ns.core
|
||||
import ns.network
|
||||
import ns.csma
|
||||
import ns.internet
|
||||
import ns.point_to_point
|
||||
import ns.applications
|
||||
import sys
|
||||
|
||||
# // Default Network Topology
|
||||
# //
|
||||
# // 10.1.1.0
|
||||
# // n0 -------------- n1 n2 n3 n4
|
||||
# // point-to-point | | | |
|
||||
# // ================
|
||||
# // LAN 10.1.2.0
|
||||
|
||||
cmd = ns.core.CommandLine()
|
||||
cmd.nCsma = 3
|
||||
cmd.verbose = "True"
|
||||
cmd.AddValue("nCsma", "Number of \"extra\" CSMA nodes/devices")
|
||||
cmd.AddValue("verbose", "Tell echo applications to log if true")
|
||||
cmd.Parse(sys.argv)
|
||||
|
||||
nCsma = int(cmd.nCsma)
|
||||
verbose = cmd.verbose
|
||||
|
||||
if verbose == "True":
|
||||
ns.core.LogComponentEnable("UdpEchoClientApplication", ns.core.LOG_LEVEL_INFO)
|
||||
ns.core.LogComponentEnable("UdpEchoServerApplication", ns.core.LOG_LEVEL_INFO)
|
||||
nCsma = 1 if int(nCsma) == 0 else int(nCsma)
|
||||
|
||||
p2pNodes = ns.network.NodeContainer()
|
||||
p2pNodes.Create(2)
|
||||
|
||||
csmaNodes = ns.network.NodeContainer()
|
||||
csmaNodes.Add(p2pNodes.Get(1))
|
||||
csmaNodes.Create(nCsma)
|
||||
|
||||
pointToPoint = ns.point_to_point.PointToPointHelper()
|
||||
pointToPoint.SetDeviceAttribute("DataRate", ns.core.StringValue("5Mbps"))
|
||||
pointToPoint.SetChannelAttribute("Delay", ns.core.StringValue("2ms"))
|
||||
|
||||
p2pDevices = pointToPoint.Install(p2pNodes)
|
||||
|
||||
csma = ns.csma.CsmaHelper()
|
||||
csma.SetChannelAttribute("DataRate", ns.core.StringValue("100Mbps"))
|
||||
csma.SetChannelAttribute("Delay", ns.core.TimeValue(ns.core.NanoSeconds(6560)))
|
||||
|
||||
csmaDevices = csma.Install(csmaNodes)
|
||||
|
||||
stack = ns.internet.InternetStackHelper()
|
||||
stack.Install(p2pNodes.Get(0))
|
||||
stack.Install(csmaNodes)
|
||||
|
||||
address = ns.internet.Ipv4AddressHelper()
|
||||
address.SetBase(ns.network.Ipv4Address("10.1.1.0"), ns.network.Ipv4Mask("255.255.255.0"))
|
||||
p2pInterfaces = address.Assign(p2pDevices)
|
||||
|
||||
address.SetBase(ns.network.Ipv4Address("10.1.2.0"), ns.network.Ipv4Mask("255.255.255.0"))
|
||||
csmaInterfaces = address.Assign(csmaDevices)
|
||||
|
||||
echoServer = ns.applications.UdpEchoServerHelper(9)
|
||||
|
||||
serverApps = echoServer.Install(csmaNodes.Get(nCsma))
|
||||
serverApps.Start(ns.core.Seconds(1.0))
|
||||
serverApps.Stop(ns.core.Seconds(10.0))
|
||||
|
||||
echoClient = ns.applications.UdpEchoClientHelper(csmaInterfaces.GetAddress(nCsma), 9)
|
||||
echoClient.SetAttribute("MaxPackets", ns.core.UintegerValue(1))
|
||||
echoClient.SetAttribute("Interval", ns.core.TimeValue(ns.core.Seconds (1.0)))
|
||||
echoClient.SetAttribute("PacketSize", ns.core.UintegerValue(1024))
|
||||
|
||||
clientApps = echoClient.Install(p2pNodes.Get(0))
|
||||
clientApps.Start(ns.core.Seconds(2.0))
|
||||
clientApps.Stop(ns.core.Seconds(10.0))
|
||||
|
||||
ns.internet.Ipv4GlobalRoutingHelper.PopulateRoutingTables()
|
||||
|
||||
pointToPoint.EnablePcapAll("second")
|
||||
csma.EnablePcap ("second", csmaDevices.Get (1), True)
|
||||
|
||||
ns.core.Simulator.Run()
|
||||
ns.core.Simulator.Destroy()
|
||||
|
||||
@@ -66,6 +66,11 @@ public:
|
||||
MyApp ();
|
||||
virtual ~MyApp ();
|
||||
|
||||
/**
|
||||
* Register this type.
|
||||
* \return The TypeId.
|
||||
*/
|
||||
static TypeId GetTypeId (void);
|
||||
void Setup (Ptr<Socket> socket, Address address, uint32_t packetSize, uint32_t nPackets, DataRate dataRate);
|
||||
|
||||
private:
|
||||
@@ -102,6 +107,17 @@ MyApp::~MyApp ()
|
||||
m_socket = 0;
|
||||
}
|
||||
|
||||
/* static */
|
||||
TypeId MyApp::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("MyApp")
|
||||
.SetParent<Application> ()
|
||||
.SetGroupName ("Tutorial")
|
||||
.AddConstructor<MyApp> ()
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
|
||||
void
|
||||
MyApp::Setup (Ptr<Socket> socket, Address address, uint32_t packetSize, uint32_t nPackets, DataRate dataRate)
|
||||
{
|
||||
|
||||
@@ -65,6 +65,11 @@ public:
|
||||
MyApp ();
|
||||
virtual ~MyApp ();
|
||||
|
||||
/**
|
||||
* Register this type.
|
||||
* \return The TypeId.
|
||||
*/
|
||||
static TypeId GetTypeId (void);
|
||||
void Setup (Ptr<Socket> socket, Address address, uint32_t packetSize, uint32_t nPackets, DataRate dataRate);
|
||||
|
||||
private:
|
||||
@@ -101,6 +106,17 @@ MyApp::~MyApp ()
|
||||
m_socket = 0;
|
||||
}
|
||||
|
||||
/* static */
|
||||
TypeId MyApp::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("MyApp")
|
||||
.SetParent<Application> ()
|
||||
.SetGroupName ("Tutorial")
|
||||
.AddConstructor<MyApp> ()
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
|
||||
void
|
||||
MyApp::Setup (Ptr<Socket> socket, Address address, uint32_t packetSize, uint32_t nPackets, DataRate dataRate)
|
||||
{
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
|
||||
// Default Network Topology
|
||||
//
|
||||
// Number of wifi or csma nodes can be increased up to 250
|
||||
// |
|
||||
// Rank 0 | Rank 1
|
||||
// -------------------------|----------------------------
|
||||
// Wifi 10.1.3.0
|
||||
// AP
|
||||
// * * * *
|
||||
@@ -44,19 +48,23 @@ main (int argc, char *argv[])
|
||||
bool verbose = true;
|
||||
uint32_t nCsma = 3;
|
||||
uint32_t nWifi = 3;
|
||||
bool tracing = false;
|
||||
|
||||
CommandLine cmd;
|
||||
cmd.AddValue ("nCsma", "Number of \"extra\" CSMA nodes/devices", nCsma);
|
||||
cmd.AddValue ("nWifi", "Number of wifi STA devices", nWifi);
|
||||
cmd.AddValue ("verbose", "Tell echo applications to log if true", verbose);
|
||||
cmd.AddValue ("tracing", "Enable pcap tracing", tracing);
|
||||
|
||||
cmd.Parse (argc,argv);
|
||||
|
||||
if (nWifi > 18)
|
||||
// Check for valid number of csma or wifi nodes
|
||||
// 250 should be enough, otherwise IP addresses
|
||||
// soon become an issue
|
||||
if (nWifi > 250 || nCsma > 250)
|
||||
{
|
||||
std::cout << "Number of wifi nodes " << nWifi <<
|
||||
" specified exceeds the mobility bounding box" << std::endl;
|
||||
exit (1);
|
||||
std::cout << "Too many wifi or csma nodes, no more than 250 each." << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (verbose)
|
||||
@@ -169,9 +177,12 @@ main (int argc, char *argv[])
|
||||
|
||||
Simulator::Stop (Seconds (10.0));
|
||||
|
||||
pointToPoint.EnablePcapAll ("third");
|
||||
phy.EnablePcap ("third", apDevices.Get (0));
|
||||
csma.EnablePcap ("third", csmaDevices.Get (0), true);
|
||||
if (tracing == true)
|
||||
{
|
||||
pointToPoint.EnablePcapAll ("third");
|
||||
phy.EnablePcap ("third", apDevices.Get (0));
|
||||
csma.EnablePcap ("third", csmaDevices.Get (0), true);
|
||||
}
|
||||
|
||||
Simulator::Run ();
|
||||
Simulator::Destroy ();
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
# -*- Mode: Python; -*-
|
||||
# /*
|
||||
# * 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
|
||||
# *
|
||||
# * Ported to Python by Mohit P. Tahiliani
|
||||
# */
|
||||
|
||||
import ns.core
|
||||
import ns.network
|
||||
import ns.point_to_point
|
||||
import ns.applications
|
||||
import ns.wifi
|
||||
import ns.mobility
|
||||
import ns.csma
|
||||
import ns.internet
|
||||
import sys
|
||||
|
||||
# // Default Network Topology
|
||||
# //
|
||||
# // Wifi 10.1.3.0
|
||||
# // AP
|
||||
# // * * * *
|
||||
# // | | | | 10.1.1.0
|
||||
# // n5 n6 n7 n0 -------------- n1 n2 n3 n4
|
||||
# // point-to-point | | | |
|
||||
# // ================
|
||||
# // LAN 10.1.2.0
|
||||
|
||||
cmd = ns.core.CommandLine()
|
||||
cmd.nCsma = 3
|
||||
cmd.verbose = "True"
|
||||
cmd.nWifi = 3
|
||||
cmd.AddValue("nCsma", "Number of \"extra\" CSMA nodes/devices")
|
||||
cmd.AddValue("nWifi", "Number of wifi STA devices")
|
||||
cmd.AddValue("verbose", "Tell echo applications to log if true")
|
||||
|
||||
cmd.Parse(sys.argv)
|
||||
|
||||
nCsma = int(cmd.nCsma)
|
||||
verbose = cmd.verbose
|
||||
nWifi = int(cmd.nWifi)
|
||||
|
||||
if nWifi > 18:
|
||||
print "Number of wifi nodes "+ str(nWifi)+ " specified exceeds the mobility bounding box"
|
||||
sys.exit(1)
|
||||
|
||||
if verbose == "True":
|
||||
ns.core.LogComponentEnable("UdpEchoClientApplication", ns.core.LOG_LEVEL_INFO)
|
||||
ns.core.LogComponentEnable("UdpEchoServerApplication", ns.core.LOG_LEVEL_INFO)
|
||||
|
||||
p2pNodes = ns.network.NodeContainer()
|
||||
p2pNodes.Create(2)
|
||||
|
||||
pointToPoint = ns.point_to_point.PointToPointHelper()
|
||||
pointToPoint.SetDeviceAttribute("DataRate", ns.core.StringValue("5Mbps"))
|
||||
pointToPoint.SetChannelAttribute("Delay", ns.core.StringValue("2ms"))
|
||||
|
||||
p2pDevices = pointToPoint.Install(p2pNodes)
|
||||
|
||||
csmaNodes = ns.network.NodeContainer()
|
||||
csmaNodes.Add(p2pNodes.Get(1))
|
||||
csmaNodes.Create(nCsma)
|
||||
|
||||
csma = ns.csma.CsmaHelper()
|
||||
csma.SetChannelAttribute("DataRate", ns.core.StringValue("100Mbps"))
|
||||
csma.SetChannelAttribute("Delay", ns.core.TimeValue(ns.core.NanoSeconds(6560)))
|
||||
|
||||
csmaDevices = csma.Install(csmaNodes)
|
||||
|
||||
wifiStaNodes = ns.network.NodeContainer()
|
||||
wifiStaNodes.Create(nWifi)
|
||||
wifiApNode = p2pNodes.Get(0)
|
||||
|
||||
channel = ns.wifi.YansWifiChannelHelper.Default()
|
||||
phy = ns.wifi.YansWifiPhyHelper.Default()
|
||||
phy.SetChannel(channel.Create())
|
||||
|
||||
wifi = ns.wifi.WifiHelper.Default()
|
||||
wifi.SetRemoteStationManager("ns3::AarfWifiManager")
|
||||
|
||||
mac = ns.wifi.NqosWifiMacHelper.Default()
|
||||
ssid = ns.wifi.Ssid ("ns-3-ssid")
|
||||
|
||||
mac.SetType ("ns3::StaWifiMac", "Ssid", ns.wifi.SsidValue(ssid), "ActiveProbing", ns.core.BooleanValue(False))
|
||||
staDevices = wifi.Install(phy, mac, wifiStaNodes)
|
||||
|
||||
mac.SetType("ns3::ApWifiMac","Ssid", ns.wifi.SsidValue (ssid))
|
||||
apDevices = wifi.Install(phy, mac, wifiApNode)
|
||||
|
||||
mobility = ns.mobility.MobilityHelper()
|
||||
mobility.SetPositionAllocator ("ns3::GridPositionAllocator", "MinX", ns.core.DoubleValue(0.0),
|
||||
"MinY", ns.core.DoubleValue (0.0), "DeltaX", ns.core.DoubleValue(5.0), "DeltaY", ns.core.DoubleValue(10.0),
|
||||
"GridWidth", ns.core.UintegerValue(3), "LayoutType", ns.core.StringValue("RowFirst"))
|
||||
|
||||
mobility.SetMobilityModel ("ns3::RandomWalk2dMobilityModel", "Bounds", ns.mobility.RectangleValue(ns.mobility.Rectangle (-50, 50, -50, 50)))
|
||||
mobility.Install(wifiStaNodes)
|
||||
|
||||
mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel")
|
||||
mobility.Install(wifiApNode)
|
||||
|
||||
stack = ns.internet.InternetStackHelper()
|
||||
stack.Install(csmaNodes)
|
||||
stack.Install(wifiApNode)
|
||||
stack.Install(wifiStaNodes)
|
||||
|
||||
address = ns.internet.Ipv4AddressHelper()
|
||||
address.SetBase(ns.network.Ipv4Address("10.1.1.0"), ns.network.Ipv4Mask("255.255.255.0"))
|
||||
p2pInterfaces = address.Assign(p2pDevices)
|
||||
|
||||
address.SetBase(ns.network.Ipv4Address("10.1.2.0"), ns.network.Ipv4Mask("255.255.255.0"))
|
||||
csmaInterfaces = address.Assign(csmaDevices)
|
||||
|
||||
address.SetBase(ns.network.Ipv4Address("10.1.3.0"), ns.network.Ipv4Mask("255.255.255.0"))
|
||||
address.Assign(staDevices)
|
||||
address.Assign(apDevices)
|
||||
|
||||
echoServer = ns.applications.UdpEchoServerHelper(9)
|
||||
|
||||
serverApps = echoServer.Install(csmaNodes.Get(nCsma))
|
||||
serverApps.Start(ns.core.Seconds(1.0))
|
||||
serverApps.Stop(ns.core.Seconds(10.0))
|
||||
|
||||
echoClient = ns.applications.UdpEchoClientHelper(csmaInterfaces.GetAddress(nCsma), 9)
|
||||
echoClient.SetAttribute("MaxPackets", ns.core.UintegerValue(1))
|
||||
echoClient.SetAttribute("Interval", ns.core.TimeValue(ns.core.Seconds (1.0)))
|
||||
echoClient.SetAttribute("PacketSize", ns.core.UintegerValue(1024))
|
||||
|
||||
clientApps = echoClient.Install(wifiStaNodes.Get (nWifi - 1))
|
||||
clientApps.Start(ns.core.Seconds(2.0))
|
||||
clientApps.Stop(ns.core.Seconds(10.0))
|
||||
|
||||
ns.internet.Ipv4GlobalRoutingHelper.PopulateRoutingTables()
|
||||
|
||||
ns.core.Simulator.Stop(ns.core.Seconds(10.0))
|
||||
|
||||
pointToPoint.EnablePcapAll ("third")
|
||||
phy.EnablePcap ("third", apDevices.Get (0))
|
||||
csma.EnablePcap ("third", csmaDevices.Get (0), True)
|
||||
|
||||
ns.core.Simulator.Run()
|
||||
ns.core.Simulator.Destroy()
|
||||
|
||||
@@ -12,9 +12,13 @@ def build(bld):
|
||||
obj = bld.create_ns3_program('second', ['core', 'point-to-point', 'csma', 'internet', 'applications'])
|
||||
obj.source = 'second.cc'
|
||||
|
||||
bld.register_ns3_script('second.py', ['core', 'point-to-point', 'csma', 'internet', 'applications'])
|
||||
|
||||
obj = bld.create_ns3_program('third', ['core', 'point-to-point', 'csma', 'wifi', 'internet', 'applications'])
|
||||
obj.source = 'third.cc'
|
||||
|
||||
bld.register_ns3_script('third.py', ['core', 'point-to-point', 'csma', 'wifi', 'internet', 'applications'])
|
||||
|
||||
obj = bld.create_ns3_program('fourth', ['core'])
|
||||
obj.source = 'fourth.cc'
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ int main (int argc, char *argv[])
|
||||
cmd.Parse (argc,argv);
|
||||
|
||||
std::cout << "DataRate" << "\t" << "Throughput" << '\n';
|
||||
for (int mcs = 0; mcs <= 31; mcs++)
|
||||
for (int i = 0; i <= 31; i++)
|
||||
{
|
||||
uint32_t payloadSize; //1500 byte IP packet
|
||||
if (udp)
|
||||
@@ -76,17 +76,17 @@ int main (int argc, char *argv[])
|
||||
YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
|
||||
phy.SetChannel (channel.Create ());
|
||||
|
||||
if (mcs <= 7)
|
||||
if (i <= 7)
|
||||
{
|
||||
phy.Set ("ShortGuardEnabled", BooleanValue (false));
|
||||
phy.Set ("ChannelBonding", BooleanValue (false));
|
||||
}
|
||||
else if (mcs > 7 && mcs <= 15)
|
||||
else if (i > 7 && i <= 15)
|
||||
{
|
||||
phy.Set ("ShortGuardEnabled", BooleanValue (true));
|
||||
phy.Set ("ChannelBonding", BooleanValue (false));
|
||||
}
|
||||
else if (mcs > 15 && mcs <= 23)
|
||||
else if (i > 15 && i <= 23)
|
||||
{
|
||||
phy.Set ("ShortGuardEnabled", BooleanValue (false));
|
||||
phy.Set ("ChannelBonding", BooleanValue (true));
|
||||
@@ -105,157 +105,157 @@ int main (int argc, char *argv[])
|
||||
|
||||
double datarate = 0;
|
||||
StringValue DataRate;
|
||||
if (mcs == 0)
|
||||
if (i == 0)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate6_5MbpsBW20MHz");
|
||||
datarate = 6.5;
|
||||
}
|
||||
else if (mcs == 1)
|
||||
else if (i == 1)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate13MbpsBW20MHz");
|
||||
datarate = 13;
|
||||
}
|
||||
else if (mcs == 2)
|
||||
else if (i == 2)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate19_5MbpsBW20MHz");
|
||||
datarate = 19.5;
|
||||
}
|
||||
else if (mcs == 3)
|
||||
else if (i == 3)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate26MbpsBW20MHz");
|
||||
datarate = 26;
|
||||
}
|
||||
else if (mcs == 4)
|
||||
else if (i == 4)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate39MbpsBW20MHz");
|
||||
datarate = 39;
|
||||
}
|
||||
else if (mcs == 5)
|
||||
else if (i == 5)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate52MbpsBW20MHz");
|
||||
datarate = 52;
|
||||
}
|
||||
else if (mcs == 6)
|
||||
else if (i == 6)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate58_5MbpsBW20MHz");
|
||||
datarate = 58.5;
|
||||
}
|
||||
else if (mcs == 7)
|
||||
else if (i == 7)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate65MbpsBW20MHz");
|
||||
datarate = 65;
|
||||
}
|
||||
else if (mcs == 8)
|
||||
else if (i == 8)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate7_2MbpsBW20MHz");
|
||||
datarate = 7.2;
|
||||
}
|
||||
else if (mcs == 9)
|
||||
else if (i == 9)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate14_4MbpsBW20MHz");
|
||||
datarate = 14.4;
|
||||
}
|
||||
else if (mcs == 10)
|
||||
else if (i == 10)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate21_7MbpsBW20MHz");
|
||||
datarate = 21.7;
|
||||
}
|
||||
else if (mcs == 11)
|
||||
else if (i == 11)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate28_9MbpsBW20MHz");
|
||||
datarate = 28.9;
|
||||
}
|
||||
else if (mcs == 12)
|
||||
else if (i == 12)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate43_3MbpsBW20MHz");
|
||||
datarate = 43.3;
|
||||
}
|
||||
else if (mcs == 13)
|
||||
else if (i == 13)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate57_8MbpsBW20MHz");
|
||||
datarate = 57.8;
|
||||
}
|
||||
else if (mcs == 14)
|
||||
else if (i == 14)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate65MbpsBW20MHzShGi");
|
||||
datarate = 65;
|
||||
}
|
||||
else if (mcs == 15)
|
||||
else if (i == 15)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate72_2MbpsBW20MHz");
|
||||
datarate = 72.2;
|
||||
}
|
||||
else if (mcs == 16)
|
||||
else if (i == 16)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate13_5MbpsBW40MHz");
|
||||
datarate = 13.5;
|
||||
}
|
||||
else if (mcs == 17)
|
||||
else if (i == 17)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate27MbpsBW40MHz");
|
||||
datarate = 27;
|
||||
}
|
||||
else if (mcs == 18)
|
||||
else if (i == 18)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate40_5MbpsBW40MHz");
|
||||
datarate = 40.5;
|
||||
}
|
||||
else if (mcs == 19)
|
||||
else if (i == 19)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate54MbpsBW40MHz");
|
||||
datarate = 54;
|
||||
}
|
||||
else if (mcs == 20)
|
||||
else if (i == 20)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate81MbpsBW40MHz");
|
||||
datarate = 81;
|
||||
}
|
||||
else if (mcs == 21)
|
||||
else if (i == 21)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate108MbpsBW40MHz");
|
||||
datarate = 108;
|
||||
}
|
||||
else if (mcs == 22)
|
||||
else if (i == 22)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate121_5MbpsBW40MHz");
|
||||
datarate = 121.5;
|
||||
}
|
||||
else if (mcs == 23)
|
||||
else if (i == 23)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate135MbpsBW40MHz");
|
||||
datarate = 135;
|
||||
}
|
||||
else if (mcs == 24)
|
||||
else if (i == 24)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate15MbpsBW40MHz");
|
||||
datarate = 15;
|
||||
}
|
||||
else if (mcs == 25)
|
||||
else if (i == 25)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate30MbpsBW40MHz");
|
||||
datarate = 30;
|
||||
}
|
||||
else if (mcs == 26)
|
||||
else if (i == 26)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate45MbpsBW40MHz");
|
||||
datarate = 45;
|
||||
}
|
||||
else if (mcs == 27)
|
||||
else if (i == 27)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate60MbpsBW40MHz");
|
||||
datarate = 60;
|
||||
}
|
||||
else if (mcs == 28)
|
||||
else if (i == 28)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate90MbpsBW40MHz");
|
||||
datarate = 90;
|
||||
}
|
||||
else if (mcs == 29)
|
||||
else if (i == 29)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate120MbpsBW40MHz");
|
||||
datarate = 120;
|
||||
}
|
||||
else if (mcs == 30)
|
||||
else if (i == 30)
|
||||
{
|
||||
DataRate = StringValue ("OfdmRate135MbpsBW40MHzShGi");
|
||||
datarate = 135;
|
||||
|
||||
@@ -72,13 +72,15 @@ import ns.wifi
|
||||
|
||||
def main(argv):
|
||||
#
|
||||
# First, we declare and initialize a few local variables that control some
|
||||
# First, we initialize a few local variables that control some
|
||||
# simulation parameters.
|
||||
#
|
||||
backboneNodes = 10
|
||||
infraNodes = 2
|
||||
lanNodes = 2
|
||||
stopTime = 20
|
||||
#
|
||||
|
||||
cmd = ns.core.CommandLine()
|
||||
cmd.backboneNodes = 10
|
||||
cmd.infraNodes = 2
|
||||
cmd.lanNodes = 2
|
||||
cmd.stopTime = 20
|
||||
|
||||
#
|
||||
# Simulation defaults are typically set next, before command line
|
||||
@@ -92,18 +94,23 @@ def main(argv):
|
||||
# system so that they can be overridden with flags such as
|
||||
# "--backboneNodes=20"
|
||||
#
|
||||
cmd = ns.core.CommandLine()
|
||||
cmd.AddValue("backboneNodes", "number of backbone nodes", str(backboneNodes))
|
||||
cmd.AddValue("infraNodes", "number of leaf nodes", str(infraNodes))
|
||||
cmd.AddValue("lanNodes", "number of LAN nodes", str(lanNodes))
|
||||
cmd.AddValue("stopTime", "simulation stop time(seconds)", str(stopTime))
|
||||
|
||||
|
||||
cmd.AddValue("backboneNodes", "number of backbone nodes")
|
||||
cmd.AddValue("infraNodes", "number of leaf nodes")
|
||||
cmd.AddValue("lanNodes", "number of LAN nodes")
|
||||
cmd.AddValue("stopTime", "simulation stop time(seconds)")
|
||||
|
||||
#
|
||||
# The system global variables and the local values added to the argument
|
||||
# system can be overridden by command line arguments by using this call.
|
||||
#
|
||||
cmd.Parse(argv)
|
||||
|
||||
backboneNodes = int(cmd.backboneNodes)
|
||||
infraNodes = int(cmd.infraNodes)
|
||||
lanNodes = int(cmd.lanNodes)
|
||||
stopTime = int(cmd.stopTime)
|
||||
|
||||
if (stopTime < 10):
|
||||
print "Use a simulation stop time >= 10 seconds"
|
||||
exit(1)
|
||||
|
||||
@@ -197,9 +197,11 @@ NodeStatistics::PhyCallback (std::string path, Ptr<const Packet> packet)
|
||||
packet->PeekHeader (head);
|
||||
Mac48Address dest = head.GetAddr1 ();
|
||||
|
||||
totalEnergy += actualPower[dest] * GetCalcTxTime (actualMode[dest]).GetSeconds ();
|
||||
totalTime += GetCalcTxTime (actualMode[dest]).GetSeconds ();
|
||||
|
||||
if (head.GetType() == WIFI_MAC_DATA)
|
||||
{
|
||||
totalEnergy += pow (10, actualPower[dest] / 10) * GetCalcTxTime (actualMode[dest]).GetSeconds ();
|
||||
totalTime += GetCalcTxTime (actualMode[dest]).GetSeconds ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@@ -259,10 +261,10 @@ NodeStatistics::AdvancePosition (Ptr<Node> node, int stepsSize, int stepsTime)
|
||||
Vector pos = GetPosition (node);
|
||||
double mbs = ((m_bytesTotal * 8.0) / (1000000 * stepsTime));
|
||||
m_bytesTotal = 0;
|
||||
double atm = pow (10, ((totalEnergy / stepsTime) / 10));
|
||||
double atp = totalEnergy / stepsTime;
|
||||
totalEnergy = 0;
|
||||
totalTime = 0;
|
||||
m_output_power.Add (pos.x, atm);
|
||||
m_output_power.Add (pos.x, atp);
|
||||
m_output.Add (pos.x, mbs);
|
||||
pos.x += stepsSize;
|
||||
SetPosition (node, pos);
|
||||
|
||||
@@ -193,9 +193,11 @@ NodeStatistics::PhyCallback (std::string path, Ptr<const Packet> packet)
|
||||
packet->PeekHeader (head);
|
||||
Mac48Address dest = head.GetAddr1 ();
|
||||
|
||||
totalEnergy += actualPower[dest] * GetCalcTxTime (actualMode[dest]).GetSeconds ();
|
||||
totalTime += GetCalcTxTime (actualMode[dest]).GetSeconds ();
|
||||
|
||||
if (head.GetType() == WIFI_MAC_DATA)
|
||||
{
|
||||
totalEnergy += pow(10, actualPower[dest] / 10) * GetCalcTxTime (actualMode[dest]).GetSeconds ();
|
||||
totalTime += GetCalcTxTime (actualMode[dest]).GetSeconds ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@@ -259,10 +261,10 @@ NodeStatistics::CheckStatistics (double time)
|
||||
{
|
||||
double mbs = ((m_bytesTotal * 8.0) / (1000000 * time));
|
||||
m_bytesTotal = 0;
|
||||
double atm = pow (10, ((totalEnergy / time) / 10));
|
||||
double atp = totalEnergy / time;
|
||||
totalEnergy = 0;
|
||||
totalTime = 0;
|
||||
m_output_power.Add ((Simulator::Now ()).GetSeconds (), atm);
|
||||
m_output_power.Add ((Simulator::Now ()).GetSeconds (), atp);
|
||||
m_output.Add ((Simulator::Now ()).GetSeconds (), mbs);
|
||||
|
||||
m_output_idle.Add ((Simulator::Now ()).GetSeconds (), idleTime * 100);
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2015 Sébastien Deronne
|
||||
*
|
||||
* 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
|
||||
*
|
||||
* Author: Sébastien Deronne <sebastien.deronne@gmail.com>
|
||||
*/
|
||||
|
||||
#include "ns3/core-module.h"
|
||||
#include "ns3/network-module.h"
|
||||
#include "ns3/applications-module.h"
|
||||
#include "ns3/wifi-module.h"
|
||||
#include "ns3/mobility-module.h"
|
||||
#include "ns3/ipv4-global-routing-helper.h"
|
||||
#include "ns3/internet-module.h"
|
||||
|
||||
// This example considers two hidden stations in an 802.11n network which supports MPDU aggregation.
|
||||
// The user can specify whether RTS/CTS is used and can set the number of aggregated MPDUs.
|
||||
//
|
||||
// Example: ./waf --run "simple-ht-hidden-stations --enableRts=1 --nMpdus=8"
|
||||
//
|
||||
// Network topology:
|
||||
//
|
||||
// Wifi 192.168.1.0
|
||||
//
|
||||
// AP
|
||||
// * * *
|
||||
// | | |
|
||||
// n1 n2 n3
|
||||
//
|
||||
// Packets in this simulation aren't marked with a QosTag so they are considered
|
||||
// belonging to BestEffort Access Class (AC_BE).
|
||||
|
||||
using namespace ns3;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("SimplesHtHiddenStations");
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
uint32_t payloadSize = 1472; //bytes
|
||||
uint64_t simulationTime = 10; //seconds
|
||||
uint32_t nMpdus = 1;
|
||||
bool enableRts = 0;
|
||||
|
||||
CommandLine cmd;
|
||||
cmd.AddValue("nMpdus", "Number of aggregated MPDUs", nMpdus);
|
||||
cmd.AddValue("payloadSize", "Payload size in bytes", payloadSize);
|
||||
cmd.AddValue("enableRts", "Enable RTS/CTS", enableRts); // 1: RTS/CTS enabled; 0: RTS/CTS disabled
|
||||
cmd.AddValue("simulationTime", "Simulation time in seconds", simulationTime);
|
||||
cmd.Parse (argc, argv);
|
||||
|
||||
if(!enableRts)
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("999999"));
|
||||
else
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("0"));
|
||||
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("990000"));
|
||||
|
||||
// Set the maximum wireless range to 5 meters in order to reproduce a hidden nodes scenario, i.e. the distance between hidden stations is larger than 5 meters
|
||||
Config::SetDefault ("ns3::RangePropagationLossModel::MaxRange", DoubleValue (5));
|
||||
|
||||
NodeContainer wifiStaNodes;
|
||||
wifiStaNodes.Create (2);
|
||||
NodeContainer wifiApNode;
|
||||
wifiApNode.Create(1);
|
||||
|
||||
YansWifiChannelHelper channel = YansWifiChannelHelper::Default ();
|
||||
channel.AddPropagationLoss ("ns3::RangePropagationLossModel"); //wireless range limited to 5 meters!
|
||||
|
||||
YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
|
||||
phy.SetPcapDataLinkType (YansWifiPhyHelper::DLT_IEEE802_11_RADIO);
|
||||
phy.SetChannel (channel.Create());
|
||||
|
||||
WifiHelper wifi = WifiHelper::Default ();
|
||||
wifi.SetStandard (WIFI_PHY_STANDARD_80211n_5GHZ);
|
||||
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode", StringValue("OfdmRate65MbpsBW20MHz"), "ControlMode", StringValue("OfdmRate6_5MbpsBW20MHz"));
|
||||
HtWifiMacHelper mac = HtWifiMacHelper::Default ();
|
||||
|
||||
Ssid ssid = Ssid ("simple-mpdu-aggregation");
|
||||
mac.SetType ("ns3::StaWifiMac",
|
||||
"Ssid", SsidValue (ssid),
|
||||
"ActiveProbing", BooleanValue (false));
|
||||
|
||||
if (nMpdus > 1) mac.SetBlockAckThresholdForAc (AC_BE, 2); //enable Block ACK when A-MPDU is enabled
|
||||
|
||||
mac.SetMpduAggregatorForAc (AC_BE,"ns3::MpduStandardAggregator",
|
||||
"MaxAmpduSize", UintegerValue (nMpdus*(payloadSize+100))); //enable MPDU aggregation for AC_BE with a maximum aggregated size of nMpdus*(payloadSize+100) bytes,
|
||||
//i.e. nMpdus aggregated packets in an A-MPDU
|
||||
|
||||
NetDeviceContainer staDevices;
|
||||
staDevices = wifi.Install (phy, mac, wifiStaNodes);
|
||||
|
||||
mac.SetType ("ns3::ApWifiMac",
|
||||
"Ssid", SsidValue (ssid),
|
||||
"BeaconInterval", TimeValue (MicroSeconds(102400)),
|
||||
"BeaconGeneration", BooleanValue (true));
|
||||
|
||||
if (nMpdus > 1) mac.SetBlockAckThresholdForAc (AC_BE, 2); //enable Block ACK when A-MPDU is enabled
|
||||
|
||||
mac.SetMpduAggregatorForAc (AC_BE,"ns3::MpduStandardAggregator",
|
||||
"MaxAmpduSize", UintegerValue (nMpdus*(payloadSize+100))); //enable MPDU aggregation for AC_BE with a maximum aggregated size of nMpdus*(payloadSize+100) bytes,
|
||||
//i.e. nMpdus aggregated packets in an A-MPDU
|
||||
|
||||
NetDeviceContainer apDevice;
|
||||
apDevice = wifi.Install (phy, mac, wifiApNode);
|
||||
|
||||
// Setting mobility model
|
||||
MobilityHelper mobility;
|
||||
Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
|
||||
|
||||
// AP is between the two stations, each station being located at 5 meters from the AP.
|
||||
// The distance between the two stations is thus equal to 10 meters.
|
||||
// Since the wireless range is limited to 5 meters, the two stations are hidden from each other.
|
||||
positionAlloc->Add (Vector (5.0, 0.0, 0.0));
|
||||
positionAlloc->Add (Vector (0.0, 0.0, 0.0));
|
||||
positionAlloc->Add (Vector (10.0, 0.0, 0.0));
|
||||
mobility.SetPositionAllocator (positionAlloc);
|
||||
|
||||
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
|
||||
|
||||
mobility.Install (wifiApNode);
|
||||
mobility.Install (wifiStaNodes);
|
||||
|
||||
// Internet stack
|
||||
InternetStackHelper stack;
|
||||
stack.Install (wifiApNode);
|
||||
stack.Install (wifiStaNodes);
|
||||
|
||||
Ipv4AddressHelper address;
|
||||
|
||||
address.SetBase ("192.168.1.0", "255.255.255.0");
|
||||
Ipv4InterfaceContainer StaInterface;
|
||||
StaInterface = address.Assign (staDevices);
|
||||
Ipv4InterfaceContainer ApInterface;
|
||||
ApInterface = address.Assign (apDevice);
|
||||
|
||||
// Setting applications
|
||||
UdpServerHelper myServer (9);
|
||||
ApplicationContainer serverApp = myServer.Install (wifiApNode);
|
||||
serverApp.Start (Seconds (0.0));
|
||||
serverApp.Stop (Seconds (simulationTime+1));
|
||||
|
||||
UdpClientHelper myClient (ApInterface.GetAddress (0), 9);
|
||||
myClient.SetAttribute ("MaxPackets", UintegerValue (4294967295u));
|
||||
myClient.SetAttribute ("Interval", TimeValue (Time ("0.00002"))); //packets/s
|
||||
myClient.SetAttribute ("PacketSize", UintegerValue (payloadSize));
|
||||
|
||||
// Saturated UDP traffic from stations to AP
|
||||
ApplicationContainer clientApp1 = myClient.Install (wifiStaNodes);
|
||||
clientApp1.Start (Seconds (1.0));
|
||||
clientApp1.Stop (Seconds (simulationTime+1));
|
||||
|
||||
phy.EnablePcap ("SimpleHtHiddenStations_Ap", apDevice.Get (0));
|
||||
phy.EnablePcap ("SimpleHtHiddenStations_Sta1", staDevices.Get (0));
|
||||
phy.EnablePcap ("SimpleHtHiddenStations_Sta2", staDevices.Get (1));
|
||||
|
||||
Simulator::Stop (Seconds (simulationTime+1));
|
||||
|
||||
Simulator::Run ();
|
||||
Simulator::Destroy ();
|
||||
|
||||
uint32_t totalPacketsThrough = DynamicCast<UdpServer>(serverApp.Get (0))->GetReceived ();
|
||||
double throughput = totalPacketsThrough*payloadSize*8/(simulationTime*1000000.0);
|
||||
std::cout << "Throughput: " << throughput << " Mbit/s" << '\n';
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,214 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2015 Sébastien Deronne
|
||||
*
|
||||
* 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
|
||||
*
|
||||
* Author: Sébastien Deronne <sebastien.deronne@gmail.com>
|
||||
*/
|
||||
|
||||
#include "ns3/core-module.h"
|
||||
#include "ns3/network-module.h"
|
||||
#include "ns3/applications-module.h"
|
||||
#include "ns3/wifi-module.h"
|
||||
#include "ns3/mobility-module.h"
|
||||
#include "ns3/ipv4-global-routing-helper.h"
|
||||
#include "ns3/internet-module.h"
|
||||
|
||||
// This is a simple example in order to show how 802.11n two-level aggregation feature works.
|
||||
// Two-level aggregation is the simultaneous use of MSDU and MPDU aggregation schemes (known as one-level aggregation techniques).
|
||||
//
|
||||
// The throughput is obtained for a given number of aggregated MSDUs and MPDUs.
|
||||
// The number of aggregated MSDUs and MPDUs can be chosen by the user through the nMsdus and nMpdus attibutes, respectively.
|
||||
//
|
||||
// Example: ./waf --run "simple-two-level-aggregation --nMsdus=3 --nMpdus=8"
|
||||
//
|
||||
// Network topology:
|
||||
//
|
||||
// Wifi 192.168.1.0
|
||||
//
|
||||
// AP
|
||||
// * *
|
||||
// | |
|
||||
// n1 n2
|
||||
//
|
||||
// Packets in this simulation aren't marked with a QosTag so they are considered
|
||||
// belonging to BestEffort Access Class (AC_BE).
|
||||
//
|
||||
// Throughput gets higher as either nMsdus or nMpdus is increased (one-level aggregation),
|
||||
// or when both nMsdus and nMpdus are increases (two-level aggregation).
|
||||
// MSDU aggregation offers a better header reduction compare to MPDU aggregation,
|
||||
// while MPDU aggregation is more robust against transmission errors than MSDU aggregation.
|
||||
// The good setting of nMsdu and nMpdus will depends on various factors (payload size, channel conditions, ...).
|
||||
// Since this example considers an ideal channel, the highest throughput is obtained with the largest values for nMsdus and nMpdus parameters.
|
||||
// Users should nevertheless take care that the standard rules limit the maximum MSDU size to 7935 bytes and the MPDU size to 65535 bytes.
|
||||
// Consequently, more packets should be aggregated if their payload is small with standard-compliant parameters.
|
||||
// Users should also note that the maximum duration of the frame is limited by the standard.
|
||||
// As a result, higher values for nMsdus and nMpdus may not always provide throughput improvements.
|
||||
|
||||
using namespace ns3;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("SimpleTwoLevelAggregation");
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
uint32_t payloadSize = 1472; //bytes
|
||||
uint64_t simulationTime = 10; //seconds
|
||||
uint32_t nMsdus = 1;
|
||||
uint32_t nMpdus = 1;
|
||||
bool enableRts = 0;
|
||||
|
||||
CommandLine cmd;
|
||||
cmd.AddValue ("nMsdus", "Number of aggregated MSDUs", nMsdus); //number of aggregated MSDUs specified by the user
|
||||
cmd.AddValue ("nMpdus", "Number of aggregated MPDUs", nMpdus); //number of aggregated MPDUs specified by the user
|
||||
cmd.AddValue ("payloadSize", "Payload size in bytes", payloadSize);
|
||||
cmd.AddValue ("enableRts", "Enable RTS/CTS", enableRts);
|
||||
cmd.AddValue ("simulationTime", "Simulation time in seconds", simulationTime);
|
||||
cmd.Parse (argc, argv);
|
||||
|
||||
if (!enableRts)
|
||||
{
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("999999"));
|
||||
}
|
||||
else
|
||||
{
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("0"));
|
||||
}
|
||||
|
||||
Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("990000"));
|
||||
|
||||
NodeContainer wifiStaNode;
|
||||
wifiStaNode.Create (1);
|
||||
NodeContainer wifiApNode;
|
||||
wifiApNode.Create (1);
|
||||
|
||||
YansWifiChannelHelper channel = YansWifiChannelHelper::Default ();
|
||||
YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
|
||||
phy.SetPcapDataLinkType (YansWifiPhyHelper::DLT_IEEE802_11_RADIO);
|
||||
phy.SetChannel (channel.Create ());
|
||||
|
||||
WifiHelper wifi = WifiHelper::Default ();
|
||||
wifi.SetStandard (WIFI_PHY_STANDARD_80211n_5GHZ);
|
||||
//We consider a constant bitrate since HT rate adaptation algorithms are not supported yet in the simulator
|
||||
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
|
||||
"DataMode", StringValue ("OfdmRate65MbpsBW20MHz"),
|
||||
"ControlMode", StringValue ("OfdmRate6_5MbpsBW20MHz"));
|
||||
HtWifiMacHelper mac = HtWifiMacHelper::Default ();
|
||||
|
||||
Ssid ssid = Ssid ("simple-two-level-aggregation");
|
||||
mac.SetType ("ns3::StaWifiMac",
|
||||
"Ssid", SsidValue (ssid),
|
||||
"ActiveProbing", BooleanValue (false));
|
||||
|
||||
|
||||
//Enable aggregation at the station side
|
||||
if (nMpdus > 1)
|
||||
{
|
||||
mac.SetBlockAckThresholdForAc (AC_BE, 2); //enable BlockAck when A-MPDU is used
|
||||
}
|
||||
if (nMsdus > 0)
|
||||
{
|
||||
mac.SetMpduAggregatorForAc (AC_BE,"ns3::MpduStandardAggregator",
|
||||
"MaxAmpduSize", UintegerValue (nMpdus * (nMsdus * (payloadSize + 100)))); //Set the maximum size for A-MPDU with regards to the payload size and the number of MSDUs expected in each MPDU.
|
||||
}
|
||||
else //MPDU aggregation only (one-level aggregation)
|
||||
{
|
||||
mac.SetMpduAggregatorForAc (AC_BE,"ns3::MpduStandardAggregator",
|
||||
"MaxAmpduSize", UintegerValue (nMpdus * (payloadSize + 200))); //Set the maximum size for A-MPDU with regards to the payload size
|
||||
}
|
||||
mac.SetMsduAggregatorForAc (AC_BE,"ns3::MsduStandardAggregator",
|
||||
"MaxAmsduSize", UintegerValue (nMsdus * (payloadSize + 100))); //Set the maximum size for A-MSDU with regards to the payload size
|
||||
|
||||
|
||||
NetDeviceContainer staDevice;
|
||||
staDevice = wifi.Install (phy, mac, wifiStaNode);
|
||||
|
||||
mac.SetType ("ns3::ApWifiMac",
|
||||
"Ssid", SsidValue (ssid),
|
||||
"BeaconInterval", TimeValue (MicroSeconds (102400)),
|
||||
"BeaconGeneration", BooleanValue (true));
|
||||
|
||||
//Enable aggregation at the AP side
|
||||
if (nMpdus > 1)
|
||||
{
|
||||
mac.SetBlockAckThresholdForAc (AC_BE, 2); //enable BlockAck when A-MPDU is used
|
||||
}
|
||||
if (nMsdus > 0)
|
||||
{
|
||||
mac.SetMpduAggregatorForAc (AC_BE,"ns3::MpduStandardAggregator",
|
||||
"MaxAmpduSize", UintegerValue (nMpdus * (nMsdus * (payloadSize + 100)))); //Set the maximum size for A-MPDU according to the payload size and the number of MSDUs expected in each MPDU.
|
||||
}
|
||||
else //MPDU aggregation only (one-level aggregation)
|
||||
{
|
||||
mac.SetMpduAggregatorForAc (AC_BE,"ns3::MpduStandardAggregator",
|
||||
"MaxAmpduSize", UintegerValue (nMpdus * (payloadSize + 200))); //Set the maximum size for A-MPDU with regards to the payload size
|
||||
}
|
||||
mac.SetMsduAggregatorForAc (AC_BE,"ns3::MsduStandardAggregator",
|
||||
"MaxAmsduSize", UintegerValue (nMsdus * (payloadSize + 100))); //Set the maximum size for A-MSDU with regards to the payload size
|
||||
|
||||
NetDeviceContainer apDevice;
|
||||
apDevice = wifi.Install (phy, mac, wifiApNode);
|
||||
|
||||
/* Setting mobility model */
|
||||
MobilityHelper mobility;
|
||||
Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
|
||||
|
||||
positionAlloc->Add (Vector (0.0, 0.0, 0.0));
|
||||
positionAlloc->Add (Vector (1.0, 0.0, 0.0));
|
||||
mobility.SetPositionAllocator (positionAlloc);
|
||||
|
||||
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
|
||||
|
||||
mobility.Install (wifiApNode);
|
||||
mobility.Install (wifiStaNode);
|
||||
|
||||
/* Internet stack*/
|
||||
InternetStackHelper stack;
|
||||
stack.Install (wifiApNode);
|
||||
stack.Install (wifiStaNode);
|
||||
|
||||
Ipv4AddressHelper address;
|
||||
|
||||
address.SetBase ("192.168.1.0", "255.255.255.0");
|
||||
Ipv4InterfaceContainer StaInterface;
|
||||
StaInterface = address.Assign (staDevice);
|
||||
Ipv4InterfaceContainer ApInterface;
|
||||
ApInterface = address.Assign (apDevice);
|
||||
|
||||
/* Setting applications */
|
||||
UdpServerHelper myServer (9);
|
||||
ApplicationContainer serverApp = myServer.Install (wifiStaNode.Get (0));
|
||||
serverApp.Start (Seconds (0.0));
|
||||
serverApp.Stop (Seconds (simulationTime + 1));
|
||||
|
||||
UdpClientHelper myClient (StaInterface.GetAddress (0), 9);
|
||||
myClient.SetAttribute ("MaxPackets", UintegerValue (4294967295u));
|
||||
myClient.SetAttribute ("Interval", TimeValue (Time ("0.00002"))); //packets/s
|
||||
myClient.SetAttribute ("PacketSize", UintegerValue (payloadSize));
|
||||
|
||||
ApplicationContainer clientApp = myClient.Install (wifiApNode.Get (0));
|
||||
clientApp.Start (Seconds (1.0));
|
||||
clientApp.Stop (Seconds (simulationTime + 1));
|
||||
|
||||
Simulator::Stop (Seconds (simulationTime + 1));
|
||||
|
||||
Simulator::Run ();
|
||||
Simulator::Destroy ();
|
||||
|
||||
uint32_t totalPacketsThrough = DynamicCast<UdpServer> (serverApp.Get (0))->GetReceived ();
|
||||
double throughput = totalPacketsThrough * payloadSize * 8 / (simulationTime * 1000000.0);
|
||||
std::cout << "Throughput: " << throughput << " Mbit/s" << '\n';
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -24,7 +24,7 @@
|
||||
// +-----+ +-----+ +-----+ +-----+
|
||||
// | STA | | STA | | STA | | STA |
|
||||
// +-----+ +-----+ +-----+ +-----+
|
||||
// 192.168.0.3 192.168.0.4 192.168.0.5 192.168.0.6
|
||||
// 192.168.0.2 192.168.0.3 192.168.0.5 192.168.0.6
|
||||
// -------- -------- -------- --------
|
||||
// WIFI STA WIFI STA WIFI STA WIFI STA
|
||||
// -------- -------- -------- --------
|
||||
@@ -37,7 +37,7 @@
|
||||
// ############## ##############
|
||||
// BRIDGE BRIDGE
|
||||
// ############## ##############
|
||||
// 192.168.0.1 192.168.0.2
|
||||
// 192.168.0.1 192.168.0.4
|
||||
// +---------+ +---------+
|
||||
// | AP Node | | AP Node |
|
||||
// +---------+ +---------+
|
||||
|
||||
@@ -71,4 +71,10 @@ def build(bld):
|
||||
obj.source = 'rate-adaptation-distance.cc'
|
||||
|
||||
obj = bld.create_ns3_program('simple-mpdu-aggregation', ['internet', 'mobility', 'wifi', 'applications'])
|
||||
obj.source = 'simple-mpdu-aggregation.cc'
|
||||
obj.source = 'simple-mpdu-aggregation.cc'
|
||||
|
||||
obj = bld.create_ns3_program('simple-two-level-aggregation', ['internet', 'mobility', 'wifi', 'applications'])
|
||||
obj.source = 'simple-two-level-aggregation.cc'
|
||||
|
||||
obj = bld.create_ns3_program('simple-ht-hidden-stations', ['internet', 'mobility', 'wifi', 'applications'])
|
||||
obj.source = 'simple-ht-hidden-stations.cc'
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
||||
|
||||
@@ -44,6 +44,7 @@ AntennaModel::GetTypeId ()
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::AntennaModel")
|
||||
.SetParent<Object> ()
|
||||
.SetGroupName("Antenna")
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ CosineAntennaModel::GetTypeId ()
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::CosineAntennaModel")
|
||||
.SetParent<AntennaModel> ()
|
||||
.SetGroupName("Antenna")
|
||||
.AddConstructor<CosineAntennaModel> ()
|
||||
.AddAttribute ("Beamwidth",
|
||||
"The 3dB beamwidth (degrees)",
|
||||
|
||||
@@ -37,6 +37,7 @@ IsotropicAntennaModel::GetTypeId ()
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::IsotropicAntennaModel")
|
||||
.SetParent<AntennaModel> ()
|
||||
.SetGroupName("Antenna")
|
||||
.AddConstructor<IsotropicAntennaModel> ()
|
||||
;
|
||||
return tid;
|
||||
|
||||
@@ -39,6 +39,7 @@ ParabolicAntennaModel::GetTypeId ()
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::ParabolicAntennaModel")
|
||||
.SetParent<AntennaModel> ()
|
||||
.SetGroupName("Antenna")
|
||||
.AddConstructor<ParabolicAntennaModel> ()
|
||||
.AddAttribute ("Beamwidth",
|
||||
"The 3dB beamwidth (degrees)",
|
||||
|
||||
@@ -729,17 +729,17 @@ def register_Ns3Buffer_methods(root_module, cls):
|
||||
cls.add_constructor([param('uint32_t', 'dataSize'), param('bool', 'initialize')])
|
||||
## buffer.h (module 'network'): ns3::Buffer::Buffer(ns3::Buffer const & o) [copy constructor]
|
||||
cls.add_constructor([param('ns3::Buffer const &', 'o')])
|
||||
## buffer.h (module 'network'): bool ns3::Buffer::AddAtEnd(uint32_t end) [member function]
|
||||
## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(uint32_t end) [member function]
|
||||
cls.add_method('AddAtEnd',
|
||||
'bool',
|
||||
'void',
|
||||
[param('uint32_t', 'end')])
|
||||
## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(ns3::Buffer const & o) [member function]
|
||||
cls.add_method('AddAtEnd',
|
||||
'void',
|
||||
[param('ns3::Buffer const &', 'o')])
|
||||
## buffer.h (module 'network'): bool ns3::Buffer::AddAtStart(uint32_t start) [member function]
|
||||
## buffer.h (module 'network'): void ns3::Buffer::AddAtStart(uint32_t start) [member function]
|
||||
cls.add_method('AddAtStart',
|
||||
'bool',
|
||||
'void',
|
||||
[param('uint32_t', 'start')])
|
||||
## buffer.h (module 'network'): ns3::Buffer::Iterator ns3::Buffer::Begin() const [member function]
|
||||
cls.add_method('Begin',
|
||||
@@ -761,11 +761,6 @@ def register_Ns3Buffer_methods(root_module, cls):
|
||||
'ns3::Buffer',
|
||||
[param('uint32_t', 'start'), param('uint32_t', 'length')],
|
||||
is_const=True)
|
||||
## buffer.h (module 'network'): ns3::Buffer ns3::Buffer::CreateFullCopy() const [member function]
|
||||
cls.add_method('CreateFullCopy',
|
||||
'ns3::Buffer',
|
||||
[],
|
||||
is_const=True)
|
||||
## buffer.h (module 'network'): uint32_t ns3::Buffer::Deserialize(uint8_t const * buffer, uint32_t size) [member function]
|
||||
cls.add_method('Deserialize',
|
||||
'uint32_t',
|
||||
@@ -775,16 +770,6 @@ def register_Ns3Buffer_methods(root_module, cls):
|
||||
'ns3::Buffer::Iterator',
|
||||
[],
|
||||
is_const=True)
|
||||
## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentEndOffset() const [member function]
|
||||
cls.add_method('GetCurrentEndOffset',
|
||||
'int32_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentStartOffset() const [member function]
|
||||
cls.add_method('GetCurrentStartOffset',
|
||||
'int32_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## buffer.h (module 'network'): uint32_t ns3::Buffer::GetSerializedSize() const [member function]
|
||||
cls.add_method('GetSerializedSize',
|
||||
'uint32_t',
|
||||
@@ -1022,14 +1007,18 @@ def register_Ns3ByteTagList_methods(root_module, cls):
|
||||
cls.add_method('Add',
|
||||
'void',
|
||||
[param('ns3::ByteTagList const &', 'o')])
|
||||
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtEnd(int32_t adjustment, int32_t appendOffset) [member function]
|
||||
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtEnd(int32_t appendOffset) [member function]
|
||||
cls.add_method('AddAtEnd',
|
||||
'void',
|
||||
[param('int32_t', 'adjustment'), param('int32_t', 'appendOffset')])
|
||||
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t adjustment, int32_t prependOffset) [member function]
|
||||
[param('int32_t', 'appendOffset')])
|
||||
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t prependOffset) [member function]
|
||||
cls.add_method('AddAtStart',
|
||||
'void',
|
||||
[param('int32_t', 'adjustment'), param('int32_t', 'prependOffset')])
|
||||
[param('int32_t', 'prependOffset')])
|
||||
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::Adjust(int32_t adjustment) [member function]
|
||||
cls.add_method('Adjust',
|
||||
'void',
|
||||
[param('int32_t', 'adjustment')])
|
||||
## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator ns3::ByteTagList::Begin(int32_t offsetStart, int32_t offsetEnd) const [member function]
|
||||
cls.add_method('Begin',
|
||||
'ns3::ByteTagList::Iterator',
|
||||
@@ -2373,10 +2362,10 @@ def register_Ns3Simulator_methods(root_module, cls):
|
||||
'void',
|
||||
[],
|
||||
is_static=True)
|
||||
## simulator.h (module 'core'): static void ns3::Simulator::Stop(ns3::Time const & time) [member function]
|
||||
## simulator.h (module 'core'): static void ns3::Simulator::Stop(ns3::Time const & delay) [member function]
|
||||
cls.add_method('Stop',
|
||||
'void',
|
||||
[param('ns3::Time const &', 'time')],
|
||||
[param('ns3::Time const &', 'delay')],
|
||||
is_static=True)
|
||||
return
|
||||
|
||||
@@ -5250,10 +5239,10 @@ def register_Ns3EmpiricalRandomVariable_methods(root_module, cls):
|
||||
'double',
|
||||
[],
|
||||
is_virtual=True)
|
||||
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double arg0, double arg1, double arg2, double arg3, double arg4) [member function]
|
||||
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double c1, double c2, double v1, double v2, double r) [member function]
|
||||
cls.add_method('Interpolate',
|
||||
'double',
|
||||
[param('double', 'arg0'), param('double', 'arg1'), param('double', 'arg2'), param('double', 'arg3'), param('double', 'arg4')],
|
||||
[param('double', 'c1'), param('double', 'c2'), param('double', 'v1'), param('double', 'v2'), param('double', 'r')],
|
||||
visibility='private', is_virtual=True)
|
||||
## random-variable-stream.h (module 'core'): void ns3::EmpiricalRandomVariable::Validate() [member function]
|
||||
cls.add_method('Validate',
|
||||
@@ -7648,6 +7637,11 @@ def register_Ns3AodvRoutingProtocol_methods(root_module, cls):
|
||||
[param('ns3::Time', 't')])
|
||||
## aodv-routing-protocol.h (module 'aodv'): ns3::aodv::RoutingProtocol::AODV_PORT [variable]
|
||||
cls.add_static_attribute('AODV_PORT', 'uint32_t const', is_const=True)
|
||||
## aodv-routing-protocol.h (module 'aodv'): void ns3::aodv::RoutingProtocol::DoInitialize() [member function]
|
||||
cls.add_method('DoInitialize',
|
||||
'void',
|
||||
[],
|
||||
visibility='protected', is_virtual=True)
|
||||
return
|
||||
|
||||
def register_Ns3AodvRoutingTable_methods(root_module, cls):
|
||||
|
||||
@@ -729,17 +729,17 @@ def register_Ns3Buffer_methods(root_module, cls):
|
||||
cls.add_constructor([param('uint32_t', 'dataSize'), param('bool', 'initialize')])
|
||||
## buffer.h (module 'network'): ns3::Buffer::Buffer(ns3::Buffer const & o) [copy constructor]
|
||||
cls.add_constructor([param('ns3::Buffer const &', 'o')])
|
||||
## buffer.h (module 'network'): bool ns3::Buffer::AddAtEnd(uint32_t end) [member function]
|
||||
## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(uint32_t end) [member function]
|
||||
cls.add_method('AddAtEnd',
|
||||
'bool',
|
||||
'void',
|
||||
[param('uint32_t', 'end')])
|
||||
## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(ns3::Buffer const & o) [member function]
|
||||
cls.add_method('AddAtEnd',
|
||||
'void',
|
||||
[param('ns3::Buffer const &', 'o')])
|
||||
## buffer.h (module 'network'): bool ns3::Buffer::AddAtStart(uint32_t start) [member function]
|
||||
## buffer.h (module 'network'): void ns3::Buffer::AddAtStart(uint32_t start) [member function]
|
||||
cls.add_method('AddAtStart',
|
||||
'bool',
|
||||
'void',
|
||||
[param('uint32_t', 'start')])
|
||||
## buffer.h (module 'network'): ns3::Buffer::Iterator ns3::Buffer::Begin() const [member function]
|
||||
cls.add_method('Begin',
|
||||
@@ -761,11 +761,6 @@ def register_Ns3Buffer_methods(root_module, cls):
|
||||
'ns3::Buffer',
|
||||
[param('uint32_t', 'start'), param('uint32_t', 'length')],
|
||||
is_const=True)
|
||||
## buffer.h (module 'network'): ns3::Buffer ns3::Buffer::CreateFullCopy() const [member function]
|
||||
cls.add_method('CreateFullCopy',
|
||||
'ns3::Buffer',
|
||||
[],
|
||||
is_const=True)
|
||||
## buffer.h (module 'network'): uint32_t ns3::Buffer::Deserialize(uint8_t const * buffer, uint32_t size) [member function]
|
||||
cls.add_method('Deserialize',
|
||||
'uint32_t',
|
||||
@@ -775,16 +770,6 @@ def register_Ns3Buffer_methods(root_module, cls):
|
||||
'ns3::Buffer::Iterator',
|
||||
[],
|
||||
is_const=True)
|
||||
## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentEndOffset() const [member function]
|
||||
cls.add_method('GetCurrentEndOffset',
|
||||
'int32_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentStartOffset() const [member function]
|
||||
cls.add_method('GetCurrentStartOffset',
|
||||
'int32_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## buffer.h (module 'network'): uint32_t ns3::Buffer::GetSerializedSize() const [member function]
|
||||
cls.add_method('GetSerializedSize',
|
||||
'uint32_t',
|
||||
@@ -1022,14 +1007,18 @@ def register_Ns3ByteTagList_methods(root_module, cls):
|
||||
cls.add_method('Add',
|
||||
'void',
|
||||
[param('ns3::ByteTagList const &', 'o')])
|
||||
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtEnd(int32_t adjustment, int32_t appendOffset) [member function]
|
||||
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtEnd(int32_t appendOffset) [member function]
|
||||
cls.add_method('AddAtEnd',
|
||||
'void',
|
||||
[param('int32_t', 'adjustment'), param('int32_t', 'appendOffset')])
|
||||
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t adjustment, int32_t prependOffset) [member function]
|
||||
[param('int32_t', 'appendOffset')])
|
||||
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t prependOffset) [member function]
|
||||
cls.add_method('AddAtStart',
|
||||
'void',
|
||||
[param('int32_t', 'adjustment'), param('int32_t', 'prependOffset')])
|
||||
[param('int32_t', 'prependOffset')])
|
||||
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::Adjust(int32_t adjustment) [member function]
|
||||
cls.add_method('Adjust',
|
||||
'void',
|
||||
[param('int32_t', 'adjustment')])
|
||||
## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator ns3::ByteTagList::Begin(int32_t offsetStart, int32_t offsetEnd) const [member function]
|
||||
cls.add_method('Begin',
|
||||
'ns3::ByteTagList::Iterator',
|
||||
@@ -2373,10 +2362,10 @@ def register_Ns3Simulator_methods(root_module, cls):
|
||||
'void',
|
||||
[],
|
||||
is_static=True)
|
||||
## simulator.h (module 'core'): static void ns3::Simulator::Stop(ns3::Time const & time) [member function]
|
||||
## simulator.h (module 'core'): static void ns3::Simulator::Stop(ns3::Time const & delay) [member function]
|
||||
cls.add_method('Stop',
|
||||
'void',
|
||||
[param('ns3::Time const &', 'time')],
|
||||
[param('ns3::Time const &', 'delay')],
|
||||
is_static=True)
|
||||
return
|
||||
|
||||
@@ -5250,10 +5239,10 @@ def register_Ns3EmpiricalRandomVariable_methods(root_module, cls):
|
||||
'double',
|
||||
[],
|
||||
is_virtual=True)
|
||||
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double arg0, double arg1, double arg2, double arg3, double arg4) [member function]
|
||||
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double c1, double c2, double v1, double v2, double r) [member function]
|
||||
cls.add_method('Interpolate',
|
||||
'double',
|
||||
[param('double', 'arg0'), param('double', 'arg1'), param('double', 'arg2'), param('double', 'arg3'), param('double', 'arg4')],
|
||||
[param('double', 'c1'), param('double', 'c2'), param('double', 'v1'), param('double', 'v2'), param('double', 'r')],
|
||||
visibility='private', is_virtual=True)
|
||||
## random-variable-stream.h (module 'core'): void ns3::EmpiricalRandomVariable::Validate() [member function]
|
||||
cls.add_method('Validate',
|
||||
@@ -7648,6 +7637,11 @@ def register_Ns3AodvRoutingProtocol_methods(root_module, cls):
|
||||
[param('ns3::Time', 't')])
|
||||
## aodv-routing-protocol.h (module 'aodv'): ns3::aodv::RoutingProtocol::AODV_PORT [variable]
|
||||
cls.add_static_attribute('AODV_PORT', 'uint32_t const', is_const=True)
|
||||
## aodv-routing-protocol.h (module 'aodv'): void ns3::aodv::RoutingProtocol::DoInitialize() [member function]
|
||||
cls.add_method('DoInitialize',
|
||||
'void',
|
||||
[],
|
||||
visibility='protected', is_virtual=True)
|
||||
return
|
||||
|
||||
def register_Ns3AodvRoutingTable_methods(root_module, cls):
|
||||
|
||||
+31
-25
@@ -94,37 +94,43 @@ Future Work
|
||||
|
||||
No announced plans.
|
||||
|
||||
References
|
||||
++++++++++
|
||||
..
|
||||
References
|
||||
++++++++++
|
||||
|
||||
..
|
||||
Usage
|
||||
*****
|
||||
|
||||
Usage
|
||||
*****
|
||||
..
|
||||
Examples
|
||||
++++++++
|
||||
|
||||
Examples
|
||||
++++++++
|
||||
..
|
||||
Helpers
|
||||
+++++++
|
||||
|
||||
Helpers
|
||||
+++++++
|
||||
..
|
||||
Attributes
|
||||
++++++++++
|
||||
|
||||
Attributes
|
||||
++++++++++
|
||||
..
|
||||
Tracing
|
||||
+++++++
|
||||
|
||||
Tracing
|
||||
+++++++
|
||||
..
|
||||
Logging
|
||||
+++++++
|
||||
|
||||
Logging
|
||||
+++++++
|
||||
..
|
||||
Caveats
|
||||
+++++++
|
||||
|
||||
Caveats
|
||||
+++++++
|
||||
|
||||
Validation
|
||||
**********
|
||||
|
||||
Unit tests
|
||||
++++++++++
|
||||
|
||||
Larger-scale performance tests
|
||||
++++++++++++++++++++++++++++++
|
||||
..
|
||||
Validation
|
||||
**********
|
||||
Unit tests
|
||||
++++++++++
|
||||
Larger-scale performance tests
|
||||
++++++++++++++++++++++++++++++
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ TypeHeader::GetTypeId ()
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::aodv::TypeHeader")
|
||||
.SetParent<Header> ()
|
||||
.SetGroupName("Aodv")
|
||||
.AddConstructor<TypeHeader> ()
|
||||
;
|
||||
return tid;
|
||||
@@ -153,6 +154,7 @@ RreqHeader::GetTypeId ()
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::aodv::RreqHeader")
|
||||
.SetParent<Header> ()
|
||||
.SetGroupName("Aodv")
|
||||
.AddConstructor<RreqHeader> ()
|
||||
;
|
||||
return tid;
|
||||
@@ -292,6 +294,7 @@ RrepHeader::GetTypeId ()
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::aodv::RrepHeader")
|
||||
.SetParent<Header> ()
|
||||
.SetGroupName("Aodv")
|
||||
.AddConstructor<RrepHeader> ()
|
||||
;
|
||||
return tid;
|
||||
@@ -434,6 +437,7 @@ RrepAckHeader::GetTypeId ()
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::aodv::RrepAckHeader")
|
||||
.SetParent<Header> ()
|
||||
.SetGroupName("Aodv")
|
||||
.AddConstructor<RrepAckHeader> ()
|
||||
;
|
||||
return tid;
|
||||
@@ -500,6 +504,7 @@ RerrHeader::GetTypeId ()
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::aodv::RerrHeader")
|
||||
.SetParent<Header> ()
|
||||
.SetGroupName("Aodv")
|
||||
.AddConstructor<RerrHeader> ()
|
||||
;
|
||||
return tid;
|
||||
|
||||
@@ -65,8 +65,9 @@ public:
|
||||
|
||||
static TypeId GetTypeId ()
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::aodv::DeferredRouteOutputTag").SetParent<Tag> ()
|
||||
static TypeId tid = TypeId ("ns3::aodv::DeferredRouteOutputTag")
|
||||
.SetParent<Tag> ()
|
||||
.SetGroupName("Aodv")
|
||||
.AddConstructor<DeferredRouteOutputTag> ()
|
||||
;
|
||||
return tid;
|
||||
@@ -158,6 +159,7 @@ RoutingProtocol::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::aodv::RoutingProtocol")
|
||||
.SetParent<Ipv4RoutingProtocol> ()
|
||||
.SetGroupName("Aodv")
|
||||
.AddConstructor<RoutingProtocol> ()
|
||||
.AddAttribute ("HelloInterval", "HELLO messages emission interval.",
|
||||
TimeValue (Seconds (1)),
|
||||
@@ -580,12 +582,6 @@ RoutingProtocol::SetIpv4 (Ptr<Ipv4> ipv4)
|
||||
NS_ASSERT (ipv4 != 0);
|
||||
NS_ASSERT (m_ipv4 == 0);
|
||||
|
||||
if (EnableHello)
|
||||
{
|
||||
m_htimer.SetFunction (&RoutingProtocol::HelloTimerExpire, this);
|
||||
m_htimer.Schedule (MilliSeconds (m_uniformRandomVariable->GetInteger (0, 100)));
|
||||
}
|
||||
|
||||
m_ipv4 = ipv4;
|
||||
|
||||
// Create lo route. It is asserted that the only one interface up for now is loopback
|
||||
@@ -1928,5 +1924,20 @@ RoutingProtocol::FindSubnetBroadcastSocketWithInterfaceAddress (Ipv4InterfaceAdd
|
||||
return socket;
|
||||
}
|
||||
|
||||
void
|
||||
RoutingProtocol::DoInitialize (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
uint32_t startTime;
|
||||
if (EnableHello)
|
||||
{
|
||||
m_htimer.SetFunction (&RoutingProtocol::HelloTimerExpire, this);
|
||||
startTime = m_uniformRandomVariable->GetInteger (0, 100);
|
||||
NS_LOG_DEBUG ("Starting at time " << startTime << "ms");
|
||||
m_htimer.Schedule (MilliSeconds (startTime));
|
||||
}
|
||||
Ipv4RoutingProtocol::DoInitialize ();
|
||||
}
|
||||
}
|
||||
|
||||
} //namespace aodv
|
||||
} //namespace ns3
|
||||
|
||||
@@ -97,6 +97,8 @@ public:
|
||||
*/
|
||||
int64_t AssignStreams (int64_t stream);
|
||||
|
||||
protected:
|
||||
virtual void DoInitialize (void);
|
||||
private:
|
||||
|
||||
// Protocol parameters.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -37,11 +37,14 @@ namespace aodv
|
||||
// Tests
|
||||
//-----------------------------------------------------------------------------
|
||||
/// Unit test for id cache
|
||||
struct IdCacheTest : public TestCase
|
||||
class IdCacheTest : public TestCase
|
||||
{
|
||||
public:
|
||||
IdCacheTest () : TestCase ("Id Cache"), cache (Seconds (10))
|
||||
{}
|
||||
virtual void DoRun ();
|
||||
|
||||
private:
|
||||
void CheckTimeout1 ();
|
||||
void CheckTimeout2 ();
|
||||
void CheckTimeout3 ();
|
||||
@@ -93,7 +96,7 @@ IdCacheTest::CheckTimeout3 ()
|
||||
class IdCacheTestSuite : public TestSuite
|
||||
{
|
||||
public:
|
||||
IdCacheTestSuite () : TestSuite ("routing-id-cache", UNIT)
|
||||
IdCacheTestSuite () : TestSuite ("aodv-routing-id-cache", UNIT)
|
||||
{
|
||||
AddTestCase (new IdCacheTest, TestCase::QUICK);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#include "aodv-regression.h"
|
||||
#include "bug-772.h"
|
||||
#include "loopback.h"
|
||||
|
||||
#include "ns3/simulator.h"
|
||||
#include "ns3/mobility-helper.h"
|
||||
@@ -32,19 +31,18 @@
|
||||
#include "ns3/internet-stack-helper.h"
|
||||
#include "ns3/ipv4-address-helper.h"
|
||||
#include "ns3/abort.h"
|
||||
#include "ns3/udp-echo-helper.h"
|
||||
#include "ns3/mobility-model.h"
|
||||
#include "ns3/pcap-file.h"
|
||||
#include "ns3/aodv-helper.h"
|
||||
#include "ns3/v4ping-helper.h"
|
||||
#include "ns3/nqos-wifi-mac-helper.h"
|
||||
#include "ns3/config.h"
|
||||
#include "ns3/pcap-test.h"
|
||||
#include "ns3/rng-seed-manager.h"
|
||||
#include "ns3/icmpv4.h"
|
||||
#include <sstream>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace aodv;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Test suite
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -56,17 +54,12 @@ public:
|
||||
SetDataDir (NS_TEST_SOURCEDIR);
|
||||
// General RREQ-RREP-RRER test case
|
||||
AddTestCase (new ChainRegressionTest ("aodv-chain-regression-test"), TestCase::QUICK);
|
||||
/// \internal
|
||||
/// \bugid{606} test case, should crash if bug is not fixed
|
||||
// \bugid{606} test case, should crash if bug is not fixed
|
||||
AddTestCase (new ChainRegressionTest ("bug-606-test", Seconds (10), 3, Seconds (1)), TestCase::QUICK);
|
||||
/// \internal
|
||||
/// \bugid{772} UDP test case
|
||||
// \bugid{772} UDP test case
|
||||
AddTestCase (new Bug772ChainTest ("udp-chain-test", "ns3::UdpSocketFactory", Seconds (3), 10), TestCase::QUICK);
|
||||
/// \internal
|
||||
/// \bugid{772} TCP test case
|
||||
// \bugid{772} TCP test case
|
||||
AddTestCase (new Bug772ChainTest ("tcp-chain-test", "ns3::TcpSocketFactory", Seconds (3), 10), TestCase::QUICK);
|
||||
// Ping loopback test case
|
||||
AddTestCase (new LoopbackTestCase (), TestCase::QUICK);
|
||||
}
|
||||
} g_aodvRegressionTestSuite;
|
||||
|
||||
@@ -81,7 +74,8 @@ ChainRegressionTest::ChainRegressionTest (const char * const prefix, Time t, uin
|
||||
m_time (t),
|
||||
m_size (size),
|
||||
m_step (120),
|
||||
m_arpAliveTimeout (arpAliveTimeout)
|
||||
m_arpAliveTimeout (arpAliveTimeout),
|
||||
m_seq (0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -90,6 +84,35 @@ ChainRegressionTest::~ChainRegressionTest ()
|
||||
delete m_nodes;
|
||||
}
|
||||
|
||||
void
|
||||
ChainRegressionTest::SendPing ()
|
||||
{
|
||||
if (Simulator::Now () >= m_time)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Ptr<Packet> p = Create<Packet> ();
|
||||
Icmpv4Echo echo;
|
||||
echo.SetSequenceNumber (m_seq);
|
||||
m_seq++;
|
||||
echo.SetIdentifier (0);
|
||||
|
||||
Ptr<Packet> dataPacket = Create<Packet> (56);
|
||||
echo.SetData (dataPacket);
|
||||
p->AddHeader (echo);
|
||||
Icmpv4Header header;
|
||||
header.SetType (Icmpv4Header::ECHO);
|
||||
header.SetCode (0);
|
||||
if (Node::ChecksumEnabled ())
|
||||
{
|
||||
header.EnableChecksum ();
|
||||
}
|
||||
p->AddHeader (header);
|
||||
m_socket->Send (p, 0);
|
||||
Simulator::Schedule (Seconds (1), &ChainRegressionTest::SendPing, this);
|
||||
}
|
||||
|
||||
void
|
||||
ChainRegressionTest::DoRun ()
|
||||
{
|
||||
@@ -173,11 +196,14 @@ ChainRegressionTest::CreateDevices ()
|
||||
Ipv4InterfaceContainer interfaces = address.Assign (devices);
|
||||
|
||||
// 3. Setup ping
|
||||
V4PingHelper ping (interfaces.GetAddress (m_size - 1));
|
||||
ping.SetAttribute ("Verbose", BooleanValue (false)); // don't need verbose ping in regression test
|
||||
ApplicationContainer p = ping.Install (m_nodes->Get (0));
|
||||
p.Start (Seconds (0));
|
||||
p.Stop (m_time);
|
||||
m_socket = Socket::CreateSocket (m_nodes->Get (0), TypeId::LookupByName ("ns3::Ipv4RawSocketFactory"));
|
||||
m_socket->SetAttribute ("Protocol", UintegerValue (1)); // icmp
|
||||
InetSocketAddress src = InetSocketAddress (Ipv4Address::GetAny (), 0);
|
||||
m_socket->Bind (src);
|
||||
InetSocketAddress dst = InetSocketAddress (interfaces.GetAddress (m_size - 1), 0);
|
||||
m_socket->Connect (dst);
|
||||
|
||||
SendPing ();
|
||||
|
||||
// 4. write PCAP
|
||||
wifiPhy.EnablePcapAll (CreateTempDirFilename (m_prefix));
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#include "ns3/test.h"
|
||||
#include "ns3/nstime.h"
|
||||
#include "ns3/socket.h"
|
||||
#include "ns3/node-container.h"
|
||||
|
||||
using namespace ns3;
|
||||
@@ -177,6 +178,10 @@ private:
|
||||
const double m_step;
|
||||
/// ARP alive timeout
|
||||
const Time m_arpAliveTimeout;
|
||||
/// Socket
|
||||
Ptr<Socket> m_socket;
|
||||
/// Sequence number
|
||||
uint16_t m_seq;
|
||||
|
||||
/// Create test topology
|
||||
void CreateNodes ();
|
||||
@@ -186,6 +191,8 @@ private:
|
||||
void CheckResults ();
|
||||
/// Go
|
||||
void DoRun ();
|
||||
/// Send one ping
|
||||
void SendPing ();
|
||||
};
|
||||
|
||||
#endif /* AODV_REGRESSION_H */
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
+28
-16
@@ -33,17 +33,14 @@
|
||||
#include "ns3/internet-stack-helper.h"
|
||||
#include "ns3/ipv4-address-helper.h"
|
||||
#include "ns3/abort.h"
|
||||
#include "ns3/udp-echo-helper.h"
|
||||
#include "ns3/mobility-model.h"
|
||||
#include "ns3/pcap-file.h"
|
||||
#include "ns3/aodv-helper.h"
|
||||
#include "ns3/v4ping-helper.h"
|
||||
#include "ns3/nqos-wifi-mac-helper.h"
|
||||
#include "ns3/config.h"
|
||||
#include "ns3/on-off-helper.h"
|
||||
#include "ns3/inet-socket-address.h"
|
||||
#include "ns3/data-rate.h"
|
||||
#include "ns3/packet-sink-helper.h"
|
||||
#include "ns3/pcap-test.h"
|
||||
#include <sstream>
|
||||
|
||||
@@ -59,8 +56,8 @@ Bug772ChainTest::Bug772ChainTest (const char * const prefix, const char * const
|
||||
m_proto (proto),
|
||||
m_time (t),
|
||||
m_size (size),
|
||||
m_step (120)
|
||||
{
|
||||
m_step (120),
|
||||
m_port (9){
|
||||
}
|
||||
|
||||
Bug772ChainTest::~Bug772ChainTest ()
|
||||
@@ -68,6 +65,17 @@ Bug772ChainTest::~Bug772ChainTest ()
|
||||
delete m_nodes;
|
||||
}
|
||||
|
||||
void
|
||||
Bug772ChainTest::SendData (Ptr<Socket> socket)
|
||||
{
|
||||
if (Simulator::Now () < m_time)
|
||||
{
|
||||
socket->Send (Create<Packet> (1000));
|
||||
Simulator::ScheduleWithContext (socket->GetNode ()->GetId (), Seconds (0.125),
|
||||
&Bug772ChainTest::SendData, this, socket);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Bug772ChainTest::DoRun ()
|
||||
{
|
||||
@@ -133,24 +141,28 @@ Bug772ChainTest::CreateDevices ()
|
||||
InternetStackHelper internetStack;
|
||||
internetStack.SetRoutingHelper (aodv);
|
||||
internetStack.Install (*m_nodes);
|
||||
streamsUsed += internetStack.AssignStreams (*m_nodes, streamsUsed);
|
||||
// Expect to use (3*m_size) more streams for internet stack random variables
|
||||
NS_TEST_ASSERT_MSG_EQ (streamsUsed, ((devices.GetN () * 6) + (3*m_size)), "Stream assignment mismatch");
|
||||
streamsUsed += aodv.AssignStreams (*m_nodes, streamsUsed);
|
||||
// Expect to use m_size more streams for AODV
|
||||
NS_TEST_ASSERT_MSG_EQ (streamsUsed, ((devices.GetN () * 6) + m_size), "Stream assignment mismatch");
|
||||
NS_TEST_ASSERT_MSG_EQ (streamsUsed, ((devices.GetN () * 6) + (3*m_size) + m_size), "Stream assignment mismatch");
|
||||
Ipv4AddressHelper address;
|
||||
address.SetBase ("10.1.1.0", "255.255.255.0");
|
||||
Ipv4InterfaceContainer interfaces = address.Assign (devices);
|
||||
|
||||
// 3. Setup UDP source and sink
|
||||
uint16_t port = 9; // Discard port (RFC 863)
|
||||
OnOffHelper onoff (m_proto, Address (InetSocketAddress (interfaces.GetAddress (m_size-1), port)));
|
||||
onoff.SetConstantRate (DataRate (64000));
|
||||
onoff.SetAttribute ("PacketSize", UintegerValue (1000));
|
||||
ApplicationContainer app = onoff.Install (m_nodes->Get (0));
|
||||
app.Start (Seconds (1.0));
|
||||
app.Stop (m_time);
|
||||
PacketSinkHelper sink (m_proto, Address (InetSocketAddress (Ipv4Address::GetAny (), port)));
|
||||
app = sink.Install (m_nodes->Get (m_size - 1));
|
||||
app.Start (Seconds (0.0));
|
||||
m_sendSocket = Socket::CreateSocket (m_nodes->Get (0), TypeId::LookupByName (m_proto));
|
||||
m_sendSocket->Bind ();
|
||||
m_sendSocket->Connect (InetSocketAddress (interfaces.GetAddress (m_size-1), m_port));
|
||||
m_sendSocket->SetAllowBroadcast (true);
|
||||
Simulator::ScheduleWithContext (m_sendSocket->GetNode ()->GetId (), Seconds (1.0),
|
||||
&Bug772ChainTest::SendData, this, m_sendSocket);
|
||||
|
||||
m_recvSocket = Socket::CreateSocket (m_nodes->Get (m_size - 1), TypeId::LookupByName (m_proto));
|
||||
m_recvSocket->Bind (InetSocketAddress (Ipv4Address::GetAny (), m_port));
|
||||
m_recvSocket->Listen ();
|
||||
m_recvSocket->ShutdownSend ();
|
||||
|
||||
// 4. write PCAP on the first and last nodes only
|
||||
wifiPhy.EnablePcap (CreateTempDirFilename (m_prefix), devices.Get (0));
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "ns3/test.h"
|
||||
#include "ns3/nstime.h"
|
||||
#include "ns3/node-container.h"
|
||||
#include "ns3/socket.h"
|
||||
|
||||
using namespace ns3;
|
||||
|
||||
@@ -62,6 +63,8 @@ private:
|
||||
const uint32_t m_size;
|
||||
/// Chain step, meters
|
||||
const double m_step;
|
||||
/// port number
|
||||
const uint16_t m_port;
|
||||
|
||||
/// Create test topology
|
||||
void CreateNodes ();
|
||||
@@ -71,6 +74,17 @@ private:
|
||||
void CheckResults ();
|
||||
/// Go
|
||||
void DoRun ();
|
||||
|
||||
/// Receiving socket
|
||||
Ptr<Socket> m_recvSocket;
|
||||
/// Transmitting socket
|
||||
Ptr<Socket> m_sendSocket;
|
||||
|
||||
/**
|
||||
* Send data
|
||||
* \param socket the sending socket
|
||||
*/
|
||||
void SendData (Ptr<Socket> socket);
|
||||
};
|
||||
|
||||
#endif /* BUG_772_H */
|
||||
|
||||
+97
-15
@@ -18,8 +18,10 @@
|
||||
* Authors: Pavel Boyko <boyko@iitp.ru>
|
||||
*/
|
||||
|
||||
#include "loopback.h"
|
||||
#include "ns3/test.h"
|
||||
#include "ns3/simulator.h"
|
||||
#include "ns3/socket-factory.h"
|
||||
#include "ns3/udp-socket-factory.h"
|
||||
#include "ns3/mobility-helper.h"
|
||||
#include "ns3/double.h"
|
||||
#include "ns3/uinteger.h"
|
||||
@@ -45,12 +47,66 @@ namespace ns3
|
||||
namespace aodv
|
||||
{
|
||||
|
||||
static uint32_t g_count (0);
|
||||
|
||||
static void
|
||||
PingRtt (std::string context, Time rtt)
|
||||
/**
|
||||
* \ingroup aodv
|
||||
*
|
||||
* \brief AODV loopback UDP echo test case
|
||||
*/
|
||||
class LoopbackTestCase : public TestCase
|
||||
{
|
||||
g_count++;
|
||||
uint32_t m_count; //!< number of packet received;
|
||||
Ptr<Socket> m_txSocket;
|
||||
Ptr<Socket> m_echoSocket;
|
||||
Ptr<Socket> m_rxSocket;
|
||||
uint16_t m_echoSendPort;
|
||||
uint16_t m_echoReplyPort;
|
||||
|
||||
void SendData (Ptr<Socket> socket);
|
||||
void ReceivePkt (Ptr<Socket> socket);
|
||||
void EchoData (Ptr<Socket> socket);
|
||||
|
||||
public:
|
||||
LoopbackTestCase ();
|
||||
void DoRun ();
|
||||
};
|
||||
|
||||
LoopbackTestCase::LoopbackTestCase () :
|
||||
TestCase ("UDP Echo 127.0.0.1 test"), m_count (0)
|
||||
{
|
||||
m_echoSendPort = 1233;
|
||||
m_echoReplyPort = 1234;
|
||||
}
|
||||
|
||||
void LoopbackTestCase::ReceivePkt (Ptr<Socket> socket)
|
||||
{
|
||||
Ptr<Packet> receivedPacket = socket->Recv (std::numeric_limits<uint32_t>::max (), 0);
|
||||
|
||||
m_count ++;
|
||||
}
|
||||
|
||||
void
|
||||
LoopbackTestCase::EchoData (Ptr<Socket> socket)
|
||||
{
|
||||
Address from;
|
||||
Ptr<Packet> receivedPacket = socket->RecvFrom (std::numeric_limits<uint32_t>::max (), 0, from);
|
||||
|
||||
Ipv4Address src = InetSocketAddress::ConvertFrom (from).GetIpv4 ();
|
||||
Address to = InetSocketAddress (src, m_echoReplyPort);
|
||||
|
||||
receivedPacket->RemoveAllPacketTags ();
|
||||
receivedPacket->RemoveAllByteTags ();
|
||||
|
||||
socket->SendTo (receivedPacket, 0, to);
|
||||
}
|
||||
|
||||
void
|
||||
LoopbackTestCase::SendData (Ptr<Socket> socket)
|
||||
{
|
||||
Address realTo = InetSocketAddress (Ipv4Address::GetLoopback (), m_echoSendPort);
|
||||
socket->SendTo (Create<Packet> (123), 0, realTo);
|
||||
|
||||
Simulator::ScheduleWithContext (socket->GetNode ()->GetId (), Seconds (1.0),
|
||||
&LoopbackTestCase::SendData, this, socket);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -80,23 +136,49 @@ LoopbackTestCase::DoRun ()
|
||||
address.SetBase ("10.1.1.0", "255.255.255.0");
|
||||
Ipv4InterfaceContainer interfaces = address.Assign (devices);
|
||||
|
||||
// Setup ping
|
||||
Ptr<V4Ping> ping = CreateObject<V4Ping> ();
|
||||
ping->SetAttribute ("Remote", Ipv4AddressValue (Ipv4Address::GetLoopback ()));
|
||||
nodes.Get (0)->AddApplication (ping);
|
||||
ping->SetStartTime (Seconds (0));
|
||||
ping->SetStopTime (Seconds (4));
|
||||
Names::Add ("ping", ping);
|
||||
Config::Connect ("/Names/ping/Rtt", MakeCallback (&PingRtt));
|
||||
// Setup echos
|
||||
Ptr<SocketFactory> socketFactory = nodes.Get (0)->GetObject<UdpSocketFactory> ();
|
||||
m_rxSocket = socketFactory->CreateSocket ();
|
||||
m_rxSocket->Bind (InetSocketAddress (Ipv4Address::GetLoopback (), m_echoReplyPort));
|
||||
m_rxSocket->SetRecvCallback (MakeCallback (&LoopbackTestCase::ReceivePkt, this));
|
||||
|
||||
m_echoSocket = socketFactory->CreateSocket ();
|
||||
m_echoSocket->Bind (InetSocketAddress (Ipv4Address::GetLoopback (), m_echoSendPort));
|
||||
m_echoSocket->SetRecvCallback (MakeCallback (&LoopbackTestCase::EchoData, this));
|
||||
|
||||
m_txSocket = socketFactory->CreateSocket ();
|
||||
|
||||
Simulator::ScheduleWithContext (m_txSocket->GetNode ()->GetId (), Seconds (1.0),
|
||||
&LoopbackTestCase::SendData, this, m_txSocket);
|
||||
|
||||
// Run
|
||||
Simulator::Stop (Seconds (5));
|
||||
Simulator::Run ();
|
||||
|
||||
m_txSocket->Close ();
|
||||
m_echoSocket->Close ();
|
||||
m_rxSocket->Close ();
|
||||
|
||||
Simulator::Destroy ();
|
||||
|
||||
// Check that 4 packets delivered
|
||||
NS_TEST_ASSERT_MSG_EQ (g_count, 4, "Exactly 4 ping replies must be delivered.");
|
||||
NS_TEST_ASSERT_MSG_EQ (m_count, 4, "Exactly 4 echo replies must be delivered.");
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Test suite
|
||||
//-----------------------------------------------------------------------------
|
||||
class AodvLoopbackTestSuite : public TestSuite
|
||||
{
|
||||
public:
|
||||
AodvLoopbackTestSuite () : TestSuite ("routing-aodv-loopback", SYSTEM)
|
||||
{
|
||||
SetDataDir (NS_TEST_SOURCEDIR);
|
||||
// UDP Echo loopback test case
|
||||
AddTestCase (new LoopbackTestCase (), TestCase::QUICK);
|
||||
}
|
||||
} g_aodvLoopbackTestSuite;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
-1
@@ -1,7 +1,7 @@
|
||||
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
|
||||
|
||||
def build(bld):
|
||||
module = bld.create_ns3_module('aodv', ['internet', 'wifi', 'applications'])
|
||||
module = bld.create_ns3_module('aodv', ['internet', 'wifi'])
|
||||
module.includes = '.'
|
||||
module.source = [
|
||||
'model/aodv-id-cache.cc',
|
||||
|
||||
@@ -110,6 +110,8 @@ def register_types(module):
|
||||
module.add_class('NodeContainer', import_from_module='ns.network')
|
||||
## node-list.h (module 'network'): ns3::NodeList [class]
|
||||
module.add_class('NodeList', import_from_module='ns.network')
|
||||
## non-copyable.h (module 'core'): ns3::NonCopyable [class]
|
||||
module.add_class('NonCopyable', destructor_visibility='protected', import_from_module='ns.core')
|
||||
## object-base.h (module 'core'): ns3::ObjectBase [class]
|
||||
module.add_class('ObjectBase', allow_subclassing=True, import_from_module='ns.core')
|
||||
## object.h (module 'core'): ns3::ObjectDeleter [struct]
|
||||
@@ -155,7 +157,7 @@ def register_types(module):
|
||||
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
|
||||
module.add_class('PcapHelper', import_from_module='ns.network')
|
||||
## trace-helper.h (module 'network'): ns3::PcapHelper [enumeration]
|
||||
module.add_enum('', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_RAW', 'DLT_IEEE802_11', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO', 'DLT_IEEE802_15_4'], outer_class=root_module['ns3::PcapHelper'], import_from_module='ns.network')
|
||||
module.add_enum('', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_RAW', 'DLT_IEEE802_11', 'DLT_LINUX_SSL', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO', 'DLT_IEEE802_15_4', 'DLT_NETLINK'], outer_class=root_module['ns3::PcapHelper'], import_from_module='ns.network')
|
||||
## trace-helper.h (module 'network'): ns3::PcapHelperForDevice [class]
|
||||
module.add_class('PcapHelperForDevice', allow_subclassing=True, import_from_module='ns.network')
|
||||
## ping6-helper.h (module 'applications'): ns3::Ping6Helper [class]
|
||||
@@ -234,6 +236,12 @@ def register_types(module):
|
||||
module.add_enum('', ['FRAME_FLAG_NONE', 'FRAME_FLAG_CFP', 'FRAME_FLAG_SHORT_PREAMBLE', 'FRAME_FLAG_WEP', 'FRAME_FLAG_FRAGMENTED', 'FRAME_FLAG_FCS_INCLUDED', 'FRAME_FLAG_DATA_PADDING', 'FRAME_FLAG_BAD_FCS', 'FRAME_FLAG_SHORT_GUARD'], outer_class=root_module['ns3::RadiotapHeader'], import_from_module='ns.network')
|
||||
## radiotap-header.h (module 'network'): ns3::RadiotapHeader [enumeration]
|
||||
module.add_enum('', ['CHANNEL_FLAG_NONE', 'CHANNEL_FLAG_TURBO', 'CHANNEL_FLAG_CCK', 'CHANNEL_FLAG_OFDM', 'CHANNEL_FLAG_SPECTRUM_2GHZ', 'CHANNEL_FLAG_SPECTRUM_5GHZ', 'CHANNEL_FLAG_PASSIVE', 'CHANNEL_FLAG_DYNAMIC', 'CHANNEL_FLAG_GFSK'], outer_class=root_module['ns3::RadiotapHeader'], import_from_module='ns.network')
|
||||
## radiotap-header.h (module 'network'): ns3::RadiotapHeader [enumeration]
|
||||
module.add_enum('', ['MCS_KNOWN_NONE', 'MCS_KNOWN_BANDWIDTH', 'MCS_KNOWN_INDEX', 'MCS_KNOWN_GUARD_INTERVAL', 'MCS_KNOWN_HT_FORMAT', 'MCS_KNOWN_FEC_TYPE', 'MCS_KNOWN_STBC', 'MCS_KNOWN_NESS', 'MCS_KNOWN_NESS_BIT_1'], outer_class=root_module['ns3::RadiotapHeader'], import_from_module='ns.network')
|
||||
## radiotap-header.h (module 'network'): ns3::RadiotapHeader [enumeration]
|
||||
module.add_enum('', ['MCS_FLAGS_NONE', 'MCS_FLAGS_BANDWIDTH_40', 'MCS_FLAGS_BANDWIDTH_20L', 'MCS_FLAGS_BANDWIDTH_20U', 'MCS_FLAGS_GUARD_INTERVAL', 'MCS_FLAGS_HT_GREENFIELD', 'MCS_FLAGS_FEC_TYPE', 'MCS_FLAGS_STBC_STREAMS', 'MCS_FLAGS_NESS_BIT_0'], outer_class=root_module['ns3::RadiotapHeader'], import_from_module='ns.network')
|
||||
## radiotap-header.h (module 'network'): ns3::RadiotapHeader [enumeration]
|
||||
module.add_enum('', ['A_MPDU_STATUS_NONE', 'A_MPDU_STATUS_REPORT_ZERO_LENGTH', 'A_MPDU_STATUS_IS_ZERO_LENGTH', 'A_MPDU_STATUS_LAST_KNOWN', 'A_MPDU_STATUS_LAST', 'A_MPDU_STATUS_DELIMITER_CRC_ERROR', 'A_MPDU_STATUS_DELIMITER_CRC_KNOWN'], outer_class=root_module['ns3::RadiotapHeader'], import_from_module='ns.network')
|
||||
## random-variable-stream.h (module 'core'): ns3::RandomVariableStream [class]
|
||||
module.add_class('RandomVariableStream', import_from_module='ns.core', parent=root_module['ns3::Object'])
|
||||
## red-queue.h (module 'network'): ns3::RedQueue [class]
|
||||
@@ -659,6 +667,7 @@ def register_methods(root_module):
|
||||
register_Ns3NetDeviceContainer_methods(root_module, root_module['ns3::NetDeviceContainer'])
|
||||
register_Ns3NodeContainer_methods(root_module, root_module['ns3::NodeContainer'])
|
||||
register_Ns3NodeList_methods(root_module, root_module['ns3::NodeList'])
|
||||
register_Ns3NonCopyable_methods(root_module, root_module['ns3::NonCopyable'])
|
||||
register_Ns3ObjectBase_methods(root_module, root_module['ns3::ObjectBase'])
|
||||
register_Ns3ObjectDeleter_methods(root_module, root_module['ns3::ObjectDeleter'])
|
||||
register_Ns3ObjectFactory_methods(root_module, root_module['ns3::ObjectFactory'])
|
||||
@@ -1242,17 +1251,17 @@ def register_Ns3Buffer_methods(root_module, cls):
|
||||
cls.add_constructor([param('uint32_t', 'dataSize'), param('bool', 'initialize')])
|
||||
## buffer.h (module 'network'): ns3::Buffer::Buffer(ns3::Buffer const & o) [copy constructor]
|
||||
cls.add_constructor([param('ns3::Buffer const &', 'o')])
|
||||
## buffer.h (module 'network'): bool ns3::Buffer::AddAtEnd(uint32_t end) [member function]
|
||||
## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(uint32_t end) [member function]
|
||||
cls.add_method('AddAtEnd',
|
||||
'bool',
|
||||
'void',
|
||||
[param('uint32_t', 'end')])
|
||||
## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(ns3::Buffer const & o) [member function]
|
||||
cls.add_method('AddAtEnd',
|
||||
'void',
|
||||
[param('ns3::Buffer const &', 'o')])
|
||||
## buffer.h (module 'network'): bool ns3::Buffer::AddAtStart(uint32_t start) [member function]
|
||||
## buffer.h (module 'network'): void ns3::Buffer::AddAtStart(uint32_t start) [member function]
|
||||
cls.add_method('AddAtStart',
|
||||
'bool',
|
||||
'void',
|
||||
[param('uint32_t', 'start')])
|
||||
## buffer.h (module 'network'): ns3::Buffer::Iterator ns3::Buffer::Begin() const [member function]
|
||||
cls.add_method('Begin',
|
||||
@@ -1274,11 +1283,6 @@ def register_Ns3Buffer_methods(root_module, cls):
|
||||
'ns3::Buffer',
|
||||
[param('uint32_t', 'start'), param('uint32_t', 'length')],
|
||||
is_const=True)
|
||||
## buffer.h (module 'network'): ns3::Buffer ns3::Buffer::CreateFullCopy() const [member function]
|
||||
cls.add_method('CreateFullCopy',
|
||||
'ns3::Buffer',
|
||||
[],
|
||||
is_const=True)
|
||||
## buffer.h (module 'network'): uint32_t ns3::Buffer::Deserialize(uint8_t const * buffer, uint32_t size) [member function]
|
||||
cls.add_method('Deserialize',
|
||||
'uint32_t',
|
||||
@@ -1288,16 +1292,6 @@ def register_Ns3Buffer_methods(root_module, cls):
|
||||
'ns3::Buffer::Iterator',
|
||||
[],
|
||||
is_const=True)
|
||||
## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentEndOffset() const [member function]
|
||||
cls.add_method('GetCurrentEndOffset',
|
||||
'int32_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentStartOffset() const [member function]
|
||||
cls.add_method('GetCurrentStartOffset',
|
||||
'int32_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## buffer.h (module 'network'): uint32_t ns3::Buffer::GetSerializedSize() const [member function]
|
||||
cls.add_method('GetSerializedSize',
|
||||
'uint32_t',
|
||||
@@ -1561,14 +1555,18 @@ def register_Ns3ByteTagList_methods(root_module, cls):
|
||||
cls.add_method('Add',
|
||||
'void',
|
||||
[param('ns3::ByteTagList const &', 'o')])
|
||||
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtEnd(int32_t adjustment, int32_t appendOffset) [member function]
|
||||
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtEnd(int32_t appendOffset) [member function]
|
||||
cls.add_method('AddAtEnd',
|
||||
'void',
|
||||
[param('int32_t', 'adjustment'), param('int32_t', 'appendOffset')])
|
||||
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t adjustment, int32_t prependOffset) [member function]
|
||||
[param('int32_t', 'appendOffset')])
|
||||
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t prependOffset) [member function]
|
||||
cls.add_method('AddAtStart',
|
||||
'void',
|
||||
[param('int32_t', 'adjustment'), param('int32_t', 'prependOffset')])
|
||||
[param('int32_t', 'prependOffset')])
|
||||
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::Adjust(int32_t adjustment) [member function]
|
||||
cls.add_method('Adjust',
|
||||
'void',
|
||||
[param('int32_t', 'adjustment')])
|
||||
## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator ns3::ByteTagList::Begin(int32_t offsetStart, int32_t offsetEnd) const [member function]
|
||||
cls.add_method('Begin',
|
||||
'ns3::ByteTagList::Iterator',
|
||||
@@ -1721,11 +1719,21 @@ def register_Ns3DataRate_methods(root_module, cls):
|
||||
cls.add_constructor([param('uint64_t', 'bps')])
|
||||
## data-rate.h (module 'network'): ns3::DataRate::DataRate(std::string rate) [constructor]
|
||||
cls.add_constructor([param('std::string', 'rate')])
|
||||
## data-rate.h (module 'network'): ns3::Time ns3::DataRate::CalculateBitsTxTime(uint32_t bits) const [member function]
|
||||
cls.add_method('CalculateBitsTxTime',
|
||||
'ns3::Time',
|
||||
[param('uint32_t', 'bits')],
|
||||
is_const=True)
|
||||
## data-rate.h (module 'network'): ns3::Time ns3::DataRate::CalculateBytesTxTime(uint32_t bytes) const [member function]
|
||||
cls.add_method('CalculateBytesTxTime',
|
||||
'ns3::Time',
|
||||
[param('uint32_t', 'bytes')],
|
||||
is_const=True)
|
||||
## data-rate.h (module 'network'): double ns3::DataRate::CalculateTxTime(uint32_t bytes) const [member function]
|
||||
cls.add_method('CalculateTxTime',
|
||||
'double',
|
||||
[param('uint32_t', 'bytes')],
|
||||
is_const=True)
|
||||
deprecated=True, is_const=True)
|
||||
## data-rate.h (module 'network'): uint64_t ns3::DataRate::GetBitRate() const [member function]
|
||||
cls.add_method('GetBitRate',
|
||||
'uint64_t',
|
||||
@@ -2634,6 +2642,12 @@ def register_Ns3NodeList_methods(root_module, cls):
|
||||
is_static=True)
|
||||
return
|
||||
|
||||
def register_Ns3NonCopyable_methods(root_module, cls):
|
||||
## non-copyable.h (module 'core'): ns3::NonCopyable::NonCopyable() [constructor]
|
||||
cls.add_constructor([],
|
||||
visibility='protected')
|
||||
return
|
||||
|
||||
def register_Ns3ObjectBase_methods(root_module, cls):
|
||||
## object-base.h (module 'core'): ns3::ObjectBase::ObjectBase() [constructor]
|
||||
cls.add_constructor([])
|
||||
@@ -3311,10 +3325,10 @@ def register_Ns3PcapFile_methods(root_module, cls):
|
||||
cls.add_method('Close',
|
||||
'void',
|
||||
[])
|
||||
## pcap-file.h (module 'network'): static bool ns3::PcapFile::Diff(std::string const & f1, std::string const & f2, uint32_t & sec, uint32_t & usec, uint32_t snapLen=ns3::PcapFile::SNAPLEN_DEFAULT) [member function]
|
||||
## pcap-file.h (module 'network'): static bool ns3::PcapFile::Diff(std::string const & f1, std::string const & f2, uint32_t & sec, uint32_t & usec, uint32_t & packets, uint32_t snapLen=ns3::PcapFile::SNAPLEN_DEFAULT) [member function]
|
||||
cls.add_method('Diff',
|
||||
'bool',
|
||||
[param('std::string const &', 'f1'), param('std::string const &', 'f2'), param('uint32_t &', 'sec'), param('uint32_t &', 'usec'), param('uint32_t', 'snapLen', default_value='ns3::PcapFile::SNAPLEN_DEFAULT')],
|
||||
[param('std::string const &', 'f1'), param('std::string const &', 'f2'), param('uint32_t &', 'sec'), param('uint32_t &', 'usec'), param('uint32_t &', 'packets'), param('uint32_t', 'snapLen', default_value='ns3::PcapFile::SNAPLEN_DEFAULT')],
|
||||
is_static=True)
|
||||
## pcap-file.h (module 'network'): bool ns3::PcapFile::Eof() const [member function]
|
||||
cls.add_method('Eof',
|
||||
@@ -3378,10 +3392,10 @@ def register_Ns3PcapFile_methods(root_module, cls):
|
||||
cls.add_method('Write',
|
||||
'void',
|
||||
[param('uint32_t', 'tsSec'), param('uint32_t', 'tsUsec'), param('ns3::Ptr< ns3::Packet const >', 'p')])
|
||||
## pcap-file.h (module 'network'): void ns3::PcapFile::Write(uint32_t tsSec, uint32_t tsUsec, ns3::Header & header, ns3::Ptr<ns3::Packet const> p) [member function]
|
||||
## pcap-file.h (module 'network'): void ns3::PcapFile::Write(uint32_t tsSec, uint32_t tsUsec, ns3::Header const & header, ns3::Ptr<ns3::Packet const> p) [member function]
|
||||
cls.add_method('Write',
|
||||
'void',
|
||||
[param('uint32_t', 'tsSec'), param('uint32_t', 'tsUsec'), param('ns3::Header &', 'header'), param('ns3::Ptr< ns3::Packet const >', 'p')])
|
||||
[param('uint32_t', 'tsSec'), param('uint32_t', 'tsUsec'), param('ns3::Header const &', 'header'), param('ns3::Ptr< ns3::Packet const >', 'p')])
|
||||
## pcap-file.h (module 'network'): ns3::PcapFile::SNAPLEN_DEFAULT [variable]
|
||||
cls.add_static_attribute('SNAPLEN_DEFAULT', 'uint32_t const', is_const=True)
|
||||
## pcap-file.h (module 'network'): ns3::PcapFile::ZONE_DEFAULT [variable]
|
||||
@@ -3641,10 +3655,10 @@ def register_Ns3Simulator_methods(root_module, cls):
|
||||
'void',
|
||||
[],
|
||||
is_static=True)
|
||||
## simulator.h (module 'core'): static void ns3::Simulator::Stop(ns3::Time const & time) [member function]
|
||||
## simulator.h (module 'core'): static void ns3::Simulator::Stop(ns3::Time const & delay) [member function]
|
||||
cls.add_method('Stop',
|
||||
'void',
|
||||
[param('ns3::Time const &', 'time')],
|
||||
[param('ns3::Time const &', 'delay')],
|
||||
is_static=True)
|
||||
return
|
||||
|
||||
@@ -3987,6 +4001,11 @@ def register_Ns3TypeId_methods(root_module, cls):
|
||||
cls.add_method('SetParent',
|
||||
'ns3::TypeId',
|
||||
[param('ns3::TypeId', 'tid')])
|
||||
## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetParent() [member function]
|
||||
cls.add_method('SetParent',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
template_parameters=['ns3::Object'])
|
||||
## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetSize(std::size_t size) [member function]
|
||||
cls.add_method('SetSize',
|
||||
'ns3::TypeId',
|
||||
@@ -4673,10 +4692,10 @@ def register_Ns3PcapFileWrapper_methods(root_module, cls):
|
||||
cls.add_method('Write',
|
||||
'void',
|
||||
[param('ns3::Time', 't'), param('ns3::Ptr< ns3::Packet const >', 'p')])
|
||||
## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Write(ns3::Time t, ns3::Header & header, ns3::Ptr<ns3::Packet const> p) [member function]
|
||||
## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Write(ns3::Time t, ns3::Header const & header, ns3::Ptr<ns3::Packet const> p) [member function]
|
||||
cls.add_method('Write',
|
||||
'void',
|
||||
[param('ns3::Time', 't'), param('ns3::Header &', 'header'), param('ns3::Ptr< ns3::Packet const >', 'p')])
|
||||
[param('ns3::Time', 't'), param('ns3::Header const &', 'header'), param('ns3::Ptr< ns3::Packet const >', 'p')])
|
||||
## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Write(ns3::Time t, uint8_t const * buffer, uint32_t length) [member function]
|
||||
cls.add_method('Write',
|
||||
'void',
|
||||
@@ -4809,6 +4828,16 @@ def register_Ns3RadiotapHeader_methods(root_module, cls):
|
||||
'uint32_t',
|
||||
[param('ns3::Buffer::Iterator', 'start')],
|
||||
is_virtual=True)
|
||||
## radiotap-header.h (module 'network'): uint16_t ns3::RadiotapHeader::GetAmpduStatusFlags() const [member function]
|
||||
cls.add_method('GetAmpduStatusFlags',
|
||||
'uint16_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## radiotap-header.h (module 'network'): uint32_t ns3::RadiotapHeader::GetAmpduStatusRef() const [member function]
|
||||
cls.add_method('GetAmpduStatusRef',
|
||||
'uint32_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## radiotap-header.h (module 'network'): uint8_t ns3::RadiotapHeader::GetAntennaNoisePower() const [member function]
|
||||
cls.add_method('GetAntennaNoisePower',
|
||||
'uint8_t',
|
||||
@@ -4839,6 +4868,21 @@ def register_Ns3RadiotapHeader_methods(root_module, cls):
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## radiotap-header.h (module 'network'): uint8_t ns3::RadiotapHeader::GetMcsFlags() const [member function]
|
||||
cls.add_method('GetMcsFlags',
|
||||
'uint8_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## radiotap-header.h (module 'network'): uint8_t ns3::RadiotapHeader::GetMcsKnown() const [member function]
|
||||
cls.add_method('GetMcsKnown',
|
||||
'uint8_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## radiotap-header.h (module 'network'): uint8_t ns3::RadiotapHeader::GetMcsRate() const [member function]
|
||||
cls.add_method('GetMcsRate',
|
||||
'uint8_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## radiotap-header.h (module 'network'): uint8_t ns3::RadiotapHeader::GetRate() const [member function]
|
||||
cls.add_method('GetRate',
|
||||
'uint8_t',
|
||||
@@ -4869,6 +4913,10 @@ def register_Ns3RadiotapHeader_methods(root_module, cls):
|
||||
'void',
|
||||
[param('ns3::Buffer::Iterator', 'start')],
|
||||
is_const=True, is_virtual=True)
|
||||
## radiotap-header.h (module 'network'): void ns3::RadiotapHeader::SetAmpduStatus(uint32_t referenceNumber, uint16_t flags, uint8_t crc) [member function]
|
||||
cls.add_method('SetAmpduStatus',
|
||||
'void',
|
||||
[param('uint32_t', 'referenceNumber'), param('uint16_t', 'flags'), param('uint8_t', 'crc')])
|
||||
## radiotap-header.h (module 'network'): void ns3::RadiotapHeader::SetAntennaNoisePower(double noise) [member function]
|
||||
cls.add_method('SetAntennaNoisePower',
|
||||
'void',
|
||||
@@ -4885,6 +4933,10 @@ def register_Ns3RadiotapHeader_methods(root_module, cls):
|
||||
cls.add_method('SetFrameFlags',
|
||||
'void',
|
||||
[param('uint8_t', 'flags')])
|
||||
## radiotap-header.h (module 'network'): void ns3::RadiotapHeader::SetMcsFields(uint8_t known, uint8_t flags, uint8_t mcs) [member function]
|
||||
cls.add_method('SetMcsFields',
|
||||
'void',
|
||||
[param('uint8_t', 'known'), param('uint8_t', 'flags'), param('uint8_t', 'mcs')])
|
||||
## radiotap-header.h (module 'network'): void ns3::RadiotapHeader::SetRate(uint8_t rate) [member function]
|
||||
cls.add_method('SetRate',
|
||||
'void',
|
||||
@@ -6722,6 +6774,11 @@ def register_Ns3DataCalculator_methods(root_module, cls):
|
||||
'std::string',
|
||||
[],
|
||||
is_const=True)
|
||||
## data-calculator.h (module 'stats'): static ns3::TypeId ns3::DataCalculator::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## data-calculator.h (module 'stats'): void ns3::DataCalculator::Output(ns3::DataOutputCallback & callback) const [member function]
|
||||
cls.add_method('Output',
|
||||
'void',
|
||||
@@ -6796,6 +6853,11 @@ def register_Ns3DataOutputInterface_methods(root_module, cls):
|
||||
'std::string',
|
||||
[],
|
||||
is_const=True)
|
||||
## data-output-interface.h (module 'stats'): static ns3::TypeId ns3::DataOutputInterface::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## data-output-interface.h (module 'stats'): void ns3::DataOutputInterface::Output(ns3::DataCollector & dc) [member function]
|
||||
cls.add_method('Output',
|
||||
'void',
|
||||
@@ -6914,10 +6976,11 @@ def register_Ns3DropTailQueue_methods(root_module, cls):
|
||||
cls.add_constructor([param('ns3::DropTailQueue const &', 'arg0')])
|
||||
## drop-tail-queue.h (module 'network'): ns3::DropTailQueue::DropTailQueue() [constructor]
|
||||
cls.add_constructor([])
|
||||
## drop-tail-queue.h (module 'network'): ns3::Queue::QueueMode ns3::DropTailQueue::GetMode() [member function]
|
||||
## drop-tail-queue.h (module 'network'): ns3::Queue::QueueMode ns3::DropTailQueue::GetMode() const [member function]
|
||||
cls.add_method('GetMode',
|
||||
'ns3::Queue::QueueMode',
|
||||
[])
|
||||
[],
|
||||
is_const=True)
|
||||
## drop-tail-queue.h (module 'network'): static ns3::TypeId ns3::DropTailQueue::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
@@ -6966,10 +7029,10 @@ def register_Ns3EmpiricalRandomVariable_methods(root_module, cls):
|
||||
'double',
|
||||
[],
|
||||
is_virtual=True)
|
||||
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double arg0, double arg1, double arg2, double arg3, double arg4) [member function]
|
||||
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double c1, double c2, double v1, double v2, double r) [member function]
|
||||
cls.add_method('Interpolate',
|
||||
'double',
|
||||
[param('double', 'arg0'), param('double', 'arg1'), param('double', 'arg2'), param('double', 'arg3'), param('double', 'arg4')],
|
||||
[param('double', 'c1'), param('double', 'c2'), param('double', 'v1'), param('double', 'v2'), param('double', 'r')],
|
||||
visibility='private', is_virtual=True)
|
||||
## random-variable-stream.h (module 'core'): void ns3::EmpiricalRandomVariable::Validate() [member function]
|
||||
cls.add_method('Validate',
|
||||
@@ -7794,6 +7857,11 @@ def register_Ns3MinMaxAvgTotalCalculator__Double_methods(root_module, cls):
|
||||
cls.add_constructor([param('ns3::MinMaxAvgTotalCalculator< double > const &', 'arg0')])
|
||||
## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<double>::MinMaxAvgTotalCalculator() [constructor]
|
||||
cls.add_constructor([])
|
||||
## basic-data-calculators.h (module 'stats'): static ns3::TypeId ns3::MinMaxAvgTotalCalculator<double>::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator<double>::Output(ns3::DataOutputCallback & callback) const [member function]
|
||||
cls.add_method('Output',
|
||||
'void',
|
||||
@@ -7859,6 +7927,11 @@ def register_Ns3MinMaxAvgTotalCalculator__Unsigned_int_methods(root_module, cls)
|
||||
cls.add_constructor([param('ns3::MinMaxAvgTotalCalculator< unsigned int > const &', 'arg0')])
|
||||
## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<unsigned int>::MinMaxAvgTotalCalculator() [constructor]
|
||||
cls.add_constructor([])
|
||||
## basic-data-calculators.h (module 'stats'): static ns3::TypeId ns3::MinMaxAvgTotalCalculator<unsigned int>::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator<unsigned int>::Output(ns3::DataOutputCallback & callback) const [member function]
|
||||
cls.add_method('Output',
|
||||
'void',
|
||||
@@ -8552,6 +8625,11 @@ def register_Ns3PacketSizeMinMaxAvgTotalCalculator_methods(root_module, cls):
|
||||
cls.add_method('FrameUpdate',
|
||||
'void',
|
||||
[param('std::string', 'path'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'realto')])
|
||||
## packet-data-calculators.h (module 'network'): static ns3::TypeId ns3::PacketSizeMinMaxAvgTotalCalculator::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## packet-data-calculators.h (module 'network'): void ns3::PacketSizeMinMaxAvgTotalCalculator::PacketUpdate(std::string path, ns3::Ptr<ns3::Packet const> packet) [member function]
|
||||
cls.add_method('PacketUpdate',
|
||||
'void',
|
||||
@@ -10284,6 +10362,11 @@ def register_Ns3SimpleChannel_methods(root_module, cls):
|
||||
'void',
|
||||
[param('ns3::Ptr< ns3::SimpleNetDevice >', 'device')],
|
||||
is_virtual=True)
|
||||
## simple-channel.h (module 'network'): void ns3::SimpleChannel::BlackList(ns3::Ptr<ns3::SimpleNetDevice> from, ns3::Ptr<ns3::SimpleNetDevice> to) [member function]
|
||||
cls.add_method('BlackList',
|
||||
'void',
|
||||
[param('ns3::Ptr< ns3::SimpleNetDevice >', 'from'), param('ns3::Ptr< ns3::SimpleNetDevice >', 'to')],
|
||||
is_virtual=True)
|
||||
## simple-channel.h (module 'network'): ns3::Ptr<ns3::NetDevice> ns3::SimpleChannel::GetDevice(uint32_t i) const [member function]
|
||||
cls.add_method('GetDevice',
|
||||
'ns3::Ptr< ns3::NetDevice >',
|
||||
@@ -10304,6 +10387,11 @@ def register_Ns3SimpleChannel_methods(root_module, cls):
|
||||
'void',
|
||||
[param('ns3::Ptr< ns3::Packet >', 'p'), param('uint16_t', 'protocol'), param('ns3::Mac48Address', 'to'), param('ns3::Mac48Address', 'from'), param('ns3::Ptr< ns3::SimpleNetDevice >', 'sender')],
|
||||
is_virtual=True)
|
||||
## simple-channel.h (module 'network'): void ns3::SimpleChannel::UnBlackList(ns3::Ptr<ns3::SimpleNetDevice> from, ns3::Ptr<ns3::SimpleNetDevice> to) [member function]
|
||||
cls.add_method('UnBlackList',
|
||||
'void',
|
||||
[param('ns3::Ptr< ns3::SimpleNetDevice >', 'from'), param('ns3::Ptr< ns3::SimpleNetDevice >', 'to')],
|
||||
is_virtual=True)
|
||||
return
|
||||
|
||||
def register_Ns3SimpleNetDevice_methods(root_module, cls):
|
||||
@@ -10946,6 +11034,11 @@ def register_Ns3CounterCalculator__Unsigned_int_methods(root_module, cls):
|
||||
'unsigned int',
|
||||
[],
|
||||
is_const=True)
|
||||
## basic-data-calculators.h (module 'stats'): static ns3::TypeId ns3::CounterCalculator<unsigned int>::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## basic-data-calculators.h (module 'stats'): void ns3::CounterCalculator<unsigned int>::Output(ns3::DataOutputCallback & callback) const [member function]
|
||||
cls.add_method('Output',
|
||||
'void',
|
||||
@@ -10975,6 +11068,11 @@ def register_Ns3PacketCounterCalculator_methods(root_module, cls):
|
||||
cls.add_method('FrameUpdate',
|
||||
'void',
|
||||
[param('std::string', 'path'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'realto')])
|
||||
## packet-data-calculators.h (module 'network'): static ns3::TypeId ns3::PacketCounterCalculator::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## packet-data-calculators.h (module 'network'): void ns3::PacketCounterCalculator::PacketUpdate(std::string path, ns3::Ptr<ns3::Packet const> packet) [member function]
|
||||
cls.add_method('PacketUpdate',
|
||||
'void',
|
||||
|
||||
@@ -110,6 +110,8 @@ def register_types(module):
|
||||
module.add_class('NodeContainer', import_from_module='ns.network')
|
||||
## node-list.h (module 'network'): ns3::NodeList [class]
|
||||
module.add_class('NodeList', import_from_module='ns.network')
|
||||
## non-copyable.h (module 'core'): ns3::NonCopyable [class]
|
||||
module.add_class('NonCopyable', destructor_visibility='protected', import_from_module='ns.core')
|
||||
## object-base.h (module 'core'): ns3::ObjectBase [class]
|
||||
module.add_class('ObjectBase', allow_subclassing=True, import_from_module='ns.core')
|
||||
## object.h (module 'core'): ns3::ObjectDeleter [struct]
|
||||
@@ -155,7 +157,7 @@ def register_types(module):
|
||||
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
|
||||
module.add_class('PcapHelper', import_from_module='ns.network')
|
||||
## trace-helper.h (module 'network'): ns3::PcapHelper [enumeration]
|
||||
module.add_enum('', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_RAW', 'DLT_IEEE802_11', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO', 'DLT_IEEE802_15_4'], outer_class=root_module['ns3::PcapHelper'], import_from_module='ns.network')
|
||||
module.add_enum('', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_RAW', 'DLT_IEEE802_11', 'DLT_LINUX_SSL', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO', 'DLT_IEEE802_15_4', 'DLT_NETLINK'], outer_class=root_module['ns3::PcapHelper'], import_from_module='ns.network')
|
||||
## trace-helper.h (module 'network'): ns3::PcapHelperForDevice [class]
|
||||
module.add_class('PcapHelperForDevice', allow_subclassing=True, import_from_module='ns.network')
|
||||
## ping6-helper.h (module 'applications'): ns3::Ping6Helper [class]
|
||||
@@ -234,6 +236,12 @@ def register_types(module):
|
||||
module.add_enum('', ['FRAME_FLAG_NONE', 'FRAME_FLAG_CFP', 'FRAME_FLAG_SHORT_PREAMBLE', 'FRAME_FLAG_WEP', 'FRAME_FLAG_FRAGMENTED', 'FRAME_FLAG_FCS_INCLUDED', 'FRAME_FLAG_DATA_PADDING', 'FRAME_FLAG_BAD_FCS', 'FRAME_FLAG_SHORT_GUARD'], outer_class=root_module['ns3::RadiotapHeader'], import_from_module='ns.network')
|
||||
## radiotap-header.h (module 'network'): ns3::RadiotapHeader [enumeration]
|
||||
module.add_enum('', ['CHANNEL_FLAG_NONE', 'CHANNEL_FLAG_TURBO', 'CHANNEL_FLAG_CCK', 'CHANNEL_FLAG_OFDM', 'CHANNEL_FLAG_SPECTRUM_2GHZ', 'CHANNEL_FLAG_SPECTRUM_5GHZ', 'CHANNEL_FLAG_PASSIVE', 'CHANNEL_FLAG_DYNAMIC', 'CHANNEL_FLAG_GFSK'], outer_class=root_module['ns3::RadiotapHeader'], import_from_module='ns.network')
|
||||
## radiotap-header.h (module 'network'): ns3::RadiotapHeader [enumeration]
|
||||
module.add_enum('', ['MCS_KNOWN_NONE', 'MCS_KNOWN_BANDWIDTH', 'MCS_KNOWN_INDEX', 'MCS_KNOWN_GUARD_INTERVAL', 'MCS_KNOWN_HT_FORMAT', 'MCS_KNOWN_FEC_TYPE', 'MCS_KNOWN_STBC', 'MCS_KNOWN_NESS', 'MCS_KNOWN_NESS_BIT_1'], outer_class=root_module['ns3::RadiotapHeader'], import_from_module='ns.network')
|
||||
## radiotap-header.h (module 'network'): ns3::RadiotapHeader [enumeration]
|
||||
module.add_enum('', ['MCS_FLAGS_NONE', 'MCS_FLAGS_BANDWIDTH_40', 'MCS_FLAGS_BANDWIDTH_20L', 'MCS_FLAGS_BANDWIDTH_20U', 'MCS_FLAGS_GUARD_INTERVAL', 'MCS_FLAGS_HT_GREENFIELD', 'MCS_FLAGS_FEC_TYPE', 'MCS_FLAGS_STBC_STREAMS', 'MCS_FLAGS_NESS_BIT_0'], outer_class=root_module['ns3::RadiotapHeader'], import_from_module='ns.network')
|
||||
## radiotap-header.h (module 'network'): ns3::RadiotapHeader [enumeration]
|
||||
module.add_enum('', ['A_MPDU_STATUS_NONE', 'A_MPDU_STATUS_REPORT_ZERO_LENGTH', 'A_MPDU_STATUS_IS_ZERO_LENGTH', 'A_MPDU_STATUS_LAST_KNOWN', 'A_MPDU_STATUS_LAST', 'A_MPDU_STATUS_DELIMITER_CRC_ERROR', 'A_MPDU_STATUS_DELIMITER_CRC_KNOWN'], outer_class=root_module['ns3::RadiotapHeader'], import_from_module='ns.network')
|
||||
## random-variable-stream.h (module 'core'): ns3::RandomVariableStream [class]
|
||||
module.add_class('RandomVariableStream', import_from_module='ns.core', parent=root_module['ns3::Object'])
|
||||
## red-queue.h (module 'network'): ns3::RedQueue [class]
|
||||
@@ -659,6 +667,7 @@ def register_methods(root_module):
|
||||
register_Ns3NetDeviceContainer_methods(root_module, root_module['ns3::NetDeviceContainer'])
|
||||
register_Ns3NodeContainer_methods(root_module, root_module['ns3::NodeContainer'])
|
||||
register_Ns3NodeList_methods(root_module, root_module['ns3::NodeList'])
|
||||
register_Ns3NonCopyable_methods(root_module, root_module['ns3::NonCopyable'])
|
||||
register_Ns3ObjectBase_methods(root_module, root_module['ns3::ObjectBase'])
|
||||
register_Ns3ObjectDeleter_methods(root_module, root_module['ns3::ObjectDeleter'])
|
||||
register_Ns3ObjectFactory_methods(root_module, root_module['ns3::ObjectFactory'])
|
||||
@@ -1242,17 +1251,17 @@ def register_Ns3Buffer_methods(root_module, cls):
|
||||
cls.add_constructor([param('uint32_t', 'dataSize'), param('bool', 'initialize')])
|
||||
## buffer.h (module 'network'): ns3::Buffer::Buffer(ns3::Buffer const & o) [copy constructor]
|
||||
cls.add_constructor([param('ns3::Buffer const &', 'o')])
|
||||
## buffer.h (module 'network'): bool ns3::Buffer::AddAtEnd(uint32_t end) [member function]
|
||||
## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(uint32_t end) [member function]
|
||||
cls.add_method('AddAtEnd',
|
||||
'bool',
|
||||
'void',
|
||||
[param('uint32_t', 'end')])
|
||||
## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(ns3::Buffer const & o) [member function]
|
||||
cls.add_method('AddAtEnd',
|
||||
'void',
|
||||
[param('ns3::Buffer const &', 'o')])
|
||||
## buffer.h (module 'network'): bool ns3::Buffer::AddAtStart(uint32_t start) [member function]
|
||||
## buffer.h (module 'network'): void ns3::Buffer::AddAtStart(uint32_t start) [member function]
|
||||
cls.add_method('AddAtStart',
|
||||
'bool',
|
||||
'void',
|
||||
[param('uint32_t', 'start')])
|
||||
## buffer.h (module 'network'): ns3::Buffer::Iterator ns3::Buffer::Begin() const [member function]
|
||||
cls.add_method('Begin',
|
||||
@@ -1274,11 +1283,6 @@ def register_Ns3Buffer_methods(root_module, cls):
|
||||
'ns3::Buffer',
|
||||
[param('uint32_t', 'start'), param('uint32_t', 'length')],
|
||||
is_const=True)
|
||||
## buffer.h (module 'network'): ns3::Buffer ns3::Buffer::CreateFullCopy() const [member function]
|
||||
cls.add_method('CreateFullCopy',
|
||||
'ns3::Buffer',
|
||||
[],
|
||||
is_const=True)
|
||||
## buffer.h (module 'network'): uint32_t ns3::Buffer::Deserialize(uint8_t const * buffer, uint32_t size) [member function]
|
||||
cls.add_method('Deserialize',
|
||||
'uint32_t',
|
||||
@@ -1288,16 +1292,6 @@ def register_Ns3Buffer_methods(root_module, cls):
|
||||
'ns3::Buffer::Iterator',
|
||||
[],
|
||||
is_const=True)
|
||||
## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentEndOffset() const [member function]
|
||||
cls.add_method('GetCurrentEndOffset',
|
||||
'int32_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentStartOffset() const [member function]
|
||||
cls.add_method('GetCurrentStartOffset',
|
||||
'int32_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## buffer.h (module 'network'): uint32_t ns3::Buffer::GetSerializedSize() const [member function]
|
||||
cls.add_method('GetSerializedSize',
|
||||
'uint32_t',
|
||||
@@ -1561,14 +1555,18 @@ def register_Ns3ByteTagList_methods(root_module, cls):
|
||||
cls.add_method('Add',
|
||||
'void',
|
||||
[param('ns3::ByteTagList const &', 'o')])
|
||||
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtEnd(int32_t adjustment, int32_t appendOffset) [member function]
|
||||
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtEnd(int32_t appendOffset) [member function]
|
||||
cls.add_method('AddAtEnd',
|
||||
'void',
|
||||
[param('int32_t', 'adjustment'), param('int32_t', 'appendOffset')])
|
||||
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t adjustment, int32_t prependOffset) [member function]
|
||||
[param('int32_t', 'appendOffset')])
|
||||
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t prependOffset) [member function]
|
||||
cls.add_method('AddAtStart',
|
||||
'void',
|
||||
[param('int32_t', 'adjustment'), param('int32_t', 'prependOffset')])
|
||||
[param('int32_t', 'prependOffset')])
|
||||
## byte-tag-list.h (module 'network'): void ns3::ByteTagList::Adjust(int32_t adjustment) [member function]
|
||||
cls.add_method('Adjust',
|
||||
'void',
|
||||
[param('int32_t', 'adjustment')])
|
||||
## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator ns3::ByteTagList::Begin(int32_t offsetStart, int32_t offsetEnd) const [member function]
|
||||
cls.add_method('Begin',
|
||||
'ns3::ByteTagList::Iterator',
|
||||
@@ -1721,11 +1719,21 @@ def register_Ns3DataRate_methods(root_module, cls):
|
||||
cls.add_constructor([param('uint64_t', 'bps')])
|
||||
## data-rate.h (module 'network'): ns3::DataRate::DataRate(std::string rate) [constructor]
|
||||
cls.add_constructor([param('std::string', 'rate')])
|
||||
## data-rate.h (module 'network'): ns3::Time ns3::DataRate::CalculateBitsTxTime(uint32_t bits) const [member function]
|
||||
cls.add_method('CalculateBitsTxTime',
|
||||
'ns3::Time',
|
||||
[param('uint32_t', 'bits')],
|
||||
is_const=True)
|
||||
## data-rate.h (module 'network'): ns3::Time ns3::DataRate::CalculateBytesTxTime(uint32_t bytes) const [member function]
|
||||
cls.add_method('CalculateBytesTxTime',
|
||||
'ns3::Time',
|
||||
[param('uint32_t', 'bytes')],
|
||||
is_const=True)
|
||||
## data-rate.h (module 'network'): double ns3::DataRate::CalculateTxTime(uint32_t bytes) const [member function]
|
||||
cls.add_method('CalculateTxTime',
|
||||
'double',
|
||||
[param('uint32_t', 'bytes')],
|
||||
is_const=True)
|
||||
deprecated=True, is_const=True)
|
||||
## data-rate.h (module 'network'): uint64_t ns3::DataRate::GetBitRate() const [member function]
|
||||
cls.add_method('GetBitRate',
|
||||
'uint64_t',
|
||||
@@ -2634,6 +2642,12 @@ def register_Ns3NodeList_methods(root_module, cls):
|
||||
is_static=True)
|
||||
return
|
||||
|
||||
def register_Ns3NonCopyable_methods(root_module, cls):
|
||||
## non-copyable.h (module 'core'): ns3::NonCopyable::NonCopyable() [constructor]
|
||||
cls.add_constructor([],
|
||||
visibility='protected')
|
||||
return
|
||||
|
||||
def register_Ns3ObjectBase_methods(root_module, cls):
|
||||
## object-base.h (module 'core'): ns3::ObjectBase::ObjectBase() [constructor]
|
||||
cls.add_constructor([])
|
||||
@@ -3311,10 +3325,10 @@ def register_Ns3PcapFile_methods(root_module, cls):
|
||||
cls.add_method('Close',
|
||||
'void',
|
||||
[])
|
||||
## pcap-file.h (module 'network'): static bool ns3::PcapFile::Diff(std::string const & f1, std::string const & f2, uint32_t & sec, uint32_t & usec, uint32_t snapLen=ns3::PcapFile::SNAPLEN_DEFAULT) [member function]
|
||||
## pcap-file.h (module 'network'): static bool ns3::PcapFile::Diff(std::string const & f1, std::string const & f2, uint32_t & sec, uint32_t & usec, uint32_t & packets, uint32_t snapLen=ns3::PcapFile::SNAPLEN_DEFAULT) [member function]
|
||||
cls.add_method('Diff',
|
||||
'bool',
|
||||
[param('std::string const &', 'f1'), param('std::string const &', 'f2'), param('uint32_t &', 'sec'), param('uint32_t &', 'usec'), param('uint32_t', 'snapLen', default_value='ns3::PcapFile::SNAPLEN_DEFAULT')],
|
||||
[param('std::string const &', 'f1'), param('std::string const &', 'f2'), param('uint32_t &', 'sec'), param('uint32_t &', 'usec'), param('uint32_t &', 'packets'), param('uint32_t', 'snapLen', default_value='ns3::PcapFile::SNAPLEN_DEFAULT')],
|
||||
is_static=True)
|
||||
## pcap-file.h (module 'network'): bool ns3::PcapFile::Eof() const [member function]
|
||||
cls.add_method('Eof',
|
||||
@@ -3378,10 +3392,10 @@ def register_Ns3PcapFile_methods(root_module, cls):
|
||||
cls.add_method('Write',
|
||||
'void',
|
||||
[param('uint32_t', 'tsSec'), param('uint32_t', 'tsUsec'), param('ns3::Ptr< ns3::Packet const >', 'p')])
|
||||
## pcap-file.h (module 'network'): void ns3::PcapFile::Write(uint32_t tsSec, uint32_t tsUsec, ns3::Header & header, ns3::Ptr<ns3::Packet const> p) [member function]
|
||||
## pcap-file.h (module 'network'): void ns3::PcapFile::Write(uint32_t tsSec, uint32_t tsUsec, ns3::Header const & header, ns3::Ptr<ns3::Packet const> p) [member function]
|
||||
cls.add_method('Write',
|
||||
'void',
|
||||
[param('uint32_t', 'tsSec'), param('uint32_t', 'tsUsec'), param('ns3::Header &', 'header'), param('ns3::Ptr< ns3::Packet const >', 'p')])
|
||||
[param('uint32_t', 'tsSec'), param('uint32_t', 'tsUsec'), param('ns3::Header const &', 'header'), param('ns3::Ptr< ns3::Packet const >', 'p')])
|
||||
## pcap-file.h (module 'network'): ns3::PcapFile::SNAPLEN_DEFAULT [variable]
|
||||
cls.add_static_attribute('SNAPLEN_DEFAULT', 'uint32_t const', is_const=True)
|
||||
## pcap-file.h (module 'network'): ns3::PcapFile::ZONE_DEFAULT [variable]
|
||||
@@ -3641,10 +3655,10 @@ def register_Ns3Simulator_methods(root_module, cls):
|
||||
'void',
|
||||
[],
|
||||
is_static=True)
|
||||
## simulator.h (module 'core'): static void ns3::Simulator::Stop(ns3::Time const & time) [member function]
|
||||
## simulator.h (module 'core'): static void ns3::Simulator::Stop(ns3::Time const & delay) [member function]
|
||||
cls.add_method('Stop',
|
||||
'void',
|
||||
[param('ns3::Time const &', 'time')],
|
||||
[param('ns3::Time const &', 'delay')],
|
||||
is_static=True)
|
||||
return
|
||||
|
||||
@@ -3987,6 +4001,11 @@ def register_Ns3TypeId_methods(root_module, cls):
|
||||
cls.add_method('SetParent',
|
||||
'ns3::TypeId',
|
||||
[param('ns3::TypeId', 'tid')])
|
||||
## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetParent() [member function]
|
||||
cls.add_method('SetParent',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
template_parameters=['ns3::Object'])
|
||||
## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetSize(std::size_t size) [member function]
|
||||
cls.add_method('SetSize',
|
||||
'ns3::TypeId',
|
||||
@@ -4673,10 +4692,10 @@ def register_Ns3PcapFileWrapper_methods(root_module, cls):
|
||||
cls.add_method('Write',
|
||||
'void',
|
||||
[param('ns3::Time', 't'), param('ns3::Ptr< ns3::Packet const >', 'p')])
|
||||
## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Write(ns3::Time t, ns3::Header & header, ns3::Ptr<ns3::Packet const> p) [member function]
|
||||
## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Write(ns3::Time t, ns3::Header const & header, ns3::Ptr<ns3::Packet const> p) [member function]
|
||||
cls.add_method('Write',
|
||||
'void',
|
||||
[param('ns3::Time', 't'), param('ns3::Header &', 'header'), param('ns3::Ptr< ns3::Packet const >', 'p')])
|
||||
[param('ns3::Time', 't'), param('ns3::Header const &', 'header'), param('ns3::Ptr< ns3::Packet const >', 'p')])
|
||||
## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Write(ns3::Time t, uint8_t const * buffer, uint32_t length) [member function]
|
||||
cls.add_method('Write',
|
||||
'void',
|
||||
@@ -4809,6 +4828,16 @@ def register_Ns3RadiotapHeader_methods(root_module, cls):
|
||||
'uint32_t',
|
||||
[param('ns3::Buffer::Iterator', 'start')],
|
||||
is_virtual=True)
|
||||
## radiotap-header.h (module 'network'): uint16_t ns3::RadiotapHeader::GetAmpduStatusFlags() const [member function]
|
||||
cls.add_method('GetAmpduStatusFlags',
|
||||
'uint16_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## radiotap-header.h (module 'network'): uint32_t ns3::RadiotapHeader::GetAmpduStatusRef() const [member function]
|
||||
cls.add_method('GetAmpduStatusRef',
|
||||
'uint32_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## radiotap-header.h (module 'network'): uint8_t ns3::RadiotapHeader::GetAntennaNoisePower() const [member function]
|
||||
cls.add_method('GetAntennaNoisePower',
|
||||
'uint8_t',
|
||||
@@ -4839,6 +4868,21 @@ def register_Ns3RadiotapHeader_methods(root_module, cls):
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_const=True, is_virtual=True)
|
||||
## radiotap-header.h (module 'network'): uint8_t ns3::RadiotapHeader::GetMcsFlags() const [member function]
|
||||
cls.add_method('GetMcsFlags',
|
||||
'uint8_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## radiotap-header.h (module 'network'): uint8_t ns3::RadiotapHeader::GetMcsKnown() const [member function]
|
||||
cls.add_method('GetMcsKnown',
|
||||
'uint8_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## radiotap-header.h (module 'network'): uint8_t ns3::RadiotapHeader::GetMcsRate() const [member function]
|
||||
cls.add_method('GetMcsRate',
|
||||
'uint8_t',
|
||||
[],
|
||||
is_const=True)
|
||||
## radiotap-header.h (module 'network'): uint8_t ns3::RadiotapHeader::GetRate() const [member function]
|
||||
cls.add_method('GetRate',
|
||||
'uint8_t',
|
||||
@@ -4869,6 +4913,10 @@ def register_Ns3RadiotapHeader_methods(root_module, cls):
|
||||
'void',
|
||||
[param('ns3::Buffer::Iterator', 'start')],
|
||||
is_const=True, is_virtual=True)
|
||||
## radiotap-header.h (module 'network'): void ns3::RadiotapHeader::SetAmpduStatus(uint32_t referenceNumber, uint16_t flags, uint8_t crc) [member function]
|
||||
cls.add_method('SetAmpduStatus',
|
||||
'void',
|
||||
[param('uint32_t', 'referenceNumber'), param('uint16_t', 'flags'), param('uint8_t', 'crc')])
|
||||
## radiotap-header.h (module 'network'): void ns3::RadiotapHeader::SetAntennaNoisePower(double noise) [member function]
|
||||
cls.add_method('SetAntennaNoisePower',
|
||||
'void',
|
||||
@@ -4885,6 +4933,10 @@ def register_Ns3RadiotapHeader_methods(root_module, cls):
|
||||
cls.add_method('SetFrameFlags',
|
||||
'void',
|
||||
[param('uint8_t', 'flags')])
|
||||
## radiotap-header.h (module 'network'): void ns3::RadiotapHeader::SetMcsFields(uint8_t known, uint8_t flags, uint8_t mcs) [member function]
|
||||
cls.add_method('SetMcsFields',
|
||||
'void',
|
||||
[param('uint8_t', 'known'), param('uint8_t', 'flags'), param('uint8_t', 'mcs')])
|
||||
## radiotap-header.h (module 'network'): void ns3::RadiotapHeader::SetRate(uint8_t rate) [member function]
|
||||
cls.add_method('SetRate',
|
||||
'void',
|
||||
@@ -6722,6 +6774,11 @@ def register_Ns3DataCalculator_methods(root_module, cls):
|
||||
'std::string',
|
||||
[],
|
||||
is_const=True)
|
||||
## data-calculator.h (module 'stats'): static ns3::TypeId ns3::DataCalculator::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## data-calculator.h (module 'stats'): void ns3::DataCalculator::Output(ns3::DataOutputCallback & callback) const [member function]
|
||||
cls.add_method('Output',
|
||||
'void',
|
||||
@@ -6796,6 +6853,11 @@ def register_Ns3DataOutputInterface_methods(root_module, cls):
|
||||
'std::string',
|
||||
[],
|
||||
is_const=True)
|
||||
## data-output-interface.h (module 'stats'): static ns3::TypeId ns3::DataOutputInterface::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## data-output-interface.h (module 'stats'): void ns3::DataOutputInterface::Output(ns3::DataCollector & dc) [member function]
|
||||
cls.add_method('Output',
|
||||
'void',
|
||||
@@ -6914,10 +6976,11 @@ def register_Ns3DropTailQueue_methods(root_module, cls):
|
||||
cls.add_constructor([param('ns3::DropTailQueue const &', 'arg0')])
|
||||
## drop-tail-queue.h (module 'network'): ns3::DropTailQueue::DropTailQueue() [constructor]
|
||||
cls.add_constructor([])
|
||||
## drop-tail-queue.h (module 'network'): ns3::Queue::QueueMode ns3::DropTailQueue::GetMode() [member function]
|
||||
## drop-tail-queue.h (module 'network'): ns3::Queue::QueueMode ns3::DropTailQueue::GetMode() const [member function]
|
||||
cls.add_method('GetMode',
|
||||
'ns3::Queue::QueueMode',
|
||||
[])
|
||||
[],
|
||||
is_const=True)
|
||||
## drop-tail-queue.h (module 'network'): static ns3::TypeId ns3::DropTailQueue::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
@@ -6966,10 +7029,10 @@ def register_Ns3EmpiricalRandomVariable_methods(root_module, cls):
|
||||
'double',
|
||||
[],
|
||||
is_virtual=True)
|
||||
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double arg0, double arg1, double arg2, double arg3, double arg4) [member function]
|
||||
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double c1, double c2, double v1, double v2, double r) [member function]
|
||||
cls.add_method('Interpolate',
|
||||
'double',
|
||||
[param('double', 'arg0'), param('double', 'arg1'), param('double', 'arg2'), param('double', 'arg3'), param('double', 'arg4')],
|
||||
[param('double', 'c1'), param('double', 'c2'), param('double', 'v1'), param('double', 'v2'), param('double', 'r')],
|
||||
visibility='private', is_virtual=True)
|
||||
## random-variable-stream.h (module 'core'): void ns3::EmpiricalRandomVariable::Validate() [member function]
|
||||
cls.add_method('Validate',
|
||||
@@ -7794,6 +7857,11 @@ def register_Ns3MinMaxAvgTotalCalculator__Double_methods(root_module, cls):
|
||||
cls.add_constructor([param('ns3::MinMaxAvgTotalCalculator< double > const &', 'arg0')])
|
||||
## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<double>::MinMaxAvgTotalCalculator() [constructor]
|
||||
cls.add_constructor([])
|
||||
## basic-data-calculators.h (module 'stats'): static ns3::TypeId ns3::MinMaxAvgTotalCalculator<double>::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator<double>::Output(ns3::DataOutputCallback & callback) const [member function]
|
||||
cls.add_method('Output',
|
||||
'void',
|
||||
@@ -7859,6 +7927,11 @@ def register_Ns3MinMaxAvgTotalCalculator__Unsigned_int_methods(root_module, cls)
|
||||
cls.add_constructor([param('ns3::MinMaxAvgTotalCalculator< unsigned int > const &', 'arg0')])
|
||||
## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<unsigned int>::MinMaxAvgTotalCalculator() [constructor]
|
||||
cls.add_constructor([])
|
||||
## basic-data-calculators.h (module 'stats'): static ns3::TypeId ns3::MinMaxAvgTotalCalculator<unsigned int>::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator<unsigned int>::Output(ns3::DataOutputCallback & callback) const [member function]
|
||||
cls.add_method('Output',
|
||||
'void',
|
||||
@@ -8552,6 +8625,11 @@ def register_Ns3PacketSizeMinMaxAvgTotalCalculator_methods(root_module, cls):
|
||||
cls.add_method('FrameUpdate',
|
||||
'void',
|
||||
[param('std::string', 'path'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'realto')])
|
||||
## packet-data-calculators.h (module 'network'): static ns3::TypeId ns3::PacketSizeMinMaxAvgTotalCalculator::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## packet-data-calculators.h (module 'network'): void ns3::PacketSizeMinMaxAvgTotalCalculator::PacketUpdate(std::string path, ns3::Ptr<ns3::Packet const> packet) [member function]
|
||||
cls.add_method('PacketUpdate',
|
||||
'void',
|
||||
@@ -10284,6 +10362,11 @@ def register_Ns3SimpleChannel_methods(root_module, cls):
|
||||
'void',
|
||||
[param('ns3::Ptr< ns3::SimpleNetDevice >', 'device')],
|
||||
is_virtual=True)
|
||||
## simple-channel.h (module 'network'): void ns3::SimpleChannel::BlackList(ns3::Ptr<ns3::SimpleNetDevice> from, ns3::Ptr<ns3::SimpleNetDevice> to) [member function]
|
||||
cls.add_method('BlackList',
|
||||
'void',
|
||||
[param('ns3::Ptr< ns3::SimpleNetDevice >', 'from'), param('ns3::Ptr< ns3::SimpleNetDevice >', 'to')],
|
||||
is_virtual=True)
|
||||
## simple-channel.h (module 'network'): ns3::Ptr<ns3::NetDevice> ns3::SimpleChannel::GetDevice(uint32_t i) const [member function]
|
||||
cls.add_method('GetDevice',
|
||||
'ns3::Ptr< ns3::NetDevice >',
|
||||
@@ -10304,6 +10387,11 @@ def register_Ns3SimpleChannel_methods(root_module, cls):
|
||||
'void',
|
||||
[param('ns3::Ptr< ns3::Packet >', 'p'), param('uint16_t', 'protocol'), param('ns3::Mac48Address', 'to'), param('ns3::Mac48Address', 'from'), param('ns3::Ptr< ns3::SimpleNetDevice >', 'sender')],
|
||||
is_virtual=True)
|
||||
## simple-channel.h (module 'network'): void ns3::SimpleChannel::UnBlackList(ns3::Ptr<ns3::SimpleNetDevice> from, ns3::Ptr<ns3::SimpleNetDevice> to) [member function]
|
||||
cls.add_method('UnBlackList',
|
||||
'void',
|
||||
[param('ns3::Ptr< ns3::SimpleNetDevice >', 'from'), param('ns3::Ptr< ns3::SimpleNetDevice >', 'to')],
|
||||
is_virtual=True)
|
||||
return
|
||||
|
||||
def register_Ns3SimpleNetDevice_methods(root_module, cls):
|
||||
@@ -10946,6 +11034,11 @@ def register_Ns3CounterCalculator__Unsigned_int_methods(root_module, cls):
|
||||
'unsigned int',
|
||||
[],
|
||||
is_const=True)
|
||||
## basic-data-calculators.h (module 'stats'): static ns3::TypeId ns3::CounterCalculator<unsigned int>::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## basic-data-calculators.h (module 'stats'): void ns3::CounterCalculator<unsigned int>::Output(ns3::DataOutputCallback & callback) const [member function]
|
||||
cls.add_method('Output',
|
||||
'void',
|
||||
@@ -10975,6 +11068,11 @@ def register_Ns3PacketCounterCalculator_methods(root_module, cls):
|
||||
cls.add_method('FrameUpdate',
|
||||
'void',
|
||||
[param('std::string', 'path'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Mac48Address', 'realto')])
|
||||
## packet-data-calculators.h (module 'network'): static ns3::TypeId ns3::PacketCounterCalculator::GetTypeId() [member function]
|
||||
cls.add_method('GetTypeId',
|
||||
'ns3::TypeId',
|
||||
[],
|
||||
is_static=True)
|
||||
## packet-data-calculators.h (module 'network'): void ns3::PacketCounterCalculator::PacketUpdate(std::string path, ns3::Ptr<ns3::Packet const> packet) [member function]
|
||||
cls.add_method('PacketUpdate',
|
||||
'void',
|
||||
|
||||
@@ -39,6 +39,7 @@ ApplicationPacketProbe::GetTypeId ()
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::ApplicationPacketProbe")
|
||||
.SetParent<Probe> ()
|
||||
.SetGroupName("Applications")
|
||||
.AddConstructor<ApplicationPacketProbe> ()
|
||||
.AddTraceSource ( "Output",
|
||||
"The packet plus its socket address that serve "
|
||||
|
||||
@@ -42,6 +42,7 @@ BulkSendApplication::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::BulkSendApplication")
|
||||
.SetParent<Application> ()
|
||||
.SetGroupName("Applications")
|
||||
.AddConstructor<BulkSendApplication> ()
|
||||
.AddAttribute ("SendSize", "The amount of data to send each time.",
|
||||
UintegerValue (512),
|
||||
@@ -224,7 +225,7 @@ void BulkSendApplication::DataSend (Ptr<Socket>, uint32_t)
|
||||
|
||||
if (m_connected)
|
||||
{ // Only send new data if the connection has completed
|
||||
Simulator::ScheduleNow (&BulkSendApplication::SendData, this);
|
||||
SendData ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ OnOffApplication::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::OnOffApplication")
|
||||
.SetParent<Application> ()
|
||||
.SetGroupName("Applications")
|
||||
.AddConstructor<OnOffApplication> ()
|
||||
.AddAttribute ("DataRate", "The data rate in on state.",
|
||||
DataRateValue (DataRate ("500kb/s")),
|
||||
|
||||
@@ -43,6 +43,7 @@ PacketSink::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::PacketSink")
|
||||
.SetParent<Application> ()
|
||||
.SetGroupName("Applications")
|
||||
.AddConstructor<PacketSink> ()
|
||||
.AddAttribute ("Local",
|
||||
"The Address on which to Bind the rx socket.",
|
||||
|
||||
@@ -46,6 +46,7 @@ TypeId Ping6::GetTypeId ()
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::Ping6")
|
||||
.SetParent<Application>()
|
||||
.SetGroupName("Applications")
|
||||
.AddConstructor<Ping6>()
|
||||
.AddAttribute ("MaxPackets",
|
||||
"The maximum number of packets the application will send",
|
||||
|
||||
@@ -317,7 +317,7 @@ public:
|
||||
|
||||
/**
|
||||
* \brief Set the last RA send time. It also decrements the initial Rtr Advertisements counter.
|
||||
* \param the last RA send time
|
||||
* \param now the last RA send time
|
||||
*/
|
||||
void SetLastRaTxTime (Time now);
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ TypeId Radvd::GetTypeId ()
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::Radvd")
|
||||
.SetParent<Application> ()
|
||||
.SetGroupName("Applications")
|
||||
.AddConstructor<Radvd> ()
|
||||
.AddAttribute ("AdvertisementJitter",
|
||||
"Uniform variable to provide jitter between min and max values of AdvInterval",
|
||||
|
||||
@@ -62,6 +62,7 @@ SeqTsHeader::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::SeqTsHeader")
|
||||
.SetParent<Header> ()
|
||||
.SetGroupName("Applications")
|
||||
.AddConstructor<SeqTsHeader> ()
|
||||
;
|
||||
return tid;
|
||||
|
||||
@@ -44,6 +44,7 @@ UdpClient::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::UdpClient")
|
||||
.SetParent<Application> ()
|
||||
.SetGroupName("Applications")
|
||||
.AddConstructor<UdpClient> ()
|
||||
.AddAttribute ("MaxPackets",
|
||||
"The maximum number of packets the application will send",
|
||||
|
||||
@@ -40,6 +40,7 @@ UdpEchoClient::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::UdpEchoClient")
|
||||
.SetParent<Application> ()
|
||||
.SetGroupName("Applications")
|
||||
.AddConstructor<UdpEchoClient> ()
|
||||
.AddAttribute ("MaxPackets",
|
||||
"The maximum number of packets the application will send",
|
||||
|
||||
@@ -43,6 +43,7 @@ UdpEchoServer::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::UdpEchoServer")
|
||||
.SetParent<Application> ()
|
||||
.SetGroupName("Applications")
|
||||
.AddConstructor<UdpEchoServer> ()
|
||||
.AddAttribute ("Port", "Port on which we listen for incoming packets.",
|
||||
UintegerValue (9),
|
||||
|
||||
@@ -46,6 +46,7 @@ UdpServer::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::UdpServer")
|
||||
.SetParent<Application> ()
|
||||
.SetGroupName("Applications")
|
||||
.AddConstructor<UdpServer> ()
|
||||
.AddAttribute ("Port",
|
||||
"Port on which we listen for incoming packets.",
|
||||
|
||||
@@ -62,6 +62,7 @@ UdpTraceClient::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::UdpTraceClient")
|
||||
.SetParent<Application> ()
|
||||
.SetGroupName("Applications")
|
||||
.AddConstructor<UdpTraceClient> ()
|
||||
.AddAttribute ("RemoteAddress",
|
||||
"The destination Address of the outbound packets",
|
||||
|
||||
@@ -37,6 +37,7 @@ V4Ping::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::V4Ping")
|
||||
.SetParent<Application> ()
|
||||
.SetGroupName("Applications")
|
||||
.AddConstructor<V4Ping> ()
|
||||
.AddAttribute ("Remote",
|
||||
"The address of the machine we want to ping.",
|
||||
|
||||
@@ -31,6 +31,7 @@ class Node;
|
||||
class AttributeValue;
|
||||
|
||||
/**
|
||||
* \ingroup bridge
|
||||
* \brief Add capability to bridge multiple LAN segments (IEEE 802.1D bridging)
|
||||
*/
|
||||
class BridgeHelper
|
||||
|
||||
@@ -30,6 +30,7 @@ BridgeChannel::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::BridgeChannel")
|
||||
.SetParent<Channel> ()
|
||||
.SetGroupName("Bridge")
|
||||
.AddConstructor<BridgeChannel> ()
|
||||
;
|
||||
return tid;
|
||||
|
||||
@@ -36,10 +36,18 @@ namespace ns3 {
|
||||
class BridgeChannel : public Channel
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* \brief Get the type ID.
|
||||
* \return the object TypeId
|
||||
*/
|
||||
static TypeId GetTypeId (void);
|
||||
BridgeChannel ();
|
||||
virtual ~BridgeChannel ();
|
||||
|
||||
/**
|
||||
* Adds a channel to the bridged pool
|
||||
* \param bridgedChannel the channel to add to the pool
|
||||
*/
|
||||
void AddChannel (Ptr<Channel> bridgedChannel);
|
||||
|
||||
// virtual methods implementation, from Channel
|
||||
@@ -48,10 +56,22 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* \brief Copy constructor
|
||||
*
|
||||
* Defined and unimplemented to avoid misuse
|
||||
*/
|
||||
BridgeChannel (const BridgeChannel &);
|
||||
|
||||
/**
|
||||
* \brief Copy constructor
|
||||
*
|
||||
* Defined and unimplemented to avoid misuse
|
||||
* \returns
|
||||
*/
|
||||
BridgeChannel &operator = (const BridgeChannel &);
|
||||
|
||||
std::vector< Ptr<Channel> > m_bridgedChannels;
|
||||
std::vector< Ptr<Channel> > m_bridgedChannels; //!< pool of bridged channels
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ BridgeNetDevice::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::BridgeNetDevice")
|
||||
.SetParent<NetDevice> ()
|
||||
.SetGroupName("Bridge")
|
||||
.AddConstructor<BridgeNetDevice> ()
|
||||
.AddAttribute ("Mtu", "The MAC-level Maximum Transmission Unit",
|
||||
UintegerValue (1500),
|
||||
@@ -398,11 +399,13 @@ BridgeNetDevice::SendFrom (Ptr<Packet> packet, const Address& src, const Address
|
||||
|
||||
// data was not unicast or no state has been learned for that mac
|
||||
// address => flood through all ports.
|
||||
Ptr<Packet> pktCopy;
|
||||
for (std::vector< Ptr<NetDevice> >::iterator iter = m_ports.begin ();
|
||||
iter != m_ports.end (); iter++)
|
||||
{
|
||||
pktCopy = packet->Copy ();
|
||||
Ptr<NetDevice> port = *iter;
|
||||
port->SendFrom (packet, src, dest, protocolNumber);
|
||||
port->SendFrom (pktCopy, src, dest, protocolNumber);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -65,12 +65,17 @@ class Node;
|
||||
class BridgeNetDevice : public NetDevice
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* \brief Get the type ID.
|
||||
* \return the object TypeId
|
||||
*/
|
||||
static TypeId GetTypeId (void);
|
||||
BridgeNetDevice ();
|
||||
virtual ~BridgeNetDevice ();
|
||||
|
||||
/**
|
||||
* \brief Add a 'port' to a bridge device
|
||||
* \param bridgePort the NetDevice to add
|
||||
*
|
||||
* This method adds a new bridge port to a BridgeNetDevice, so that
|
||||
* the new bridge port NetDevice becomes part of the bridge and L2
|
||||
@@ -84,8 +89,18 @@ public:
|
||||
*/
|
||||
void AddBridgePort (Ptr<NetDevice> bridgePort);
|
||||
|
||||
/**
|
||||
* \brief Gets the number of bridged 'ports', i.e., the NetDevices currently bridged.
|
||||
*
|
||||
* \return the number of bridged ports.
|
||||
*/
|
||||
uint32_t GetNBridgePorts (void) const;
|
||||
|
||||
/**
|
||||
* \brief Gets the n-th bridged port.
|
||||
* \param n the port index
|
||||
* \return the n-th bridged NetDevice
|
||||
*/
|
||||
Ptr<NetDevice> GetBridgePort (uint32_t n) const;
|
||||
|
||||
// inherited from NetDevice base class.
|
||||
@@ -117,36 +132,92 @@ public:
|
||||
protected:
|
||||
virtual void DoDispose (void);
|
||||
|
||||
/**
|
||||
* \brief Receives a packet from one bridged port.
|
||||
* \param device the originating port
|
||||
* \param packet the received packet
|
||||
* \param protocol the packet protocol (e.g., Ethertype)
|
||||
* \param source the packet source
|
||||
* \param destination the packet destination
|
||||
* \param packetType the packet type (e.g., host, broadcast, etc.)
|
||||
*/
|
||||
void ReceiveFromDevice (Ptr<NetDevice> device, Ptr<const Packet> packet, uint16_t protocol,
|
||||
Address const &source, Address const &destination, PacketType packetType);
|
||||
|
||||
/**
|
||||
* \brief Forwards a unicast packet
|
||||
* \param incomingPort the packet incoming port
|
||||
* \param packet the packet
|
||||
* \param protocol the packet protocol (e.g., Ethertype)
|
||||
* \param src the packet source
|
||||
* \param dst the packet destination
|
||||
*/
|
||||
void ForwardUnicast (Ptr<NetDevice> incomingPort, Ptr<const Packet> packet,
|
||||
uint16_t protocol, Mac48Address src, Mac48Address dst);
|
||||
|
||||
/**
|
||||
* \brief Forwards a broadcast or a multicast packet
|
||||
* \param incomingPort the packet incoming port
|
||||
* \param packet the packet
|
||||
* \param protocol the packet protocol (e.g., Ethertype)
|
||||
* \param src the packet source
|
||||
* \param dst the packet destination
|
||||
*/
|
||||
void ForwardBroadcast (Ptr<NetDevice> incomingPort, Ptr<const Packet> packet,
|
||||
uint16_t protocol, Mac48Address src, Mac48Address dst);
|
||||
|
||||
/**
|
||||
* \brief Learns the port a MAC address is sending from
|
||||
* \param source source address
|
||||
* \param port the port the source is sending from
|
||||
*/
|
||||
void Learn (Mac48Address source, Ptr<NetDevice> port);
|
||||
|
||||
/**
|
||||
* \brief Gets the port associated to a source address
|
||||
* \param source the source address
|
||||
* \returns the port the source is associated to, or NULL if no association is known.
|
||||
*/
|
||||
Ptr<NetDevice> GetLearnedState (Mac48Address source);
|
||||
|
||||
private:
|
||||
/**
|
||||
* \brief Copy constructor
|
||||
*
|
||||
* Defined and unimplemented to avoid misuse
|
||||
*/
|
||||
BridgeNetDevice (const BridgeNetDevice &);
|
||||
|
||||
/**
|
||||
* \brief Copy constructor
|
||||
*
|
||||
* Defined and unimplemented to avoid misuse
|
||||
* \returns
|
||||
*/
|
||||
BridgeNetDevice &operator = (const BridgeNetDevice &);
|
||||
|
||||
NetDevice::ReceiveCallback m_rxCallback;
|
||||
NetDevice::PromiscReceiveCallback m_promiscRxCallback;
|
||||
NetDevice::ReceiveCallback m_rxCallback; //!< receive callback
|
||||
NetDevice::PromiscReceiveCallback m_promiscRxCallback; //!< promiscuous receive callback
|
||||
|
||||
Mac48Address m_address;
|
||||
Time m_expirationTime; // time it takes for learned MAC state to expire
|
||||
Mac48Address m_address; //!< MAC address of the NetDevice
|
||||
Time m_expirationTime; //!< time it takes for learned MAC state to expire
|
||||
|
||||
/**
|
||||
* \ingroup bridge
|
||||
* Structure holding the status of an address
|
||||
*/
|
||||
struct LearnedState
|
||||
{
|
||||
Ptr<NetDevice> associatedPort;
|
||||
Time expirationTime;
|
||||
Ptr<NetDevice> associatedPort; //!< port associated with the address
|
||||
Time expirationTime; //!< time it takes for learned MAC state to expire
|
||||
};
|
||||
std::map<Mac48Address, LearnedState> m_learnState;
|
||||
Ptr<Node> m_node;
|
||||
Ptr<BridgeChannel> m_channel;
|
||||
std::vector< Ptr<NetDevice> > m_ports;
|
||||
uint32_t m_ifIndex;
|
||||
uint16_t m_mtu;
|
||||
bool m_enableLearning;
|
||||
std::map<Mac48Address, LearnedState> m_learnState; //!< Container for known address statuses
|
||||
Ptr<Node> m_node; //!< node owning this NetDevice
|
||||
Ptr<BridgeChannel> m_channel; //!< virtual bridged channel
|
||||
std::vector< Ptr<NetDevice> > m_ports; //!< bridged ports
|
||||
uint32_t m_ifIndex; //!< Interface index
|
||||
uint16_t m_mtu; //!< MTU of the bridged NetDevice
|
||||
bool m_enableLearning; //!< true if the bridge will learn the node status
|
||||
};
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
@@ -3222,10 +3222,10 @@ def register_Ns3EmpiricalRandomVariable_methods(root_module, cls):
|
||||
'double',
|
||||
[],
|
||||
is_virtual=True)
|
||||
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double arg0, double arg1, double arg2, double arg3, double arg4) [member function]
|
||||
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double c1, double c2, double v1, double v2, double r) [member function]
|
||||
cls.add_method('Interpolate',
|
||||
'double',
|
||||
[param('double', 'arg0'), param('double', 'arg1'), param('double', 'arg2'), param('double', 'arg3'), param('double', 'arg4')],
|
||||
[param('double', 'c1'), param('double', 'c2'), param('double', 'v1'), param('double', 'v2'), param('double', 'r')],
|
||||
visibility='private', is_virtual=True)
|
||||
## random-variable-stream.h (module 'core'): void ns3::EmpiricalRandomVariable::Validate() [member function]
|
||||
cls.add_method('Validate',
|
||||
|
||||
@@ -3222,10 +3222,10 @@ def register_Ns3EmpiricalRandomVariable_methods(root_module, cls):
|
||||
'double',
|
||||
[],
|
||||
is_virtual=True)
|
||||
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double arg0, double arg1, double arg2, double arg3, double arg4) [member function]
|
||||
## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double c1, double c2, double v1, double v2, double r) [member function]
|
||||
cls.add_method('Interpolate',
|
||||
'double',
|
||||
[param('double', 'arg0'), param('double', 'arg1'), param('double', 'arg2'), param('double', 'arg3'), param('double', 'arg4')],
|
||||
[param('double', 'c1'), param('double', 'c2'), param('double', 'v1'), param('double', 'v2'), param('double', 'r')],
|
||||
visibility='private', is_virtual=True)
|
||||
## random-variable-stream.h (module 'core'): void ns3::EmpiricalRandomVariable::Validate() [member function]
|
||||
cls.add_method('Validate',
|
||||
|
||||
@@ -51,6 +51,7 @@ GridBuildingAllocator::GetTypeId (void)
|
||||
static TypeId tid = TypeId ("ns3::GridBuildingAllocator")
|
||||
.SetParent<Object> ()
|
||||
.AddConstructor<GridBuildingAllocator> ()
|
||||
.SetGroupName ("Buildings")
|
||||
.AddAttribute ("GridWidth", "The number of objects layed out on a line.",
|
||||
UintegerValue (10),
|
||||
MakeUintegerAccessor (&GridBuildingAllocator::m_n),
|
||||
|
||||
@@ -50,7 +50,7 @@ RandomBuildingPositionAllocator::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::RandomBuildingPositionAllocator")
|
||||
.SetParent<PositionAllocator> ()
|
||||
.SetGroupName ("Mobility")
|
||||
.SetGroupName ("Buildings")
|
||||
.AddConstructor<RandomBuildingPositionAllocator> ()
|
||||
.AddAttribute ("WithReplacement",
|
||||
"If true, the building will be randomly selected with replacement. "
|
||||
@@ -117,7 +117,7 @@ RandomRoomPositionAllocator::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::RandomRoomPositionAllocator")
|
||||
.SetParent<PositionAllocator> ()
|
||||
.SetGroupName ("Mobility")
|
||||
.SetGroupName ("Buildings")
|
||||
.AddConstructor<RandomRoomPositionAllocator> ();
|
||||
return tid;
|
||||
}
|
||||
@@ -221,7 +221,7 @@ SameRoomPositionAllocator::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::SameRoomPositionAllocator")
|
||||
.SetParent<PositionAllocator> ()
|
||||
.SetGroupName ("Mobility")
|
||||
.SetGroupName ("Buildings")
|
||||
.AddConstructor<SameRoomPositionAllocator> ();
|
||||
return tid;
|
||||
}
|
||||
@@ -303,7 +303,7 @@ FixedRoomPositionAllocator::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::FixedRoomPositionAllocator")
|
||||
.SetParent<PositionAllocator> ()
|
||||
.SetGroupName ("Mobility")
|
||||
.SetGroupName ("Buildings")
|
||||
.AddConstructor<SameRoomPositionAllocator> ();
|
||||
return tid;
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@ BuildingListPriv::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::BuildingListPriv")
|
||||
.SetParent<Object> ()
|
||||
.SetGroupName ("Buildings")
|
||||
.AddAttribute ("BuildingList", "The list of all buildings created during the simulation.",
|
||||
ObjectVectorValue (),
|
||||
MakeObjectVectorAccessor (&BuildingListPriv::m_buildings),
|
||||
|
||||
@@ -41,6 +41,7 @@ Building::GetTypeId (void)
|
||||
static TypeId tid = TypeId ("ns3::Building")
|
||||
.SetParent<Object> ()
|
||||
.AddConstructor<Building> ()
|
||||
.SetGroupName ("Buildings")
|
||||
.AddAttribute ("NRoomsX", "The number of rooms in the X axis.",
|
||||
UintegerValue (1),
|
||||
MakeUintegerAccessor (&Building::GetNRoomsX, &Building::SetNRoomsX),
|
||||
|
||||
@@ -65,6 +65,7 @@ BuildingsPropagationLossModel::GetTypeId (void)
|
||||
static TypeId tid = TypeId ("ns3::BuildingsPropagationLossModel")
|
||||
|
||||
.SetParent<PropagationLossModel> ()
|
||||
.SetGroupName ("Buildings")
|
||||
|
||||
|
||||
.AddAttribute ("ShadowSigmaOutdoor",
|
||||
|
||||
@@ -66,6 +66,7 @@ HybridBuildingsPropagationLossModel::GetTypeId (void)
|
||||
.SetParent<BuildingsPropagationLossModel> ()
|
||||
|
||||
.AddConstructor<HybridBuildingsPropagationLossModel> ()
|
||||
.SetGroupName ("Buildings")
|
||||
|
||||
.AddAttribute ("Frequency",
|
||||
"The Frequency (default is 2.106 GHz).",
|
||||
|
||||
@@ -41,6 +41,7 @@ ItuR1238PropagationLossModel::GetTypeId (void)
|
||||
static TypeId tid = TypeId ("ns3::ItuR1238PropagationLossModel")
|
||||
|
||||
.SetParent<PropagationLossModel> ()
|
||||
.SetGroupName ("Buildings")
|
||||
|
||||
.AddAttribute ("Frequency",
|
||||
"The Frequency (default is 2.106 GHz).",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user