diff -Naur ns-3.17/AUTHORS ns-3.18/AUTHORS --- ns-3.17/AUTHORS 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/AUTHORS 2013-10-26 07:07:30.615364408 -0700 @@ -2,6 +2,7 @@ Rohit Agarwal (mindprince@gmail.com) Kirill Andreev (andreev@iitp.ru) Dean Armstrong (deanarm@gmail.com) +Ghada Badawy (gbadawy@gmail.com) Nicola Baldo (nbaldo@cttc.es) Mirko Banchi (mk.banchi@gmail.com) Peter D. Barnes, Jr. (barnes26@llnl.gov) @@ -27,6 +28,7 @@ Craig Dowell (craigdo@ee.washington.edu) Denis Fakhriev (fakhriev@iitp.ru) Jahanzeb Farooq (Jahanzeb.Farooq@inria.fr, Jahanzeb.Farooq@gmail.com) +Pedro Fortuna (pedro.fortuna@inescporto.pt) Juliana Freitag Borin (juliana.freitag@gmail.com) Eric Gamess (egamess@gmail.com) Thomas Geithner (thomas.geithner@dai-labor.de) diff -Naur ns-3.17/bindings/python/ns3modulegen_core_customizations.py ns-3.18/bindings/python/ns3modulegen_core_customizations.py --- ns-3.17/bindings/python/ns3modulegen_core_customizations.py 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/bindings/python/ns3modulegen_core_customizations.py 2013-10-26 07:07:30.615364408 -0700 @@ -177,8 +177,11 @@ } virtual ~%s() { + PyGILState_STATE __py_gil_state; + __py_gil_state = (PyEval_ThreadsInitialized() ? PyGILState_Ensure() : (PyGILState_STATE) 0); Py_DECREF(m_callback); m_callback = NULL; + PyGILState_Release(__py_gil_state); } virtual bool IsEqual(ns3::Ptr other_base) const diff -Naur ns-3.17/bindings/python/wscript ns-3.18/bindings/python/wscript --- ns-3.17/bindings/python/wscript 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/bindings/python/wscript 2013-10-26 07:07:30.615364408 -0700 @@ -13,7 +13,7 @@ # after = TaskGen.after ## https://launchpad.net/pybindgen/ -REQUIRED_PYBINDGEN_VERSION = (0, 16, 0, 825) +REQUIRED_PYBINDGEN_VERSION = (0, 16, 0, 831) REQUIRED_PYGCCXML_VERSION = (0, 9, 5) diff -Naur ns-3.17/CHANGES.html ns-3.18/CHANGES.html --- ns-3.17/CHANGES.html 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/CHANGES.html 2013-10-26 07:07:30.611364407 -0700 @@ -51,6 +51,116 @@ us a note on ns-developers mailing list.


+

Changes from ns-3.17 to ns-3.18

+ +

New API:

+ + +

Changes to existing API:

+ + +

Changes to build system:

+ + +

Changed behavior:

+ +

Changes from ns-3.16 to ns-3.17

New API:

diff -Naur ns-3.17/doc/doxygen.conf ns-3.18/doc/doxygen.conf --- ns-3.17/doc/doxygen.conf 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/doxygen.conf 2013-10-26 07:07:29.443364378 -0700 @@ -193,9 +193,20 @@ # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. -ALIASES = \ - "intern=\internal \par \b Internal:" \ - "pname{1}=\1" +ALIASES = + +# Link to bug tracker +ALIASES += bugid{1}="Bug \1" + +# Set off \internal docs +ALIASES += internal="\par \b Internal:" + +# Typeset parameter name in docs as in the "Parameters:" list +# Usage: /** \param [in/out] tag If found, \pname{tag} is ... */ +ALIASES += pname{1}="\1" + +# Link to RFC's +ALIASES += RFC{1}="RFC \1" # 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 @@ -285,7 +296,7 @@ # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. -DISTRIBUTE_GROUP_DOC = NO +DISTRIBUTE_GROUP_DOC = YES # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a @@ -660,6 +671,7 @@ INPUT = doc/modules \ doc/main.h \ doc/introspected-doxygen.h \ + examples \ utils \ src @@ -727,14 +739,18 @@ EXAMPLE_PATH = src/aodv/examples \ src/bridge/examples \ + src/brite/examples \ + src/buildings/examples \ src/click/examples \ src/config-store/examples \ src/core/examples \ src/csma/examples \ src/csma-layout/examples \ src/dsdv/examples \ + src/dsr/examples \ src/emu/examples \ src/energy/examples \ + src/fd-net-device/examples \ src/flow-monitor/examples \ src/internet/examples \ src/lte/examples \ @@ -749,8 +765,8 @@ src/point-to-point/examples \ src/propagation/examples \ src/spectrum/examples \ + src/stats/examples \ src/tap-bridge/examples \ - src/tools/examples \ src/topology-read/examples \ src/uan/examples \ src/virtual-net-device/examples \ @@ -777,7 +793,12 @@ # the \image command). IMAGE_PATH = doc/ns3_html_theme/static \ - src/mesh/doc/ + src/lte/doc/source/figures \ + src/lte/test/reference \ + src/mesh/doc \ + src/netanim/doc/figures \ + src/stats/doc \ + src/visualizer/visualizer/resource # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program diff -Naur ns-3.17/doc/doxygen.warnings.report.sh ns-3.18/doc/doxygen.warnings.report.sh --- ns-3.17/doc/doxygen.warnings.report.sh 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/doxygen.warnings.report.sh 2013-10-26 07:07:29.451364379 -0700 @@ -2,7 +2,7 @@ # Process doxygen.warnings.log to generate sorted list of top offenders -# Flag to skip running doxygen +# Flag to skip the build and running doxygen, and just analyze the log skipdoxy=${1:-""} DIR=`dirname $0` @@ -16,6 +16,9 @@ if [ "$skipdoxy" == "" ]; then + # Run introspection, which may require a build + cd $(hg root) && ./waf --run print-introspected-doxygen >doc/introspected-doxygen.h + conf=$DIR/doxygen.conf sed -i.bak -E '/^EXTRACT_ALL |^HAVE_DOT |^WARNINGS /s/YES/no/' $conf @@ -91,6 +94,9 @@ sort -k 2 \ ) +# Sorted by number, decreasing +undocsort=$(echo "$undocfiles" | sort -r ) + # Total number of files filecount=$( \ echo "$undocfiles" | \ @@ -117,7 +123,7 @@ printf "%6d directories with warnings\n" $modcount echo echo -echo "Warnings by file" +echo "Warnings by file (alphabetical)" echo echo "Count File" echo "----- ----------------------------------" @@ -126,8 +132,19 @@ printf "%6d files with warnings\n" $filecount echo echo +echo "Warnings by file (numerical)" +echo +echo "Count File" +echo "----- ----------------------------------" +echo "$undocsort" +echo "----------------------------------------" +printf "%6d files with warnings\n" $filecount +echo +echo echo "Doxygen Warnings Summary" echo "----------------------------------------" printf "%6d directories\n" $modcount printf "%6d files\n" $filecount printf "%6d warnings\n" $warncount + + diff -Naur ns-3.17/doc/main.h ns-3.18/doc/main.h --- ns-3.17/doc/main.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/main.h 2013-10-26 07:07:29.471364379 -0700 @@ -57,7 +57,6 @@ * - stats * - tap-bridge * - test - * - tools * - topology-read * - uan * - virtual-net-device diff -Naur ns-3.17/doc/manual/Makefile ns-3.18/doc/manual/Makefile --- ns-3.17/doc/manual/Makefile 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/Makefile 2013-10-26 07:07:29.455364378 -0700 @@ -2,38 +2,99 @@ DIA = dia CONVERT = convert -FIGURES = figures -VPATH = $(FIGURES) +SRC = ../../src +# Temporary source directory, for build +SOURCETEMP = source-temp +FIGURES = $(SOURCETEMP)/figures +#VPATH = $(FIGURES) + +# list all manual .rst files that need to be copied to $SOURCETEMP +SOURCES = \ + source/conf.py \ + source/_static \ + source/index.rst \ + source/replace.txt \ + source/attributes.rst \ + source/callbacks.rst \ + source/enable-modules.rst \ + source/enable-tests.rst \ + source/events.rst \ + source/gnuplot.rst \ + source/hash-functions.rst \ + source/helpers.rst \ + source/how-to-write-tests.rst \ + source/logging.rst \ + source/new-models.rst \ + source/new-modules.rst \ + source/object-model.rst \ + source/object-names.rst \ + source/organization.rst \ + source/python.rst \ + source/random-variables.rst \ + source/realtime.rst \ + source/support.rst \ + source/test-background.rst \ + source/test-framework.rst \ + source/test-overview.rst \ + source/tests.rst \ + source/tracing.rst \ + source/troubleshoot.rst \ + ${SRC}/stats/doc/data-collection.rst \ + ${SRC}/stats/doc/data-collection-overview.rst \ + ${SRC}/stats/doc/statistics.rst \ + ${SRC}/stats/doc/data-collection-helpers.rst \ + ${SRC}/stats/doc/probe.rst \ + ${SRC}/stats/doc/collector.rst \ + ${SRC}/stats/doc/aggregator.rst \ + ${SRC}/stats/doc/adaptor.rst \ + ${SRC}/stats/doc/scope-and-limitations.rst \ + +# list all manual figure files that need to be copied to +# $SOURCETEMP/figures. For each figure to be included in all +# documentation formats (html, latex...) the following formats are supported: +# 1) a single .dia file (preferred option, because it can be edited) +# 2) a single .eps file +# 3) both a .pdf and .png file + +SOURCEFIGS = \ + figures/software-organization.dia \ + figures/plot-2d.png \ + figures/plot-2d-with-error-bars.png \ + figures/plot-3d.png \ + ${SRC}/stats/doc/Stat-framework-arch.png \ + ${SRC}/stats/doc/Wifi-default.png \ + ${SRC}/stats/doc/dcf-overview.dia \ + ${SRC}/stats/doc/dcf-overview-with-aggregation.dia \ + ${SRC}/stats/doc/gnuplot-example.png \ + ${SRC}/stats/doc/file-example.png \ + ${SRC}/stats/doc/seventh-packet-byte-count.png \ + ${SRC}/stats/doc/gnuplot-helper-example.png \ + ${SRC}/stats/doc/gnuplot-aggregator.png \ +# specify figures from which .png and .pdf figures need to be +# generated (all dia and eps figures) IMAGES_EPS = \ $(FIGURES)/software-organization.eps \ + $(FIGURES)/dcf-overview.eps \ + $(FIGURES)/dcf-overview-with-aggregation.eps \ # rescale pdf figures as necessary $(FIGURES)/software-organization.pdf_width = 5in -# Do not delete/clean these png images upon make clean -IMAGES_PNG_SAVED = \ - $(FIGURES)/plot-2d.png \ - $(FIGURES)/plot-2d-with-error-bars.png \ - $(FIGURES)/plot-3d.png \ - -IMAGES_PNG_CONVERTED = \ - ${IMAGES_EPS:.eps=.png} - -IMAGES_PNG = $(IMAGES_PNG_SAVED) $(IMAGES_PNG_CONVERTED) +IMAGES_PNG = $(IMAGES_EPS:.eps=.png) IMAGES_PDF = ${IMAGES_EPS:.eps=.pdf} IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF) -IMAGES_TO_CLEAN = $(IMAGES_PNG_CONVERTED) $(IMAGES_PDF) $(IMAGES_EPS) +RESCALE = $(shell hg root)/utils/rescale-pdf.sh %.eps : %.dia; $(DIA) -t eps $< -e $@ %.png : %.dia; $(DIA) -t png $< -e $@ %.png : %.eps; $(CONVERT) $< $@ %.pdf : %.eps; $(EPSTOPDF) $< -o=$@ - if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi + if test x$($@_width) != x; then $(RESCALE) $($@_width) $@ ; fi # You can set these variables from the command line. @@ -45,7 +106,7 @@ # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCETEMP) .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest @@ -70,47 +131,54 @@ @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" +copy-sources: $(SOURCES) + @rm -rf $(SOURCETEMP) + @mkdir -p $(SOURCETEMP) + @mkdir -p $(FIGURES) + @cp -r $(SOURCES) $(SOURCETEMP) + @cp -r $(SOURCEFIGS) $(FIGURES) + clean: -rm -rf $(BUILDDIR) - -rm -rf $(IMAGES_TO_CLEAN) + -rm -rf $(SOURCETEMP) frag: pickle @if test ! -d $(BUILDDIR)/frag; then mkdir $(BUILDDIR)/frag; fi pushd $(BUILDDIR)/frag && ../../pickle-to-xml.py ../pickle/index.fpickle > navigation.xml && popd cp -r $(BUILDDIR)/pickle/_images $(BUILDDIR)/frag -html: $(IMAGES) +html: copy-sources $(IMAGES) $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." -dirhtml: $(IMAGES) +dirhtml: copy-sources $(IMAGES) $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." -singlehtml: $(IMAGES) +singlehtml: copy-sources $(IMAGES) $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." -pickle: $(IMAGES) +pickle: copy-sources $(IMAGES) $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." -json: $(IMAGES) +json: copy-sources $(IMAGES) $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." -htmlhelp: $(IMAGES) +htmlhelp: copy-sources $(IMAGES) $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." -qthelp: $(IMAGES) +qthelp: copy-sources $(IMAGES) $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ @@ -119,7 +187,7 @@ @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ns-3.qhc" -devhelp: $(IMAGES) +devhelp: copy-sources $(IMAGES) $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @@ -128,46 +196,46 @@ @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/ns-3" @echo "# devhelp" -epub: $(IMAGES) +epub: copy-sources $(IMAGES) $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." -latex: $(IMAGES) +latex: copy-sources $(IMAGES) $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." -latexpdf: $(IMAGES) +latexpdf: copy-sources $(IMAGES) $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." make -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." -text: $(IMAGES) +text: copy-sources $(IMAGES) $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." -man: $(IMAGES) +man: copy-sources $(IMAGES) $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." -changes: $(IMAGES) +changes: copy-sources $(IMAGES) $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." -linkcheck: $(IMAGEs) +linkcheck: copy-sources $(IMAGES) $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." -doctest: $(IMAGES) +doctest: copy-sources $(IMAGES) $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." diff -Naur ns-3.17/doc/manual/rescale-pdf.sh ns-3.18/doc/manual/rescale-pdf.sh --- ns-3.17/doc/manual/rescale-pdf.sh 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/rescale-pdf.sh 1969-12-31 16:00:00.000000000 -0800 @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -TMPDIR=/tmp - -TMPFILE=`mktemp` - -echo "\documentclass{book} -\usepackage{pdfpages} -\begin{document} -\includepdf[width=${1},fitpaper]{${2}} -\end{document}" >${TMPFILE}.tex -pdflatex -output-directory /tmp ${TMPFILE}.tex >/dev/null 2>/dev/null -cp ${TMPFILE}.pdf ${2} -rm -f ${TMPFILE}{,.{tex,aux,log,pdf}} diff -Naur ns-3.17/doc/manual/source/attributes.rst ns-3.18/doc/manual/source/attributes.rst --- ns-3.17/doc/manual/source/attributes.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/source/attributes.rst 2013-10-26 07:07:29.455364378 -0700 @@ -1,4 +1,6 @@ .. include:: replace.txt +.. highlight:: cpp + .. _Attributes: @@ -405,7 +407,9 @@ Another way to get at the attribute is to use the object name service facility. Here, this attribute is found using a name string. This approach is useful if one doesn't have access to the underlying pointers and it is difficult to -determine the required concrete configuration namespaced path.:: +determine the required concrete configuration namespaced path. + +:: Names::Add ("server", serverNode); Names::Add ("server/eth0", serverDevice); @@ -414,7 +418,7 @@ Config::Set ("/Names/server/eth0/TxQueue/MaxPackets", UintegerValue (25)); -:ref:`Object-names` for a fuller treatment of the |ns3| configuration namespace. +See :ref:`Object-names` for a fuller treatment of the |ns3| configuration namespace. Setting through constructors helper classes +++++++++++++++++++++++++++++++++++++++++++ @@ -426,7 +430,7 @@ or from the higher-level helper APIs, such as::: - mobility.SetPositionAllocator ("GridPositionAllocator", + mobility.SetPositionAllocator ("ns3::GridPositionAllocator", "MinX", DoubleValue (-100.0), "MinY", DoubleValue (-100.0), "DeltaX", DoubleValue (5.0), @@ -737,7 +741,9 @@ Simulator::Destroy (); -After running, you can open the output-attributes.txt file and see::: +After running, you can open the output-attributes.txt file and see: + +.. sourcecode:: text default ns3::RealtimeSimulatorImpl::SynchronizationMode "BestEffort" default ns3::RealtimeSimulatorImpl::HardLimit "+100000000.0ns" @@ -769,7 +775,9 @@ in the configuration namespace is shown. In a real ns-3 program, many more models, attributes, and defaults would be shown. -An XML version also exists in ``output-attributes.xml``::: +An XML version also exists in ``output-attributes.xml``: + +.. sourcecode:: xml @@ -858,13 +866,17 @@ presentation. To use this feature, one must install libgtk and libgtk-dev; an example -Ubuntu installation command is::: +Ubuntu installation command is: - sudo apt-get install libgtk2.0-0 libgtk2.0-dev +.. sourcecode:: bash -To check whether it is configured or not, check the output of the step::: + $ sudo apt-get install libgtk2.0-0 libgtk2.0-dev - ./waf configure --enable-examples --enable-tests +To check whether it is configured or not, check the output of the step: + +.. sourcecode:: bash + + $ ./waf configure --enable-examples --enable-tests ---- Summary of optional NS-3 features: Python Bindings : enabled @@ -873,10 +885,12 @@ GtkConfigStore : not enabled (library 'gtk+-2.0 >= 2.12' not found) In the above example, it was not enabled, so it cannot be used until a suitable -version is installed and:: +version is installed and: - ./waf configure --enable-examples --enable-tests - ./waf +.. sourcecode:: bash + + $ ./waf configure --enable-examples --enable-tests + $ ./waf is rerun. @@ -895,6 +909,7 @@ Future work +++++++++++ There are a couple of possible improvements: + * save a unique version number with date and time at start of file * save rng initial seed somewhere. * make each RandomVariable serialize its own initial seed and re-read it later diff -Naur ns-3.17/doc/manual/source/callbacks.rst ns-3.18/doc/manual/source/callbacks.rst --- ns-3.17/doc/manual/source/callbacks.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/source/callbacks.rst 2013-10-26 07:07:29.455364378 -0700 @@ -1,4 +1,5 @@ .. include:: replace.txt +.. highlight:: cpp Callbacks --------- @@ -364,11 +365,11 @@ callback-- this is important. We can pass in any such properly-typed function to this callback. Let's look at this more closely:: - static double CbOne (double a, double b) {} - ^ ^ ^ - | ---| ------| - | | | - Callback one; + static double CbOne (double a, double b) {} + ^ ^ ^ + | | | + | | | + Callback one; You can only bind a function to a callback if they have the matching signature. The first template argument is the return type, and the additional template @@ -537,6 +538,30 @@ (*m_p.*m_pmi)(m_boundArg, arg); +It's possible to bind two or three arguments as well. Say we have a function with +signature:: + + static void NotifyEvent (Ptr a, Ptr b, MyEventType e); + +One can create bound callback binding first two arguments like:: + + MakeBoundCallback (&NotifyEvent, a1, b1); + +assuming `a1` and `b1` are objects of type `A` and `B` respectively. Similarly for +three arguments one would have function with a signature:: + + static void NotifyEvent (Ptr a, Ptr b, MyEventType e); + +Binding three arguments in done with:: + + MakeBoundCallback (&NotifyEvent, a1, b1, c1); + +again assuming `a1`, `b1` and `c1` are objects of type `A`, `B` and `C` respectively. + +This kind of binding can be used for exchanging information between objects in +simulation; specifically, bound callbacks can be used as traced callbacks, which will +be described in the next section. + Traced Callbacks **************** *Placeholder subsection* diff -Naur ns-3.17/doc/manual/source/conf.py ns-3.18/doc/manual/source/conf.py --- ns-3.17/doc/manual/source/conf.py 2013-05-14 07:35:20.000000000 -0700 +++ ns-3.18/doc/manual/source/conf.py 2013-10-26 07:07:29.459364378 -0700 @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = 'ns-3.17' +version = 'ns-3.18' # The full version, including alpha/beta/rc tags. -release = 'ns-3.17' +release = 'ns-3.18' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -197,7 +197,7 @@ #latex_show_urls = False # Additional stuff for the LaTeX preamble. -#latex_preamble = '' +latex_preamble = '\usepackage{amssymb}' # Documents to append as an appendix to all manuals. #latex_appendices = [] diff -Naur ns-3.17/doc/manual/source/enable-modules.rst ns-3.18/doc/manual/source/enable-modules.rst --- ns-3.17/doc/manual/source/enable-modules.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/source/enable-modules.rst 2013-10-26 07:07:29.459364378 -0700 @@ -1,4 +1,5 @@ .. include:: replace.txt +.. highlight:: bash Enabling Subsets of |ns3| Modules --------------------------------- @@ -10,11 +11,15 @@ How to enable a subset of |ns3|'s modules ***************************************** -If shared libraries are being built, then enabling a module will cause at least one library to be built: :: +If shared libraries are being built, then enabling a module will cause at least one library to be built: + +.. sourcecode:: text libns3-modulename.so -If the module has a test library and test libraries are being built, then :: +If the module has a test library and test libraries are being built, then + +.. sourcecode:: text libns3-modulename-test.so @@ -31,29 +36,37 @@ To enable only the core module with example and tests, for example, try these commands: :: - ./waf clean - ./waf configure --enable-examples --enable-tests --enable-modules=core - ./waf build - cd build/debug/ - ls + $ ./waf clean + $ ./waf configure --enable-examples --enable-tests --enable-modules=core + $ ./waf build + $ cd build/debug/ + $ ls + +and the following libraries should be present: -and the following libraries should be present: :: +.. sourcecode:: text bindings libns3-core.so ns3 scratch utils examples libns3-core-test.so samples src Note the ``./waf clean`` step is done here only to make it more obvious which module libraries were built. You don't have to do ``./waf clean`` in order to enable subsets of modules. -Running test.py will cause only those tests that depend on module core to be run: :: +Running test.py will cause only those tests that depend on module core to be run: +.. sourcecode:: text + 24 of 24 tests passed (24 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) -Repeat the above steps for the "network" module instead of the "core" module, and the following will be built, since network depends on core: :: +Repeat the above steps for the "network" module instead of the "core" module, and the following will be built, since network depends on core: + +.. sourcecode:: text bindings libns3-core.so libns3-network.so ns3 scratch utils examples libns3-core-test.so libns3-network-test.so samples src -Running test.py will cause those tests that depend on only the core and network modules to be run: :: +Running test.py will cause those tests that depend on only the core and network modules to be run: + +.. sourcecode:: text 31 of 31 tests passed (31 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) @@ -74,9 +87,11 @@ Assuming that you are in the top level |ns3| directory, you can get a copy of the .ns3rc file that is in the ``utils`` directory as follows: :: - cp utils/.ns3rc . + $ cp utils/.ns3rc . -The .ns3rc file should now be in your top level |ns3| directory, and it contains the following: :: +The .ns3rc file should now be in your top level |ns3| directory, and it contains the following: + +.. sourcecode:: python #! /usr/bin/env python @@ -92,7 +107,9 @@ # Set this equal to true if you want tests to be run. tests_enabled = False -Use your favorite editor to modify the .ns3rc file to only enable the core module with examples and tests like this: :: +Use your favorite editor to modify the .ns3rc file to only enable the core module with examples and tests like this: + +.. sourcecode:: python #! /usr/bin/env python @@ -110,28 +127,36 @@ Only the core module will be enabled now if you try these commands: :: - ./waf clean - ./waf configure - ./waf build - cd build/debug/ - ls + $ ./waf clean + $ ./waf configure + $ ./waf build + $ cd build/debug/ + $ ls + +and the following libraries should be present: -and the following libraries should be present: :: +.. sourcecode:: text bindings libns3-core.so ns3 scratch utils examples libns3-core-test.so samples src Note the ``./waf clean`` step is done here only to make it more obvious which module libraries were built. You don't have to do ``./waf clean`` in order to enable subsets of modules. -Running test.py will cause only those tests that depend on module core to be run: :: +Running test.py will cause only those tests that depend on module core to be run: +.. sourcecode:: text + 24 of 24 tests passed (24 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) -Repeat the above steps for the "network" module instead of the "core" module, and the following will be built, since network depends on core: :: +Repeat the above steps for the "network" module instead of the "core" module, and the following will be built, since network depends on core: + +.. sourcecode:: text bindings libns3-core.so libns3-network.so ns3 scratch utils examples libns3-core-test.so libns3-network-test.so samples src -Running test.py will cause those tests that depend on only the core and network modules to be run: :: +Running test.py will cause those tests that depend on only the core and network modules to be run: + +.. sourcecode:: text 31 of 31 tests passed (31 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) diff -Naur ns-3.17/doc/manual/source/enable-tests.rst ns-3.18/doc/manual/source/enable-tests.rst --- ns-3.17/doc/manual/source/enable-tests.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/source/enable-tests.rst 2013-10-26 07:07:29.455364378 -0700 @@ -1,4 +1,6 @@ .. include:: replace.txt +.. highlight:: bash + Enabling/disabling |ns3| Tests and Examples ------------------------------------------- @@ -26,18 +28,22 @@ From the ns-3-allinone directory, you can build |ns3| without any examples or tests simply by doing: :: - ./build.py + $ ./build.py -Running test.py in the top level |ns3| directory now will cause no examples or tests to be run: :: +Running test.py in the top level |ns3| directory now will cause no examples or tests to be run: +.. sourcecode:: text + 0 of 0 tests passed (0 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) If you would like build |ns3| with examples and tests, then do the following from the ns-3-allinone directory: :: - ./build.py --enable-examples --enable-tests + $ ./build.py --enable-examples --enable-tests -Running test.py in the top level |ns3| directory will cause all of the examples and tests to be run: :: +Running test.py in the top level |ns3| directory will cause all of the examples and tests to be run: +.. sourcecode:: text + 170 of 170 tests passed (170 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) Enable/disable examples and tests using waf @@ -50,20 +56,24 @@ From the top level |ns3| directory, you can build |ns3| without any examples or tests simply by doing: :: - ./waf configure - ./waf build + $ ./waf configure + $ ./waf build -Running test.py now will cause no examples or tests to be run: :: +Running test.py now will cause no examples or tests to be run: +.. sourcecode:: text + 0 of 0 tests passed (0 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) If you would like build |ns3| with examples and tests, then do the following from the top level |ns3| directory: :: - ./waf configure --enable-examples --enable-tests - ./waf build + $ ./waf configure --enable-examples --enable-tests + $ ./waf build -Running test.py will cause all of the examples and tests to be run: :: +Running test.py will cause all of the examples and tests to be run: +.. sourcecode:: text + 170 of 170 tests passed (170 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) Enable/disable examples and tests using the |ns3| configuration file @@ -84,9 +94,11 @@ Assuming that you are in the top level |ns3| directory, you can get a copy of the .ns3rc file that is in the ``utils`` directory as follows: :: - cp utils/.ns3rc . + $ cp utils/.ns3rc . -The .ns3rc file should now be in your top level |ns3| directory, and it contains the following: :: +The .ns3rc file should now be in your top level |ns3| directory, and it contains the following: + +.. sourcecode:: python #! /usr/bin/env python @@ -105,16 +117,20 @@ From the top level |ns3| directory, you can build |ns3| without any examples or tests simply by doing: :: - ./waf configure - ./waf build + $ ./waf configure + $ ./waf build -Running test.py now will cause no examples or tests to be run: :: +Running test.py now will cause no examples or tests to be run: +.. sourcecode:: text + 0 of 0 tests passed (0 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) If you would like build |ns3| with examples and tests, use your favorite editor to change the values in the .ns3rc file for -examples_enabled and tests_enabled file to be True: :: +examples_enabled and tests_enabled file to be True: + +.. sourcecode:: python #! /usr/bin/env python @@ -133,9 +149,11 @@ From the top level |ns3| directory, you can build |ns3| with examples and tests simply by doing: :: - ./waf configure - ./waf build + $ ./waf configure + $ ./waf build -Running test.py will cause all of the examples and tests to be run: :: +Running test.py will cause all of the examples and tests to be run: +.. sourcecode:: text + 170 of 170 tests passed (170 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) diff -Naur ns-3.17/doc/manual/source/events.rst ns-3.18/doc/manual/source/events.rst --- ns-3.17/doc/manual/source/events.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/source/events.rst 2013-10-26 07:07:29.459364378 -0700 @@ -1,4 +1,6 @@ .. include:: replace.txt +.. highlight:: cpp + .. heading hierarchy: ------------- Chapter @@ -42,7 +44,7 @@ The Simulator class is the public entry point to access event scheduling facilities. Once a couple of events have been scheduled to start the simulation, the user can start to execute them by entering the simulator -main loop (call Simulator::Run). Once the main loop starts running, it +main loop (call ``Simulator::Run``). Once the main loop starts running, it will sequentially execute all scheduled events in order from oldest to most recent until there are either no more events left in the event queue or Simulator::Stop has been called. @@ -70,7 +72,7 @@ Which will output: -:: +.. sourcecode:: text handler called with argument arg0=10 and arg1=5 diff -Naur ns-3.17/doc/manual/source/gnuplot.rst ns-3.18/doc/manual/source/gnuplot.rst --- ns-3.17/doc/manual/source/gnuplot.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/source/gnuplot.rst 2013-10-26 07:07:29.459364378 -0700 @@ -1,5 +1,6 @@ .. include:: replace.txt - +.. highlight:: cpp + Making Plots using the Gnuplot Class ------------------------------------ @@ -25,39 +26,51 @@ An Example Program that Uses the Gnuplot Class ********************************************** -An example program that uses |ns3|'s Gnuplot class can be found here: :: +An example program that uses |ns3|'s Gnuplot class can be found here: + +.. sourcecode:: bash + + src/stats/examples/gnuplot-example.cc + +In order to run this example, do the following: - src/tools/examples/gnuplot-example.cc +.. sourcecode:: bash -In order to run this example, do the following: :: + $ ./waf shell + $ cd build/debug/src/stats/examples + $ ./gnuplot-example - ./waf shell - cd build/debug/src/tools/examples - ./gnuplot-example +This should produce the following gnuplot control files in the directory where the example is located: -This should produce the following gnuplot control files in the directory where the example is located: :: +.. sourcecode:: text plot-2d.plt plot-2d-with-error-bars.plt plot-3d.plt -In order to process these gnuplot control files, do the following: :: +In order to process these gnuplot control files, do the following: - gnuplot plot-2d.plt - gnuplot plot-2d-with-error-bars.plt - gnuplot plot-3d.plt +.. sourcecode:: bash -This should produce the following graphics files in the directory where the example is located: :: + $ gnuplot plot-2d.plt + $ gnuplot plot-2d-with-error-bars.plt + $ gnuplot plot-3d.plt + +This should produce the following graphics files in the directory where the example is located: + +.. sourcecode:: text plot-2d.png plot-2d-with-error-bars.png plot-3d.png -You can view these graphics files in your favorite graphics viewer. If you have gimp installed on your machine, for example, you can do this: :: +You can view these graphics files in your favorite graphics viewer. If you have gimp installed on your machine, for example, you can do this: + +.. sourcecode:: bash - gimp plot-2d.png - gimp plot-2d-with-error-bars.png - gimp plot-3d.png + $ gimp plot-2d.png + $ gimp plot-2d-with-error-bars.png + $ gimp plot-3d.png An Example 2-Dimensional Plot ***************************** diff -Naur ns-3.17/doc/manual/source/hash-functions.rst ns-3.18/doc/manual/source/hash-functions.rst --- ns-3.17/doc/manual/source/hash-functions.rst 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/doc/manual/source/hash-functions.rst 2013-10-26 07:07:29.459364378 -0700 @@ -0,0 +1,118 @@ +.. include:: replace.txt +.. highlight:: cpp + +Hash Functions +---------------- + +|ns3| provides a generic interface to general purpose hash functions. +In the simplest usage, the hash function returns the 32-bit or 64-bit +hash of a data buffer or string. The default underlying hash function +is murmur3_, chosen because it has good hash function properties and +offers a 64-bit version. The venerable FNV1a_ hash is also available. + +There is a straight-forward mechanism to +add (or provide at run time) alternative hash function implementations. + +.. _murmur3: http://code.google.com/p/smhasher/wiki/MurmurHash3 +.. _FNV1a: http://isthe.com/chongo/tech/comp/fnv/ + +Basic Usage +*********** + +The simplest way to get a hash value of a data buffer or string is just:: + + #include "ns3/hash.h" + + using namespace ns3; + + char * buffer = ... + size_t buffer_size = ... + + uint32_t buffer_hash = Hash32 ( buffer, buffer_size); + + std::string s; + uint32_t string_hash = Hash32 (s); + +Equivalent functions are defined for 64-bit hash values. + +Incremental Hashing +******************* + +In some situations it's useful to compute the hash of multiple buffers, +as if they had been joined together. (For example, you might want +the hash of a packet stream, but not want to assemble a single buffer +with the combined contents of all the packets.) + +This is almost as straight-forward as the first example:: + + #include "ns3/hash.h" + + using namespace ns3; + + char * buffer; + size_t buffer_size; + + Hasher hasher; // Use default hash function + + for () + { + buffer = get_next_buffer (); + hasher (buffer, buffer_size); + } + uint32_t combined_hash = hasher.GetHash32 (); + +By default ``Hasher`` preserves internal state to enable incremental +hashing. If you want to reuse a ``Hasher`` object (for example +because it's configured with a non-default hash function), but don't +want to add to the previously computed hash, you need to ``clear()`` +first:: + + hasher.clear ().GetHash32 (buffer, buffer_size); + +This reinitializes the internal state before hashing the buffer. + + +Using an Alternative Hash Function +********************************** + +The default hash function is murmur3_. FNV1a_ is also available. To specify +the hash function explicitly, use this contructor:: + + Hasher hasher = Hasher ( Create () ); + + +Adding New Hash Function Implementations +**************************************** + +To add the hash function ``foo``, follow the ``hash-murmur3.h``/``.cc`` pattern: + + * Create a class declaration (``.h``) and definition (``.cc``) inheriting + from ``Hash::Implementation``. + * ``include`` the declaration in ``hash.h`` (at the point where + ``hash-murmur3.h`` is included. + * In your own code, instantiate a ``Hasher`` object via the constructor + ``Hasher (Ptr ())`` + + +If your hash function is a single function, e.g. ``hashf``, you don't +even need to create a new class derived from HashImplementation:: + + Hasher hasher = + Hasher ( Create (&hashf) ); + +For this to compile, your ``hashf`` has to match one of the function pointer +signatures:: + + typedef uint32_t (*Hash32Function_ptr) (const char *, const size_t); + typedef uint64_t (*Hash64Function_ptr) (const char *, const size_t); + + +Sources for Hash Functions +************************** + +Sources for other hash function implementations include: + + * Peter Kankowski: http://www.strchr.com + * Arash Partow: http://www.partow.net/programming/hashfunctions/index.html + * SMHasher: http://code.google.com/p/smhasher/ + * Sanmayce: http://www.sanmayce.com/Fastest_Hash/index.html diff -Naur ns-3.17/doc/manual/source/helpers.rst ns-3.18/doc/manual/source/helpers.rst --- ns-3.17/doc/manual/source/helpers.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/source/helpers.rst 2013-10-26 07:07:29.459364378 -0700 @@ -1,4 +1,5 @@ .. include:: replace.txt +.. highlight:: cpp Helpers ------- diff -Naur ns-3.17/doc/manual/source/how-to-write-tests.rst ns-3.18/doc/manual/source/how-to-write-tests.rst --- ns-3.17/doc/manual/source/how-to-write-tests.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/source/how-to-write-tests.rst 2013-10-26 07:07:29.455364378 -0700 @@ -1,4 +1,5 @@ .. include:: replace.txt +.. highlight:: cpp How to write tests ------------------ @@ -46,7 +47,7 @@ You also need to add a block into your wscript to get this test to compile: -:: +.. sourcecode:: python module_test.source = [ 'test/router-test-suite.cc', @@ -64,13 +65,13 @@ Try this command: -:: +.. sourcecode:: bash - ./test.py -s router + $ ./test.py -s router Output such as below should be produced: -:: +.. sourcecode:: text PASS: TestSuite router 1 of 1 tests passed (1 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) diff -Naur ns-3.17/doc/manual/source/index.rst ns-3.18/doc/manual/source/index.rst --- ns-3.17/doc/manual/source/index.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/source/index.rst 2013-10-26 07:07:29.459364378 -0700 @@ -18,6 +18,7 @@ organization random-variables + hash-functions events callbacks object-model @@ -25,6 +26,8 @@ object-names logging tracing + data-collection + statistics realtime helpers gnuplot diff -Naur ns-3.17/doc/manual/source/logging.rst ns-3.18/doc/manual/source/logging.rst --- ns-3.17/doc/manual/source/logging.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/source/logging.rst 2013-10-26 07:07:29.459364378 -0700 @@ -1,4 +1,5 @@ .. include:: replace.txt +.. highlight:: cpp .. heading hierarchy: ------------- Chapter @@ -71,7 +72,7 @@ This section still needs documentation; bug 1496 is open on this: -:: +.. sourcecode:: bash $ NS_LOG="*=all|prefix_all" ./waf --run scratch-simulator Scratch Simulator @@ -88,16 +89,16 @@ There are two ways that users typically control logging output. The first is by setting an ``NS_LOG`` environment variable; e.g.: -:: +.. sourcecode:: bash - NS_LOG="*" ./waf --run first + $ NS_LOG="*" ./waf --run first will run the first tutorial program with all logging output. This can be made more granular by selecting individual components: -:: +.. sourcecode:: bash - NS_LOG="Ipv4L3Protocol" ./waf --run first + $ NS_LOG="Ipv4L3Protocol" ./waf --run first The second way to enable this is to use explicit statements in your program, such as in the first tutorial program: diff -Naur ns-3.17/doc/manual/source/new-models.rst ns-3.18/doc/manual/source/new-models.rst --- ns-3.17/doc/manual/source/new-models.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/source/new-models.rst 2013-10-26 07:07:29.459364378 -0700 @@ -1,4 +1,5 @@ .. include:: replace.txt +.. highlight:: cpp Creating a new ns-3 model ------------------------- @@ -408,7 +409,7 @@ :: - point-to-point-net-device.h + /* point-to-point-net-device.h */ class ErrorModel; /** @@ -473,7 +474,7 @@ :: - simple-error-model.cc + /* simple-error-model.cc */ // Error model // We want to add an error model to node 3's NetDevice diff -Naur ns-3.17/doc/manual/source/new-modules.rst ns-3.18/doc/manual/source/new-modules.rst --- ns-3.17/doc/manual/source/new-modules.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/source/new-modules.rst 2013-10-26 07:07:29.455364378 -0700 @@ -1,4 +1,5 @@ .. include:: replace.txt +.. highlight:: cpp Adding a New Module to |ns3| ---------------------------- @@ -20,7 +21,9 @@ src/spectrum A prototypical module has the following directory structure and -required files: :: +required files: + +.. sourcecode:: text src/ module-name/ @@ -39,29 +42,39 @@ Step 2 - Create your new module based on the template module ************************************************************ -A python program is provided in the source directory that will create a skeleton for a new module :: +A python program is provided in the source directory that will create a skeleton for a new module + +.. sourcecode:: bash + + $ src/create-module.py + +For the purposes of this discussion we will assume that your new module is called "new-module". From the ``src`` directory, do the following to create the new module: - src/create-module.py +.. sourcecode:: bash -For the purposes of this discussion we will assume that your new module is called "new-module". From the ``src`` directory, do the following to create the new module: :: + $ ./create-module.py new-module - ./create-module.py new-module +Next, cd into ``new-module``; you will find this directory layout: -Next, cd into ``new-module``; you will find this directory layout: :: +.. sourcecode:: text - examples helper model test wscript + $ examples helper model test wscript We next walk through how to customize this module. All |ns3| modules depend on the 'core' module and usually on other modules. This dependency is specified in the wscript file. Let's assume that 'new-module' depends on the internet, mobility, and aodv modules. Then the call to the function that will -create this module should look like this before editing: :: +create this module should look like this before editing: + +.. sourcecode:: python def build(bld): module = bld.create_ns3_module('new-module', ['core']) -and after editing: :: +and after editing: + +.. sourcecode:: python def build(bld): module = bld.create_ns3_module('new-module', ['internet', 'mobility', 'aodv']) @@ -82,18 +95,24 @@ ********************************************* If your new module has model and/or helper source files, then they -must be specified in your :: +must be specified in your + +.. sourcecode:: text src/new-module/wscript file by modifying it with your text editor. As an example, the source files for the spectrum module are specified -in :: +in + +.. sourcecode:: text src/spectrum/wscript -with the following list of source files: :: +with the following list of source files: + +.. sourcecode:: python module.source = [ 'model/spectrum-model.cc', @@ -112,20 +131,26 @@ ******************************************* If your new module has model and/or helper header files, then they -must be specified in your :: +must be specified in your + +.. sourcecode:: text src/new-module/wscript file by modifying it with your text editor. As an example, the header files for the spectrum module are specified -in :: +in + +.. sourcecode:: text src/spectrum/wscript with the following function call, module name, and list of header files. Note that the argument for the function new_task_gen() tells -waf to install this module's headers with the other |ns3| headers: :: +waf to install this module's headers with the other |ns3| headers: + +.. sourcecode:: python headers = bld.new_task_gen(features=['ns3header']) @@ -147,17 +172,23 @@ Step 5 - Specify your module's tests ************************************ -If your new module has tests, then they must be specified in your :: +If your new module has tests, then they must be specified in your + +.. sourcecode:: text src/new-module/wscript file by modifying it with your text editor. -As an example, the tests for the spectrum module are specified in :: +As an example, the tests for the spectrum module are specified in + +.. sourcecode:: text src/spectrum/wscript -with the following function call and list of test suites: :: +with the following function call and list of test suites: + +.. sourcecode:: python module_test = bld.create_ns3_module_test_library('spectrum') @@ -170,20 +201,26 @@ Step 6 - Specify your module's examples *************************************** -If your new module has examples, then they must be specified in your :: +If your new module has examples, then they must be specified in your + +.. sourcecode:: text src/new-module/examples/wscript file by modifying it with your text editor. -As an example, the examples for the core module are specified in :: +As an example, the examples for the core module are specified in + +.. sourcecode:: text src/core/examples/wscript The core module's C++ examples are specified using the following function calls and source file names. Note that the second argument for the function ``create_ns3_program()`` is the list of modules that the -program being created depends on: :: +program being created depends on: + +.. sourcecode:: python obj = bld.create_ns3_program('main-callback', ['core']) obj.source = 'main-callback.cc' @@ -194,7 +231,9 @@ The core module's Python examples are specified using the following function call. Note that the second argument for the function register_ns3_script() is the list of modules that the Python example -depends on: :: +depends on: + +.. sourcecode:: python bld.register_ns3_script('sample-simulator.py', ['core']) @@ -207,11 +246,15 @@ that exists in each module's test directory can control the invocation of the examples when the test framework runs. -As an example, the examples that are run by ``test.py`` for the core module are specified in :: +As an example, the examples that are run by ``test.py`` for the core module are specified in + +.. sourcecode:: text src/core/test/examples-to-run.py -using the following two lists of C++ and Python examples: :: +using the following two lists of C++ and Python examples: + +.. sourcecode:: python # A list of C++ examples to run in order to ensure that they remain # buildable and runnable over time. Each tuple in the list contains @@ -238,7 +281,9 @@ ("sample-simulator.py", "True"), ] -Each tuple in the C++ list of examples to run contains :: +Each tuple in the C++ list of examples to run contains + +.. sourcecode:: python (example_name, do_run, do_valgrind_run) @@ -249,11 +294,15 @@ some tests when they are run under valgrind. Note that the two conditions are Python statements that -can depend on waf configuration variables. For example, :: +can depend on waf configuration variables. For example, + +.. sourcecode:: python ("tcp-nsc-lfn", "NSC_ENABLED == True", "NSC_ENABLED == False"), -Each tuple in the Python list of examples to run contains :: +Each tuple in the Python list of examples to run contains + +.. sourcecode:: python (example_name, do_run) @@ -261,12 +310,16 @@ do_run is a condition under which to run the example. Note that the condition is a Python statement that can -depend on waf configuration variables. For example, :: +depend on waf configuration variables. For example, + +.. sourcecode:: python ("realtime-udp-echo.py", "ENABLE_REAL_TIME == False"), If your new module has examples, then you must specify which of them -should be run in your :: +should be run in your + +.. sourcecode:: text src/new-module/test/examples-to-run.py @@ -276,10 +329,12 @@ Step 8 - Build and test your new module *************************************** -You can now build and test your module as normal: :: +You can now build and test your module as normal: + +.. sourcecode:: bash - ./waf configure --enable-examples --enable-tests - ./waf build - ./test.py + $ ./waf configure --enable-examples --enable-tests + $ ./waf build + $ ./test.py and look for your new module's test suite (and example programs, if enabled) in the test output. diff -Naur ns-3.17/doc/manual/source/object-model.rst ns-3.18/doc/manual/source/object-model.rst --- ns-3.17/doc/manual/source/object-model.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/source/object-model.rst 2013-10-26 07:07:29.459364378 -0700 @@ -1,4 +1,5 @@ .. include:: replace.txt +.. highlight:: cpp .. _Object-model: diff -Naur ns-3.17/doc/manual/source/object-names.rst ns-3.18/doc/manual/source/object-names.rst --- ns-3.17/doc/manual/source/object-names.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/source/object-names.rst 2013-10-26 07:07:29.455364378 -0700 @@ -1,4 +1,5 @@ .. include:: replace.txt +.. highlight:: cpp .. _Object-names: diff -Naur ns-3.17/doc/manual/source/organization.rst ns-3.18/doc/manual/source/organization.rst --- ns-3.17/doc/manual/source/organization.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/source/organization.rst 2013-10-26 07:07:29.459364378 -0700 @@ -1,4 +1,5 @@ .. include:: replace.txt +.. highlight:: cpp Organization diff -Naur ns-3.17/doc/manual/source/python.rst ns-3.18/doc/manual/source/python.rst --- ns-3.17/doc/manual/source/python.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/source/python.rst 2013-10-26 07:07:29.459364378 -0700 @@ -1,4 +1,5 @@ .. include:: replace.txt +.. highlight:: python Using Python to Run |ns3| ------------------------- @@ -74,30 +75,30 @@ waf contains some options that automatically update the python path to find the ns3 module. To run example programs, there are two ways to use waf to take care of this. One is to run a waf shell; e.g.: -:: +.. sourcecode:: bash - ./waf --shell - python examples/mixed-wireless.py + $ ./waf --shell + $ python examples/wireless/mixed-wireless.py and the other is to use the --pyrun option to waf: -:: +.. sourcecode:: bash - ./waf --pyrun examples/mixed-wireless.py + $ ./waf --pyrun examples/wireless/mixed-wireless.py To run a python script under the C debugger: -:: +.. sourcecode:: bash - ./waf --shell - gdb --args python examples/mixed-wireless.py + $ ./waf --shell + $ gdb --args python examples/wireless/mixed-wireless.py To run your own Python script that calls |ns3| and that has this path, ``/path/to/your/example/my-script.py``, do the following: -:: +.. sourcecode:: bash - ./waf --shell - python /path/to/your/example/my-script.py + $ ./waf --shell + $ python /path/to/your/example/my-script.py Caveats ******* @@ -118,9 +119,9 @@ Conversion Constructors +++++++++++++++++++++++ -Conversion constructors (http://publib.boulder.ibm.com/infocenter/compbgpl/v9v111/topic/com.ibm.xlcpp9.bg.doc/language_ref/cplr384.htm) are not fully supported yet by PyBindGen, and they always act as explicit constructors when translating an API into Python. For example, in C++ you can do this: +`Conversion constructors `_ are not fully supported yet by PyBindGen, and they always act as explicit constructors when translating an API into Python. For example, in C++ you can do this: -:: +.. sourcecode:: cpp Ipv4AddressHelper ipAddrs; ipAddrs.SetBase ("192.168.0.0", "255.255.255.0"); @@ -188,9 +189,9 @@ If you really care about Python bindings on Windows, try building with mingw and native python instead. Or else, to build without python bindings, disable python bindings in the configuration stage: -:: +.. sourcecode:: bash - ./waf configure --disable-python + $ ./waf configure --disable-python Working with Python Bindings **************************** @@ -211,9 +212,9 @@ If something goes wrong with compiling Python bindings and you just want to ignore them and move on with C++, you can disable Python with: -:: +.. sourcecode:: bash - ./waf --disable-python + $ ./waf --disable-python Instructions for Handling New Files or Changed API's **************************************************** @@ -230,9 +231,9 @@ To scan the monolithic Python bindings do the following: -:: +.. sourcecode:: bash - ./waf --python-scan + $ ./waf --python-scan Organization of the Monolithic Python Bindings ++++++++++++++++++++++++++++++++++++++++++++++ @@ -269,15 +270,15 @@ To scan the modular Python bindings for the core module, for example, do the following: -:: +.. sourcecode:: bash - ./waf --apiscan=core + $ ./waf --apiscan=core To scan the modular Python bindings for all of the modules, do the following: -:: +.. sourcecode:: bash - ./waf --apiscan=all + $ ./waf --apiscan=all Creating a New Module +++++++++++++++++++++ @@ -311,5 +312,4 @@ More Information for Developers ******************************* -If you are a developer and need more information on |ns3|'s Python bindings, please see the Python Bindings wiki page at -``_. +If you are a developer and need more information on |ns3|'s Python bindings, please see the `Python Bindings wiki page `_. diff -Naur ns-3.17/doc/manual/source/random-variables.rst ns-3.18/doc/manual/source/random-variables.rst --- ns-3.17/doc/manual/source/random-variables.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/source/random-variables.rst 2013-10-26 07:07:29.459364378 -0700 @@ -1,4 +1,5 @@ .. include:: replace.txt +.. highlight:: cpp Random Variables ---------------- @@ -125,7 +126,7 @@ before any random variables are created; e.g:: RngSeedManager::SetSeed (3); // Changes seed from default of 1 to 3 - RngSeedManager::SetRun (7); // Changes run number from default of 1 to 7 + RngSeedManager::SetRun (7); // Changes run number from default of 1 to 7 // Now, create random variables Ptr x = CreateObject (); Ptr y = CreateObject (); @@ -143,18 +144,24 @@ For ease of use, it is not necessary to control the seed and run number from within the program; the user can set the ``NS_GLOBAL_VALUE`` environment -variable as follows:: +variable as follows: - NS_GLOBAL_VALUE="RngRun=3" ./waf --run program-name +.. sourcecode:: bash + + $ NS_GLOBAL_VALUE="RngRun=3" ./waf --run program-name Another way to control this is by passing a command-line argument; since this is -an |ns3| GlobalValue instance, it is equivalently done such as follows:: +an |ns3| GlobalValue instance, it is equivalently done such as follows: + +.. sourcecode:: bash - ./waf --command-template="%s --RngRun=3" --run program-name + $ ./waf --command-template="%s --RngRun=3" --run program-name -or, if you are running programs directly outside of waf:: +or, if you are running programs directly outside of waf: - ./build/optimized/scratch/program-name --RngRun=3 +.. sourcecode:: bash + + $ ./build/optimized/scratch/program-name --RngRun=3 The above command-line variants make it easy to run lots of different runs from a shell script by just passing a different RngRun index. @@ -177,7 +184,9 @@ ********************* Below are excerpted a few public methods of class :cpp:class:`RandomVariableStream` -that access the next value in the substream.:: +that access the next value in the substream. + +:: /** * \brief Returns a random double from the underlying distribution @@ -226,7 +235,7 @@ RandomVariableStream instances can also be used in |ns3| attributes, which means that values can be set for them through the |ns3| attribute system. -An example is in the propagation models for WifiNetDevice::: +An example is in the propagation models for WifiNetDevice:: TypeId RandomPropagationDelayModel::GetTypeId (void) @@ -278,20 +287,20 @@ By partitioning the existing sequence of streams from before: -:: +.. sourcecode:: text <--------------------------------------------------------------------------> - stream 0 stream (2^64 - 1) + stream 0 stream (2^64 - 1) into two equal-sized sets: -:: +.. sourcecode:: text - <---------------------------------------------------------------------------> - ^ ^^ ^ - | || | - stream 0 stream (2^63 - 1) stream 2^63 stream (2^64 - 1) - <- automatically assigned -----><-------- assigned by user-----------> + <--------------------------------------------------------------------------> + ^ ^^ ^ + | || | + stream 0 stream (2^63 - 1) stream 2^63 stream (2^64 - 1) + <- automatically assigned -----------><- assigned by user -----------------> The first 2^63 streams continue to be automatically assigned, while the last 2^63 are given stream indices starting with zero up to diff -Naur ns-3.17/doc/manual/source/realtime.rst ns-3.18/doc/manual/source/realtime.rst --- ns-3.17/doc/manual/source/realtime.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/source/realtime.rst 2013-10-26 07:07:29.459364378 -0700 @@ -1,4 +1,5 @@ .. include:: replace.txt +.. highlight:: cpp RealTime -------- @@ -61,9 +62,11 @@ StringValue ("ns3::RealtimeSimulatorImpl")); There is a script in ``examples/realtime/realtime-udp-echo.cc`` that -has an example of how to configure the realtime behavior. Try: :: +has an example of how to configure the realtime behavior. Try: - ./waf --run realtime-udp-echo +.. sourcecode:: bash + + $ ./waf --run realtime-udp-echo Whether the simulator will work in a best effort or hard limit policy fashion is governed by the attributes explained in the previous section. diff -Naur ns-3.17/doc/manual/source/replace.txt ns-3.18/doc/manual/source/replace.txt --- ns-3.17/doc/manual/source/replace.txt 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/source/replace.txt 2013-10-26 07:07:29.455364378 -0700 @@ -1,3 +1,5 @@ .. |ns3| replace:: *ns-3* .. |ns2| replace:: *ns-2* + +.. |check| replace:: :math:`\checkmark` diff -Naur ns-3.17/doc/manual/source/test-framework.rst ns-3.18/doc/manual/source/test-framework.rst --- ns-3.17/doc/manual/source/test-framework.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/source/test-framework.rst 2013-10-26 07:07:29.459364378 -0700 @@ -1,4 +1,5 @@ .. include:: replace.txt +.. highlight:: bash Testing framework ----------------- @@ -27,7 +28,9 @@ Users (and developers) typically will not interact with the buildbot 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-developers* 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: @@ -69,20 +72,20 @@ :: - ./waf configure --enable-examples --enable-tests - ./waf + $ ./waf configure --enable-examples --enable-tests + $ ./waf By default, ``test.py`` will run all available tests and report status back in a very concise form. Running the command :: - ./test.py + $ ./test.py will result in a number of ``PASS``, ``FAIL``, ``CRASH`` or ``SKIP`` indications followed by the kind of test that was run and its display name. -:: +.. 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' @@ -103,7 +106,7 @@ There are a number of options available to control the behavior of ``test.py``. if you run ``test.py --help`` you should see a command summary like: -:: +.. sourcecode:: text Usage: test.py [options] @@ -145,7 +148,7 @@ :: - ./test.py --html=nightly.html + $ ./test.py --html=nightly.html In this case, an HTML file named ''nightly.html'' would be created with a pretty summary of the testing done. A ''human readable'' format is available for users @@ -153,7 +156,7 @@ :: - ./test.py --text=results.txt + $ ./test.py --text=results.txt In the example above, the test suite checking the |ns3| wireless device propagation loss models failed. By default no further information is @@ -164,17 +167,17 @@ :: - ./test.py --suite=ns3-wifi-propagation-loss-models + $ ./test.py --suite=ns3-wifi-propagation-loss-models or equivalently :: - ./test.py -s ns3-wifi-propagation-loss-models + $ ./test.py -s ns3-wifi-propagation-loss-models results in that single test suite being run. -:: +.. sourcecode:: text FAIL: TestSuite ns3-wifi-propagation-loss-models @@ -182,13 +185,14 @@ 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=ns3-wifi-propagation-loss-models --text=results.txt This will result in that single test suite being run with the test status written to the file ''results.txt''. -You should find something similar to the following in that file:: +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) PASS: Test Case "Check ... Friis ... model ..." (real 0.01 user 0.00 system 0.00) @@ -222,21 +226,23 @@ the types of tests being run to a particular class of tests. The following command will result in only the unit tests being run:: - ./test.py --constrain=unit + $ ./test.py --constrain=unit Similarly, the following command will result in only the example smoke tests being run:: - ./test.py --constrain=unit + $ ./test.py --constrain=unit To see a quick list of the legal kinds of constraints, you can ask for them to be listed. The following command :: - ./test.py --kinds + $ ./test.py --kinds -will result in the following list being displayed:: +will result in the following list being displayed: + +.. 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' @@ -256,9 +262,11 @@ :: - ./test.py --list + $ ./test.py --list + +will result in a list of the test suite being displayed, similar to -will result in a list of the test suite being displayed, similar to:: +.. 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' @@ -291,11 +299,11 @@ :: - ./test.py --example=udp-echo + $ ./test.py --example=udp-echo results in that single example being run. -:: +.. sourcecode:: text PASS: Example examples/udp/udp-echo @@ -304,7 +312,7 @@ :: - ./test.py --buildpath=/home/craigdo/repos/ns-3-allinone-test/ns-3-dev/build/debug --example=wifi-simple-adhoc + $ ./test.py --buildpath=/home/craigdo/repos/ns-3-allinone-test/ns-3-dev/build/debug --example=wifi-simple-adhoc One can run a single Python example program using the ``--pyexample`` option. Note that the relative path for the example must be included @@ -312,11 +320,11 @@ :: - ./test.py --pyexample=examples/tutorial/first.py + $ ./test.py --pyexample=examples/tutorial/first.py results in that single example being run. -:: +.. sourcecode:: text PASS: Example examples/tutorial/first.py @@ -344,9 +352,11 @@ :: - ./test.py --list --nowaf + $ ./test.py --list --nowaf + +will result in a list of the currently built test suites being displayed, similar to: -will result in a list of the currently built test suites being displayed, similar to:: +.. sourcecode:: text ns3-wifi-propagation-loss-models ns3-tcp-cwnd @@ -366,7 +376,7 @@ :: - ./test.py --grind + $ ./test.py --grind As it runs, ``test.py`` and the programs that it runs indirectly, generate large numbers of temporary files. Usually, the content of these files is not interesting, @@ -378,7 +388,7 @@ :: - ./test.py --retain + $ ./test.py --retain Finally, ``test.py`` provides a ``--verbose`` option which will print large amounts of information about its progress. It is not expected that this @@ -386,13 +396,13 @@ access to the standard output and standard error reported by running test suites and examples. Select verbose in the following way:: - ./test.py --verbose + $ ./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 output file, one would do:: - ./test.py --verbose --grind --constrain=core --html=results.html + $ ./test.py --verbose --grind --constrain=core --html=results.html TestTaxonomy ************ @@ -480,7 +490,7 @@ :: - ./waf --configure --enable-examples --enable-tests + $ ./waf --configure --enable-examples --enable-tests Then, build ns-3, and after it is built, just run ``test.py``. ``test.py -h`` will show a number of configuration options that modify the behavior @@ -501,9 +511,11 @@ In order to execute the test-runner, you run it like any other ns-3 executable -- using ``waf``. To get a list of available options, you can type:: - ./waf --run "test-runner --help" + $ ./waf --run "test-runner --help" -You should see something like the following:: +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' @@ -537,10 +549,10 @@ :: - ./waf shell - cd build/debug/utils - gdb test-runner - run --suite=global-value --assert + $ ./waf shell + $ cd build/debug/utils + $ gdb test-runner + $ run --suite=global-value --assert 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`` @@ -556,7 +568,7 @@ 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 --basedir=`pwd` --suite=pcap-file-object" + $ ./waf --run "test-runner --basedir=`pwd` --suite=pcap-file-object" Note the ''backward'' quotation marks on the ``pwd`` command. @@ -601,7 +613,7 @@ :: - ./test.py -r + $ ./test.py -r and test output can be found in the ``testpy-output/`` directory. @@ -619,11 +631,11 @@ :: - ./waf --run "test-runner --basedir=`pwd` --suite=pcap-file-object --out=myfile.xml" + $ ./waf --run "test-runner --basedir=`pwd` --suite=pcap-file-object --out=myfile.xml" If you look at the file ``myfile.xml`` you should see something like, -:: +.. sourcecode:: xml pcap-file-object @@ -669,7 +681,9 @@ Debugging test suite failures +++++++++++++++++++++++++++++ -To debug test crashes, such as:: +To debug test crashes, such as + +.. sourcecode:: text CRASH: TestSuite ns3-wifi-interference @@ -677,7 +691,7 @@ then pass the "--basedir=`pwd`" argument to run (you can also pass other arguments as needed, but basedir is the minimum needed):: - ./waf --command-template="gdb %s" --run "test-runner" + $ ./waf --command-template="gdb %s" --run "test-runner" Waf: Entering directory `/home/tomh/hg/sep09/ns-3-allinone/ns-3-dev-678/build' Waf: Leaving directory `/home/tomh/hg/sep09/ns-3-allinone/ns-3-dev-678/build' 'build' finished successfully (0.380s) @@ -699,7 +713,7 @@ 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 --basedir=`pwd` --suite=devices-mesh-dot11s-regression" --run test-runner Class TestRunner **************** @@ -736,7 +750,7 @@ The following code will define a new class that can be run by ``test.py`` as a ''unit'' test with the display name, ``my-test-suite-name``. -:: +.. sourcecode:: cpp class MySuite : public TestSuite { @@ -766,7 +780,7 @@ from the ``TestCase`` base class, override the constructor to give the test case a name and override the ``DoRun`` method to run the test. -:: +.. sourcecode:: cpp class MyTestCase : public TestCase { diff -Naur ns-3.17/doc/manual/source/tracing.rst ns-3.18/doc/manual/source/tracing.rst --- ns-3.17/doc/manual/source/tracing.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/source/tracing.rst 2013-10-26 07:07:29.455364378 -0700 @@ -1,4 +1,5 @@ .. include:: replace.txt +.. highlight:: cpp Tracing ------- @@ -269,7 +270,7 @@ indicates a ``GetObject`` call should be made looking for the type that follows. When a node is initialized by an ``InternetStackHelper`` a number of interfaces are aggregated to the node. One of these is the TCP level four protocol. The -runtime type of this protocol object is "ns3::TcpL4Protocol". When the +runtime type of this protocol object is ``ns3::TcpL4Protocol''. When the ``GetObject`` is executed, it returns a pointer to the object of this type. The ``TcpL4Protocol`` class defines an Attribute called "SocketList" which is a @@ -342,14 +343,15 @@ The trace helpers therefore fall naturally into a two-dimensional taxonomy. There are subtleties that prevent all four classes from behaving identically, but we do strive to make them all work as similarly as possible; and whenever -possible there are analogs for all methods in all classes.:: +possible there are analogs for all methods in all classes. - | pcap | ascii | - -----------------+------+-------| - Device Helper | | | - -----------------+------+-------| - Protocol Helper | | | - -----------------+------+-------| + +-----------------+---------+---------+ + | | pcap | ascii | + +=================+=========+=========+ + | Device Helper | |check| | |check| | + +-----------------+---------+---------+ + | Protocol Helper | |check| | |check| | + +-----------------+---------+---------+ We use an approach called a ``mixin`` to add tracing functionality to our helper classes. A ``mixin`` is a class that provides functionality to that is @@ -393,11 +395,16 @@ :: - void EnablePcap (std::string prefix, Ptr nd, bool promiscuous = false, bool explicitFilename = false); - void EnablePcap (std::string prefix, std::string ndName, bool promiscuous = false, bool explicitFilename = false); - void EnablePcap (std::string prefix, NetDeviceContainer d, bool promiscuous = false); - void EnablePcap (std::string prefix, NodeContainer n, bool promiscuous = false); - void EnablePcap (std::string prefix, uint32_t nodeid, uint32_t deviceid, bool promiscuous = false); + void EnablePcap (std::string prefix, Ptr nd, + bool promiscuous = false, bool explicitFilename = false); + void EnablePcap (std::string prefix, std::string ndName, + bool promiscuous = false, bool explicitFilename = false); + void EnablePcap (std::string prefix, NetDeviceContainer d, + bool promiscuous = false); + void EnablePcap (std::string prefix, NodeContainer n, + bool promiscuous = false); + void EnablePcap (std::string prefix, uint32_t nodeid, uint32_t deviceid, + bool promiscuous = false); void EnablePcapAll (std::string prefix, bool promiscuous = false); In each of the methods shown above, there is a default parameter called diff -Naur ns-3.17/doc/manual/source/troubleshoot.rst ns-3.18/doc/manual/source/troubleshoot.rst --- ns-3.17/doc/manual/source/troubleshoot.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/manual/source/troubleshoot.rst 2013-10-26 07:07:29.455364378 -0700 @@ -1,4 +1,5 @@ .. include:: replace.txt +.. highlight:: bash Troubleshooting --------------- @@ -22,18 +23,20 @@ Here is an example of what might occur::: - ns-old:~/ns-3-nsc$ ./waf --run tcp-point-to-point - Entering directory `/home/tomh/ns-3-nsc/build' + $ ./waf --run tcp-point-to-point + Entering directory '/home/tomh/ns-3-nsc/build' Compilation finished successfully Command ['/home/tomh/ns-3-nsc/build/debug/examples/tcp-point-to-point'] exited with code -11 The error message says that the program terminated unsuccessfully, but it is not clear from this information what might be wrong. To examine more closely, try running it under the `gdb debugger -`_::: +`_: - ns-old:~/ns-3-nsc$ ./waf --run tcp-point-to-point --command-template="gdb %s" - Entering directory `/home/tomh/ns-3-nsc/build' +.. sourcecode:: bash + + $ ./waf --run tcp-point-to-point --command-template="gdb %s" + Entering directory '/home/tomh/ns-3-nsc/build' Compilation finished successfully GNU gdb Red Hat Linux (6.3.0.0-1.134.fc5rh) Copyright 2004 Free Software Foundation, Inc. @@ -66,7 +69,9 @@ This tells us that there was an attempt to dereference a null pointer socketFactory. -Let's look around line 136 of tcp-point-to-point, as gdb suggests::: +Let's look around line 136 of tcp-point-to-point, as gdb suggests: + +.. sourcecode:: cpp Ptr socketFactory = n2->GetObject (Tcp::iid); Ptr localSocket = socketFactory->CreateSocket (); @@ -77,6 +82,6 @@ Sometimes you may need to use the `valgrind memory checker `_ for more subtle errors. Again, you invoke the use of -valgrind similarly::: +valgrind similarly:: - ns-old:~/ns-3-nsc$ ./waf --run tcp-point-to-point --command-template="valgrind %s" + $ ./waf --run tcp-point-to-point --command-template="valgrind %s" diff -Naur ns-3.17/doc/models/Makefile ns-3.18/doc/models/Makefile --- ns-3.17/doc/models/Makefile 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/models/Makefile 2013-10-26 07:07:29.451364379 -0700 @@ -65,6 +65,7 @@ $(SRC)/wimax/doc/wimax.rst \ $(SRC)/uan/doc/uan.rst \ $(SRC)/topology-read/doc/topology.rst \ + $(SRC)/spectrum/doc/spectrum.rst \ $(SRC)/stats/doc/statistics.rst \ $(SRC)/netanim/doc/animation.rst \ $(SRC)/flow-monitor/doc/flow-monitor.rst \ @@ -129,12 +130,34 @@ $(SRC)/lte/doc/source/figures/lte-rlc-data-retx-ul.eps \ $(SRC)/lte/doc/source/figures/lte-epc-x2-handover-seq-diagram.eps \ $(SRC)/lte/doc/source/figures/lte-epc-x2-entity-saps.eps \ - $(SRC)/lte/doc/source/figures/fading_pedestrian.png \ - $(SRC)/lte/doc/source/figures/fading_vehicular.png \ - $(SRC)/lte/doc/source/figures/fading_urban_3kmph.png \ + $(SRC)/lte/doc/source/figures/lte-phy-interference.pdf \ + $(SRC)/lte/doc/source/figures/lte-phy-interference.png \ + $(SRC)/lte/doc/source/figures/helpers.pdf \ + $(SRC)/lte/doc/source/figures/helpers.png \ + $(SRC)/lte/doc/source/figures/mac-random-access-contention.pdf \ + $(SRC)/lte/doc/source/figures/mac-random-access-contention.png \ + $(SRC)/lte/doc/source/figures/mac-random-access-noncontention.pdf \ + $(SRC)/lte/doc/source/figures/mac-random-access-noncontention.png \ + $(SRC)/lte/doc/source/figures/rrc-connection-establishment.pdf \ + $(SRC)/lte/doc/source/figures/rrc-connection-establishment.png \ + $(SRC)/lte/doc/source/figures/rrc-connection-reconfiguration.pdf \ + $(SRC)/lte/doc/source/figures/rrc-connection-reconfiguration.png \ + $(SRC)/lte/doc/source/figures/rrc-connection-reconfiguration-handover.pdf \ + $(SRC)/lte/doc/source/figures/rrc-connection-reconfiguration-handover.png \ + $(SRC)/lte/doc/source/figures/nas-attach.pdf \ + $(SRC)/lte/doc/source/figures/nas-attach.png \ + $(SRC)/lte/doc/source/figures/lte-enb-rrc-states.pdf \ + $(SRC)/lte/doc/source/figures/lte-enb-rrc-states.png \ + $(SRC)/lte/doc/source/figures/lte-ue-rrc-states.pdf \ + $(SRC)/lte/doc/source/figures/lte-ue-rrc-states.png \ + $(SRC)/lte/doc/source/figures/lte-handover-algorithm.pdf \ + $(SRC)/lte/doc/source/figures/lte-handover-algorithm.png \ $(SRC)/lte/doc/source/figures/fading_pedestrian.pdf \ + $(SRC)/lte/doc/source/figures/fading_pedestrian.png \ $(SRC)/lte/doc/source/figures/fading_vehicular.pdf \ + $(SRC)/lte/doc/source/figures/fading_vehicular.png \ $(SRC)/lte/doc/source/figures/fading_urban_3kmph.pdf \ + $(SRC)/lte/doc/source/figures/fading_urban_3kmph.png \ $(SRC)/lte/doc/source/figures/MCS_1_4.pdf \ $(SRC)/lte/doc/source/figures/MCS_1_4.png \ $(SRC)/lte/doc/source/figures/MCS_5_8.pdf \ @@ -159,26 +182,6 @@ $(SRC)/lte/doc/source/figures/MCS_16_test.pdf \ $(SRC)/lte/doc/source/figures/miesm_scheme.pdf \ $(SRC)/lte/doc/source/figures/miesm_scheme.png \ - $(SRC)/lte/doc/source/figures/lte-phy-interference.png \ - $(SRC)/lte/doc/source/figures/helpers.png \ - $(SRC)/lte/doc/source/figures/mac-random-access-contention.png \ - $(SRC)/lte/doc/source/figures/mac-random-access-noncontention.png \ - $(SRC)/lte/doc/source/figures/rrc-connection-establishment.png \ - $(SRC)/lte/doc/source/figures/rrc-connection-reconfiguration.png \ - $(SRC)/lte/doc/source/figures/rrc-connection-reconfiguration-handover.png \ - $(SRC)/lte/doc/source/figures/nas-attach.png \ - $(SRC)/lte/doc/source/figures/lte-phy-interference.pdf \ - $(SRC)/lte/doc/source/figures/helpers.pdf \ - $(SRC)/lte/doc/source/figures/mac-random-access-contention.pdf \ - $(SRC)/lte/doc/source/figures/mac-random-access-noncontention.pdf \ - $(SRC)/lte/doc/source/figures/rrc-connection-establishment.pdf \ - $(SRC)/lte/doc/source/figures/rrc-connection-reconfiguration.pdf \ - $(SRC)/lte/doc/source/figures/rrc-connection-reconfiguration-handover.pdf \ - $(SRC)/lte/doc/source/figures/nas-attach.pdf \ - $(SRC)/lte/doc/source/figures/lte-enb-rrc-states.png \ - $(SRC)/lte/doc/source/figures/lte-ue-rrc-states.png \ - $(SRC)/lte/doc/source/figures/lte-enb-rrc-states.pdf \ - $(SRC)/lte/doc/source/figures/lte-ue-rrc-states.pdf \ $(SRC)/uan/doc/auvmobility-classes.dia \ $(SRC)/stats/doc/Stat-framework-arch.png \ $(SRC)/stats/doc/Wifi-default.png \ @@ -210,11 +213,11 @@ IMAGES_EPS = \ $(FIGURES)/testbed.eps \ $(FIGURES)/emulated-channel.eps \ + $(FIGURES)/antenna-coordinate-system.eps \ $(FIGURES)/packet.eps \ $(FIGURES)/node.eps \ $(FIGURES)/buffer.eps \ $(FIGURES)/sockets-overview.eps \ - $(FIGURES)/antenna-coordinate-system.eps \ $(FIGURES)/internet-node-send.eps \ $(FIGURES)/internet-node-recv.eps \ $(FIGURES)/routing.eps \ @@ -277,17 +280,28 @@ $(FIGURES)/routing-specialization.pdf_width = 5in $(FIGURES)/snir.pdf_width = 3in $(FIGURES)/lte-interference-test-scenario.pdf_width = 3in +$(FIGURES)/epc-ctrl-arch.pdf_width = 8cm $(FIGURES)/epc-topology.pdf_width = 4in +$(FIGURES)/epc-topology-x2-enhanced.pdf_width = 14cm $(FIGURES)/lte-arch-data-rrc-pdcp-rlc.pdf_width = 3in $(FIGURES)/lte-epc-e2e-data-protocol-stack.pdf_width = 15cm $(FIGURES)/ff-mac-saps.pdf_width = 5in $(FIGURES)/ff-example.pdf_width = 5in +$(FIGURES)/lte-arch-enb-data.pdf_width = 6cm +$(FIGURES)/lte-arch-enb-ctrl.pdf_width = 10cm +$(FIGURES)/lte-arch-ue-data.pdf_width = 6cm +$(FIGURES)/lte-arch-ue-ctrl.pdf_width = 10cm $(FIGURES)/lte-rlc-implementation-model.pdf_width = 20in $(FIGURES)/lte-rlc-data-txon-dl.pdf_width = 10cm $(FIGURES)/lte-rlc-data-txon-ul.pdf_width = 10cm $(FIGURES)/lte-rlc-data-retx-ul.pdf_width = 10cm $(FIGURES)/lte-phy-interference.pdf_width = 12cm $(FIGURES)/lte-subframe-structure.pdf_width = 2in +$(FIGURES)/mac-random-access-contention.pdf_width = 10cm +$(FIGURES)/mac-random-access-noncontention.pdf_width = 15cm +$(FIGURES)/lte-ue-rrc-states.pdf_width = 7cm +$(FIGURES)/lte-handover-algorithm.pdf_width = 10cm +$(FIGURES)/helpers.pdf_width = 8cm $(FIGURES)/auvmobility-classes.pdf_width = 10cm IMAGES_PNG = ${IMAGES_EPS:.eps=.png} @@ -295,12 +309,14 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF) +RESCALE = $(shell hg root)/utils/rescale-pdf.sh + %.eps : %.dia; $(DIA) -t eps $< -e $@ %.png : %.dia; $(DIA) -t png $< -e $@ %.png : %.eps; $(CONVERT) $< $@ %.pdf : %.eps $(EPSTOPDF) $< -o=$@ - if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi + @if test x$($@_width) != x; then $(RESCALE) $($@_width) $@ ; fi # You can set these variables from the command line. SPHINXOPTS = diff -Naur ns-3.17/doc/models/rescale-pdf.sh ns-3.18/doc/models/rescale-pdf.sh --- ns-3.17/doc/models/rescale-pdf.sh 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/models/rescale-pdf.sh 1969-12-31 16:00:00.000000000 -0800 @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -TMPDIR=/tmp - -TMPFILE=`mktemp` - -echo "\documentclass{book} -\usepackage{pdfpages} -\begin{document} -\includepdf[width=${1},fitpaper]{${2}} -\end{document}" >${TMPFILE}.tex -pdflatex -output-directory /tmp ${TMPFILE}.tex >/dev/null 2>/dev/null -cp ${TMPFILE}.pdf ${2} -rm -f ${TMPFILE}{,.{tex,aux,log,pdf}} diff -Naur ns-3.17/doc/models/source/conf.py ns-3.18/doc/models/source/conf.py --- ns-3.17/doc/models/source/conf.py 2013-05-14 07:34:56.000000000 -0700 +++ ns-3.18/doc/models/source/conf.py 2013-10-26 07:07:29.455364378 -0700 @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = 'ns-3.17' +version = 'ns-3.18' # The full version, including alpha/beta/rc tags. -release = 'ns-3.17' +release = 'ns-3.18' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff -Naur ns-3.17/doc/modules ns-3.18/doc/modules --- ns-3.17/doc/modules 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/modules 2013-10-26 07:07:29.471364379 -0700 @@ -1,8 +1,8 @@ /** * @anchor modules_anchor * - * @defgroup constructs C++ Constructs Used by All Modules - * \brief These are C++ constructs defined by the modules. + * @defgroup constructs Introspected Lists + * \brief These are lists of useful items found by examining the type system. * * @defgroup constants Constants * @brief Constants you can change diff -Naur ns-3.17/doc/ns3_html_theme/get_version.sh ns-3.18/doc/ns3_html_theme/get_version.sh --- ns-3.17/doc/ns3_html_theme/get_version.sh 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/ns3_html_theme/get_version.sh 2013-10-26 07:07:29.471364379 -0700 @@ -201,8 +201,9 @@ # by Sphinx when rebuilding cd doc 2>&1 >/dev/null for d in {manual,models,tutorial{,-pt-br}}/build/{single,}html/_static/ ; do - # expect the copy to fail if the destination dir - # hasn't been created by a prior doc build + if [ ! -d $d ]; then + mkdir -p $d + fi cp ns3_html_theme/static/ns3_version.js $d done cd - 2>&1 >/dev/null diff -Naur ns-3.17/doc/ns3_html_theme/static/ns3_stylesheet.css ns-3.18/doc/ns3_html_theme/static/ns3_stylesheet.css --- ns-3.17/doc/ns3_html_theme/static/ns3_stylesheet.css 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/ns3_html_theme/static/ns3_stylesheet.css 2013-10-26 07:07:29.471364379 -0700 @@ -25,6 +25,11 @@ background-image: url('nav_f.png'); } +/* Sphinx figure captions */ +p.caption { + font-weight: bold; +} + /* Doxygen side bar */ #nav-tree { font-size: 12px; diff -Naur ns-3.17/doc/release_steps.txt ns-3.18/doc/release_steps.txt --- ns-3.17/doc/release_steps.txt 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/release_steps.txt 2013-10-26 07:07:29.471364379 -0700 @@ -164,7 +164,10 @@ 4. The main page http://www.nsnam.org should point to ns-3.x in the "Download" and "Documentation" boxes -5. Create a blog entry to announce release +5. The releases page http://www.nsnam.org must be updated (including +source tarball link) + +6. Create a blog entry to announce release ns-3 wiki edits --------------- diff -Naur ns-3.17/doc/tutorial/source/building-topologies.rst ns-3.18/doc/tutorial/source/building-topologies.rst --- ns-3.17/doc/tutorial/source/building-topologies.rst 2013-05-13 06:16:04.000000000 -0700 +++ ns-3.18/doc/tutorial/source/building-topologies.rst 2013-10-26 07:07:29.451364379 -0700 @@ -1,5 +1,5 @@ .. include:: replace.txt - +.. highlight:: cpp Building Topologies ------------------- @@ -337,10 +337,10 @@ the ``first.cc`` example. If you are in the top-level directory of the repository you just type, -:: +.. sourcecode:: bash - cp examples/tutorial/second.cc scratch/mysecond.cc - ./waf + $ cp examples/tutorial/second.cc scratch/mysecond.cc + $ ./waf Warning: We use the file ``second.cc`` as one of our regression tests to verify that it works exactly as we think it should in order to make your @@ -353,15 +353,15 @@ still have the NS_LOG variable set, so go ahead and clear that variable and run the program. -:: +.. sourcecode:: bash - export NS_LOG= - ./waf --run scratch/mysecond + $ export NS_LOG= + $ ./waf --run scratch/mysecond Since we have set up the UDP echo applications to log just as we did in ``first.cc``, you will see similar output when you run the script. -:: +.. sourcecode:: text Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' @@ -381,7 +381,7 @@ If you now go and look in the top level directory, you will find three trace files: -:: +.. sourcecode:: text second-0-0.pcap second-1-0.pcap second-2-0.pcap @@ -403,13 +403,13 @@ Now, let's follow the echo packet through the internetwork. First, do a tcpdump of the trace file for the leftmost point-to-point node --- node zero. -:: +.. sourcecode:: bash - tcpdump -nn -tt -r second-0-0.pcap + $ tcpdump -nn -tt -r second-0-0.pcap You should see the contents of the pcap file displayed: -:: +.. sourcecode:: text reading from file second-0-0.pcap, link-type PPP (PPP) 2.000000 IP 10.1.1.1.49153 > 10.1.2.4.9: UDP, length 1024 @@ -422,14 +422,14 @@ point-to-point link and be received by the point-to-point net device on node one. Let's take a look: -:: +.. sourcecode:: bash - tcpdump -nn -tt -r second-1-0.pcap + $ tcpdump -nn -tt -r second-1-0.pcap You should now see the pcap trace output of the other side of the point-to-point link: -:: +.. sourcecode:: text reading from file second-1-0.pcap, link-type PPP (PPP) 2.003686 IP 10.1.1.1.49153 > 10.1.2.4.9: UDP, length 1024 @@ -444,13 +444,13 @@ Remember that we selected node 2 as the promiscuous sniffer node for the CSMA network so let's then look at second-2-0.pcap and see if its there. -:: +.. sourcecode:: bash - tcpdump -nn -tt -r second-2-0.pcap + $ tcpdump -nn -tt -r second-2-0.pcap You should now see the promiscuous dump of node two, device zero: -:: +.. sourcecode:: text reading from file second-2-0.pcap, link-type EN10MB (Ethernet) 2.003696 arp who-has 10.1.2.4 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1 @@ -471,7 +471,7 @@ This exchange is seen in the following lines, -:: +.. sourcecode:: text 2.003696 arp who-has 10.1.2.4 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1 2.003707 arp reply 10.1.2.4 is-at 00:00:00:00:00:06 @@ -479,7 +479,7 @@ Then node one, device one goes ahead and sends the echo packet to the UDP echo server at IP address 10.1.2.4. -:: +.. sourcecode:: text 2.003801 IP 10.1.1.1.49153 > 10.1.2.4.9: UDP, length 1024 @@ -490,40 +490,41 @@ doesn't know the MAC address of the first CSMA node, so it has to ARP for it just like the first CSMA node had to do. -:: +.. sourcecode:: text 2.003811 arp who-has 10.1.2.1 (ff:ff:ff:ff:ff:ff) tell 10.1.2.4 2.003822 arp reply 10.1.2.1 is-at 00:00:00:00:00:03 The server then sends the echo back to the forwarding node. -:: +.. sourcecode:: text 2.003915 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024 Looking back at the rightmost node of the point-to-point link, -:: +.. sourcecode:: bash - tcpdump -nn -tt -r second-1-0.pcap + $ tcpdump -nn -tt -r second-1-0.pcap You can now see the echoed packet coming back onto the point-to-point link as the last line of the trace dump. -:: +.. sourcecode:: text reading from file second-1-0.pcap, link-type PPP (PPP) 2.003686 IP 10.1.1.1.49153 > 10.1.2.4.9: UDP, length 1024 2.003915 IP 10.1.2.4.9 > 10.1.1.1.49153: UDP, length 1024 Lastly, you can look back at the node that originated the echo -:: - tcpdump -nn -tt -r second-0-0.pcap +.. sourcecode:: bash + + $ tcpdump -nn -tt -r second-0-0.pcap and see that the echoed packet arrives back at the source at 2.007602 seconds, -:: +.. sourcecode:: text reading from file second-0-0.pcap, link-type PPP (PPP) 2.000000 IP 10.1.1.1.49153 > 10.1.2.4.9: UDP, length 1024 @@ -535,13 +536,13 @@ ``first.cc`` example. Try running the program with the number of "extra" devices set to four: -:: +.. sourcecode:: bash - ./waf --run "scratch/mysecond --nCsma=4" + $ ./waf --run "scratch/mysecond --nCsma=4" You should now see, -:: +.. sourcecode:: text Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' @@ -602,20 +603,20 @@ Let's clear the old trace files out of the top-level directory to avoid confusion about what is going on, -:: +.. sourcecode:: bash - rm *.pcap - rm *.tr + $ rm *.pcap + $ rm *.tr If you build the new script and run the simulation setting ``nCsma`` to 100, -:: +.. sourcecode:: bash - ./waf --run "scratch/mysecond --nCsma=100" + $ ./waf --run "scratch/mysecond --nCsma=100" you will see the following output: -:: +.. sourcecode:: text Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' @@ -628,7 +629,7 @@ having 100 "extra" CSMA nodes with the echo server on the last one. If you list the pcap files in the top level directory you will see, -:: +.. sourcecode:: text second-0-0.pcap second-100-0.pcap second-101-0.pcap @@ -643,15 +644,15 @@ also requested a non-promiscuous trace for the next-to-last node. Go ahead and take a look at the ``tcpdump`` for ``second-100-0.pcap``. -:: +.. sourcecode:: bash - tcpdump -nn -tt -r second-100-0.pcap + $ tcpdump -nn -tt -r second-100-0.pcap You can now see that node 100 is really a bystander in the echo exchange. The only packets that it receives are the ARP requests which are broadcast to the entire CSMA network. -:: +.. sourcecode:: text reading from file second-100-0.pcap, link-type EN10MB (Ethernet) 2.003696 arp who-has 10.1.2.101 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1 @@ -659,13 +660,13 @@ Now take a look at the ``tcpdump`` for ``second-101-0.pcap``. -:: +.. sourcecode:: bash - tcpdump -nn -tt -r second-101-0.pcap + $ tcpdump -nn -tt -r second-101-0.pcap You can now see that node 101 is really the participant in the echo exchange. -:: +.. sourcecode:: text reading from file second-101-0.pcap, link-type EN10MB (Ethernet) 2.003696 arp who-has 10.1.2.101 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1 @@ -1180,16 +1181,16 @@ the ``second.cc`` example. If you are in the top-level directory of the repository you would type, -:: +.. sourcecode:: bash - cp examples/third.cc scratch/mythird.cc - ./waf - ./waf --run scratch/mythird + $ cp examples/third.cc scratch/mythird.cc + $ ./waf + $ ./waf --run scratch/mythird Again, since we have set up the UDP echo applications just as we did in the ``second.cc`` script, you will see similar output. -:: +.. sourcecode:: text Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' @@ -1209,7 +1210,7 @@ If you now go and look in the top level directory, you will find four trace files from this simulation, two from node zero and two from node one: -:: +.. sourcecode:: text third-0-0.pcap third-0-1.pcap third-1-0.pcap third-1-1.pcap @@ -1224,13 +1225,13 @@ Since the echo client is on the Wifi network, let's start there. Let's take a look at the promiscuous (monitor mode) trace we captured on that network. -:: +.. sourcecode:: bash - tcpdump -nn -tt -r third-0-1.pcap + $ tcpdump -nn -tt -r third-0-1.pcap You should see some wifi-looking contents you haven't seen here before: -:: +.. sourcecode:: text reading from file third-0-1.pcap, link-type IEEE802_11 (802.11) 0.000025 Beacon (ns-3-ssid) [6.0* 9.0 12.0 18.0 24.0 36.0 48.0 54.0 Mbit] IBSS @@ -1258,13 +1259,13 @@ Now, look at the pcap file of the right side of the point-to-point link, -:: +.. sourcecode:: bash - tcpdump -nn -tt -r third-0-0.pcap + $ tcpdump -nn -tt -r third-0-0.pcap Again, you should see some familiar looking contents: -:: +.. sourcecode:: text reading from file third-0-0.pcap, link-type PPP (PPP) 2.002160 IP 10.1.3.3.49153 > 10.1.2.4.9: UDP, length 1024 @@ -1275,13 +1276,13 @@ Now, look at the pcap file of the right side of the point-to-point link, -:: +.. sourcecode:: bash - tcpdump -nn -tt -r third-1-0.pcap + $ tcpdump -nn -tt -r third-1-0.pcap Again, you should see some familiar looking contents: -:: +.. sourcecode:: text reading from file third-1-0.pcap, link-type PPP (PPP) 2.005846 IP 10.1.3.3.49153 > 10.1.2.4.9: UDP, length 1024 @@ -1294,13 +1295,13 @@ The echo server is on the CSMA network, let's look at the promiscuous trace there: -:: +.. sourcecode:: bash - tcpdump -nn -tt -r third-1-1.pcap + $ tcpdump -nn -tt -r third-1-1.pcap You should see some familiar looking contents: -:: +.. sourcecode:: text reading from file third-1-1.pcap, link-type EN10MB (Ethernet) 2.005846 ARP, Request who-has 10.1.2.4 (ff:ff:ff:ff:ff:ff) tell 10.1.2.1, length 50 @@ -1382,7 +1383,7 @@ If you now run the simulation, you will see the course changes displayed as they happen. -:: +.. sourcecode:: text Build finished successfully (00:00:01) /NodeList/7/$ns3::MobilityModel/CourseChange x = 10, y = 0 diff -Naur ns-3.17/doc/tutorial/source/conceptual-overview.rst ns-3.18/doc/tutorial/source/conceptual-overview.rst --- ns-3.17/doc/tutorial/source/conceptual-overview.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/tutorial/source/conceptual-overview.rst 2013-10-26 07:07:29.451364379 -0700 @@ -1,5 +1,5 @@ .. include:: replace.txt - +.. highlight:: cpp Conceptual Overview ------------------- @@ -153,7 +153,7 @@ directory. Change into that release directory, and you should find a directory structure something like the following: -:: +.. sourcecode:: bash AUTHORS examples scratch utils waf.bat* bindings LICENSE src utils.py waf-tools @@ -250,16 +250,16 @@ Since you are, of course, following this tutorial religiously, you will already have done a -:: +.. sourcecode:: bash - ./waf -d debug --enable-examples --enable-tests configure + $ ./waf -d debug --enable-examples --enable-tests configure in order to configure the project to perform debug builds that include examples and tests. You will also have done a -:: +.. sourcecode:: bash - ./waf + $ ./waf to build the project. So now if you look in the directory ``../../build/debug/ns3`` you will find the four module include files shown @@ -340,6 +340,21 @@ the first function run. There is nothing at all special here. Your |ns3| script is just a C++ program. +The next line sets the time resolution to one nanosecond, which happens +to be the default value: + +:: + + Time::SetResolution (Time::NS); + +The resolution is the smallest time value that can be represented (as well as +the smallest representable difference between two time values). +You can change the resolution exactly once. The mechanism enabling this +flexibility is somewhat memory hungry, so once the resolution has been +set explicitly we release the memory, preventing further updates. (If +you don't set the resolution explicitly, it will default to one nanosecond, +and the memory will be released when the simulation starts.) + The next two lines of the script are used to enable two logging components that are built into the Echo Client and Echo Server applications: @@ -735,21 +750,21 @@ built if you run Waf. Let's try it. Copy ``examples/tutorial/first.cc`` into the ``scratch`` directory after changing back into the top level directory. -:: +.. sourcecode:: bash - cd ../.. - cp examples/tutorial/first.cc scratch/myfirst.cc + $ cd ../.. + $ cp examples/tutorial/first.cc scratch/myfirst.cc Now build your first example script using waf: -:: +.. sourcecode:: bash - ./waf + $ ./waf You should see messages reporting that your ``myfirst`` example was built successfully. -:: +.. sourcecode:: bash Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' [614/708] cxx: scratch/myfirst.cc -> build/debug/scratch/myfirst_3.o @@ -760,13 +775,13 @@ You can now run the example (note that if you build your program in the scratch directory you must run it out of the scratch directory): -:: +.. sourcecode:: bash - ./waf --run scratch/myfirst + $ ./waf --run scratch/myfirst You should see some output: -:: +.. sourcecode:: bash Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' @@ -794,14 +809,14 @@ At the top of the page, you will see a number of links, -:: +.. sourcecode:: text summary | shortlog | changelog | graph | tags | files Go ahead and select the ``files`` link. This is what the top-level of most of our *repositories* will look: -:: +.. sourcecode:: text drwxr-xr-x [up] drwxr-xr-x bindings python files diff -Naur ns-3.17/doc/tutorial/source/conf.py ns-3.18/doc/tutorial/source/conf.py --- ns-3.17/doc/tutorial/source/conf.py 2013-05-14 07:34:00.000000000 -0700 +++ ns-3.18/doc/tutorial/source/conf.py 2013-10-26 07:07:29.451364379 -0700 @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = 'ns-3.17' +version = 'ns-3.18' # The full version, including alpha/beta/rc tags. -release = 'ns-3.17' +release = 'ns-3.18' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -197,7 +197,7 @@ #latex_show_urls = False # Additional stuff for the LaTeX preamble. -#latex_preamble = '' +latex_preamble = '\usepackage{amssymb}' # Documents to append as an appendix to all manuals. #latex_appendices = [] diff -Naur ns-3.17/doc/tutorial/source/data-collection.rst ns-3.18/doc/tutorial/source/data-collection.rst --- ns-3.17/doc/tutorial/source/data-collection.rst 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/doc/tutorial/source/data-collection.rst 2013-10-26 07:07:29.447364379 -0700 @@ -0,0 +1,446 @@ +.. include:: replace.txt +.. highlight:: cpp +.. role:: raw-role(raw) + :format: html latex + +Data Collection +--------------- + +Our final tutorial chapter introduces some components that were added +to |ns3| in version 3.18, and that are still under development. This +tutorial section is also a work-in-progress. + +Motivation +********** + +One of the main points of running simulations is to generate output data, +either for research purposes or simply to learn about the system. +In the previous chapter, we introduced the tracing subsystem and +the example ``sixth.cc``. from which PCAP or ASCII trace files are +generated. These traces are valuable for data analysis using a +variety of external tools, and for many users, such output data is +a preferred means of gathering data (for analysis by external tools). + +However, there are also use cases for more than trace file generation, +including the following: + +* generation of data that does not map well to PCAP or ASCII traces, such + as non-packet data (e.g. protocol state machine transitions), +* large simulations for which the disk I/O requirements for generating + trace files is prohibitive or cumbersome, and +* the need for *online* data reduction or computation, during the course + of the simulation. A good example of this is to define a termination + condition for the simulation, to tell it when to stop when it has + received enough data to form a narrow-enough confidence interval around + the estimate of some parameter. + +The |ns3| data collection framework is designed to provide these +additional capabilities beyond trace-based output. We recommend +that the reader interested in this topic consult the |ns3| Manual +for a more detailed treatment of this framework; here, we summarize +with an example program some of the developing capabilities. + +Example Code +************ + +The tutorial example ``examples/tutorial/seventh.cc`` resembles the +``sixth.cc`` example we previously reviewed, except for a few changes. +First, it has been enabled for IPv6 support with a command-line option: + +:: + + CommandLine cmd; + cmd.AddValue ("useIpv6", "Use Ipv6", useV6); + cmd.Parse (argc, argv); + +If the user specifies ``useIpv6``, option, the program will be run +using IPv6 instead of IPv4. The ``help`` option, available on all |ns3| +programs that support the CommandLine object as shown above, can +be invoked as follows (please note the use of double quotes): + +:: + + ./waf --run "seventh --help" + +which produces: + +:: + + ns3-dev-seventh-debug [Program Arguments] [General Arguments] + + Program Arguments: + --useIpv6: Use Ipv6 [false] + + 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. + +This default (use of IPv4, since useIpv6 is false) can be changed by +toggling the boolean value as follows: + +:: + + ./waf --run "seventh --useIpv6=1" + +and have a look at the pcap generated, such as with ``tcpdump``: + +:: + + tcpdump -r seventh.pcap -nn -tt + +This has been a short digression into IPv6 support and the command line, +which was also introduced earlier in this tutorial. For a dedicated +example of command line usage, please see +``src/core/examples/command-line-example.cc``. + +Now back to data collection. In the ``examples/tutorial/`` directory, +type the following command: ``diff -u sixth.cc seventh.cc``, and examine +some of the new lines of this diff: + +:: + + + std::string probeName; + + std::string probeTrace; + + if (useV6 == false) + + { + ... + + probeName = "ns3::Ipv4PacketProbe"; + + probeTrace = "/NodeList/*/$ns3::Ipv4L3Protocol/Tx"; + + } + + else + + { + ... + + probeName = "ns3::Ipv6PacketProbe"; + + probeTrace = "/NodeList/*/$ns3::Ipv6L3Protocol/Tx"; + + } + ... + + // Use GnuplotHelper to plot the packet byte count over time + + GnuplotHelper plotHelper; + + + + // Configure the plot. The first argument is the file name prefix + + // for the output files generated. The second, third, and fourth + + // arguments are, respectively, the plot title, x-axis, and y-axis labels + + plotHelper.ConfigurePlot ("seventh-packet-byte-count", + + "Packet Byte Count vs. Time", + + "Time (Seconds)", + + "Packet Byte Count"); + + + + // Specify the probe type, probe path (in configuration namespace), and + + // probe output trace source ("OutputBytes") to plot. The fourth argument + + // specifies the name of the data series label on the plot. The last + + // argument formats the plot by specifying where the key should be placed. + + plotHelper.PlotProbe (probeName, + + probeTrace, + + "OutputBytes", + + "Packet Byte Count", + + GnuplotAggregator::KEY_BELOW); + + + + // Use FileHelper to write out the packet byte count over time + + FileHelper fileHelper; + + + + // Configure the file to be written, and the formatting of output data. + + fileHelper.ConfigureFile ("seventh-packet-byte-count", + + FileAggregator::FORMATTED); + + + + // Set the labels for this formatted output file. + + fileHelper.Set2dFormat ("Time (Seconds) = %.3e\tPacket Byte Count = %.0f"); + + + + // Specify the probe type, probe path (in configuration namespace), and + + // probe output trace source ("OutputBytes") to write. + + fileHelper.WriteProbe (probeName, + + probeTrace, + + "OutputBytes"); + + + Simulator::Stop (Seconds (20)); + Simulator::Run (); + Simulator::Destroy (); + + +The careful reader will have noticed, when testing the IPv6 command +line attribute, that ``seventh.cc`` had created a number of new output files: + +:: + + seventh-packet-byte-count-0.txt + seventh-packet-byte-count-1.txt + seventh-packet-byte-count.dat + seventh-packet-byte-count.plt + seventh-packet-byte-count.png + seventh-packet-byte-count.sh + +These were created by the additional statements introduced above; in +particular, by a GnuplotHelper and a FileHelper. This data was produced +by hooking the data collection components to |ns3| trace sources, and +marshaling the data into a formatted ``gnuplot`` and into a formatted +text file. In the next sections, we'll review each of these. + +GnuplotHelper +************* + +The GnuplotHelper is an |ns3| helper object aimed at the production of +``gnuplot`` plots with as few statements as possible, for common cases. +It hooks |ns3| trace sources with data types supported by the +data collection system. Not all |ns3| trace sources data types are +supported, but many of the common trace types are, including TracedValues +with plain old data (POD) types. + +Let's look at the output produced by this helper: + +:: + + seventh-packet-byte-count.dat + seventh-packet-byte-count.plt + seventh-packet-byte-count.sh + +The first is a gnuplot data file with a series of space-delimited +timestamps and packet byte counts. We'll cover how this particular +data output was configured below, but let's continue with the output +files. The file ``seventh-packet-byte-count.plt`` is a gnuplot plot file, +that can be opened from within gnuplot. Readers who understand gnuplot +syntax can see that this will produce a formatted output PNG file named +``seventh-packet-byte-count.png``. Finally, a small shell script +``seventh-packet-byte-count.sh`` runs this plot file through gnuplot +to produce the desired PNG (which can be viewed in an image editor); that +is, the command: + +:: + + sh seventh-packet-byte-count.sh + +will yield ``seventh-packet-byte-count.png``. Why wasn't this PNG +produced in the first place? The answer is that by providing the +plt file, the user can hand-configure the result if desired, before +producing the PNG. + +The PNG image title states that this plot is a plot of +"Packet Byte Count vs. Time", and that it is plotting the probed data +corresponding to the trace source path: + +:: + + /NodeList/*/$ns3::Ipv6L3Protocol/Tx + +Note the wild-card in the trace path. In summary, what this plot is +capturing is the plot of packet bytes observed at the transmit trace +source of the Ipv6L3Protocol object; largely 596-byte TCP segments +in one direction, and 60-byte TCP acks in the other (two node +trace sources were matched by this trace source). + +How was this configured? A few statements need to be provided. First, +the GnuplotHelper object must be declared and configured: + +:: + + + // Use GnuplotHelper to plot the packet byte count over time + + GnuplotHelper plotHelper; + + + + // Configure the plot. The first argument is the file name prefix + + // for the output files generated. The second, third, and fourth + + // arguments are, respectively, the plot title, x-axis, and y-axis labels + + plotHelper.ConfigurePlot ("seventh-packet-byte-count", + + "Packet Byte Count vs. Time", + + "Time (Seconds)", + + "Packet Byte Count"); + + +To this point, an empty plot has been configured. The filename prefix +is the first argument, the plot title is the second, the x-axis label +the third, and the y-axis label the fourth argument. + +The next step is to configure the data, and here is where the trace +source is hooked. First, note above in the program we declared a few +variables for later use: + +:: + + + std::string probeName; + + std::string probeTrace; + + probeName = "ns3::Ipv6PacketProbe"; + + probeTrace = "/NodeList/*/$ns3::Ipv6L3Protocol/Tx"; + +We use them here: + +:: + + + // Specify the probe type, probe path (in configuration namespace), and + + // probe output trace source ("OutputBytes") to plot. The fourth argument + + // specifies the name of the data series label on the plot. The last + + // argument formats the plot by specifying where the key should be placed. + + plotHelper.PlotProbe (probeName, + + probeTrace, + + "OutputBytes", + + "Packet Byte Count", + + GnuplotAggregator::KEY_BELOW); + +The first two arguments are the name of the probe type and the probe trace. +These two are probably the hardest to determine when you try to use +this framework to plot other traces. The probe trace here is the ``Tx`` +trace source of class ``Ipv6L3Protocol``. When we examine this class +implementation (``src/internet/model/ipv6-l3-protocol.cc``) we can +observe: + +:: + + .AddTraceSource ("Tx", "Send IPv6 packet to outgoing interface.", + MakeTraceSourceAccessor (&Ipv6L3Protocol::m_txTrace)) + +This says that ``Tx`` is a name for variable ``m_txTrace``, which has +a declaration of: + +:: + + /** + * \brief Callback to trace TX (transmission) packets. + */ + TracedCallback, Ptr, uint32_t> m_txTrace; + +It turns out that this specific trace source signature is supported +by a Probe class (what we need here) of class Ipv6PacketProbe. +See the files ``src/internet/model/ipv6-packet-probe.{h,cc}``. + +So, in the PlotProbe statement above, we see that the statement is +hooking the trace source (identified by path string) with a matching +|ns3| Probe type of ``Ipv6PacketProbe``. If we did not support +this probe type (matching trace source signature), we could have not +used this statement (although some more complicated lower-level statements +could have been used, as described in the manual). + +The Ipv6PacketProbe exports, itself, some trace sources that extract +the data out of the probed Packet object: + +:: + + TypeId + Ipv6PacketProbe::GetTypeId () + { + static TypeId tid = TypeId ("ns3::Ipv6PacketProbe") + .SetParent () + .AddConstructor () + .AddTraceSource ( "Output", + "The packet plus its IPv6 object and interface that serve as the output for this probe", + MakeTraceSourceAccessor (&Ipv6PacketProbe::m_output)) + .AddTraceSource ( "OutputBytes", + "The number of bytes in the packet", + MakeTraceSourceAccessor (&Ipv6PacketProbe::m_outputBytes)) + ; + return tid; + } + + +The third argument of our PlotProbe statement specifies that we are +interested in the number of bytes in this packet; specifically, the +"OutputBytes" trace source of Ipv6PacketProbe. +Finally, the last two arguments of the statement provide the plot +legend for this data series ("Packet Byte Count"), and an optional +gnuplot formatting statement (GnuplotAggregator::KEY_BELOW) that we want +the plot key to be inserted below the plot. Other options include +NO_KEY, KEY_INSIDE, and KEY_ABOVE. + + +Supported Trace Types +********************* + +The following traced values are supported with Probes as of this writing: + + +------------------+-------------------+------------------------------------+ + | TracedValue type | Probe type | File | + +==================+=========+=========+====================================+ + | double | DoubleProbe | stats/model/double-probe.h | + +------------------+-------------------+------------------------------------+ + | uint8_t | Uinteger8Probe | stats/model/uinteger-8-probe.h | + +------------------+-------------------+------------------------------------+ + | uint16_t | Uinteger16Probe | stats/model/uinteger-16-probe.h | + +------------------+-------------------+------------------------------------+ + | uint32_t | Uinteger32Probe | stats/model/uinteger-32-probe.h | + +------------------+-------------------+------------------------------------+ + | bool | BooleanProbe | stats/model/uinteger-16-probe.h | + +------------------+-------------------+------------------------------------+ + +The following TraceSource types are supported by Probes as of this writing: + + +------------------------------------------+------------------------+---------------+----------------------------------------------------+ + | TracedSource type | Probe type | Probe outputs | File | + +==========================================+========================+===============+====================================================+ + | Ptr | PacketProbe | OutputBytes | network/utils/packet-probe.h | + +------------------------------------------+------------------------+---------------+----------------------------------------------------+ + | Ptr, Ptr, uint32_t | Ipv4PacketProbe | OutputBytes | internet/model/ipv4-packet-probe.h | + +------------------------------------------+------------------------+---------------+----------------------------------------------------+ + | Ptr, Ptr, uint32_t | Ipv6PacketProbe | OutputBytes | internet/model/ipv6-packet-probe.h | + +------------------------------------------+------------------------+---------------+----------------------------------------------------+ + | Ptr, Ptr, uint32_t | Ipv6PacketProbe | OutputBytes | internet/model/ipv6-packet-probe.h | + +------------------------------------------+------------------------+---------------+----------------------------------------------------+ + | Ptr, const Address& | ApplicationPacketProbe | OutputBytes | applications/model/application-packet-probe.h | + +------------------------------------------+------------------------+---------------+----------------------------------------------------+ + +As can be seen, only a few trace sources are supported, and they are all +oriented towards outputting the Packet size (in bytes). However, +most of the fundamental data types available as TracedValues can be +supported with these helpers. + +FileHelper +********** + +The FileHelper class is just a variation of the previous GnuplotHelper +example. The example program provides formatted output of the +same timestamped data, such as follows: + +:: + + Time (Seconds) = 9.312e+00 Packet Byte Count = 596 + Time (Seconds) = 9.312e+00 Packet Byte Count = 564 + +Two files are provided, one for node "0" and one for node "1" as can +be seen in the filenames. Let's look at the code piece-by-piece: + +:: + + + // Use FileHelper to write out the packet byte count over time + + FileHelper fileHelper; + + + + // Configure the file to be written, and the formatting of output data. + + fileHelper.ConfigureFile ("seventh-packet-byte-count", + + FileAggregator::FORMATTED); + +The file helper file prefix is the first argument, and a format specifier +is next. +Some other options for formatting include SPACE_SEPARATED, COMMA_SEPARATED, +and TAB_SEPARATED. Users are able to change the formatting (if +FORMATTED is specified) with a format string such as follows: + +:: + + + + + // Set the labels for this formatted output file. + + fileHelper.Set2dFormat ("Time (Seconds) = %.3e\tPacket Byte Count = %.0f"); + +Finally, the probe of interest must be hooked. Again, the probeName and +probeTrace variables in this example are used, and the probe's output +trace source "OutputBytes" is hooked: + +:: + + + + + // Specify the probe type, probe path (in configuration namespace), and + + // probe output trace source ("OutputBytes") to write. + + fileHelper.WriteProbe (probeName, + + probeTrace, + + "OutputBytes"); + + + +The wildcard fields in this trace source specifier match two trace sources. +Unlike the GnuplotHelper example, in which two data series were overlaid +on the same plot, here, two separate files are written to disk. + +Summary +******* + +Data collection support is new as of ns-3.18, and basic support for +providing time series output has been added. The basic pattern described +above may be replicated within the scope of support of the existing +probes and trace sources. More capabilities including statistics +processing will be added in future releases. + diff -Naur ns-3.17/doc/tutorial/source/getting-started.rst ns-3.18/doc/tutorial/source/getting-started.rst --- ns-3.17/doc/tutorial/source/getting-started.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/tutorial/source/getting-started.rst 2013-10-26 07:07:29.447364379 -0700 @@ -1,5 +1,5 @@ - .. include:: replace.txt - +.. include:: replace.txt +.. highlight:: bash Getting Started --------------- @@ -89,11 +89,11 @@ :: - cd - mkdir workspace - cd workspace - wget http://www.nsnam.org/releases/ns-allinone-3.17.tar.bz2 - tar xjf ns-allinone-3.17.tar.bz2 + $ cd + $ mkdir workspace + $ cd workspace + $ wget http://www.nsnam.org/releases/ns-allinone-3.17.tar.bz2 + $ tar xjf ns-allinone-3.17.tar.bz2 If you change into the directory ``ns-allinone-3.17`` you should see a number of files: @@ -123,10 +123,10 @@ :: - cd - mkdir workspace - cd workspace - hg clone http://code.nsnam.org/bake + $ cd + $ mkdir workspace + $ cd workspace + $ hg clone http://code.nsnam.org/bake As the hg (Mercurial) command executes, you should see something like the following displayed, @@ -191,9 +191,9 @@ :: - export BAKE_HOME=`pwd`/bake - export PATH=$PATH:$BAKE_HOME - export PYTHONPATH=$PYTHONPATH:$BAKE_HOME + $ export BAKE_HOME=`pwd`/bake + $ export PATH=$PATH:$BAKE_HOME + $ export PYTHONPATH=$PYTHONPATH:$BAKE_HOME However, setting environment variables is not strictly necessary to complete this tutorial, so we'll call bake directly by specifying the path @@ -203,14 +203,14 @@ :: - ./bake.py configure -e ns-3-dev + $ ./bake.py configure -e ns-3.17 Next, we'l ask bake to check whether we have enough tools to download various components. Type: :: - ./bake.py check + $ ./bake.py check You should see something like the following, @@ -232,7 +232,9 @@ > patch tool - OK > autoreconf tool - OK - > Path searched for tools: /usr/lib64/qt-3.3/bin /usr/lib64/ccache /usr/local/bin /bin /usr/bin /usr/local/sbin /usr/sbin /sbin /home/tomh/bin bin + > Path searched for tools: /usr/lib64/qt-3.3/bin /usr/lib64/ccache + /usr/local/bin /bin /usr/bin /usr/local/sbin /usr/sbin /sbin + /home/tomh/bin bin In particular, download tools such as Mercurial, CVS, GIT, and Bazaar are our principal concerns at this point, since they allow us to fetch @@ -286,7 +288,7 @@ :: - ./build.py --enable-examples --enable-tests + $ ./build.py --enable-examples --enable-tests Because we are working with examples and tests in this tutorial, and because they are not built by default in |ns3|, the arguments for @@ -323,7 +325,7 @@ brite click openflow visualizer - Leaving directory `./ns-3.17` + Leaving directory `./ns-3.17' Regarding the portion about modules not built: @@ -347,7 +349,7 @@ :: - ./bake.py build + $ ./bake.py build and you should see something like: @@ -364,7 +366,7 @@ :: - ./bake.py show + $ ./bake.py show This will list out the various dependencies of the packages you are trying to build. @@ -392,8 +394,8 @@ :: - ./waf clean - ./waf -d optimized --enable-examples --enable-tests configure + $ ./waf clean + $ ./waf -d optimized --enable-examples --enable-tests configure This runs Waf out of the local directory (which is provided as a convenience for you). The first command to clean out the previous build is not @@ -476,15 +478,15 @@ :: - ./waf clean - ./waf -d debug --enable-examples --enable-tests configure + $ ./waf clean + $ ./waf -d debug --enable-examples --enable-tests configure The build system is now configured and you can build the debug versions of the |ns3| programs by simply typing :: - ./waf + $ ./waf Okay, sorry, I made you build the |ns3| part of the system twice, but now you know how to change the configuration and build optimized code. @@ -498,7 +500,7 @@ :: - ./waf configure -d debug --enable-sudo --enable-examples --enable-tests + $ ./waf configure -d debug --enable-sudo --enable-examples --enable-tests If you do this, waf will have run sudo to change the socket creator programs of the emulation code to run as root. There are many other configure- and build-time options @@ -506,7 +508,7 @@ :: - ./waf --help + $ ./waf --help We'll use some of the testing-related commands in the next section. @@ -517,7 +519,7 @@ :: - ./waf configure -d debug -o build/debug --enable-examples --enable-tests + $ ./waf configure -d debug -o build/debug --enable-examples --enable-tests This allows users to work with multiple builds rather than always overwriting the last build. @@ -528,16 +530,16 @@ :: - CXX="clang++" ./waf configure - ./waf build + $ CXX="clang++" ./waf configure + $ ./waf build One can also set up waf to do distributed compilation with ``distcc`` in a similar way: :: - CXX="distcc g++" ./waf configure - ./waf build + $ CXX="distcc g++" ./waf configure + $ ./waf build More info on distcc and distributed compilation can be found on it's `project page @@ -552,7 +554,7 @@ :: - ./test.py -c core + $ ./test.py -c core These tests are run in parallel by waf. You should eventually see a report saying that, @@ -617,7 +619,7 @@ :: - ./waf --run hello-simulator + $ ./waf --run hello-simulator Waf first checks to make sure that the program is built correctly and executes a build if required. Waf then executes the program, which @@ -644,7 +646,7 @@ :: - ./waf configure -d debug --enable-examples --enable-tests + $ ./waf configure -d debug --enable-examples --enable-tests to tell ``waf`` to build the debug versions of the |ns3| programs that includes the examples and tests. You must still build @@ -652,7 +654,7 @@ :: - ./waf + $ ./waf Now, if you run the ``hello-simulator`` program, you should see the expected output. diff -Naur ns-3.17/doc/tutorial/source/index.rst ns-3.18/doc/tutorial/source/index.rst --- ns-3.17/doc/tutorial/source/index.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/tutorial/source/index.rst 2013-10-26 07:07:29.451364379 -0700 @@ -23,4 +23,5 @@ tweaking building-topologies tracing + data-collection conclusion diff -Naur ns-3.17/doc/tutorial/source/introduction.rst ns-3.18/doc/tutorial/source/introduction.rst --- ns-3.17/doc/tutorial/source/introduction.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/tutorial/source/introduction.rst 2013-10-26 07:07:29.451364379 -0700 @@ -22,21 +22,55 @@ A few key points are worth noting at the onset: -* Ns-3 is not an extension of `ns-2 +* |ns3| is open-source, and the project strives to maintain an + open environment for researchers to contribute and share their software. +* |ns3| is not a backwards-compatible extension of `ns-2 `_; it is a new simulator. The two simulators are both written in C++ but |ns3| is a new simulator that does not support the |ns2| APIs. Some models from |ns2| have already been ported from |ns2| to |ns3|. The project will continue to maintain |ns2| while |ns3| is being built, and will study transition and integration mechanisms. -* |ns3| is open-source, and the project strives to maintain an - open environment for researchers to contribute and share their software. +About |ns3| +*********** + +|ns3| has been developed to provide an open, extensible network simulation +platform, for networking research and education. In brief, |ns3| provides +models of how packet data networks work and perform, and provides a +simulation engine for users to conduct simulation experiments. Some of the +reasons to use |ns3| include to perform studies that are more difficult +or not possible to perform with real systems, to study system behavior in +a highly controllled, reproducible environment, and to learn about how +networks work. Users will note that the available model set in |ns3| +focuses on modeling how Internet protocols and networks work, but +|ns3| is not limited to Internet systems; several users are using +|ns3| to model non-Internet-based systems. + +Many simulation tools exist for network simulation studies. Below are +a few distinguishing features of |ns3| in contrast to other tools. + +* |ns3| is designed as a set of libraries that can be combined together + and also with other external software libraries. While some simulation + platforms provide users with a single, integrated graphical user + interface environment in which all tasks are carried out, |ns3| is + more modular in this regard. Several external animators and + data analysis and visualization tools can be used with |ns3|. However, + users should expect to work at the command line and with C++ and/or + Python software development tools. +* |ns3| is primarily used on Linux systems, although support exists + for FreeBSD, Cygwin (for Windows), and native Windows Visual Studio + support is in the process of being developed. +* |ns3| is not an officially supported software product of any company. + Support for |ns3| is done on a best-effort basis on the + ns-3-users mailing list. + For |ns2| Users *************** -For those familiar with |ns2|, the most visible outward change when moving to +For those familiar with |ns2| (a popular tool that preceded |ns3|), +the most visible outward change when moving to |ns3| is the choice of scripting language. Programs in |ns2| are scripted in OTcl and results of simulations can be visualized using the Network Animator nam. It is not possible to run a simulation @@ -57,17 +91,38 @@ as we proceed in this tutorial. A question that we often hear is "Should I still use |ns2| or move to -|ns3|?" The answer is that it depends. |ns3| does not have -all of the models that |ns2| currently has, but on the other hand, |ns3| -does have new capabilities (such as handling multiple interfaces on nodes -correctly, use of IP addressing and more alignment with Internet -protocols and designs, more detailed 802.11 models, etc.). |ns2| -models can sometimes be ported to |ns3| (a porting guide is under -development). The support available on the user mailing list, and the -developer and maintainer activity, is higher for |ns3|. A good guideline -would be to look at both simulators, and in particular the models available -for your research, but when in doubt or when starting new simulation -projects, choose the tool that is under more active development (|ns3|). +|ns3|?" In this author's opinion, unless the user is somehow vested +in |ns2| (either based on existing personal comfort with and knowledge +of |ns2|, or based on a specific simulation model that is only available +in |ns2|), a user will be more productive with |ns3| for the following +reasons: + +* |ns3| is actively maintained with an active, responsive users mailing + list, while |ns2| is only lightly maintained and has not seen + significant development in its main code tree for over a decade. +* |ns3| provides features not available in |ns2|, such as a implementation + code execution environment (allowing users to run real implementation + code in the simulator) +* |ns3| provides a lower base level of abstraction compared with |ns2|, + allowing it to align better with how real systems are put together. + Some limitations found in |ns2| (such as supporting multiple types of + interfaces on nodes correctly) have been remedied in |ns3|. + +|ns2| has a more diverse set of contributed modules than does |ns3|, owing to +its long history. However, |ns3| has more detailed models in several +popular areas of research (including sophisticated LTE and WiFi models), +and its support of implementation code admits a very wide spectrum +of high-fidelity models. Users may be surprised to learn that the +whole Linux networking stack can be encapsulated in an |ns3| node, +using the Direct Code Execution (DCE) framework. |ns2| +models can sometimes be ported to |ns3|, particularly if they have been +implemented in C++. + +If in doubt, a good guideline would be to look at both simulators (as +well as other simulators), and in particular the models available +for your research, but keep in mind that your experience may be better +in using the tool that is being actively developed and +maintained (|ns3|). Contributing ************ diff -Naur ns-3.17/doc/tutorial/source/replace.txt ns-3.18/doc/tutorial/source/replace.txt --- ns-3.17/doc/tutorial/source/replace.txt 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/tutorial/source/replace.txt 2013-10-26 07:07:29.447364379 -0700 @@ -1,3 +1,5 @@ .. |ns3| replace:: *ns-3* .. |ns2| replace:: *ns-2* + +.. |check| replace:: :math:`\checkmark` diff -Naur ns-3.17/doc/tutorial/source/tracing.rst ns-3.18/doc/tutorial/source/tracing.rst --- ns-3.17/doc/tutorial/source/tracing.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/tutorial/source/tracing.rst 2013-10-26 07:07:29.447364379 -0700 @@ -1,5 +1,7 @@ .. include:: replace.txt - +.. highlight:: cpp +.. role:: raw-role(raw) + :format: html latex Tracing ------- @@ -15,12 +17,13 @@ the information wanted. Using pre-defined bulk output mechanisms has the advantage of not requiring any -changes to |ns3|, but it does require programming. Often, pcap or NS_LOG +changes to |ns3|, but it may require writing scripts to parse and filter +for data of interest. Often, pcap or NS_LOG output messages are gathered during simulation runs and separately run through scripts that use grep, sed or awk to parse the messages and reduce and transform the data to a manageable form. Programs must be written to do the transformation, so this does not come for free. Of course, if the information -of interest in does not exist in any of the pre-defined output mechanisms, +of interest does not exist in any of the pre-defined output mechanisms, this approach fails. If you need to add some tidbit of information to the pre-defined bulk mechanisms, @@ -256,11 +259,11 @@ The ``operator()`` eventually wanders down into the system and does something remarkably like the indirect call you just saw. It provides zero or more parameters (the call to "pfi" above passed one parameter to the target function -``MyFunction``. +``MyFunction``). The important difference that the tracing system adds is that for each trace source there is an internal list of Callbacks. Instead of just making one -indirect call, a trace source may invoke any number of Callbacks. When a trace +indirect call, a trace source may invoke multiple. When a trace sink expresses interest in notifications from a trace source, it basically just arranges to add its own function to the callback list. @@ -309,7 +312,8 @@ The file, ``traced-value.h`` brings in the required declarations for tracing of data that obeys value semantics. In general, value semantics just means that -you can pass the object around, not an address. In order to use value semantics +you can pass the object itself around, rather than passing the address of the +object. In order to use value semantics at all you have to have an object with an associated copy constructor and assignment operator available. We extend the requirements to talk about the set of operators that are pre-defined for plain-old-data (POD) types. Operator=, @@ -426,21 +430,20 @@ If you now build and run this example, -:: +.. sourcecode:: bash - ./waf --run fourth + $ ./waf --run fourth you will see the output from the ``IntTrace`` function execute as soon as the trace source is hit: -:: +.. sourcecode:: bash Traced 0 to 1234 When we executed the code, ``myObject->m_myInt = 1234;``, the trace source fired and automatically provided the before and after values to the trace sink. -The function ``IntTrace`` then printed this to the standard output. No -problem. +The function ``IntTrace`` then printed this to the standard output. Using the Config Subsystem to Connect to Trace Sources ++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -449,7 +452,7 @@ actually very rarely used in the system. More typically, the ``Config`` subsystem is used to allow selecting a trace source in the system using what is called a *config path*. We saw an example of this in the previous section -where we hooked the "CourseChange" event when we were playing with +where we hooked the "CourseChange" event when we were experimenting with ``third.cc``. Recall that we defined a trace sink to print course change information from the @@ -679,9 +682,9 @@ who has already figured it out, You should always try to copy someone else's working code before you start to write your own. Try something like: -:: +.. sourcecode:: bash - find . -name '*.cc' | xargs grep CourseChange | grep Connect + $ find . -name '*.cc' | xargs grep CourseChange | grep Connect and you may find your answer along with working code. For example, in this case, ``./ns-3-dev/examples/wireless/mixed-wireless.cc`` has something @@ -732,7 +735,7 @@ You are looking at the same information for the RandomWalk2dMobilityModel; and the information you want is now right there in front of you in the Doxygen: -:: +.. sourcecode:: bash This object is accessible through the following paths with Config::Set and Config::Connect: @@ -756,7 +759,7 @@ Look further down in the ``GetTypeId`` doxygen. You will find, -:: +.. sourcecode:: bash No TraceSources defined for this type. TraceSources defined in parent class ns3::MobilityModel: @@ -788,9 +791,9 @@ who has already figured it out, You should always try to copy someone else's working code. Try something like: -:: +.. sourcecode:: bash - find . -name '*.cc' | xargs grep CourseChange | grep Connect + $ find . -name '*.cc' | xargs grep CourseChange | grep Connect and you may find your answer along with working code. For example, in this case, ``./ns-3-dev/examples/wireless/mixed-wireless.cc`` has something @@ -812,7 +815,7 @@ ... } -Take my Word for It +Take My Word for It ~~~~~~~~~~~~~~~~~~~ If there are no examples to work from, this can be, well, challenging to @@ -899,9 +902,9 @@ we know this declaration is going to have to be in some kind of header file, so just grep for it using: -:: +.. sourcecode:: bash - find . -name '*.h' | xargs grep TracedCallback + $ find . -name '*.h' | xargs grep TracedCallback You'll see 124 lines fly by (I piped this through wc to see how bad it was). Although that may seem like it, that's not really a lot. Just pipe the output @@ -943,7 +946,7 @@ You will see a comment at the top of the file that should be comforting: -:: +.. sourcecode:: text An ns3::TracedCallback has almost exactly the same API as a normal ns3::Callback but instead of forwarding calls to a single function (as an ns3::Callback normally does), @@ -1019,7 +1022,7 @@ incomprehensible template code. You will eventually come to some Doxygen for the Callback template class, though. Fortunately, there is some English: -:: +.. sourcecode:: text This class template implements the Functor Design Pattern. It is used to declare the type of a Callback: @@ -1179,7 +1182,7 @@ in the |ns3| Doxygen in the "C++ Constructs Used by All Modules" Module section. If you scroll through the list, you will eventually find: -:: +.. sourcecode:: bash ns3::TcpNewReno CongestionWindow: The TCP connection's congestion window @@ -1189,9 +1192,9 @@ variants are in files such as ``src/internet/model/tcp-newreno.cc``. If you don't know this a priori, you can use the recursive grep trick: -:: +.. sourcecode:: bash - find . -name '*.cc' | xargs grep -i tcp + $ find . -name '*.cc' | xargs grep -i tcp You will find page after page of instances of tcp pointing you to that file. @@ -1247,9 +1250,9 @@ is to find some code that already hooks the "CongestionWindow" trace source and see if we can modify it. As usual, grep is your friend: -:: +.. sourcecode:: bash - find . -name '*.cc' | xargs grep CongestionWindow + $ find . -name '*.cc' | xargs grep CongestionWindow This will point out a couple of promising candidates: ``examples/tcp/tcp-large-transfer.cc`` and @@ -1954,10 +1957,10 @@ your distribution (in debug mode since it uses NS_LOG -- recall that optimized builds optimize out NS_LOGs) it will be waiting for you to run. -:: +.. sourcecode:: bash - ./waf --run fifth - Waf: Entering directory `/home/craigdo/repos/ns-3-allinone-dev/ns-3-dev/build + $ ./waf --run fifth + Waf: Entering directory `/home/craigdo/repos/ns-3-allinone-dev/ns-3-dev/build' Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone-dev/ns-3-dev/build' 'build' finished successfully (0.684s) 1.20919 1072 @@ -1976,9 +1979,9 @@ sure you can't wait to see the results of all of this work. Let's redirect that output to a file called ``cwnd.dat``: -:: +.. sourcecode:: bash - ./waf --run fifth > cwnd.dat 2>&1 + $ ./waf --run fifth > cwnd.dat 2>&1 Now edit up "cwnd.dat" in your favorite editor and remove the waf build status and drop lines, leaving only the traced data (you could also comment out the @@ -1988,8 +1991,9 @@ You can now run gnuplot (if you have it installed) and tell it to generate some pretty pictures: -:: +.. sourcecode:: bash + $ gnuplot gnuplot> set terminal png size 640,480 gnuplot> set output "cwnd.png" gnuplot> plot "cwnd.dat" using 1:2 title 'Congestion Window' with linespoints @@ -2140,7 +2144,7 @@ since the packets are coming from our point-to-point device driver. Other common data link types are DLT_EN10MB (10 MB Ethernet) appropriate for csma devices and DLT_IEEE802_11 (IEEE 802.11) appropriate for wifi devices. These -are defined in ``src/network/helper/trace-helper.h"`` if you are interested in seeing +are defined in ``src/network/helper/trace-helper.h`` if you are interested in seeing the list. The entries in the list match those in ``bpf.h`` but we duplicate them to avoid a pcap source dependence. @@ -2187,21 +2191,21 @@ Now, back to the example. If you now build and run this example, -:: +.. sourcecode:: bash - ./waf --run sixth + $ ./waf --run sixth you will see the same messages appear as when you ran "fifth", but two new files will appear in the top-level directory of your |ns3| distribution. -:: +.. sourcecode:: bash sixth.cwnd sixth.pcap Since "sixth.cwnd" is an ASCII text file, you can view it with ``cat`` or your favorite file viewer. -:: +.. sourcecode:: bash 1.20919 536 1072 1.21511 1072 1608 @@ -2215,7 +2219,7 @@ Since "sixth.pcap" is a pcap file, you can fiew it with ``tcpdump``. -:: +.. sourcecode:: bash reading from file ../../sixth.pcap, link-type PPP (PPP) 1.251507 IP 10.1.1.1.49153 > 10.1.1.2.8080: . 17689:18225(536) ack 1 win 65535 @@ -2305,14 +2309,13 @@ but we do strive to make them all work as similarly as possible; and whenever possible there are analogs for all methods in all classes. -:: - - | pcap | ascii | - -----------------+------+-------| - Device Helper | | | - -----------------+------+-------| - Protocol Helper | | | - -----------------+------+-------| + +-----------------+---------+---------+ + | | pcap | ascii | + +=================+=========+=========+ + | Device Helper | |check| | |check| | + +-----------------+---------+---------+ + | Protocol Helper | |check| | |check| | + +-----------------+---------+---------+ We use an approach called a ``mixin`` to add tracing functionality to our helper classes. A ``mixin`` is a class that provides functionality to that diff -Naur ns-3.17/doc/tutorial/source/tweaking.rst ns-3.18/doc/tutorial/source/tweaking.rst --- ns-3.17/doc/tutorial/source/tweaking.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/doc/tutorial/source/tweaking.rst 2013-10-26 07:07:29.451364379 -0700 @@ -1,4 +1,5 @@ .. include:: replace.txt +.. highlight:: cpp Tweaking @@ -80,16 +81,16 @@ first, just to get our bearings, go ahead and run the last script just as you did previously, -:: +.. sourcecode:: bash - ./waf --run scratch/myfirst + $ ./waf --run scratch/myfirst You should see the now familiar output of the first |ns3| example program -:: +.. sourcecode:: bash - Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' + $ Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' 'build' finished successfully (0.413s) Sent 1024 bytes to 10.1.1.2 @@ -121,13 +122,13 @@ increase the logging level and get more information without changing the script and recompiling by setting the NS_LOG environment variable like this: -:: +.. sourcecode:: bash - export NS_LOG=UdpEchoClientApplication=level_all + $ export NS_LOG=UdpEchoClientApplication=level_all This sets the shell environment variable ``NS_LOG`` to the string, -:: +.. sourcecode:: bash UdpEchoClientApplication=level_all @@ -137,9 +138,9 @@ you run the script with NS_LOG set this way, the |ns3| logging system will pick up the change and you should see the following output: -:: +.. sourcecode:: bash - Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build + Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' 'build' finished successfully (0.404s) UdpEchoClientApplication:UdpEchoClient() @@ -183,9 +184,9 @@ from. You can resolve this by OR'ing the ``prefix_func`` level into the ``NS_LOG`` environment variable. Try doing the following, -:: +.. sourcecode:: bash - export 'NS_LOG=UdpEchoClientApplication=level_all|prefix_func' + $ export 'NS_LOG=UdpEchoClientApplication=level_all|prefix_func' Note that the quotes are required since the vertical bar we use to indicate an OR operation is also a Unix pipe connector. @@ -194,7 +195,7 @@ that every message from the given log component is prefixed with the component name. -:: +.. sourcecode:: bash Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' @@ -219,9 +220,9 @@ can enable that component by entering a colon separated list of components in the NS_LOG environment variable. -:: +.. sourcecode:: bash - export 'NS_LOG=UdpEchoClientApplication=level_all|prefix_func: + $ export 'NS_LOG=UdpEchoClientApplication=level_all|prefix_func: UdpEchoServerApplication=level_all|prefix_func' Warning: You will need to remove the newline after the ``:`` in the @@ -231,7 +232,7 @@ echo client and server applications. You may see that this can be very useful in debugging problems. -:: +.. sourcecode:: bash Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' @@ -258,15 +259,15 @@ It is also sometimes useful to be able to see the simulation time at which a log message is generated. You can do this by ORing in the prefix_time bit. -:: +.. sourcecode:: bash - export 'NS_LOG=UdpEchoClientApplication=level_all|prefix_func|prefix_time: + $ export 'NS_LOG=UdpEchoClientApplication=level_all|prefix_func|prefix_time: UdpEchoServerApplication=level_all|prefix_func|prefix_time' Again, you will have to remove the newline above. If you run the script now, you should see the following output: -:: +.. sourcecode:: bash Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' @@ -314,9 +315,9 @@ turning on all of the logging components in the system. Try setting the ``NS_LOG`` variable to the following, -:: +.. sourcecode:: bash - export 'NS_LOG=*=level_all|prefix_func|prefix_time' + $ export 'NS_LOG=*=level_all|prefix_func|prefix_time' The asterisk above is the logging component wildcard. This will turn on all of the logging in all of the components used in the simulation. I won't @@ -324,9 +325,9 @@ for the single packet echo) but you can redirect this information into a file and look through it with your favorite editor if you like, -:: +.. sourcecode:: bash - ./waf --run scratch/myfirst > log.out 2>&1 + $ ./waf --run scratch/myfirst > log.out 2>&1 I personally use this extremely verbose version of logging when I am presented with a problem and I have no idea where things are going wrong. I can follow the @@ -374,16 +375,16 @@ Now build the script using waf and clear the ``NS_LOG`` variable to turn off the torrent of logging we previously enabled: -:: +.. sourcecode:: bash - ./waf - export NS_LOG= + $ ./waf + $ export NS_LOG= Now, if you run the script, -:: +.. sourcecode:: bash - ./waf --run scratch/myfirst + $ ./waf --run scratch/myfirst you will ``not`` see your new message since its associated logging component (``FirstScriptExample``) has not been enabled. In order to see your @@ -391,14 +392,14 @@ with a level greater than or equal to ``NS_LOG_INFO``. If you just want to see this particular level of logging, you can enable it by, -:: +.. sourcecode:: bash - export NS_LOG=FirstScriptExample=info + $ export NS_LOG=FirstScriptExample=info If you now run the script you will see your new "Creating Topology" log message, -:: +.. sourcecode:: bash Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' @@ -441,16 +442,16 @@ the start of ``main``. Go ahead and build the script and run it, but ask the script for help in the following way, -:: +.. sourcecode:: bash - ./waf --run "scratch/myfirst --PrintHelp" + $ ./waf --run "scratch/myfirst --PrintHelp" This will ask Waf to run the ``scratch/myfirst`` script and pass the command line argument ``--PrintHelp`` to the script. The quotes are required to sort out which program gets which argument. The command line parser will now see the ``--PrintHelp`` argument and respond with, -:: +.. sourcecode:: bash Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' @@ -481,14 +482,14 @@ class name of the class to which the ``Attributes`` belong. In this case it will be ``ns3::PointToPointNetDevice``. Let's go ahead and type in, -:: +.. sourcecode:: bash - ./waf --run "scratch/myfirst --PrintAttributes=ns3::PointToPointNetDevice" + $ ./waf --run "scratch/myfirst --PrintAttributes=ns3::PointToPointNetDevice" The system will print out all of the ``Attributes`` of this kind of net device. Among the ``Attributes`` you will see listed is, -:: +.. sourcecode:: bash --ns3::PointToPointNetDevice::DataRate=[32768bps]: The default data rate for point to point links @@ -521,13 +522,13 @@ and enable some logging from the UDP echo server application and turn on the time prefix. -:: +.. sourcecode:: bash - export 'NS_LOG=UdpEchoServerApplication=level_all|prefix_time' + $ export 'NS_LOG=UdpEchoServerApplication=level_all|prefix_time' If you run the script, you should now see the following output, -:: +.. sourcecode:: bash Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' @@ -545,7 +546,7 @@ Recall that the last time we looked at the simulation time at which the packet was received by the echo server, it was at 2.00369 seconds. -:: +.. sourcecode:: bash 2.00369s UdpEchoServerApplication:HandleRead(): Received 1024 bytes from 10.1.1.1 @@ -557,9 +558,9 @@ speed our simulation up again. We do this in the following way, according to the formula implied by the help item: -:: +.. sourcecode:: bash - ./waf --run "scratch/myfirst --ns3::PointToPointNetDevice::DataRate=5Mbps" + $ ./waf --run "scratch/myfirst --ns3::PointToPointNetDevice::DataRate=5Mbps" This will set the default value of the ``DataRate`` ``Attribute`` back to five megabits per second. Are you surprised by the result? It turns out that @@ -568,30 +569,30 @@ system to print out the ``Attributes`` of the channel just like we did for the net device: -:: +.. sourcecode:: bash - ./waf --run "scratch/myfirst --PrintAttributes=ns3::PointToPointChannel" + $ ./waf --run "scratch/myfirst --PrintAttributes=ns3::PointToPointChannel" We discover the ``Delay`` ``Attribute`` of the channel is set in the following way: -:: +.. sourcecode:: bash --ns3::PointToPointChannel::Delay=[0ns]: Transmission delay through the channel We can then set both of these default values through the command line system, -:: +.. sourcecode:: bash - ./waf --run "scratch/myfirst + $ ./waf --run "scratch/myfirst --ns3::PointToPointNetDevice::DataRate=5Mbps --ns3::PointToPointChannel::Delay=2ms" in which case we recover the timing we had when we explicitly set the ``DataRate`` and ``Delay`` in the script: -:: +.. sourcecode:: bash Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' @@ -620,9 +621,9 @@ line. Since we're nice folks, we'll tell you that your command line should end up looking something like, -:: +.. sourcecode:: bash - ./waf --run "scratch/myfirst + $ ./waf --run "scratch/myfirst --ns3::PointToPointNetDevice::DataRate=5Mbps --ns3::PointToPointChannel::Delay=2ms --ns3::UdpEchoClient::MaxPackets=2" @@ -666,11 +667,11 @@ Try, -:: +.. sourcecode:: bash - ./waf --run "scratch/myfirst --PrintHelp" + $ ./waf --run "scratch/myfirst --PrintHelp" -:: +.. sourcecode:: bash Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' @@ -687,13 +688,13 @@ If you want to specify the number of packets to echo, you can now do so by setting the ``--nPackets`` argument in the command line, -:: +.. sourcecode:: bash - ./waf --run "scratch/myfirst --nPackets=2" + $ ./waf --run "scratch/myfirst --nPackets=2" You should now see -:: +.. sourcecode:: bash Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build' @@ -821,9 +822,9 @@ You can now build the script and run it from the command line: -:: +.. sourcecode:: bash - ./waf --run scratch/myfirst + $ ./waf --run scratch/myfirst Just as you have seen many times before, you will see some messages from Waf and then "'build' finished successfully" with some number of messages from @@ -856,31 +857,32 @@ * ``r``: A packet was received by the net device. Let's take a more detailed view of the first line in the trace file. I'll -break it down into sections (indented for clarity) with a two digit reference +break it down into sections (indented for clarity) with a reference number on the left side: -:: +.. sourcecode:: text + :linenos: - 00 + - 01 2 - 02 /NodeList/0/DeviceList/0/$ns3::PointToPointNetDevice/TxQueue/Enqueue - 03 ns3::PppHeader ( - 04 Point-to-Point Protocol: IP (0x0021)) - 05 ns3::Ipv4Header ( - 06 tos 0x0 ttl 64 id 0 protocol 17 offset 0 flags [none] - 07 length: 1052 10.1.1.1 > 10.1.1.2) - 08 ns3::UdpHeader ( - 09 length: 1032 49153 > 9) - 10 Payload (size=1024) + + + 2 + /NodeList/0/DeviceList/0/$ns3::PointToPointNetDevice/TxQueue/Enqueue + ns3::PppHeader ( + Point-to-Point Protocol: IP (0x0021)) + ns3::Ipv4Header ( + tos 0x0 ttl 64 id 0 protocol 17 offset 0 flags [none] + length: 1052 10.1.1.1 > 10.1.1.2) + ns3::UdpHeader ( + length: 1032 49153 > 9) + Payload (size=1024) -The first line of this expanded trace event (reference number 00) is the +The first section of this expanded trace event (reference number 0) is the operation. We have a ``+`` character, so this corresponds to an -*enqueue* operation on the transmit queue. The second line (reference 01) +*enqueue* operation on the transmit queue. The second section (reference 1) is the simulation time expressed in seconds. You may recall that we asked the ``UdpEchoClientApplication`` to start sending packets at two seconds. Here we see confirmation that this is, indeed, happening. -The next line of the example trace (reference 02) tell us which trace source +The next section of the example trace (reference 2) tell us which trace source originated this event (expressed in the tracing namespace). You can think of the tracing namespace somewhat like you would a filesystem namespace. The root of the namespace is the ``NodeList``. This corresponds to a container @@ -899,11 +901,11 @@ operation happened on the transmit queue of the device. This is reflected in the final segments of the "trace path" which are ``TxQueue/Enqueue``. -The remaining lines in the trace should be fairly intuitive. References 03-04 +The remaining sections in the trace should be fairly intuitive. References 3-4 indicate that the packet is encapsulated in the point-to-point protocol. -References 05-07 show that the packet has an IP version four header and has +References 5-7 show that the packet has an IP version four header and has originated from IP address 10.1.1.1 and is destined for 10.1.1.2. References -08-09 show that this packet has a UDP header and, finally, reference 10 shows +8-9 show that this packet has a UDP header and, finally, reference 10 shows that the payload is the expected 1024 bytes. The next line in the trace file shows the same packet being dequeued from the @@ -912,17 +914,18 @@ The Third line in the trace file shows the packet being received by the net device on the node with the echo server. I have reproduced that event below. -:: +.. sourcecode:: text + :linenos: - 00 r - 01 2.25732 - 02 /NodeList/1/DeviceList/0/$ns3::PointToPointNetDevice/MacRx - 03 ns3::Ipv4Header ( - 04 tos 0x0 ttl 64 id 0 protocol 17 offset 0 flags [none] - 05 length: 1052 10.1.1.1 > 10.1.1.2) - 06 ns3::UdpHeader ( - 07 length: 1032 49153 > 9) - 08 Payload (size=1024) + r + 2.25732 + /NodeList/1/DeviceList/0/$ns3::PointToPointNetDevice/MacRx + ns3::Ipv4Header ( + tos 0x0 ttl 64 id 0 protocol 17 offset 0 flags [none] + length: 1052 10.1.1.1 > 10.1.1.2) + ns3::UdpHeader ( + length: 1032 49153 > 9) + Payload (size=1024) Notice that the trace operation is now ``r`` and the simulation time has increased to 2.25732 seconds. If you have been following the tutorial steps @@ -968,9 +971,9 @@ Once you have added the line of code to enable pcap tracing, you can run the script in the usual way: -:: +.. sourcecode:: bash - ./waf --run scratch/myfirst + $ ./waf --run scratch/myfirst If you look at the top level directory of your distribution, you should now see three log files: ``myfirst.tr`` is the ASCII trace file we have @@ -982,9 +985,9 @@ The easiest thing to do at this point will be to use ``tcpdump`` to look at the ``pcap`` files. -:: +.. sourcecode:: bash - tcpdump -nn -tt -r myfirst-0-0.pcap + $ tcpdump -nn -tt -r myfirst-0-0.pcap reading from file myfirst-0-0.pcap, link-type PPP (PPP) 2.000000 IP 10.1.1.1.49153 > 10.1.1.2.9: UDP, length 1024 2.514648 IP 10.1.1.2.9 > 10.1.1.1.49153: UDP, length 1024 diff -Naur ns-3.17/doc/tutorial-pt-br/source/conf.py ns-3.18/doc/tutorial-pt-br/source/conf.py --- ns-3.17/doc/tutorial-pt-br/source/conf.py 2013-05-14 07:34:33.000000000 -0700 +++ ns-3.18/doc/tutorial-pt-br/source/conf.py 2013-10-26 07:07:29.467364379 -0700 @@ -50,9 +50,9 @@ # built documents. # # The short X.Y version. -version = 'ns-3.17' +version = 'ns-3.18' # The full version, including alpha/beta/rc tags. -release = 'ns-3.17' +release = 'ns-3.18' # The language for content autogenerated by . Refer to babel documentation # for a list of supported languages. diff -Naur ns-3.17/examples/ipv6/fragmentation-ipv6.cc ns-3.18/examples/ipv6/fragmentation-ipv6.cc --- ns-3.17/examples/ipv6/fragmentation-ipv6.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/examples/ipv6/fragmentation-ipv6.cc 2013-10-26 07:07:29.491364379 -0700 @@ -41,69 +41,23 @@ NS_LOG_COMPONENT_DEFINE ("FragmentationIpv6Example"); -/** - * \class StackHelper - * \brief Helper to set or get some IPv6 information about nodes. - */ -class StackHelper -{ -public: - /** - * \brief Add an address to a IPv6 node. - * \param n node - * \param interface interface index - * \param address IPv6 address to add - */ - inline void AddAddress (Ptr& n, uint32_t interface, Ipv6Address address) - { - Ptr ipv6 = n->GetObject (); - ipv6->AddAddress (interface, address); - } - - /** - * \brief Print the routing table. - * \param n the node - */ - inline void PrintRoutingTable (Ptr& n) - { - Ptr routing = 0; - Ipv6StaticRoutingHelper routingHelper; - Ptr ipv6 = n->GetObject (); - uint32_t nbRoutes = 0; - Ipv6RoutingTableEntry route; - - routing = routingHelper.GetStaticRouting (ipv6); - - std::cout << "Routing table of " << n << " : " << std::endl; - std::cout << "Destination\t\t\t\t" << "Gateway\t\t\t\t\t" << "Interface\t" << "Prefix to use" << std::endl; - - nbRoutes = routing->GetNRoutes (); - for (uint32_t i = 0; i < nbRoutes; i++) - { - route = routing->GetRoute (i); - std::cout << route.GetDest () << "\t" - << route.GetGateway () << "\t" - << route.GetInterface () << "\t" - << route.GetPrefixToUse () << "\t" - << std::endl; - } - } -}; int main (int argc, char** argv) { -#if 0 - LogComponentEnable ("Ipv6L3Protocol", LOG_LEVEL_ALL); - LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_ALL); - LogComponentEnable ("Ipv6StaticRouting", LOG_LEVEL_ALL); - LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL); - LogComponentEnable ("Ping6Application", LOG_LEVEL_ALL); -#endif + bool verbose = false; CommandLine cmd; + cmd.AddValue ("verbose", "turn on log components", verbose); cmd.Parse (argc, argv); - StackHelper stackHelper; + if (verbose) + { + LogComponentEnable ("Ipv6L3Protocol", LOG_LEVEL_ALL); + LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6StaticRouting", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL); + LogComponentEnable ("Ping6Application", LOG_LEVEL_ALL); + } NS_LOG_INFO ("Create nodes."); Ptr n0 = CreateObject (); @@ -129,12 +83,16 @@ Ipv6AddressHelper ipv6; ipv6.SetBase (Ipv6Address ("2001:1::"), Ipv6Prefix (64)); Ipv6InterfaceContainer i1 = ipv6.Assign (d1); - i1.SetRouter (1, true); + i1.SetForwarding (1, true); + i1.SetDefaultRouteInAllNodes (1); ipv6.SetBase (Ipv6Address ("2001:2::"), Ipv6Prefix (64)); Ipv6InterfaceContainer i2 = ipv6.Assign (d2); - i2.SetRouter (0, true); + i2.SetForwarding (0, true); + i2.SetDefaultRouteInAllNodes (0); - stackHelper.PrintRoutingTable (n0); + Ipv6StaticRoutingHelper routingHelper; + Ptr routingStream = Create (&std::cout); + routingHelper.PrintRoutingTableAt (Seconds (0), n0, routingStream); /* Create a Ping6 application to send ICMPv6 echo request from n0 to n1 via r */ uint32_t packetSize = 4096; diff -Naur ns-3.17/examples/ipv6/fragmentation-ipv6-two-MTU.cc ns-3.18/examples/ipv6/fragmentation-ipv6-two-MTU.cc --- ns-3.17/examples/ipv6/fragmentation-ipv6-two-MTU.cc 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/examples/ipv6/fragmentation-ipv6-two-MTU.cc 2013-10-26 07:07:29.491364379 -0700 @@ -0,0 +1,124 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008-2009 Strasbourg University + * Copyright (c) 2013 Universita' di Firenze + * + * 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: David Gross + * Sebastien Vincent + * Modified by Tommaso Pecorella + */ + +// Network topology +// // +// // Src n0 r n1 Dst +// // | _ | +// // MTU ====|_|==== MTU +// // 5000 router 1500 +// // +// // - Tracing of queues and packet receptions to file "fragmentation-ipv6-two-mtu.tr" + +#include +#include "ns3/core-module.h" +#include "ns3/internet-module.h" +#include "ns3/csma-module.h" +#include "ns3/applications-module.h" +#include "ns3/ipv6-static-routing-helper.h" + +#include "ns3/ipv6-routing-table-entry.h" + +using namespace ns3; + +NS_LOG_COMPONENT_DEFINE ("FragmentationIpv6TwoMtuExample"); + +int main (int argc, char** argv) +{ + bool verbose = false; + + CommandLine cmd; + cmd.AddValue ("verbose", "turn on log components", verbose); + cmd.Parse (argc, argv); + + if (verbose) + { + LogComponentEnable ("Ipv6L3Protocol", LOG_LEVEL_ALL); + LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6StaticRouting", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL); + LogComponentEnable ("Ping6Application", LOG_LEVEL_ALL); + } + + NS_LOG_INFO ("Create nodes."); + Ptr n0 = CreateObject (); + Ptr r = CreateObject (); + Ptr n1 = CreateObject (); + + NodeContainer net1 (n0, r); + NodeContainer net2 (r, n1); + NodeContainer all (n0, r, n1); + + NS_LOG_INFO ("Create IPv6 Internet Stack"); + InternetStackHelper internetv6; + internetv6.Install (all); + + NS_LOG_INFO ("Create channels."); + CsmaHelper csma; + csma.SetChannelAttribute ("DataRate", DataRateValue (5000000)); + csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2))); + NetDeviceContainer d2 = csma.Install (net2); + csma.SetDeviceAttribute ("Mtu", UintegerValue (5000)); + NetDeviceContainer d1 = csma.Install (net1); + + NS_LOG_INFO ("Create networks and assign IPv6 Addresses."); + Ipv6AddressHelper ipv6; + ipv6.SetBase (Ipv6Address ("2001:1::"), Ipv6Prefix (64)); + Ipv6InterfaceContainer i1 = ipv6.Assign (d1); + i1.SetForwarding (1, true); + i1.SetDefaultRouteInAllNodes (1); + ipv6.SetBase (Ipv6Address ("2001:2::"), Ipv6Prefix (64)); + Ipv6InterfaceContainer i2 = ipv6.Assign (d2); + i2.SetForwarding (0, true); + i2.SetDefaultRouteInAllNodes (0); + + Ipv6StaticRoutingHelper routingHelper; + Ptr routingStream = Create (&std::cout); + routingHelper.PrintRoutingTableAt (Seconds (0), n0, routingStream); + + /* Create a Ping6 application to send ICMPv6 echo request from n0 to n1 via r */ + uint32_t packetSize = 4096; + uint32_t maxPacketCount = 5; + Time interPacketInterval = Seconds (1.0); + Ping6Helper ping6; + + ping6.SetLocal (i1.GetAddress (0, 1)); + ping6.SetRemote (i2.GetAddress (1, 1)); + + ping6.SetAttribute ("MaxPackets", UintegerValue (maxPacketCount)); + ping6.SetAttribute ("Interval", TimeValue (interPacketInterval)); + ping6.SetAttribute ("PacketSize", UintegerValue (packetSize)); + ApplicationContainer apps = ping6.Install (net1.Get (0)); + apps.Start (Seconds (2.0)); + apps.Stop (Seconds (20.0)); + + AsciiTraceHelper ascii; + csma.EnableAsciiAll (ascii.CreateFileStream ("fragmentation-ipv6-two-mtu.tr")); + csma.EnablePcapAll (std::string ("fragmentation-ipv6-two-mtu"), true); + + NS_LOG_INFO ("Run Simulation."); + Simulator::Run (); + Simulator::Destroy (); + NS_LOG_INFO ("Done."); +} + diff -Naur ns-3.17/examples/ipv6/icmpv6-redirect.cc ns-3.18/examples/ipv6/icmpv6-redirect.cc --- ns-3.17/examples/ipv6/icmpv6-redirect.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/examples/ipv6/icmpv6-redirect.cc 2013-10-26 07:07:29.491364379 -0700 @@ -53,75 +53,25 @@ NS_LOG_COMPONENT_DEFINE ("Icmpv6RedirectExample"); -/** - * \class StackHelper - * \brief Helper to set or get some IPv6 information about nodes. - */ -class StackHelper -{ -public: - /** - * \brief Print the routing table. - * \param n the node - */ - inline void PrintRoutingTable (Ptr& n) - { - Ptr routing = 0; - Ipv6StaticRoutingHelper routingHelper; - Ptr ipv6 = n->GetObject (); - uint32_t nbRoutes = 0; - Ipv6RoutingTableEntry route; - - routing = routingHelper.GetStaticRouting (ipv6); - - std::cout << "Routing table of " << n << " : " << std::endl; - std::cout << "Destination\t\t\t\t" << "Gateway\t\t\t\t\t" << "Interface\t" << "Prefix to use" << std::endl; - - nbRoutes = routing->GetNRoutes (); - for(uint32_t i = 0; i < nbRoutes; i++) - { - route = routing->GetRoute (i); - std::cout << route.GetDest () << "\t" - << route.GetGateway () << "\t" - << route.GetInterface () << "\t" - << route.GetPrefixToUse () << "\t" - << std::endl; - } - } - - /** - * \brief Add an host route. - * \param n node - * \param dst destination address - * \param nextHop next hop for destination - * \param interface output interface - */ - inline void AddHostRouteTo (Ptr& n, Ipv6Address dst, Ipv6Address nextHop, uint32_t interface) - { - Ptr routing = 0; - Ipv6StaticRoutingHelper routingHelper; - Ptr ipv6 = n->GetObject (); - - routing = routingHelper.GetStaticRouting (ipv6); - routing->AddHostRouteTo (dst, nextHop, interface); - } -}; - int main (int argc, char **argv) { -#if 0 - LogComponentEnable ("Icmpv6RedirectExample", LOG_LEVEL_INFO); - LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_INFO); - LogComponentEnable ("Ipv6L3Protocol", LOG_LEVEL_ALL); - LogComponentEnable ("Ipv6StaticRouting", LOG_LEVEL_ALL); - LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL); - LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_ALL); - LogComponentEnable ("NdiscCache", LOG_LEVEL_ALL); -#endif + bool verbose = false; CommandLine cmd; + cmd.AddValue ("verbose", "turn on log components", verbose); cmd.Parse (argc, argv); + if (verbose) + { + LogComponentEnable ("Icmpv6RedirectExample", LOG_LEVEL_INFO); + LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_INFO); + LogComponentEnable ("Ipv6L3Protocol", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6StaticRouting", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL); + LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_ALL); + LogComponentEnable ("NdiscCache", LOG_LEVEL_ALL); + } + NS_LOG_INFO ("Create nodes."); Ptr sta1 = CreateObject (); Ptr r1 = CreateObject (); @@ -131,8 +81,6 @@ NodeContainer net2 (r2, sta2); NodeContainer all (sta1, r1, r2, sta2); - StackHelper stackHelper; - InternetStackHelper internetv6; internetv6.Install (all); @@ -148,17 +96,24 @@ ipv6.SetBase (Ipv6Address ("2001:1::"), Ipv6Prefix (64)); Ipv6InterfaceContainer iic1 = ipv6.Assign (ndc1); - iic1.SetRouter (2, true); - iic1.SetRouter (1, true); + iic1.SetForwarding (2, true); + iic1.SetForwarding (1, true); + iic1.SetDefaultRouteInAllNodes (1); ipv6.SetBase (Ipv6Address ("2001:2::"), Ipv6Prefix (64)); Ipv6InterfaceContainer iic2 = ipv6.Assign (ndc2); - iic2.SetRouter (0, true); + iic2.SetForwarding (0, true); + iic2.SetDefaultRouteInAllNodes (0); - stackHelper.AddHostRouteTo (r1, iic2.GetAddress (1, 1), iic1.GetAddress (2, 1), iic1.GetInterfaceIndex (1)); + Ipv6StaticRoutingHelper routingHelper; - Simulator::Schedule (Seconds (0.0), &StackHelper::PrintRoutingTable, &stackHelper, r1); - Simulator::Schedule (Seconds (3.0), &StackHelper::PrintRoutingTable, &stackHelper, sta1); + // manually inject a static route to the second router. + Ptr routing = routingHelper.GetStaticRouting (r1->GetObject ()); + routing->AddHostRouteTo (iic2.GetAddress (1, 1), iic1.GetAddress (2, 0), iic1.GetInterfaceIndex (1)); + + Ptr routingStream = Create (&std::cout); + routingHelper.PrintRoutingTableAt (Seconds (0.0), r1, routingStream); + routingHelper.PrintRoutingTableAt (Seconds (3.0), sta1, routingStream); NS_LOG_INFO ("Create Applications."); uint32_t packetSize = 1024; diff -Naur ns-3.17/examples/ipv6/loose-routing-ipv6.cc ns-3.18/examples/ipv6/loose-routing-ipv6.cc --- ns-3.17/examples/ipv6/loose-routing-ipv6.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/examples/ipv6/loose-routing-ipv6.cc 2013-10-26 07:07:29.491364379 -0700 @@ -50,19 +50,23 @@ int main (int argc, char **argv) { -#if 0 - LogComponentEnable ("Ipv6ExtensionLooseRouting", LOG_LEVEL_ALL); - LogComponentEnable ("Ipv6Extension", LOG_LEVEL_ALL); - LogComponentEnable ("Ipv6L3Protocol", LOG_LEVEL_ALL); - LogComponentEnable ("Ipv6StaticRouting", LOG_LEVEL_ALL); - LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL); - LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL); - LogComponentEnable ("NdiscCache", LOG_LEVEL_ALL); -#endif + bool verbose = false; CommandLine cmd; + cmd.AddValue ("verbose", "turn on log components", verbose); cmd.Parse (argc, argv); + if (verbose) + { + LogComponentEnable ("Ipv6ExtensionLooseRouting", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6Extension", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6L3Protocol", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6StaticRouting", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL); + LogComponentEnable ("NdiscCache", LOG_LEVEL_ALL); + } + NS_LOG_INFO ("Create nodes."); Ptr h0 = CreateObject (); Ptr h1 = CreateObject (); @@ -106,31 +110,41 @@ ipv6.SetBase (Ipv6Address ("2001:1::"), Ipv6Prefix (64)); Ipv6InterfaceContainer i1 = ipv6.Assign (d1); - i1.SetRouter (1, true); + i1.SetForwarding (1, true); + i1.SetDefaultRouteInAllNodes (1); ipv6.SetBase (Ipv6Address ("2001:2::"), Ipv6Prefix (64)); Ipv6InterfaceContainer i2 = ipv6.Assign (d2); - i2.SetRouter (1, true); + i2.SetForwarding (1, true); + i2.SetDefaultRouteInAllNodes (1); ipv6.SetBase (Ipv6Address ("2001:3::"), Ipv6Prefix (64)); Ipv6InterfaceContainer i3 = ipv6.Assign (d3); - i3.SetRouter (0, true); - i3.SetRouter (1, true); + i3.SetForwarding (0, true); + i3.SetDefaultRouteInAllNodes (0); + i3.SetForwarding (1, true); + i3.SetDefaultRouteInAllNodes (1); ipv6.SetBase (Ipv6Address ("2001:4::"), Ipv6Prefix (64)); Ipv6InterfaceContainer i4 = ipv6.Assign (d4); - i4.SetRouter (0, true); - i4.SetRouter (1, true); + i4.SetForwarding (0, true); + i4.SetDefaultRouteInAllNodes (0); + i4.SetForwarding (1, true); + i4.SetDefaultRouteInAllNodes (1); ipv6.SetBase (Ipv6Address ("2001:5::"), Ipv6Prefix (64)); Ipv6InterfaceContainer i5 = ipv6.Assign (d5); - i5.SetRouter (0, true); - i5.SetRouter (1, true); + i5.SetForwarding (0, true); + i5.SetDefaultRouteInAllNodes (0); + i5.SetForwarding (1, true); + i5.SetDefaultRouteInAllNodes (1); ipv6.SetBase (Ipv6Address ("2001:6::"), Ipv6Prefix (64)); Ipv6InterfaceContainer i6 = ipv6.Assign (d6); - i6.SetRouter (0, true); - i6.SetRouter (1, true); + i6.SetForwarding (0, true); + i6.SetDefaultRouteInAllNodes (0); + i6.SetForwarding (1, true); + i6.SetDefaultRouteInAllNodes (1); NS_LOG_INFO ("Create Applications."); diff -Naur ns-3.17/examples/ipv6/ping6.cc ns-3.18/examples/ipv6/ping6.cc --- ns-3.17/examples/ipv6/ping6.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/examples/ipv6/ping6.cc 2013-10-26 07:07:29.491364379 -0700 @@ -41,21 +41,25 @@ int main (int argc, char **argv) { -#if 0 - LogComponentEnable ("Ping6Example", LOG_LEVEL_INFO); - LogComponentEnable ("Ipv6EndPointDemux", LOG_LEVEL_ALL); - LogComponentEnable ("Ipv6L3Protocol", LOG_LEVEL_ALL); - LogComponentEnable ("Ipv6StaticRouting", LOG_LEVEL_ALL); - LogComponentEnable ("Ipv6ListRouting", LOG_LEVEL_ALL); - LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL); - LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_ALL); - LogComponentEnable ("Ping6Application", LOG_LEVEL_ALL); - LogComponentEnable ("NdiscCache", LOG_LEVEL_ALL); -#endif + bool verbose = false; CommandLine cmd; + cmd.AddValue ("verbose", "turn on log components", verbose); cmd.Parse (argc, argv); + if (verbose) + { + LogComponentEnable ("Ping6Example", LOG_LEVEL_INFO); + LogComponentEnable ("Ipv6EndPointDemux", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6L3Protocol", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6StaticRouting", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6ListRouting", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL); + LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_ALL); + LogComponentEnable ("Ping6Application", LOG_LEVEL_ALL); + LogComponentEnable ("NdiscCache", LOG_LEVEL_ALL); + } + NS_LOG_INFO ("Create nodes."); NodeContainer n; n.Create (4); diff -Naur ns-3.17/examples/ipv6/radvd.cc ns-3.18/examples/ipv6/radvd.cc --- ns-3.17/examples/ipv6/radvd.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/examples/ipv6/radvd.cc 2013-10-26 07:07:29.491364379 -0700 @@ -47,19 +47,23 @@ int main (int argc, char** argv) { -#if 0 - LogComponentEnable ("Ipv6L3Protocol", LOG_LEVEL_ALL); - LogComponentEnable ("Ipv6RawSocketImpl", LOG_LEVEL_ALL); - LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_ALL); - LogComponentEnable ("Ipv6StaticRouting", LOG_LEVEL_ALL); - LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL); - LogComponentEnable ("RadvdApplication", LOG_LEVEL_ALL); - LogComponentEnable ("Ping6Application", LOG_LEVEL_ALL); -#endif + bool verbose = false; CommandLine cmd; + cmd.AddValue ("verbose", "turn on log components", verbose); cmd.Parse (argc, argv); + if (verbose) + { + LogComponentEnable ("Ipv6L3Protocol", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6RawSocketImpl", LOG_LEVEL_ALL); + LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6StaticRouting", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL); + LogComponentEnable ("RadvdApplication", LOG_LEVEL_ALL); + LogComponentEnable ("Ping6Application", LOG_LEVEL_ALL); + } + NS_LOG_INFO ("Create nodes."); Ptr n0 = CreateObject (); Ptr r = CreateObject (); @@ -92,7 +96,8 @@ NetDeviceContainer tmp2; tmp2.Add (d1.Get (1)); /* R */ Ipv6InterfaceContainer iicr1 = ipv6.Assign (tmp2); /* R interface to the first subnet is just statically assigned */ - iicr1.SetRouter (0, true); + iicr1.SetForwarding (0, true); + iicr1.SetDefaultRouteInAllNodes (0); iic1.Add (iicr1); /* second subnet R - n1 */ @@ -100,7 +105,8 @@ NetDeviceContainer tmp3; tmp3.Add (d2.Get (0)); /* R */ Ipv6InterfaceContainer iicr2 = ipv6.Assign (tmp3); /* R interface */ - iicr2.SetRouter (0, true); + iicr2.SetForwarding (0, true); + iicr2.SetDefaultRouteInAllNodes (0); NetDeviceContainer tmp4; tmp4.Add (d2.Get (1)); /* n1 */ @@ -108,24 +114,15 @@ iic2.Add (iicr2); /* radvd configuration */ - Ipv6Address prefix ("2001:1::0"); /* create the prefix */ - Ipv6Address prefix2 ("2001:2::0"); /* create the prefix */ - uint32_t indexRouter = iic1.GetInterfaceIndex (1); /* R interface (n0 - R) */ - uint32_t indexRouter2 = iic2.GetInterfaceIndex (1); /* R interface (R - n1) */ - Ptr radvd = CreateObject (); - Ptr routerInterface = Create (indexRouter, 5000, 1000); - Ptr routerPrefix = Create (prefix, 64, 3, 5); - Ptr routerInterface2 = Create (indexRouter2, 5000, 1000); - Ptr routerPrefix2 = Create (prefix2, 64, 3, 5); - - routerInterface->AddPrefix (routerPrefix); - routerInterface2->AddPrefix (routerPrefix2); - radvd->AddConfiguration (routerInterface); - radvd->AddConfiguration (routerInterface2); - - r->AddApplication (radvd); - radvd->SetStartTime (Seconds (1.0)); - radvd->SetStopTime (Seconds (10.0)); + RadvdHelper radvdHelper; + /* R interface (n0 - R) */ + radvdHelper.AddAnnouncedPrefix(iic1.GetInterfaceIndex (1), Ipv6Address("2001:1::0"), 64); + /* R interface (R - n1) */ + radvdHelper.AddAnnouncedPrefix(iic2.GetInterfaceIndex (1), Ipv6Address("2001:2::0"), 64); + + ApplicationContainer radvdApps = radvdHelper.Install (r); + radvdApps.Start (Seconds (1.0)); + radvdApps.Stop (Seconds (10.0)); /* Create a Ping6 application to send ICMPv6 echo request from n0 to n1 via R */ uint32_t packetSize = 1024; diff -Naur ns-3.17/examples/ipv6/radvd-two-prefix.cc ns-3.18/examples/ipv6/radvd-two-prefix.cc --- ns-3.17/examples/ipv6/radvd-two-prefix.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/examples/ipv6/radvd-two-prefix.cc 2013-10-26 07:07:29.491364379 -0700 @@ -49,69 +49,56 @@ NS_LOG_COMPONENT_DEFINE ("RadvdTwoPrefixExample"); /** - * \class StackHelper - * \brief Helper to set or get some IPv6 information about nodes. + * \class IpAddressHelper + * \brief Helper to print a node's IP addresses. */ -class StackHelper +class IpAddressHelper { public: /** - * \brief Add an address to a IPv6 node. - * \param n node - * \param interface interface index - * \param address IPv6 address to add - */ - inline void AddAddress (Ptr& n, uint32_t interface, Ipv6Address address) - { - Ptr ipv6 = n->GetObject (); - ipv6->AddAddress (interface, address); - } - - /** - * \brief Print the routing table. + * \brief Print the node's IP addresses. * \param n the node */ - inline void PrintRoutingTable (Ptr& n) + inline void PrintIpAddresses (Ptr& n) { - Ptr routing = 0; - Ipv6StaticRoutingHelper routingHelper; Ptr ipv6 = n->GetObject (); - uint32_t nbRoutes = 0; - Ipv6RoutingTableEntry route; - - routing = routingHelper.GetStaticRouting (ipv6); + uint32_t nInterfaces = ipv6->GetNInterfaces(); - std::cout << "Routing table of " << n << " : " << std::endl; - std::cout << "Destination\t\t\t\t" << "Gateway\t\t\t\t\t" << "Interface\t" << "Prefix to use" << std::endl; + std::cout << "Node: " << ipv6->GetObject ()->GetId () + << " Time: " << Simulator::Now ().GetSeconds () << "s " + << "IPv6 addresses" << std::endl; + std::cout << "(Interface index, Address index)\t" << "IPv6 Address" << std::endl; - nbRoutes = routing->GetNRoutes (); - for (uint32_t i = 0; i < nbRoutes; i++) + for (uint32_t i = 0; i < nInterfaces; i++) { - route = routing->GetRoute (i); - std::cout << route.GetDest () << "\t" - << route.GetGateway () << "\t" - << route.GetInterface () << "\t" - << route.GetPrefixToUse () << "\t" - << std::endl; + for (uint32_t j = 0; j < ipv6->GetNAddresses(i); j++) + { + std::cout << "(" << int(i) << "," << int(j) << ")\t" << ipv6->GetAddress(i,j) << std::endl; + } } + std::cout << std::endl; } }; int main (int argc, char** argv) { -#if 0 - LogComponentEnable ("Ipv6L3Protocol", LOG_LEVEL_ALL); - LogComponentEnable ("Ipv6RawSocketImpl", LOG_LEVEL_ALL); - LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_ALL); - LogComponentEnable ("Ipv6StaticRouting", LOG_LEVEL_ALL); - LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL); - LogComponentEnable ("RadvdApplication", LOG_LEVEL_ALL); - LogComponentEnable ("Ping6Application", LOG_LEVEL_ALL); -#endif + bool verbose = false; CommandLine cmd; + cmd.AddValue ("verbose", "turn on log components", verbose); cmd.Parse (argc, argv); + if (verbose) + { + LogComponentEnable ("Ipv6L3Protocol", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6RawSocketImpl", LOG_LEVEL_ALL); + LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6StaticRouting", LOG_LEVEL_ALL); + LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL); + LogComponentEnable ("RadvdApplication", LOG_LEVEL_ALL); + LogComponentEnable ("Ping6Application", LOG_LEVEL_ALL); + } + NS_LOG_INFO ("Create nodes."); Ptr n0 = CreateObject (); Ptr r = CreateObject (); @@ -120,7 +107,6 @@ NodeContainer net1 (n0, r); NodeContainer net2 (r, n1); NodeContainer all (n0, r, n1); - StackHelper stackHelper; NS_LOG_INFO ("Create IPv6 Internet Stack"); InternetStackHelper internetv6; @@ -145,18 +131,21 @@ NetDeviceContainer tmp2; tmp2.Add (d1.Get (1)); /* R */ Ipv6InterfaceContainer iicr1 = ipv6.Assign (tmp2); /* R interface to the first subnet is just statically assigned */ - iicr1.SetRouter (0, true); + iicr1.SetForwarding (0, true); + iicr1.SetDefaultRouteInAllNodes (0); iic1.Add (iicr1); /* add another IPv6 address for second prefix advertised on first subnet */ - stackHelper.AddAddress (r, iic1.GetInterfaceIndex (1), Ipv6Address ("2001:ABCD::2")); + ipv6.SetBase (Ipv6Address ("2001:ABCD::2"), Ipv6Prefix (64)); + ipv6.Assign (tmp2); /* second subnet R - n1 */ ipv6.SetBase (Ipv6Address ("2001:2::"), Ipv6Prefix (64)); NetDeviceContainer tmp3; tmp3.Add (d2.Get (0)); /* R */ Ipv6InterfaceContainer iicr2 = ipv6.Assign (tmp3); /* R interface */ - iicr2.SetRouter (0, true); + iicr2.SetForwarding (0, true); + iicr2.SetDefaultRouteInAllNodes (0); NetDeviceContainer tmp4; tmp4.Add (d2.Get (1)); /* n1 */ @@ -164,29 +153,39 @@ iic2.Add (iicr2); /* radvd configuration */ - Ipv6Address prefix ("2001:ABCD::0"); /* create the prefix */ - Ipv6Address prefixBis ("2001:1::0"); /* create the prefix */ - Ipv6Address prefix2 ("2001:2::0"); /* create the prefix */ - uint32_t indexRouter = iic1.GetInterfaceIndex (1); /* R interface (n0 - R) */ - uint32_t indexRouter2 = iic2.GetInterfaceIndex (1); /* R interface (R - n1) */ - Ptr radvd = CreateObject (); - Ptr routerInterface = Create (indexRouter, 2000, 1000); - Ptr routerPrefix = Create (prefix, 64, 3, 5); - Ptr routerPrefixBis = Create (prefixBis, 64, 3, 5); - Ptr routerInterface2 = Create (indexRouter2, 2000, 1000); - Ptr routerPrefix2 = Create (prefix2, 64, 3, 5); - - /* first interface advertise two prefixes (2001:1::/64 and 2001:ABCD::/64) */ - /* prefix is added in the inverse order in packet */ - routerInterface->AddPrefix (routerPrefix); - routerInterface->AddPrefix (routerPrefixBis); - routerInterface2->AddPrefix (routerPrefix2); - radvd->AddConfiguration (routerInterface); - radvd->AddConfiguration (routerInterface2); - - r->AddApplication (radvd); - radvd->SetStartTime (Seconds (1.0)); - radvd->SetStopTime (Seconds (2.0)); + RadvdHelper radvdHelper; + /* R interface (n0 - R) */ + radvdHelper.AddAnnouncedPrefix(iic1.GetInterfaceIndex (1), Ipv6Address("2001:ABCD::0"), 64); + radvdHelper.AddAnnouncedPrefix(iic1.GetInterfaceIndex (1), Ipv6Address("2001:1::0"), 64); + + // Set some non-standard timers so the simulation is not taking ages + Ptr routerInterface = radvdHelper.GetRadvdInterface(iic1.GetInterfaceIndex (1)); + routerInterface->SetMaxRtrAdvInterval (2000); + routerInterface->SetMinRtrAdvInterval (1000); + RadvdInterface::RadvdPrefixList prefixList = routerInterface->GetPrefixes (); + for (RadvdInterface::RadvdPrefixListI iter = prefixList.begin(); iter != prefixList.end(); iter++) + { + (*iter)->SetPreferredLifeTime (3); + (*iter)->SetValidLifeTime (5); + } + + /* R interface (R - n1) */ + radvdHelper.AddAnnouncedPrefix(iic2.GetInterfaceIndex (1), Ipv6Address("2001:2::0"), 64); + + // Set some non-standard timers so the simulation is not taking ages + routerInterface = radvdHelper.GetRadvdInterface(iic2.GetInterfaceIndex (1)); + routerInterface->SetMaxRtrAdvInterval (2000); + routerInterface->SetMinRtrAdvInterval (1000); + prefixList = routerInterface->GetPrefixes (); + for (RadvdInterface::RadvdPrefixListI iter = prefixList.begin(); iter != prefixList.end(); iter++) + { + (*iter)->SetPreferredLifeTime (3); + (*iter)->SetValidLifeTime (5); + } + + ApplicationContainer radvdApps = radvdHelper.Install(r); + radvdApps.Start (Seconds (1.0)); + radvdApps.Stop (Seconds (2.0)); /* Create a Ping6 application to send ICMPv6 echo request from n0 to n1 via R */ uint32_t packetSize = 1024; @@ -205,10 +204,16 @@ apps.Start (Seconds (2.0)); apps.Stop (Seconds (9.0)); + Ipv6StaticRoutingHelper routingHelper; + Ptr routingStream = Create (&std::cout); + routingHelper.PrintRoutingTableAt (Seconds (2.0), n0, routingStream); + routingHelper.PrintRoutingTableAt (Seconds (10.0), n0, routingStream); + + IpAddressHelper ipAddressHelper; /* RA should be received, two prefixes + routes + default route should be present */ - Simulator::Schedule (Seconds (2.0), &StackHelper::PrintRoutingTable, &stackHelper, n0); + Simulator::Schedule (Seconds (2.0), &IpAddressHelper::PrintIpAddresses, &ipAddressHelper, n0); /* at the end, RA addresses and routes should be cleared */ - Simulator::Schedule (Seconds (10.0), &StackHelper::PrintRoutingTable, &stackHelper, n0); + Simulator::Schedule (Seconds (10.0), &IpAddressHelper::PrintIpAddresses, &ipAddressHelper, n0); AsciiTraceHelper ascii; csma.EnableAsciiAll (ascii.CreateFileStream ("radvd-two-prefix.tr")); diff -Naur ns-3.17/examples/ipv6/wscript ns-3.18/examples/ipv6/wscript --- ns-3.17/examples/ipv6/wscript 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/examples/ipv6/wscript 2013-10-26 07:07:29.491364379 -0700 @@ -18,6 +18,9 @@ obj = bld.create_ns3_program('fragmentation-ipv6', ['csma', 'internet']) obj.source = 'fragmentation-ipv6.cc' + + obj = bld.create_ns3_program('fragmentation-ipv6-two-MTU', ['csma', 'internet']) + obj.source = 'fragmentation-ipv6-two-MTU.cc' obj = bld.create_ns3_program('loose-routing-ipv6', ['csma', 'internet']) obj.source = 'loose-routing-ipv6.cc' diff -Naur ns-3.17/examples/routing/simple-routing-ping6.cc ns-3.18/examples/routing/simple-routing-ping6.cc --- ns-3.17/examples/routing/simple-routing-ping6.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/examples/routing/simple-routing-ping6.cc 2013-10-26 07:07:29.495364379 -0700 @@ -130,10 +130,12 @@ Ipv6AddressHelper ipv6; ipv6.SetBase (Ipv6Address ("2001:1::"), Ipv6Prefix (64)); Ipv6InterfaceContainer i1 = ipv6.Assign (d1); - i1.SetRouter (1, true); + i1.SetForwarding (1, true); + i1.SetDefaultRouteInAllNodes (1); ipv6.SetBase (Ipv6Address ("2001:2::"), Ipv6Prefix (64)); Ipv6InterfaceContainer i2 = ipv6.Assign (d2); - i2.SetRouter (0, true); + i2.SetForwarding (0, true); + i2.SetDefaultRouteInAllNodes (0); stackHelper.PrintRoutingTable (n0); diff -Naur ns-3.17/examples/tutorial/examples-to-run.py ns-3.18/examples/tutorial/examples-to-run.py --- ns-3.17/examples/tutorial/examples-to-run.py 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/examples/tutorial/examples-to-run.py 2013-10-26 07:07:29.487364379 -0700 @@ -15,6 +15,7 @@ ("fourth", "True", "True"), ("fifth", "True", "True"), ("sixth", "True", "True"), + ("seventh", "True", "True"), ] # A list of Python examples to run in order to ensure that they remain diff -Naur ns-3.17/examples/tutorial/first.cc ns-3.18/examples/tutorial/first.cc --- ns-3.17/examples/tutorial/first.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/examples/tutorial/first.cc 2013-10-26 07:07:29.487364379 -0700 @@ -27,6 +27,7 @@ int main (int argc, char *argv[]) { + Time::SetResolution (Time::NS); LogComponentEnable ("UdpEchoClientApplication", LOG_LEVEL_INFO); LogComponentEnable ("UdpEchoServerApplication", LOG_LEVEL_INFO); diff -Naur ns-3.17/examples/tutorial/seventh.cc ns-3.18/examples/tutorial/seventh.cc --- ns-3.17/examples/tutorial/seventh.cc 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/examples/tutorial/seventh.cc 2013-10-26 07:07:29.487364379 -0700 @@ -0,0 +1,300 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include "ns3/core-module.h" +#include "ns3/network-module.h" +#include "ns3/internet-module.h" +#include "ns3/point-to-point-module.h" +#include "ns3/applications-module.h" +#include "ns3/stats-module.h" + +using namespace ns3; + +NS_LOG_COMPONENT_DEFINE ("SeventhScriptExample"); + +// =========================================================================== +// +// node 0 node 1 +// +----------------+ +----------------+ +// | ns-3 TCP | | ns-3 TCP | +// +----------------+ +----------------+ +// | 10.1.1.1 | | 10.1.1.2 | +// +----------------+ +----------------+ +// | point-to-point | | point-to-point | +// +----------------+ +----------------+ +// | | +// +---------------------+ +// 5 Mbps, 2 ms +// +// +// We want to look at changes in the ns-3 TCP congestion window. We need +// to crank up a flow and hook the CongestionWindow attribute on the socket +// of the sender. Normally one would use an on-off application to generate a +// flow, but this has a couple of problems. First, the socket of the on-off +// application is not created until Application Start time, so we wouldn't be +// able to hook the socket (now) at configuration time. Second, even if we +// could arrange a call after start time, the socket is not public so we +// couldn't get at it. +// +// So, we can cook up a simple version of the on-off application that does what +// we want. On the plus side we don't need all of the complexity of the on-off +// application. On the minus side, we don't have a helper, so we have to get +// a little more involved in the details, but this is trivial. +// +// So first, we create a socket and do the trace connect on it; then we pass +// this socket into the constructor of our simple application which we then +// install in the source node. +// =========================================================================== +// +class MyApp : public Application +{ +public: + MyApp (); + virtual ~MyApp (); + + void Setup (Ptr socket, Address address, uint32_t packetSize, uint32_t nPackets, DataRate dataRate); + +private: + virtual void StartApplication (void); + virtual void StopApplication (void); + + void ScheduleTx (void); + void SendPacket (void); + + Ptr m_socket; + Address m_peer; + uint32_t m_packetSize; + uint32_t m_nPackets; + DataRate m_dataRate; + EventId m_sendEvent; + bool m_running; + uint32_t m_packetsSent; +}; + +MyApp::MyApp () + : m_socket (0), + m_peer (), + m_packetSize (0), + m_nPackets (0), + m_dataRate (0), + m_sendEvent (), + m_running (false), + m_packetsSent (0) +{ +} + +MyApp::~MyApp () +{ + m_socket = 0; +} + +void +MyApp::Setup (Ptr socket, Address address, uint32_t packetSize, uint32_t nPackets, DataRate dataRate) +{ + m_socket = socket; + m_peer = address; + m_packetSize = packetSize; + m_nPackets = nPackets; + m_dataRate = dataRate; +} + +void +MyApp::StartApplication (void) +{ + m_running = true; + m_packetsSent = 0; + if (InetSocketAddress::IsMatchingType (m_peer)) + { + m_socket->Bind (); + } + else + { + m_socket->Bind6 (); + } + m_socket->Connect (m_peer); + SendPacket (); +} + +void +MyApp::StopApplication (void) +{ + m_running = false; + + if (m_sendEvent.IsRunning ()) + { + Simulator::Cancel (m_sendEvent); + } + + if (m_socket) + { + m_socket->Close (); + } +} + +void +MyApp::SendPacket (void) +{ + Ptr packet = Create (m_packetSize); + m_socket->Send (packet); + + if (++m_packetsSent < m_nPackets) + { + ScheduleTx (); + } +} + +void +MyApp::ScheduleTx (void) +{ + if (m_running) + { + Time tNext (Seconds (m_packetSize * 8 / static_cast (m_dataRate.GetBitRate ()))); + m_sendEvent = Simulator::Schedule (tNext, &MyApp::SendPacket, this); + } +} + +static void +CwndChange (Ptr stream, uint32_t oldCwnd, uint32_t newCwnd) +{ + NS_LOG_UNCOND (Simulator::Now ().GetSeconds () << "\t" << newCwnd); + *stream->GetStream () << Simulator::Now ().GetSeconds () << "\t" << oldCwnd << "\t" << newCwnd << std::endl; +} + +static void +RxDrop (Ptr file, Ptr p) +{ + NS_LOG_UNCOND ("RxDrop at " << Simulator::Now ().GetSeconds ()); + file->Write (Simulator::Now (), p); +} + +int +main (int argc, char *argv[]) +{ + bool useV6 = false; + + CommandLine cmd; + cmd.AddValue ("useIpv6", "Use Ipv6", useV6); + cmd.Parse (argc, argv); + + NodeContainer nodes; + nodes.Create (2); + + PointToPointHelper pointToPoint; + pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps")); + pointToPoint.SetChannelAttribute ("Delay", StringValue ("2ms")); + + NetDeviceContainer devices; + devices = pointToPoint.Install (nodes); + + Ptr em = CreateObject (); + em->SetAttribute ("ErrorRate", DoubleValue (0.00001)); + devices.Get (1)->SetAttribute ("ReceiveErrorModel", PointerValue (em)); + + InternetStackHelper stack; + stack.Install (nodes); + + uint16_t sinkPort = 8080; + Address sinkAddress; + Address anyAddress; + std::string probeName; + std::string probeTrace; + if (useV6 == false) + { + Ipv4AddressHelper address; + address.SetBase ("10.1.1.0", "255.255.255.0"); + Ipv4InterfaceContainer interfaces = address.Assign (devices); + sinkAddress = InetSocketAddress (interfaces.GetAddress (1), sinkPort); + anyAddress = InetSocketAddress (Ipv4Address::GetAny (), sinkPort); + probeName = "ns3::Ipv4PacketProbe"; + probeTrace = "/NodeList/*/$ns3::Ipv4L3Protocol/Tx"; + } + else + { + Ipv6AddressHelper address; + address.SetBase ("2001:0000:f00d:cafe::", Ipv6Prefix (64)); + Ipv6InterfaceContainer interfaces = address.Assign (devices); + sinkAddress = Inet6SocketAddress (interfaces.GetAddress (1,1), sinkPort); + anyAddress = Inet6SocketAddress (Ipv6Address::GetAny (), sinkPort); + probeName = "ns3::Ipv6PacketProbe"; + probeTrace = "/NodeList/*/$ns3::Ipv6L3Protocol/Tx"; + } + + PacketSinkHelper packetSinkHelper ("ns3::TcpSocketFactory", anyAddress); + ApplicationContainer sinkApps = packetSinkHelper.Install (nodes.Get (1)); + sinkApps.Start (Seconds (0.)); + sinkApps.Stop (Seconds (20.)); + + Ptr ns3TcpSocket = Socket::CreateSocket (nodes.Get (0), TcpSocketFactory::GetTypeId ()); + + Ptr app = CreateObject (); + app->Setup (ns3TcpSocket, sinkAddress, 1040, 1000, DataRate ("1Mbps")); + nodes.Get (0)->AddApplication (app); + app->SetStartTime (Seconds (1.)); + app->SetStopTime (Seconds (20.)); + + AsciiTraceHelper asciiTraceHelper; + Ptr stream = asciiTraceHelper.CreateFileStream ("seventh.cwnd"); + ns3TcpSocket->TraceConnectWithoutContext ("CongestionWindow", MakeBoundCallback (&CwndChange, stream)); + + PcapHelper pcapHelper; + Ptr file = pcapHelper.CreateFile ("seventh.pcap", std::ios::out, PcapHelper::DLT_PPP); + devices.Get (1)->TraceConnectWithoutContext ("PhyRxDrop", MakeBoundCallback (&RxDrop, file)); + + // Use GnuplotHelper to plot the packet byte count over time + GnuplotHelper plotHelper; + + // Configure the plot. The first argument is the file name prefix + // for the output files generated. The second, third, and fourth + // arguments are, respectively, the plot title, x-axis, and y-axis labels + plotHelper.ConfigurePlot ("seventh-packet-byte-count", + "Packet Byte Count vs. Time", + "Time (Seconds)", + "Packet Byte Count"); + + // Specify the probe type, probe path (in configuration namespace), and + // probe output trace source ("OutputBytes") to plot. The fourth argument + // specifies the name of the data series label on the plot. The last + // argument formats the plot by specifying where the key should be placed. + plotHelper.PlotProbe (probeName, + probeTrace, + "OutputBytes", + "Packet Byte Count", + GnuplotAggregator::KEY_BELOW); + + // Use FileHelper to write out the packet byte count over time + FileHelper fileHelper; + + // Configure the file to be written, and the formatting of output data. + fileHelper.ConfigureFile ("seventh-packet-byte-count", + FileAggregator::FORMATTED); + + // Set the labels for this formatted output file. + fileHelper.Set2dFormat ("Time (Seconds) = %.3e\tPacket Byte Count = %.0f"); + + // Specify the probe type, probe path (in configuration namespace), and + // probe output trace source ("OutputBytes") to write. + fileHelper.WriteProbe (probeName, + probeTrace, + "OutputBytes"); + + Simulator::Stop (Seconds (20)); + Simulator::Run (); + Simulator::Destroy (); + + return 0; +} + diff -Naur ns-3.17/examples/tutorial/sixth.cc ns-3.18/examples/tutorial/sixth.cc --- ns-3.17/examples/tutorial/sixth.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/examples/tutorial/sixth.cc 2013-10-26 07:07:29.487364379 -0700 @@ -43,10 +43,10 @@ // We want to look at changes in the ns-3 TCP congestion window. We need // to crank up a flow and hook the CongestionWindow attribute on the socket // of the sender. Normally one would use an on-off application to generate a -// flow, but this has a couple of problems. First, the socket of the on-off -// application is not created until Application Start time, so we wouldn't be -// able to hook the socket (now) at configuration time. Second, even if we -// could arrange a call after start time, the socket is not public so we +// flow, but this has a couple of problems. First, the socket of the on-off +// application is not created until Application Start time, so we wouldn't be +// able to hook the socket (now) at configuration time. Second, even if we +// could arrange a call after start time, the socket is not public so we // couldn't get at it. // // So, we can cook up a simple version of the on-off application that does what @@ -54,17 +54,16 @@ // application. On the minus side, we don't have a helper, so we have to get // a little more involved in the details, but this is trivial. // -// So first, we create a socket and do the trace connect on it; then we pass -// this socket into the constructor of our simple application which we then +// So first, we create a socket and do the trace connect on it; then we pass +// this socket into the constructor of our simple application which we then // install in the source node. // =========================================================================== // -class MyApp : public Application +class MyApp : public Application { public: - MyApp (); - virtual ~MyApp(); + virtual ~MyApp (); void Setup (Ptr socket, Address address, uint32_t packetSize, uint32_t nPackets, DataRate dataRate); @@ -86,18 +85,18 @@ }; MyApp::MyApp () - : m_socket (0), - m_peer (), - m_packetSize (0), - m_nPackets (0), - m_dataRate (0), - m_sendEvent (), - m_running (false), + : m_socket (0), + m_peer (), + m_packetSize (0), + m_nPackets (0), + m_dataRate (0), + m_sendEvent (), + m_running (false), m_packetsSent (0) { } -MyApp::~MyApp() +MyApp::~MyApp () { m_socket = 0; } @@ -122,7 +121,7 @@ SendPacket (); } -void +void MyApp::StopApplication (void) { m_running = false; @@ -138,7 +137,7 @@ } } -void +void MyApp::SendPacket (void) { Ptr packet = Create (m_packetSize); @@ -150,7 +149,7 @@ } } -void +void MyApp::ScheduleTx (void) { if (m_running) @@ -174,7 +173,7 @@ file->Write (Simulator::Now (), p); } -int +int main (int argc, char *argv[]) { NodeContainer nodes; diff -Naur ns-3.17/examples/tutorial/wscript ns-3.18/examples/tutorial/wscript --- ns-3.17/examples/tutorial/wscript 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/examples/tutorial/wscript 2013-10-26 07:07:29.487364379 -0700 @@ -23,3 +23,6 @@ obj = bld.create_ns3_program('sixth', ['core', 'point-to-point', 'internet', 'applications']) obj.source = 'sixth.cc' + + obj = bld.create_ns3_program('seventh', ['core', 'stats', 'point-to-point', 'internet', 'applications']) + obj.source = 'seventh.cc' diff -Naur ns-3.17/examples/wireless/ht-wifi-network.cc ns-3.18/examples/wireless/ht-wifi-network.cc --- ns-3.17/examples/wireless/ht-wifi-network.cc 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/examples/wireless/ht-wifi-network.cc 2013-10-26 07:07:29.479364378 -0700 @@ -0,0 +1,244 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2009 MIRKO BANCHI + * + * 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: Mirko Banchi + */ +#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 frame aggregation feature (A-MSDU) works. +// +//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 ("DataRates"); + +double rxBytessum=0; +double throughput=0; + + +//=========================================================================== +//Set position of the nodes +//=========================================================================== +static void +SetPosition (Ptr node, Vector position) +{ + Ptr mobility = node->GetObject (); + mobility->SetPosition (position); +} + +//========================================================================== +//========================================================================== + +int main (int argc, char *argv[]) +{ + std::cout << "DataRate" <<" " << "Throughput" << '\n'; + bool udp = true; + int i=2; + for (;i <= 2; i++) + { + uint32_t nWifi = 1; + CommandLine cmd; + cmd.AddValue ("nWifi", "Number of wifi STA devices", nWifi); + cmd.Parse (argc,argv); + Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("990000")); + // disable rts cts all the time. + Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("99000")); + NodeContainer wifiNodes; + wifiNodes.Create (1); + NodeContainer wifiApNode; + wifiApNode.Create (1); + + YansWifiChannelHelper channel = YansWifiChannelHelper::Default (); + YansWifiPhyHelper phy = YansWifiPhyHelper::Default (); + phy.SetChannel (channel.Create ()); + if (i ==3 || i == 4) + phy.Set ("ShortGuardEnabled",BooleanValue(true)); + //phy.Set ("GreenfieldEnabled",BooleanValue(true)); + + WifiHelper wifi = WifiHelper::Default (); + wifi.SetStandard (WIFI_PHY_STANDARD_80211n_2_4GHZ); + HtWifiMacHelper mac = HtWifiMacHelper::Default (); + + + Ssid ssid = Ssid ("ns380211n"); + double datarate; + StringValue DataRate; + if (i==0) + { + DataRate = StringValue("OfdmRate6_5MbpsBW20MHz"); + datarate = 6.5; + } + else if (i==1) + { + DataRate = StringValue("OfdmRate58_5MbpsBW20MHz"); + datarate = 58.5; + } + else if (i == 2) + { + DataRate = StringValue("OfdmRate65MbpsBW20MHz"); + datarate = 65; + } + else if (i == 3) + { + DataRate = StringValue("OfdmRate57_8MbpsBW20MHz"); + datarate = 57.8; + } + else if (i == 4) + { + DataRate = StringValue("OfdmRate72_2MbpsBW20MHz"); + datarate = 72.2; + } + + wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager","DataMode", DataRate, + "ControlMode", DataRate); + mac.SetType ("ns3::StaWifiMac", + "Ssid", SsidValue (ssid), + "ActiveProbing", BooleanValue (false)); + + NetDeviceContainer staDevices; + staDevices = wifi.Install (phy, mac, wifiNodes); + + mac.SetType ("ns3::ApWifiMac", + "Ssid", SsidValue (ssid)); + + NetDeviceContainer apDevice; + apDevice = wifi.Install (phy, mac, wifiApNode); + /* Ptr apStationManager = + DynamicCast(apDevice.Get (0))->GetRemoteStationManager (); + apStationManager->AddBasicMode (WifiMode ("OfdmRate13MbpsBW20MHz")); + apStationManager->AddBasicMode (WifiMode ("OfdmRate19_5MbpsBW20MHz")); + apStationManager->AddBasicMode (WifiMode ("OfdmRate26MbpsBW20MHz")); + apStationManager->AddBasicMode (WifiMode ("OfdmRate39MbpsBW20MHz")); + Ptr staStationManager = + DynamicCast (staDevices.Get (0))->GetRemoteStationManager (); + staStationManager->AddBasicMode (WifiMode ("OfdmRate13MbpsBW20MHz")); + staStationManager->AddBasicMode (WifiMode ("OfdmRate19_5MbpsBW20MHz")); + staStationManager->AddBasicMode (WifiMode ("OfdmRate26MbpsBW20MHz")); + staStationManager->AddBasicMode (WifiMode ("OfdmRate39MbpsBW20MHz"));*/ + + // mobility. + MobilityHelper mobility; + mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); + mobility.Install (wifiNodes); + mobility.Install (wifiApNode); + + SetPosition (wifiNodes.Get(0), Vector (1.0,0.0,0.0)); + SetPosition (wifiApNode.Get(0), Vector (0.0,0.0,0.0)); + + + /* Internet stack*/ + InternetStackHelper stack; + stack.Install (wifiApNode); + stack.Install (wifiNodes); + + Ipv4AddressHelper address; + + address.SetBase ("10.1.3.0", "255.255.255.0"); + Ipv4InterfaceContainer wifiNodesInterfaces; + Ipv4InterfaceContainer apNodeInterface; + + wifiNodesInterfaces = address.Assign (staDevices); + apNodeInterface = address.Assign (apDevice); + + ApplicationContainer serverApps,sink1App; + + double t=10; + + /* Setting applications */ + if (udp) + { + UdpServerHelper myServer (9); + serverApps = myServer.Install (wifiNodes.Get (0)); + serverApps.Start (Seconds (0.0)); + serverApps.Stop (Seconds (t)); + + UdpClientHelper myClient (wifiNodesInterfaces.GetAddress (0), 9); + myClient.SetAttribute ("MaxPackets", UintegerValue (64707202)); + myClient.SetAttribute ("Interval", TimeValue (Time ("0.00002"))); + myClient.SetAttribute ("PacketSize", UintegerValue (1500)); + + ApplicationContainer clientApps = myClient.Install (wifiApNode.Get (0)); + clientApps.Start (Seconds (0.0)); + clientApps.Stop (Seconds (t)); + } + else + { + + //TCP flow + uint16_t port = 50000; + Address apLocalAddress (InetSocketAddress (Ipv4Address::GetAny (), port)); + PacketSinkHelper packetSinkHelper ("ns3::TcpSocketFactory", apLocalAddress); + sink1App = packetSinkHelper.Install (wifiNodes.Get (0)); + + sink1App.Start (Seconds (0.0)); + sink1App.Stop (Seconds (t)); + + OnOffHelper onoff ("ns3::TcpSocketFactory",Ipv4Address::GetAny ()); + onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable(30)));//in seconds + onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable(0))); + onoff.SetAttribute ("PacketSize", UintegerValue (1500-30));//1024 + onoff.SetAttribute ("DataRate", DataRateValue (100000000));//51200 + ApplicationContainer apps; + + AddressValue remoteAddress (InetSocketAddress (wifiNodesInterfaces.GetAddress(0), port)); + onoff.SetAttribute ("Remote", remoteAddress); + apps.Add (onoff.Install (wifiApNode.Get (0))); + apps.Start (Seconds (0.0)); + apps.Stop (Seconds (t)); + } + + + Ipv4GlobalRoutingHelper::PopulateRoutingTables (); + + Simulator::Stop (Seconds (t)); + Simulator::Run (); + Simulator::Destroy (); + + //UDP + if (udp) + { + uint32_t totalPacketsThrough = DynamicCast(serverApps.Get (0))->GetReceived (); + throughput=totalPacketsThrough*1500*8/(t*1000000.0); + } + else + { + //TCP + uint32_t totalPacketsThrough = DynamicCast(sink1App.Get (0))->GetTotalRx (); + throughput=totalPacketsThrough*8/((t-3)*1000000.0); + } + + std::cout << datarate <<" " << throughput << '\n'; + } + return 0; +} diff -Naur ns-3.17/examples/wireless/multirate.cc ns-3.18/examples/wireless/multirate.cc --- ns-3.17/examples/wireless/multirate.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/examples/wireless/multirate.cc 2013-10-26 07:07:29.483364379 -0700 @@ -52,7 +52,7 @@ #include "ns3/network-module.h" #include "ns3/applications-module.h" #include "ns3/mobility-module.h" -#include "ns3/tools-module.h" +#include "ns3/stats-module.h" #include "ns3/random-variable-stream.h" #include "ns3/wifi-module.h" #include "ns3/internet-module.h" @@ -103,6 +103,7 @@ double totalTime; double expMean; + double samplingPeriod; uint32_t bytesTotal; uint32_t packetSize; @@ -129,6 +130,7 @@ m_output (name), totalTime (0.3), expMean (0.1), //flows being exponentially distributed + samplingPeriod(0.1), bytesTotal (0), packetSize (2000), gridSize (10), //10x10 grid for a total of 100 nodes @@ -172,12 +174,12 @@ void Experiment::CheckThroughput () { - double mbs = ((bytesTotal * 8.0) /1000000); + double mbs = ((bytesTotal * 8.0) /1000000 /samplingPeriod); bytesTotal = 0; m_output.Add ((Simulator::Now ()).GetSeconds (), mbs); - //check throughput every 1/10 of a second - Simulator::Schedule (Seconds (0.1), &Experiment::CheckThroughput, this); + //check throughput every samplingPeriod second + Simulator::Schedule (Seconds (samplingPeriod), &Experiment::CheckThroughput, this); } /** @@ -534,6 +536,17 @@ CommandLine cmd; cmd.AddValue ("packetSize", "packet size", packetSize); cmd.AddValue ("totalTime", "simulation time", totalTime); + // according to totalTime, select an appropriate samplingPeriod automatically. + if (totalTime < 1.0) + { + samplingPeriod = 0.1; + } + else + { + samplingPeriod = 1.0; + } + // or user selects a samplingPeriod. + cmd.AddValue ("samplingPeriod", "sampling period", samplingPeriod); cmd.AddValue ("rtsThreshold", "rts threshold", rtsThreshold); cmd.AddValue ("rateManager", "type of rate", rateManager); cmd.AddValue ("outputFileName", "output filename", outputFileName); diff -Naur ns-3.17/examples/wireless/wifi-adhoc.cc ns-3.18/examples/wireless/wifi-adhoc.cc --- ns-3.17/examples/wireless/wifi-adhoc.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/examples/wireless/wifi-adhoc.cc 2013-10-26 07:07:29.483364379 -0700 @@ -22,7 +22,7 @@ #include "ns3/network-module.h" #include "ns3/applications-module.h" #include "ns3/mobility-module.h" -#include "ns3/tools-module.h" +#include "ns3/stats-module.h" #include "ns3/wifi-module.h" #include diff -Naur ns-3.17/examples/wireless/wifi-clear-channel-cmu.cc ns-3.18/examples/wireless/wifi-clear-channel-cmu.cc --- ns-3.17/examples/wireless/wifi-clear-channel-cmu.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/examples/wireless/wifi-clear-channel-cmu.cc 2013-10-26 07:07:29.483364379 -0700 @@ -21,7 +21,7 @@ #include "ns3/core-module.h" #include "ns3/network-module.h" #include "ns3/mobility-module.h" -#include "ns3/tools-module.h" +#include "ns3/stats-module.h" #include "ns3/wifi-module.h" #include "ns3/internet-module.h" diff -Naur ns-3.17/examples/wireless/wifi-hidden-terminal.cc ns-3.18/examples/wireless/wifi-hidden-terminal.cc --- ns-3.17/examples/wireless/wifi-hidden-terminal.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/examples/wireless/wifi-hidden-terminal.cc 2013-10-26 07:07:29.483364379 -0700 @@ -109,19 +109,19 @@ cbrApps.Add (onOffHelper.Install (nodes.Get (0))); // flow 2: node 2 -> node 1 - // The slightly different start times and data rates are a workround - // for Bug 388 and Bug 912 - // http://www.nsnam.org/bugzilla/show_bug.cgi?id=912 - // http://www.nsnam.org/bugzilla/show_bug.cgi?id=388 + /** \internal + * The slightly different start times and data rates are a workaround + * for \bugid{388} and \bugid{912} + */ onOffHelper.SetAttribute ("DataRate", StringValue ("3001100bps")); onOffHelper.SetAttribute ("StartTime", TimeValue (Seconds (1.001))); cbrApps.Add (onOffHelper.Install (nodes.Get (2))); - // we also use separate UDP applications that will send a single - // packet before the CBR flows start. - // This is a workround for the lack of perfect ARP, see Bug 187 - // http://www.nsnam.org/bugzilla/show_bug.cgi?id=187 - + /** \internal + * We also use separate UDP applications that will send a single + * packet before the CBR flows start. + * This is a workaround for the lack of perfect ARP, see \bugid{187} + */ uint16_t echoPort = 9; UdpEchoClientHelper echoClientHelper (Ipv4Address ("10.0.0.2"), echoPort); echoClientHelper.SetAttribute ("MaxPackets", UintegerValue (1)); @@ -156,9 +156,10 @@ if (i->first > 2) { Ipv4FlowClassifier::FiveTuple t = classifier->FindFlow (i->first); - std::cout << "Flow " << i->first - 2 << " (" << t.sourceAddress << " -> " << t.destinationAddress << ")\n"; std::cout << " Tx Bytes: " << i->second.txBytes << "\n"; + std::cout << "Flow " << i->first - 2 << " (" << t.sourceAddress << " -> " << t.destinationAddress << ")\n"; + std::cout << " Tx Bytes: " << i->second.txBytes << "\n"; std::cout << " Rx Bytes: " << i->second.rxBytes << "\n"; - std::cout << " Throughput: " << i->second.rxBytes * 8.0 / 10.0 / 1024 / 1024 << " Mbps\n"; + std::cout << " Throughput: " << i->second.rxBytes * 8.0 / 10.0 / 1000 / 1000 << " Mbps\n"; } } diff -Naur ns-3.17/examples/wireless/wscript ns-3.18/examples/wireless/wscript --- ns-3.17/examples/wireless/wscript 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/examples/wireless/wscript 2013-10-26 07:07:29.479364378 -0700 @@ -8,16 +8,16 @@ bld.register_ns3_script('mixed-wireless.py', ['core', 'mobility', 'wifi', 'applications', 'point-to-point', 'internet', 'csma', 'olsr']) - obj = bld.create_ns3_program('wifi-adhoc', ['core', 'mobility', 'wifi', 'applications', 'tools']) + obj = bld.create_ns3_program('wifi-adhoc', ['core', 'mobility', 'wifi', 'applications', 'stats']) obj.source = 'wifi-adhoc.cc' - obj = bld.create_ns3_program('wifi-clear-channel-cmu', ['internet', 'mobility', 'wifi', 'tools']) + obj = bld.create_ns3_program('wifi-clear-channel-cmu', ['internet', 'mobility', 'wifi', 'stats']) obj.source = 'wifi-clear-channel-cmu.cc' - obj = bld.create_ns3_program('wifi-ap', ['core', 'mobility', 'wifi', 'applications', 'config-store', 'tools']) + obj = bld.create_ns3_program('wifi-ap', ['core', 'mobility', 'wifi', 'applications', 'config-store', 'stats']) obj.source = 'wifi-ap.cc' - bld.register_ns3_script('wifi-ap.py', ['core', 'mobility', 'wifi', 'applications', 'config-store', 'tools']) + bld.register_ns3_script('wifi-ap.py', ['core', 'mobility', 'wifi', 'applications', 'config-store', 'stats']) obj = bld.create_ns3_program('wifi-wired-bridging', ['internet', 'mobility', 'wifi', 'csma', 'bridge', 'applications']) obj.source = 'wifi-wired-bridging.cc' @@ -25,26 +25,29 @@ obj = bld.create_ns3_program('simple-wifi-frame-aggregation', ['internet', 'mobility', 'wifi', 'applications']) obj.source = 'simple-wifi-frame-aggregation.cc' - obj = bld.create_ns3_program('multirate', ['internet', 'mobility', 'wifi', 'tools', 'flow-monitor', 'olsr', 'applications', 'point-to-point']) + obj = bld.create_ns3_program('multirate', ['internet', 'mobility', 'wifi', 'stats', 'flow-monitor', 'olsr', 'applications', 'point-to-point']) obj.source = 'multirate.cc' - obj = bld.create_ns3_program('wifi-simple-adhoc', ['internet', 'mobility', 'wifi', 'config-store', 'tools']) + obj = bld.create_ns3_program('wifi-simple-adhoc', ['internet', 'mobility', 'wifi', 'config-store', 'stats']) obj.source = 'wifi-simple-adhoc.cc' - obj = bld.create_ns3_program('wifi-simple-adhoc-grid', ['internet', 'mobility', 'wifi', 'olsr', 'config-store', 'tools', 'point-to-point']) + obj = bld.create_ns3_program('wifi-simple-adhoc-grid', ['internet', 'mobility', 'wifi', 'olsr', 'config-store', 'stats', 'point-to-point']) obj.source = 'wifi-simple-adhoc-grid.cc' obj = bld.create_ns3_program('wifi-simple-infra', ['internet', 'mobility', 'wifi','config-store']) obj.source = 'wifi-simple-infra.cc' - obj = bld.create_ns3_program('wifi-simple-interference', ['internet', 'mobility', 'wifi', 'config-store', 'tools']) + obj = bld.create_ns3_program('wifi-simple-interference', ['internet', 'mobility', 'wifi', 'config-store', 'stats']) obj.source = 'wifi-simple-interference.cc' obj = bld.create_ns3_program('wifi-blockack', ['internet', 'mobility', 'wifi', 'applications']) obj.source = 'wifi-blockack.cc' - obj = bld.create_ns3_program('ofdm-validation', ['core', 'mobility', 'wifi', 'config-store', 'tools']) + obj = bld.create_ns3_program('ofdm-validation', ['core', 'mobility', 'wifi', 'config-store', 'stats']) obj.source = 'ofdm-validation.cc' obj = bld.create_ns3_program('wifi-hidden-terminal', ['internet', 'mobility', 'wifi', 'applications', 'propagation', 'flow-monitor']) obj.source = 'wifi-hidden-terminal.cc' + + obj = bld.create_ns3_program('ht-wifi-network', ['core','internet', 'mobility', 'wifi', 'applications', 'propagation']) + obj.source = 'ht-wifi-network.cc' diff -Naur ns-3.17/Makefile ns-3.18/Makefile --- ns-3.17/Makefile 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/Makefile 2013-10-26 07:07:30.611364407 -0700 @@ -0,0 +1,20 @@ +# Makefile wrapper for waf + +all: + ./waf + +# free free to change this part to suit your requirements +configure: + ./waf configure --enable-examples --enable-tests + +build: + ./waf build + +install: + ./waf install + +clean: + ./waf clean + +distclean: + ./waf distclean diff -Naur ns-3.17/RELEASE_NOTES ns-3.18/RELEASE_NOTES --- ns-3.17/RELEASE_NOTES 2013-05-14 07:37:33.000000000 -0700 +++ ns-3.18/RELEASE_NOTES 2013-10-26 07:07:29.479364378 -0700 @@ -9,6 +9,91 @@ Consult the file CHANGES.html for more detailed information about changed API and behavior across ns-3 releases. +Release 3.18 +============ + +Availability +------------ +This release is available from: +http://www.nsnam.org/release/ns-allinone-3.18.tar.bz2 + +Supported platforms +------------------- + +New user-visible features +------------------------- +- Time attributes can now be bounded. See attribute-test-suite.cc for an + example. +- Data collection components have been added to the stats module. These + components can be used to generate time series data in files and plots. +- IPv6 address class 2001:db8::/32 is now dropped by routers (RFC 3849). +- New generic hash function interface. Two hash functions are provided: + murmur3 (default), and the venerable FNV1a. See the Hash Functions + section in the Manual. +- New Mac16Address has been added, Mac64Address is now in-line with + Mac48Address and all the three can be used in IPv6 autoconfigure. +- Previously, the use of Building models was limited to the use of the + companion BuildingsMobilityModel. Now, any MobilityModel can be + used with Building models. +- The latest LTE module code by the LENA project has been merged, + including the following new features: + - PHY support for UE measurements (RSRP and RSRQ) + - RRC support for UE measurements (configuration, execution, reporting) + - Automatic Handover trigger based on RRC UE measurement reports +- IPv6 can now detect and use Path-MTU. See + examples/ipv6/fragmentation-ipv6-two-MTU.cc for an example. +- Radvd application have a new Helper. See the updated + examples/ipv6/radvd.cc for an example. +- 11n- It is now possible to create a high throughput (HT) node that used the new 11n data rates and preambles. +- It is now possible to request printing command line arguments to the + desired output stream using PrintHelp or operator << + +Bugs fixed +---------- +- Bug 760 - IP address removal can be painful +- Bug 1190 - Suppress hello if bcast was sent within the last hello interval +- Bug 1296 - Enhancement in Ipv[4,6]RoutingHelper +- Bug 1390 - ICMPv6 Redirect are handled correctly only for /64 networks +- Bug 1522 - Hidden node scenario leads to ARP failure +- Bug 1584 - Old Association Request Timeouts are not canceled +- Bug 1629 - Make AODV Default to Disable Hello +- Bug 1643 - NdiscCache creation and existence checks +- Bug 1646 - ICMPv6 Redirect are sent from global address instead of link-local +- Bug 1662 - m_type not set for Ipv6OptionRouterAlertHeader +- Bug 1678 - C++11 compliance problem with std::pair" +- Bug 1682 - ./waf crashes on FC10 +- Bug 1683 - IPv6 autoconfigured don't use *infinite* lifetimes +- Bug 1669 - ns-3 should support binding two and three (possibly more) arguments +- Bug 1675 - Throughput computation error in Wireless examples +- Bug 1687 - wscript features report doesn't respect NOCOLOR +- Bug 1688 - Routers should advertise themselves from the link-local address +- Bug 1689 - IPv6 shouldn't add a default gateway without checking the Router lifetime +- Bug 1690 - missing header files from wifi wscript +- Bug 1697 - ICMPv6 Redirect trigger contains multiple bugs +- Bug 1698 - mobility.SetPositionAllocator misses prefix "ns3::" +- Bug 1700 - Ipv6RawSocket does not honor the bound address when sending packets +- Bug 1701 - Ipv6StaticRouting: the source address should match the destination scope +- Bug 1702 - Ipv6InterfaceContainer::SetRouter should not always add the router as the default router. +- Bug 1703 - Nodes don't react to a DAD +- Bug 1712 - The IP (v4 and v6) forwarding needs a test +- Bug 1718 - Ipv4StaticRouting log component is misspelled +- Bug 1720 - IPv6 Fragmentation cause crashes +- Bug 1721 - Path MTU isn't handled properly +- Bug 1723 - name clash in ipv4-header.h with +- Bug 1727 - Ping6 should use a proper source address +- Bug 1728 - Radvd application is missing an Helper +- Bug 1731 - lte-phy-error-model passes unexpectedly +- Bug 1738 - strict aliasing compiler bug +- Bug 1742 - IPv6 HbH and Dst Extension Header size is not correctly calculated +- Bug 1752 - RadvdInterface m_defaultLifeTime is set to milliseconds instead of seconds +- Bug 1753 - Halting Issue with DistributedSimulatorImpl +- Bug 1754 - Missing GIL lock in generated callback destructor + +Known issues +------------ +In general, known issues are tracked on the project tracker available +at http://www.nsnam.org/bugzilla/ + Release 3.17 ============ diff -Naur ns-3.17/src/antenna/bindings/modulegen__gcc_ILP32.py ns-3.18/src/antenna/bindings/modulegen__gcc_ILP32.py --- ns-3.17/src/antenna/bindings/modulegen__gcc_ILP32.py 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/antenna/bindings/modulegen__gcc_ILP32.py 2013-10-26 07:07:29.679364384 -0700 @@ -28,6 +28,8 @@ module.add_class('Item', import_from_module='ns.core', outer_class=root_module['ns3::AttributeConstructionList']) ## callback.h (module 'core'): ns3::CallbackBase [class] module.add_class('CallbackBase', import_from_module='ns.core') + ## hash.h (module 'core'): ns3::Hasher [class] + module.add_class('Hasher', 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] @@ -60,6 +62,8 @@ module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeValue', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::CallbackImplBase', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] + module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Hash::Implementation', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::TraceSourceAccessor', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## trace-source-accessor.h (module 'core'): ns3::TraceSourceAccessor [class] @@ -116,16 +120,53 @@ nested_module = module.add_cpp_namespace('FatalImpl') register_types_ns3_FatalImpl(nested_module) + + ## Register a nested module for the namespace Hash + + nested_module = module.add_cpp_namespace('Hash') + register_types_ns3_Hash(nested_module) + def register_types_ns3_FatalImpl(module): root_module = module.get_root() +def register_types_ns3_Hash(module): + root_module = module.get_root() + + ## hash-function.h (module 'core'): ns3::Hash::Implementation [class] + module.add_class('Implementation', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash32Function_ptr') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash32Function_ptr*') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash32Function_ptr&') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash64Function_ptr') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash64Function_ptr*') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash64Function_ptr&') + + ## Register a nested module for the namespace Function + + nested_module = module.add_cpp_namespace('Function') + register_types_ns3_Hash_Function(nested_module) + + +def register_types_ns3_Hash_Function(module): + root_module = module.get_root() + + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a [class] + module.add_class('Fnv1a', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32 [class] + module.add_class('Hash32', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64 [class] + module.add_class('Hash64', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3 [class] + module.add_class('Murmur3', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + def register_methods(root_module): register_Ns3Angles_methods(root_module, root_module['ns3::Angles']) register_Ns3AttributeConstructionList_methods(root_module, root_module['ns3::AttributeConstructionList']) register_Ns3AttributeConstructionListItem_methods(root_module, root_module['ns3::AttributeConstructionList::Item']) register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase']) + register_Ns3Hasher_methods(root_module, root_module['ns3::Hasher']) register_Ns3ObjectBase_methods(root_module, root_module['ns3::ObjectBase']) register_Ns3ObjectDeleter_methods(root_module, root_module['ns3::ObjectDeleter']) register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, root_module['ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter >']) @@ -141,6 +182,7 @@ register_Ns3SimpleRefCount__Ns3AttributeChecker_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeChecker__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter >']) + register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter >']) register_Ns3TraceSourceAccessor_methods(root_module, root_module['ns3::TraceSourceAccessor']) register_Ns3AntennaModel_methods(root_module, root_module['ns3::AntennaModel']) @@ -160,6 +202,11 @@ register_Ns3Vector2DValue_methods(root_module, root_module['ns3::Vector2DValue']) register_Ns3Vector3DChecker_methods(root_module, root_module['ns3::Vector3DChecker']) register_Ns3Vector3DValue_methods(root_module, root_module['ns3::Vector3DValue']) + register_Ns3HashImplementation_methods(root_module, root_module['ns3::Hash::Implementation']) + register_Ns3HashFunctionFnv1a_methods(root_module, root_module['ns3::Hash::Function::Fnv1a']) + register_Ns3HashFunctionHash32_methods(root_module, root_module['ns3::Hash::Function::Hash32']) + register_Ns3HashFunctionHash64_methods(root_module, root_module['ns3::Hash::Function::Hash64']) + register_Ns3HashFunctionMurmur3_methods(root_module, root_module['ns3::Hash::Function::Murmur3']) return def register_Ns3Angles_methods(root_module, cls): @@ -239,6 +286,35 @@ is_static=True, visibility='protected') return +def register_Ns3Hasher_methods(root_module, cls): + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Hasher const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hasher const &', 'arg0')]) + ## hash.h (module 'core'): ns3::Hasher::Hasher() [constructor] + cls.add_constructor([]) + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Ptr hp) [constructor] + cls.add_constructor([param('ns3::Ptr< ns3::Hash::Implementation >', 'hp')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(std::string const s) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(std::string const s) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): ns3::Hasher & ns3::Hasher::clear() [member function] + cls.add_method('clear', + 'ns3::Hasher &', + []) + return + def register_Ns3ObjectBase_methods(root_module, cls): ## object-base.h (module 'core'): ns3::ObjectBase::ObjectBase() [constructor] cls.add_constructor([]) @@ -372,6 +448,11 @@ 'std::string', [], is_const=True) + ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetHash() const [member function] + cls.add_method('GetHash', + 'uint32_t', + [], + is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeId::GetName() const [member function] cls.add_method('GetName', 'std::string', @@ -431,6 +512,16 @@ 'bool', [param('std::string', 'name'), param('ns3::TypeId::AttributeInformation *', 'info', transfer_ownership=False)], is_const=True) + ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByHash(uint32_t hash) [member function] + cls.add_method('LookupByHash', + 'ns3::TypeId', + [param('uint32_t', 'hash')], + is_static=True) + ## type-id.h (module 'core'): static bool ns3::TypeId::LookupByHashFailSafe(uint32_t hash, ns3::TypeId * tid) [member function] + cls.add_method('LookupByHashFailSafe', + 'bool', + [param('uint32_t', 'hash'), param('ns3::TypeId *', 'tid')], + is_static=True) ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByName(std::string name) [member function] cls.add_method('LookupByName', 'ns3::TypeId', @@ -649,6 +740,18 @@ is_static=True) return +def register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter< ns3::Hash::Implementation > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + def register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] cls.add_constructor([]) @@ -1072,6 +1175,111 @@ [param('ns3::Vector3D const &', 'value')]) return +def register_Ns3HashImplementation_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation(ns3::Hash::Implementation const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Implementation const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation() [constructor] + cls.add_constructor([]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Implementation::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_pure_virtual=True, is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Implementation::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Implementation::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + return + +def register_Ns3HashFunctionFnv1a_methods(root_module, cls): + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a(ns3::Hash::Function::Fnv1a const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Fnv1a const &', 'arg0')]) + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a() [constructor] + cls.add_constructor([]) + ## hash-fnv.h (module 'core'): uint32_t ns3::Hash::Function::Fnv1a::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): uint64_t ns3::Hash::Function::Fnv1a::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): void ns3::Hash::Function::Fnv1a::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash32_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Function::Hash32 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash32 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Hash32Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash32Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash32::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash32::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash64_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Function::Hash64 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash64 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Hash64Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash64Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash64::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Function::Hash64::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash64::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionMurmur3_methods(root_module, cls): + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3(ns3::Hash::Function::Murmur3 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Murmur3 const &', 'arg0')]) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3() [constructor] + cls.add_constructor([]) + ## hash-murmur3.h (module 'core'): uint32_t ns3::Hash::Function::Murmur3::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): uint64_t ns3::Hash::Function::Murmur3::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): void ns3::Hash::Function::Murmur3::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + def register_functions(root_module): module = root_module ## angles.h (module 'antenna'): extern double ns3::DegreesToRadians(double degrees) [free function] @@ -1083,11 +1291,19 @@ 'double', [param('double', 'radians')]) register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) + register_functions_ns3_Hash(module.get_submodule('Hash'), root_module) return def register_functions_ns3_FatalImpl(module, root_module): return +def register_functions_ns3_Hash(module, root_module): + register_functions_ns3_Hash_Function(module.get_submodule('Function'), root_module) + return + +def register_functions_ns3_Hash_Function(module, root_module): + return + def main(): out = FileCodeSink(sys.stdout) root_module = module_init() diff -Naur ns-3.17/src/antenna/bindings/modulegen__gcc_LP64.py ns-3.18/src/antenna/bindings/modulegen__gcc_LP64.py --- ns-3.17/src/antenna/bindings/modulegen__gcc_LP64.py 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/antenna/bindings/modulegen__gcc_LP64.py 2013-10-26 07:07:29.675364383 -0700 @@ -28,6 +28,8 @@ module.add_class('Item', import_from_module='ns.core', outer_class=root_module['ns3::AttributeConstructionList']) ## callback.h (module 'core'): ns3::CallbackBase [class] module.add_class('CallbackBase', import_from_module='ns.core') + ## hash.h (module 'core'): ns3::Hasher [class] + module.add_class('Hasher', 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] @@ -60,6 +62,8 @@ module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeValue', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::CallbackImplBase', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] + module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Hash::Implementation', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::TraceSourceAccessor', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## trace-source-accessor.h (module 'core'): ns3::TraceSourceAccessor [class] @@ -116,16 +120,53 @@ nested_module = module.add_cpp_namespace('FatalImpl') register_types_ns3_FatalImpl(nested_module) + + ## Register a nested module for the namespace Hash + + nested_module = module.add_cpp_namespace('Hash') + register_types_ns3_Hash(nested_module) + def register_types_ns3_FatalImpl(module): root_module = module.get_root() +def register_types_ns3_Hash(module): + root_module = module.get_root() + + ## hash-function.h (module 'core'): ns3::Hash::Implementation [class] + module.add_class('Implementation', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash32Function_ptr') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash32Function_ptr*') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash32Function_ptr&') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash64Function_ptr') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash64Function_ptr*') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash64Function_ptr&') + + ## Register a nested module for the namespace Function + + nested_module = module.add_cpp_namespace('Function') + register_types_ns3_Hash_Function(nested_module) + + +def register_types_ns3_Hash_Function(module): + root_module = module.get_root() + + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a [class] + module.add_class('Fnv1a', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32 [class] + module.add_class('Hash32', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64 [class] + module.add_class('Hash64', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3 [class] + module.add_class('Murmur3', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + def register_methods(root_module): register_Ns3Angles_methods(root_module, root_module['ns3::Angles']) register_Ns3AttributeConstructionList_methods(root_module, root_module['ns3::AttributeConstructionList']) register_Ns3AttributeConstructionListItem_methods(root_module, root_module['ns3::AttributeConstructionList::Item']) register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase']) + register_Ns3Hasher_methods(root_module, root_module['ns3::Hasher']) register_Ns3ObjectBase_methods(root_module, root_module['ns3::ObjectBase']) register_Ns3ObjectDeleter_methods(root_module, root_module['ns3::ObjectDeleter']) register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, root_module['ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter >']) @@ -141,6 +182,7 @@ register_Ns3SimpleRefCount__Ns3AttributeChecker_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeChecker__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter >']) + register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter >']) register_Ns3TraceSourceAccessor_methods(root_module, root_module['ns3::TraceSourceAccessor']) register_Ns3AntennaModel_methods(root_module, root_module['ns3::AntennaModel']) @@ -160,6 +202,11 @@ register_Ns3Vector2DValue_methods(root_module, root_module['ns3::Vector2DValue']) register_Ns3Vector3DChecker_methods(root_module, root_module['ns3::Vector3DChecker']) register_Ns3Vector3DValue_methods(root_module, root_module['ns3::Vector3DValue']) + register_Ns3HashImplementation_methods(root_module, root_module['ns3::Hash::Implementation']) + register_Ns3HashFunctionFnv1a_methods(root_module, root_module['ns3::Hash::Function::Fnv1a']) + register_Ns3HashFunctionHash32_methods(root_module, root_module['ns3::Hash::Function::Hash32']) + register_Ns3HashFunctionHash64_methods(root_module, root_module['ns3::Hash::Function::Hash64']) + register_Ns3HashFunctionMurmur3_methods(root_module, root_module['ns3::Hash::Function::Murmur3']) return def register_Ns3Angles_methods(root_module, cls): @@ -239,6 +286,35 @@ is_static=True, visibility='protected') return +def register_Ns3Hasher_methods(root_module, cls): + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Hasher const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hasher const &', 'arg0')]) + ## hash.h (module 'core'): ns3::Hasher::Hasher() [constructor] + cls.add_constructor([]) + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Ptr hp) [constructor] + cls.add_constructor([param('ns3::Ptr< ns3::Hash::Implementation >', 'hp')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(std::string const s) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(std::string const s) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): ns3::Hasher & ns3::Hasher::clear() [member function] + cls.add_method('clear', + 'ns3::Hasher &', + []) + return + def register_Ns3ObjectBase_methods(root_module, cls): ## object-base.h (module 'core'): ns3::ObjectBase::ObjectBase() [constructor] cls.add_constructor([]) @@ -372,6 +448,11 @@ 'std::string', [], is_const=True) + ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetHash() const [member function] + cls.add_method('GetHash', + 'uint32_t', + [], + is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeId::GetName() const [member function] cls.add_method('GetName', 'std::string', @@ -431,6 +512,16 @@ 'bool', [param('std::string', 'name'), param('ns3::TypeId::AttributeInformation *', 'info', transfer_ownership=False)], is_const=True) + ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByHash(uint32_t hash) [member function] + cls.add_method('LookupByHash', + 'ns3::TypeId', + [param('uint32_t', 'hash')], + is_static=True) + ## type-id.h (module 'core'): static bool ns3::TypeId::LookupByHashFailSafe(uint32_t hash, ns3::TypeId * tid) [member function] + cls.add_method('LookupByHashFailSafe', + 'bool', + [param('uint32_t', 'hash'), param('ns3::TypeId *', 'tid')], + is_static=True) ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByName(std::string name) [member function] cls.add_method('LookupByName', 'ns3::TypeId', @@ -649,6 +740,18 @@ is_static=True) return +def register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter< ns3::Hash::Implementation > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + def register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] cls.add_constructor([]) @@ -1072,6 +1175,111 @@ [param('ns3::Vector3D const &', 'value')]) return +def register_Ns3HashImplementation_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation(ns3::Hash::Implementation const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Implementation const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation() [constructor] + cls.add_constructor([]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Implementation::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_pure_virtual=True, is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Implementation::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Implementation::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + return + +def register_Ns3HashFunctionFnv1a_methods(root_module, cls): + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a(ns3::Hash::Function::Fnv1a const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Fnv1a const &', 'arg0')]) + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a() [constructor] + cls.add_constructor([]) + ## hash-fnv.h (module 'core'): uint32_t ns3::Hash::Function::Fnv1a::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): uint64_t ns3::Hash::Function::Fnv1a::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): void ns3::Hash::Function::Fnv1a::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash32_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Function::Hash32 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash32 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Hash32Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash32Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash32::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash32::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash64_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Function::Hash64 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash64 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Hash64Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash64Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash64::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Function::Hash64::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash64::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionMurmur3_methods(root_module, cls): + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3(ns3::Hash::Function::Murmur3 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Murmur3 const &', 'arg0')]) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3() [constructor] + cls.add_constructor([]) + ## hash-murmur3.h (module 'core'): uint32_t ns3::Hash::Function::Murmur3::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): uint64_t ns3::Hash::Function::Murmur3::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): void ns3::Hash::Function::Murmur3::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + def register_functions(root_module): module = root_module ## angles.h (module 'antenna'): extern double ns3::DegreesToRadians(double degrees) [free function] @@ -1083,11 +1291,19 @@ 'double', [param('double', 'radians')]) register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) + register_functions_ns3_Hash(module.get_submodule('Hash'), root_module) return def register_functions_ns3_FatalImpl(module, root_module): return +def register_functions_ns3_Hash(module, root_module): + register_functions_ns3_Hash_Function(module.get_submodule('Function'), root_module) + return + +def register_functions_ns3_Hash_Function(module, root_module): + return + def main(): out = FileCodeSink(sys.stdout) root_module = module_init() diff -Naur ns-3.17/src/antenna/doc/Makefile ns-3.18/src/antenna/doc/Makefile --- ns-3.17/src/antenna/doc/Makefile 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/antenna/doc/Makefile 2013-10-26 07:07:29.675364383 -0700 @@ -20,12 +20,14 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF) +RESCALE = $(shell hg root)/utils/rescale-pdf.sh + %.eps : %.dia; $(DIA) -t eps $< -e $@ %.png : %.dia; $(DIA) -t png $< -e $@ %.png : %.eps; $(CONVERT) $< $@ %.pdf : %.eps $(EPSTOPDF) $< -o=$@ - if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi + @if test x$($@_width) != x; then $(RESCALE) $($@_width) $@ ; fi GRAPHS_PNG = ${GRAPHS_EPS:.eps=.png} GRAPHS_PDF = ${GRAPHS_EPS:.eps=.pdf} @@ -35,7 +37,7 @@ %.png : %.eps; $(CONVERT) $< $@ %.pdf : %.eps $(EPSTOPDF) $< -o=$@ - if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi + @if test x$($@_width) != x; then $(RESCALE) $($@_width) $@ ; fi # You can set these variables from the command line. SPHINXOPTS = diff -Naur ns-3.17/src/antenna/doc/rescale-pdf.sh ns-3.18/src/antenna/doc/rescale-pdf.sh --- ns-3.17/src/antenna/doc/rescale-pdf.sh 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/antenna/doc/rescale-pdf.sh 1969-12-31 16:00:00.000000000 -0800 @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -TMPDIR=/tmp - -TMPFILE=`mktemp` - -echo "\documentclass{book} -\usepackage{pdfpages} -\begin{document} -\includepdf[width=${1},fitpaper]{${2}} -\end{document}" >${TMPFILE}.tex -pdflatex -output-directory /tmp ${TMPFILE}.tex >/dev/null 2>/dev/null -cp ${TMPFILE}.pdf ${2} -rm -f ${TMPFILE}{,.{tex,aux,log,pdf}} diff -Naur ns-3.17/src/aodv/bindings/callbacks_list.py ns-3.18/src/aodv/bindings/callbacks_list.py --- ns-3.17/src/aodv/bindings/callbacks_list.py 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/aodv/bindings/callbacks_list.py 2013-10-26 07:07:29.631364382 -0700 @@ -1,12 +1,12 @@ callback_classes = [ ['void', 'ns3::Ptr', 'ns3::Ipv4Header const&', 'ns3::Socket::SocketErrno', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::Ptr', 'ns3::Ptr', 'ns3::Ipv4Header const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], + ['void', 'ns3::WifiMacHeader const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], + ['void', 'ns3::Ipv4Address', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], + ['void', 'ns3::Ptr', 'ns3::Ipv4Address', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::Ptr', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::Ptr', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::Ptr', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['bool', 'ns3::Ptr', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], - ['void', 'ns3::WifiMacHeader const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], - ['void', 'ns3::Ipv4Address', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], - ['void', 'ns3::Ptr', 'ns3::Ipv4Address', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::Ptr', 'ns3::Ptr', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ] diff -Naur ns-3.17/src/aodv/bindings/modulegen__gcc_ILP32.py ns-3.18/src/aodv/bindings/modulegen__gcc_ILP32.py --- ns-3.17/src/aodv/bindings/modulegen__gcc_ILP32.py 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/aodv/bindings/modulegen__gcc_ILP32.py 2013-10-26 07:07:29.631364382 -0700 @@ -21,7 +21,7 @@ root_module = module.get_root() ## wifi-mac-header.h (module 'wifi'): ns3::WifiMacType [enumeration] - module.add_enum('WifiMacType', ['WIFI_MAC_CTL_RTS', 'WIFI_MAC_CTL_CTS', 'WIFI_MAC_CTL_ACK', 'WIFI_MAC_CTL_BACKREQ', 'WIFI_MAC_CTL_BACKRESP', 'WIFI_MAC_MGT_BEACON', 'WIFI_MAC_MGT_ASSOCIATION_REQUEST', 'WIFI_MAC_MGT_ASSOCIATION_RESPONSE', 'WIFI_MAC_MGT_DISASSOCIATION', 'WIFI_MAC_MGT_REASSOCIATION_REQUEST', 'WIFI_MAC_MGT_REASSOCIATION_RESPONSE', 'WIFI_MAC_MGT_PROBE_REQUEST', 'WIFI_MAC_MGT_PROBE_RESPONSE', 'WIFI_MAC_MGT_AUTHENTICATION', 'WIFI_MAC_MGT_DEAUTHENTICATION', 'WIFI_MAC_MGT_ACTION', 'WIFI_MAC_MGT_ACTION_NO_ACK', 'WIFI_MAC_MGT_MULTIHOP_ACTION', 'WIFI_MAC_DATA', 'WIFI_MAC_DATA_CFACK', 'WIFI_MAC_DATA_CFPOLL', 'WIFI_MAC_DATA_CFACK_CFPOLL', 'WIFI_MAC_DATA_NULL', 'WIFI_MAC_DATA_NULL_CFACK', 'WIFI_MAC_DATA_NULL_CFPOLL', 'WIFI_MAC_DATA_NULL_CFACK_CFPOLL', 'WIFI_MAC_QOSDATA', 'WIFI_MAC_QOSDATA_CFACK', 'WIFI_MAC_QOSDATA_CFPOLL', 'WIFI_MAC_QOSDATA_CFACK_CFPOLL', 'WIFI_MAC_QOSDATA_NULL', 'WIFI_MAC_QOSDATA_NULL_CFPOLL', 'WIFI_MAC_QOSDATA_NULL_CFACK_CFPOLL'], import_from_module='ns.wifi') + module.add_enum('WifiMacType', ['WIFI_MAC_CTL_RTS', 'WIFI_MAC_CTL_CTS', 'WIFI_MAC_CTL_ACK', 'WIFI_MAC_CTL_BACKREQ', 'WIFI_MAC_CTL_BACKRESP', 'WIFI_MAC_CTL_CTLWRAPPER', 'WIFI_MAC_MGT_BEACON', 'WIFI_MAC_MGT_ASSOCIATION_REQUEST', 'WIFI_MAC_MGT_ASSOCIATION_RESPONSE', 'WIFI_MAC_MGT_DISASSOCIATION', 'WIFI_MAC_MGT_REASSOCIATION_REQUEST', 'WIFI_MAC_MGT_REASSOCIATION_RESPONSE', 'WIFI_MAC_MGT_PROBE_REQUEST', 'WIFI_MAC_MGT_PROBE_RESPONSE', 'WIFI_MAC_MGT_AUTHENTICATION', 'WIFI_MAC_MGT_DEAUTHENTICATION', 'WIFI_MAC_MGT_ACTION', 'WIFI_MAC_MGT_ACTION_NO_ACK', 'WIFI_MAC_MGT_MULTIHOP_ACTION', 'WIFI_MAC_DATA', 'WIFI_MAC_DATA_CFACK', 'WIFI_MAC_DATA_CFPOLL', 'WIFI_MAC_DATA_CFACK_CFPOLL', 'WIFI_MAC_DATA_NULL', 'WIFI_MAC_DATA_NULL_CFACK', 'WIFI_MAC_DATA_NULL_CFPOLL', 'WIFI_MAC_DATA_NULL_CFACK_CFPOLL', 'WIFI_MAC_QOSDATA', 'WIFI_MAC_QOSDATA_CFACK', 'WIFI_MAC_QOSDATA_CFPOLL', 'WIFI_MAC_QOSDATA_CFACK_CFPOLL', 'WIFI_MAC_QOSDATA_NULL', 'WIFI_MAC_QOSDATA_NULL_CFPOLL', 'WIFI_MAC_QOSDATA_NULL_CFACK_CFPOLL'], import_from_module='ns.wifi') ## address.h (module 'network'): ns3::Address [class] module.add_class('Address', import_from_module='ns.network') ## address.h (module 'network'): ns3::Address::MaxSize_e [enumeration] @@ -48,6 +48,8 @@ module.add_class('CallbackBase', import_from_module='ns.core') ## event-id.h (module 'core'): ns3::EventId [class] module.add_class('EventId', import_from_module='ns.core') + ## hash.h (module 'core'): ns3::Hasher [class] + module.add_class('Hasher', import_from_module='ns.core') ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress [class] module.add_class('Inet6SocketAddress', import_from_module='ns.network') ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress [class] @@ -136,6 +138,8 @@ module.add_class('PacketTagList', import_from_module='ns.network') ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData [struct] module.add_class('TagData', import_from_module='ns.network', outer_class=root_module['ns3::PacketTagList']) + ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData_e [enumeration] + module.add_enum('TagData_e', ['MAX_SIZE'], outer_class=root_module['ns3::PacketTagList::TagData'], import_from_module='ns.network') ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Object', 'ns3::ObjectBase', 'ns3::ObjectDeleter'], parent=root_module['ns3::ObjectBase'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simulator.h (module 'core'): ns3::Simulator [class] @@ -173,9 +177,9 @@ ## ipv4-header.h (module 'internet'): ns3::Ipv4Header [class] module.add_class('Ipv4Header', import_from_module='ns.internet', parent=root_module['ns3::Header']) ## ipv4-header.h (module 'internet'): ns3::Ipv4Header::DscpType [enumeration] - module.add_enum('DscpType', ['DscpDefault', 'CS1', 'AF11', 'AF12', 'AF13', 'CS2', 'AF21', 'AF22', 'AF23', 'CS3', 'AF31', 'AF32', 'AF33', 'CS4', 'AF41', 'AF42', 'AF43', 'CS5', 'EF', 'CS6', 'CS7'], outer_class=root_module['ns3::Ipv4Header'], import_from_module='ns.internet') + module.add_enum('DscpType', ['DscpDefault', 'DSCP_CS1', 'DSCP_AF11', 'DSCP_AF12', 'DSCP_AF13', 'DSCP_CS2', 'DSCP_AF21', 'DSCP_AF22', 'DSCP_AF23', 'DSCP_CS3', 'DSCP_AF31', 'DSCP_AF32', 'DSCP_AF33', 'DSCP_CS4', 'DSCP_AF41', 'DSCP_AF42', 'DSCP_AF43', 'DSCP_CS5', 'DSCP_EF', 'DSCP_CS6', 'DSCP_CS7'], outer_class=root_module['ns3::Ipv4Header'], import_from_module='ns.internet') ## ipv4-header.h (module 'internet'): ns3::Ipv4Header::EcnType [enumeration] - module.add_enum('EcnType', ['NotECT', 'ECT1', 'ECT0', 'CE'], outer_class=root_module['ns3::Ipv4Header'], import_from_module='ns.internet') + module.add_enum('EcnType', ['ECN_NotECT', 'ECN_ECT1', 'ECN_ECT0', 'ECN_CE'], outer_class=root_module['ns3::Ipv4Header'], import_from_module='ns.internet') ## ipv6-header.h (module 'internet'): ns3::Ipv6Header [class] module.add_class('Ipv6Header', import_from_module='ns.internet', parent=root_module['ns3::Header']) ## ipv6-header.h (module 'internet'): ns3::Ipv6Header::NextHeader_e [enumeration] @@ -198,6 +202,8 @@ module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::CallbackImplBase', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::EventImpl', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] + module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Hash::Implementation', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Ipv4MulticastRoute', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] @@ -352,8 +358,6 @@ module.add_class('Packet', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter >']) ## random-variable-stream.h (module 'core'): ns3::ParetoRandomVariable [class] module.add_class('ParetoRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) - ## nstime.h (module 'core'): ns3::TimeChecker [class] - module.add_class('TimeChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) ## nstime.h (module 'core'): ns3::TimeValue [class] module.add_class('TimeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## type-id.h (module 'core'): ns3::TypeIdChecker [class] @@ -364,6 +368,8 @@ module.add_class('AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker']) ## address.h (module 'network'): ns3::AddressValue [class] module.add_class('AddressValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue']) + ## ipv4-list-routing.h (module 'internet'): ns3::Ipv4ListRouting [class] + module.add_class('Ipv4ListRouting', import_from_module='ns.internet', parent=root_module['ns3::Ipv4RoutingProtocol']) module.add_container('std::list< ns3::Ptr< ns3::Packet > >', 'ns3::Ptr< ns3::Packet >', container_type='list') module.add_container('std::map< unsigned int, unsigned int >', ('unsigned int', 'unsigned int'), container_type='map') @@ -373,6 +379,12 @@ register_types_ns3_FatalImpl(nested_module) + ## Register a nested module for the namespace Hash + + nested_module = module.add_cpp_namespace('Hash') + register_types_ns3_Hash(nested_module) + + ## Register a nested module for the namespace aodv nested_module = module.add_cpp_namespace('aodv') @@ -383,6 +395,36 @@ root_module = module.get_root() +def register_types_ns3_Hash(module): + root_module = module.get_root() + + ## hash-function.h (module 'core'): ns3::Hash::Implementation [class] + module.add_class('Implementation', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash64Function_ptr') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash64Function_ptr*') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash64Function_ptr&') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash32Function_ptr') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash32Function_ptr*') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash32Function_ptr&') + + ## Register a nested module for the namespace Function + + nested_module = module.add_cpp_namespace('Function') + register_types_ns3_Hash_Function(nested_module) + + +def register_types_ns3_Hash_Function(module): + root_module = module.get_root() + + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a [class] + module.add_class('Fnv1a', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32 [class] + module.add_class('Hash32', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64 [class] + module.add_class('Hash64', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3 [class] + module.add_class('Murmur3', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + def register_types_ns3_aodv(module): root_module = module.get_root() @@ -434,6 +476,7 @@ register_Ns3ByteTagListIteratorItem_methods(root_module, root_module['ns3::ByteTagList::Iterator::Item']) register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase']) register_Ns3EventId_methods(root_module, root_module['ns3::EventId']) + register_Ns3Hasher_methods(root_module, root_module['ns3::Hasher']) register_Ns3Inet6SocketAddress_methods(root_module, root_module['ns3::Inet6SocketAddress']) register_Ns3InetSocketAddress_methods(root_module, root_module['ns3::InetSocketAddress']) register_Ns3IntToType__0_methods(root_module, root_module['ns3::IntToType< 0 >']) @@ -487,6 +530,7 @@ register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter >']) + register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3Ipv4MulticastRoute_Ns3Empty_Ns3DefaultDeleter__lt__ns3Ipv4MulticastRoute__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Ipv4MulticastRoute, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3Ipv4Route_Ns3Empty_Ns3DefaultDeleter__lt__ns3Ipv4Route__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Ipv4Route, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3NixVector_Ns3Empty_Ns3DefaultDeleter__lt__ns3NixVector__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter >']) @@ -555,12 +599,17 @@ register_Ns3OutputStreamWrapper_methods(root_module, root_module['ns3::OutputStreamWrapper']) register_Ns3Packet_methods(root_module, root_module['ns3::Packet']) register_Ns3ParetoRandomVariable_methods(root_module, root_module['ns3::ParetoRandomVariable']) - register_Ns3TimeChecker_methods(root_module, root_module['ns3::TimeChecker']) register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue']) register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker']) register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue']) register_Ns3AddressChecker_methods(root_module, root_module['ns3::AddressChecker']) register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue']) + register_Ns3Ipv4ListRouting_methods(root_module, root_module['ns3::Ipv4ListRouting']) + register_Ns3HashImplementation_methods(root_module, root_module['ns3::Hash::Implementation']) + register_Ns3HashFunctionFnv1a_methods(root_module, root_module['ns3::Hash::Function::Fnv1a']) + register_Ns3HashFunctionHash32_methods(root_module, root_module['ns3::Hash::Function::Hash32']) + register_Ns3HashFunctionHash64_methods(root_module, root_module['ns3::Hash::Function::Hash64']) + register_Ns3HashFunctionMurmur3_methods(root_module, root_module['ns3::Hash::Function::Murmur3']) register_Ns3AodvDuplicatePacketDetection_methods(root_module, root_module['ns3::aodv::DuplicatePacketDetection']) register_Ns3AodvIdCache_methods(root_module, root_module['ns3::aodv::IdCache']) register_Ns3AodvNeighbors_methods(root_module, root_module['ns3::aodv::Neighbors']) @@ -1100,6 +1149,35 @@ is_const=True) return +def register_Ns3Hasher_methods(root_module, cls): + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Hasher const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hasher const &', 'arg0')]) + ## hash.h (module 'core'): ns3::Hasher::Hasher() [constructor] + cls.add_constructor([]) + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Ptr hp) [constructor] + cls.add_constructor([param('ns3::Ptr< ns3::Hash::Implementation >', 'hp')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(std::string const s) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(std::string const s) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): ns3::Hasher & ns3::Hasher::clear() [member function] + cls.add_method('clear', + 'ns3::Hasher &', + []) + return + def register_Ns3Inet6SocketAddress_methods(root_module, cls): ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(ns3::Inet6SocketAddress const & arg0) [copy constructor] cls.add_constructor([param('ns3::Inet6SocketAddress const &', 'arg0')]) @@ -1598,6 +1676,11 @@ 'bool', [], is_const=True) + ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsDocumentation() const [member function] + cls.add_method('IsDocumentation', + 'bool', + [], + is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsEqual(ns3::Ipv6Address const & other) const [member function] cls.add_method('IsEqual', 'bool', @@ -1637,16 +1720,36 @@ 'bool', [], is_const=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac16Address addr, ns3::Ipv6Address prefix) [member function] + cls.add_method('MakeAutoconfiguredAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac16Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac48Address addr, ns3::Ipv6Address prefix) [member function] cls.add_method('MakeAutoconfiguredAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac64Address addr, ns3::Ipv6Address prefix) [member function] + cls.add_method('MakeAutoconfiguredAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac64Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], + is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac16Address mac) [member function] + cls.add_method('MakeAutoconfiguredLinkLocalAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac16Address', 'mac')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac48Address mac) [member function] cls.add_method('MakeAutoconfiguredLinkLocalAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'mac')], is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac64Address mac) [member function] + cls.add_method('MakeAutoconfiguredLinkLocalAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac64Address', 'mac')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeIpv4MappedAddress(ns3::Ipv4Address addr) [member function] cls.add_method('MakeIpv4MappedAddress', 'ns3::Ipv6Address', @@ -2205,6 +2308,10 @@ cls.add_method('RemoveAll', 'void', []) + ## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Replace(ns3::Tag & tag) [member function] + cls.add_method('Replace', + 'bool', + [param('ns3::Tag &', 'tag')]) return def register_Ns3PacketTagListTagData_methods(root_module, cls): @@ -2541,6 +2648,11 @@ 'std::string', [], is_const=True) + ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetHash() const [member function] + cls.add_method('GetHash', + 'uint32_t', + [], + is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeId::GetName() const [member function] cls.add_method('GetName', 'std::string', @@ -2600,6 +2712,16 @@ 'bool', [param('std::string', 'name'), param('ns3::TypeId::AttributeInformation *', 'info', transfer_ownership=False)], is_const=True) + ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByHash(uint32_t hash) [member function] + cls.add_method('LookupByHash', + 'ns3::TypeId', + [param('uint32_t', 'hash')], + is_static=True) + ## type-id.h (module 'core'): static bool ns3::TypeId::LookupByHashFailSafe(uint32_t hash, ns3::TypeId * tid) [member function] + cls.add_method('LookupByHashFailSafe', + 'bool', + [param('uint32_t', 'hash'), param('ns3::TypeId *', 'tid')], + is_static=True) ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByName(std::string name) [member function] cls.add_method('LookupByName', 'ns3::TypeId', @@ -3342,6 +3464,18 @@ is_static=True) return +def register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter< ns3::Hash::Implementation > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + def register_Ns3SimpleRefCount__Ns3Ipv4MulticastRoute_Ns3Empty_Ns3DefaultDeleter__lt__ns3Ipv4MulticastRoute__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] cls.add_constructor([]) @@ -4159,11 +4293,26 @@ 'bool', [], is_const=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Max() [member function] + cls.add_method('Max', + 'ns3::Time', + [], + is_static=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Min() [member function] + cls.add_method('Min', + 'ns3::Time', + [], + is_static=True) ## nstime.h (module 'core'): static void ns3::Time::SetResolution(ns3::Time::Unit resolution) [member function] cls.add_method('SetResolution', 'void', [param('ns3::Time::Unit', 'resolution')], is_static=True) + ## nstime.h (module 'core'): static bool ns3::Time::StaticInit() [member function] + cls.add_method('StaticInit', + 'bool', + [], + is_static=True) ## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function] cls.add_method('To', 'ns3::int64x64_t', @@ -4710,10 +4859,18 @@ cls.add_method('SetNoMoreFragments', 'void', []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetNoOrder() [member function] + cls.add_method('SetNoOrder', + 'void', + []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetNoRetry() [member function] cls.add_method('SetNoRetry', 'void', []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetOrder() [member function] + cls.add_method('SetOrder', + 'void', + []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetProbeReq() [member function] cls.add_method('SetProbeReq', 'void', @@ -5636,6 +5793,11 @@ 'bool', [param('uint32_t', 'interface'), param('uint32_t', 'addressIndex')], is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): bool ns3::Ipv4::RemoveAddress(uint32_t interface, ns3::Ipv4Address address) [member function] + cls.add_method('RemoveAddress', + 'bool', + [param('uint32_t', 'interface'), param('ns3::Ipv4Address', 'address')], + is_pure_virtual=True, is_virtual=True) ## ipv4.h (module 'internet'): ns3::Ipv4Address ns3::Ipv4::SelectSourceAddress(ns3::Ptr device, ns3::Ipv4Address dst, ns3::Ipv4InterfaceAddress::InterfaceAddressScope_e scope) [member function] cls.add_method('SelectSourceAddress', 'ns3::Ipv4Address', @@ -5798,6 +5960,10 @@ cls.add_method('RemoveAddress', 'ns3::Ipv4InterfaceAddress', [param('uint32_t', 'index')]) + ## ipv4-interface.h (module 'internet'): ns3::Ipv4InterfaceAddress ns3::Ipv4Interface::RemoveAddress(ns3::Ipv4Address address) [member function] + cls.add_method('RemoveAddress', + 'ns3::Ipv4InterfaceAddress', + [param('ns3::Ipv4Address', 'address')]) ## ipv4-interface.h (module 'internet'): void ns3::Ipv4Interface::Send(ns3::Ptr p, ns3::Ipv4Address dest) [member function] cls.add_method('Send', 'void', @@ -5958,6 +6124,11 @@ 'bool', [param('uint32_t', 'interfaceIndex'), param('uint32_t', 'addressIndex')], is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::RemoveAddress(uint32_t interface, ns3::Ipv4Address address) [member function] + cls.add_method('RemoveAddress', + 'bool', + [param('uint32_t', 'interface'), param('ns3::Ipv4Address', 'address')], + is_virtual=True) ## ipv4-l3-protocol.h (module 'internet'): ns3::Ipv4Address ns3::Ipv4L3Protocol::SelectSourceAddress(ns3::Ptr device, ns3::Ipv4Address dst, ns3::Ipv4InterfaceAddress::InterfaceAddressScope_e scope) [member function] cls.add_method('SelectSourceAddress', 'ns3::Ipv4Address', @@ -6350,6 +6521,10 @@ cls.add_method('RemoveAddress', 'ns3::Ipv6InterfaceAddress', [param('uint32_t', 'index')]) + ## ipv6-interface.h (module 'internet'): ns3::Ipv6InterfaceAddress ns3::Ipv6Interface::RemoveAddress(ns3::Ipv6Address address) [member function] + cls.add_method('RemoveAddress', + 'ns3::Ipv6InterfaceAddress', + [param('ns3::Ipv6Address', 'address')]) ## ipv6-interface.h (module 'internet'): void ns3::Ipv6Interface::Send(ns3::Ptr p, ns3::Ipv6Address dest) [member function] cls.add_method('Send', 'void', @@ -7054,6 +7229,10 @@ cls.add_method('RemoveTrailer', 'uint32_t', [param('ns3::Trailer &', 'trailer')]) + ## packet.h (module 'network'): bool ns3::Packet::ReplacePacketTag(ns3::Tag & tag) [member function] + cls.add_method('ReplacePacketTag', + 'bool', + [param('ns3::Tag &', 'tag')]) ## packet.h (module 'network'): uint32_t ns3::Packet::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function] cls.add_method('Serialize', 'uint32_t', @@ -7108,13 +7287,6 @@ is_virtual=True) return -def register_Ns3TimeChecker_methods(root_module, cls): - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker() [constructor] - cls.add_constructor([]) - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker(ns3::TimeChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TimeChecker const &', 'arg0')]) - return - def register_Ns3TimeValue_methods(root_module, cls): ## nstime.h (module 'core'): ns3::TimeValue::TimeValue() [constructor] cls.add_constructor([]) @@ -7228,6 +7400,188 @@ [param('ns3::Address const &', 'value')]) return +def register_Ns3Ipv4ListRouting_methods(root_module, cls): + ## ipv4-list-routing.h (module 'internet'): ns3::Ipv4ListRouting::Ipv4ListRouting(ns3::Ipv4ListRouting const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv4ListRouting const &', 'arg0')]) + ## ipv4-list-routing.h (module 'internet'): ns3::Ipv4ListRouting::Ipv4ListRouting() [constructor] + cls.add_constructor([]) + ## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::AddRoutingProtocol(ns3::Ptr routingProtocol, int16_t priority) [member function] + cls.add_method('AddRoutingProtocol', + 'void', + [param('ns3::Ptr< ns3::Ipv4RoutingProtocol >', 'routingProtocol'), param('int16_t', 'priority')], + is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): uint32_t ns3::Ipv4ListRouting::GetNRoutingProtocols() const [member function] + cls.add_method('GetNRoutingProtocols', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): ns3::Ptr ns3::Ipv4ListRouting::GetRoutingProtocol(uint32_t index, int16_t & priority) const [member function] + cls.add_method('GetRoutingProtocol', + 'ns3::Ptr< ns3::Ipv4RoutingProtocol >', + [param('uint32_t', 'index'), param('int16_t &', 'priority', direction=2)], + is_const=True, is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): static ns3::TypeId ns3::Ipv4ListRouting::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::NotifyAddAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] + cls.add_method('NotifyAddAddress', + 'void', + [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], + is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::NotifyInterfaceDown(uint32_t interface) [member function] + cls.add_method('NotifyInterfaceDown', + 'void', + [param('uint32_t', 'interface')], + is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::NotifyInterfaceUp(uint32_t interface) [member function] + cls.add_method('NotifyInterfaceUp', + 'void', + [param('uint32_t', 'interface')], + is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::NotifyRemoveAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] + cls.add_method('NotifyRemoveAddress', + 'void', + [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], + is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::PrintRoutingTable(ns3::Ptr stream) const [member function] + cls.add_method('PrintRoutingTable', + 'void', + [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')], + is_const=True, is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): bool ns3::Ipv4ListRouting::RouteInput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr idev, ns3::Callback, ns3::Ptr, ns3::Ipv4Header const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> ucb, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback, ns3::Ipv4Header const&, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> ecb) [member function] + cls.add_method('RouteInput', + 'bool', + [param('ns3::Ptr< ns3::Packet const >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'lcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')], + is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): ns3::Ptr ns3::Ipv4ListRouting::RouteOutput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr oif, ns3::Socket::SocketErrno & sockerr) [member function] + cls.add_method('RouteOutput', + 'ns3::Ptr< ns3::Ipv4Route >', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice >', 'oif'), param('ns3::Socket::SocketErrno &', 'sockerr')], + is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::SetIpv4(ns3::Ptr ipv4) [member function] + cls.add_method('SetIpv4', + 'void', + [param('ns3::Ptr< ns3::Ipv4 >', 'ipv4')], + is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='protected', is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::DoInitialize() [member function] + cls.add_method('DoInitialize', + 'void', + [], + visibility='protected', is_virtual=True) + return + +def register_Ns3HashImplementation_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation(ns3::Hash::Implementation const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Implementation const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation() [constructor] + cls.add_constructor([]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Implementation::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_pure_virtual=True, is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Implementation::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Implementation::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + return + +def register_Ns3HashFunctionFnv1a_methods(root_module, cls): + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a(ns3::Hash::Function::Fnv1a const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Fnv1a const &', 'arg0')]) + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a() [constructor] + cls.add_constructor([]) + ## hash-fnv.h (module 'core'): uint32_t ns3::Hash::Function::Fnv1a::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): uint64_t ns3::Hash::Function::Fnv1a::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): void ns3::Hash::Function::Fnv1a::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash32_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Function::Hash32 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash32 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Hash32Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash32Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash32::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash32::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash64_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Function::Hash64 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash64 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Hash64Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash64Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash64::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Function::Hash64::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash64::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionMurmur3_methods(root_module, cls): + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3(ns3::Hash::Function::Murmur3 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Murmur3 const &', 'arg0')]) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3() [constructor] + cls.add_constructor([]) + ## hash-murmur3.h (module 'core'): uint32_t ns3::Hash::Function::Murmur3::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): uint64_t ns3::Hash::Function::Murmur3::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): void ns3::Hash::Function::Murmur3::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + def register_Ns3AodvDuplicatePacketDetection_methods(root_module, cls): ## aodv-dpd.h (module 'aodv'): ns3::aodv::DuplicatePacketDetection::DuplicatePacketDetection(ns3::aodv::DuplicatePacketDetection const & arg0) [copy constructor] cls.add_constructor([param('ns3::aodv::DuplicatePacketDetection const &', 'arg0')]) @@ -8171,12 +8525,20 @@ def register_functions(root_module): module = root_module register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) + register_functions_ns3_Hash(module.get_submodule('Hash'), root_module) register_functions_ns3_aodv(module.get_submodule('aodv'), root_module) return def register_functions_ns3_FatalImpl(module, root_module): return +def register_functions_ns3_Hash(module, root_module): + register_functions_ns3_Hash_Function(module.get_submodule('Function'), root_module) + return + +def register_functions_ns3_Hash_Function(module, root_module): + return + def register_functions_ns3_aodv(module, root_module): return diff -Naur ns-3.17/src/aodv/bindings/modulegen__gcc_LP64.py ns-3.18/src/aodv/bindings/modulegen__gcc_LP64.py --- ns-3.17/src/aodv/bindings/modulegen__gcc_LP64.py 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/aodv/bindings/modulegen__gcc_LP64.py 2013-10-26 07:07:29.627364383 -0700 @@ -21,7 +21,7 @@ root_module = module.get_root() ## wifi-mac-header.h (module 'wifi'): ns3::WifiMacType [enumeration] - module.add_enum('WifiMacType', ['WIFI_MAC_CTL_RTS', 'WIFI_MAC_CTL_CTS', 'WIFI_MAC_CTL_ACK', 'WIFI_MAC_CTL_BACKREQ', 'WIFI_MAC_CTL_BACKRESP', 'WIFI_MAC_MGT_BEACON', 'WIFI_MAC_MGT_ASSOCIATION_REQUEST', 'WIFI_MAC_MGT_ASSOCIATION_RESPONSE', 'WIFI_MAC_MGT_DISASSOCIATION', 'WIFI_MAC_MGT_REASSOCIATION_REQUEST', 'WIFI_MAC_MGT_REASSOCIATION_RESPONSE', 'WIFI_MAC_MGT_PROBE_REQUEST', 'WIFI_MAC_MGT_PROBE_RESPONSE', 'WIFI_MAC_MGT_AUTHENTICATION', 'WIFI_MAC_MGT_DEAUTHENTICATION', 'WIFI_MAC_MGT_ACTION', 'WIFI_MAC_MGT_ACTION_NO_ACK', 'WIFI_MAC_MGT_MULTIHOP_ACTION', 'WIFI_MAC_DATA', 'WIFI_MAC_DATA_CFACK', 'WIFI_MAC_DATA_CFPOLL', 'WIFI_MAC_DATA_CFACK_CFPOLL', 'WIFI_MAC_DATA_NULL', 'WIFI_MAC_DATA_NULL_CFACK', 'WIFI_MAC_DATA_NULL_CFPOLL', 'WIFI_MAC_DATA_NULL_CFACK_CFPOLL', 'WIFI_MAC_QOSDATA', 'WIFI_MAC_QOSDATA_CFACK', 'WIFI_MAC_QOSDATA_CFPOLL', 'WIFI_MAC_QOSDATA_CFACK_CFPOLL', 'WIFI_MAC_QOSDATA_NULL', 'WIFI_MAC_QOSDATA_NULL_CFPOLL', 'WIFI_MAC_QOSDATA_NULL_CFACK_CFPOLL'], import_from_module='ns.wifi') + module.add_enum('WifiMacType', ['WIFI_MAC_CTL_RTS', 'WIFI_MAC_CTL_CTS', 'WIFI_MAC_CTL_ACK', 'WIFI_MAC_CTL_BACKREQ', 'WIFI_MAC_CTL_BACKRESP', 'WIFI_MAC_CTL_CTLWRAPPER', 'WIFI_MAC_MGT_BEACON', 'WIFI_MAC_MGT_ASSOCIATION_REQUEST', 'WIFI_MAC_MGT_ASSOCIATION_RESPONSE', 'WIFI_MAC_MGT_DISASSOCIATION', 'WIFI_MAC_MGT_REASSOCIATION_REQUEST', 'WIFI_MAC_MGT_REASSOCIATION_RESPONSE', 'WIFI_MAC_MGT_PROBE_REQUEST', 'WIFI_MAC_MGT_PROBE_RESPONSE', 'WIFI_MAC_MGT_AUTHENTICATION', 'WIFI_MAC_MGT_DEAUTHENTICATION', 'WIFI_MAC_MGT_ACTION', 'WIFI_MAC_MGT_ACTION_NO_ACK', 'WIFI_MAC_MGT_MULTIHOP_ACTION', 'WIFI_MAC_DATA', 'WIFI_MAC_DATA_CFACK', 'WIFI_MAC_DATA_CFPOLL', 'WIFI_MAC_DATA_CFACK_CFPOLL', 'WIFI_MAC_DATA_NULL', 'WIFI_MAC_DATA_NULL_CFACK', 'WIFI_MAC_DATA_NULL_CFPOLL', 'WIFI_MAC_DATA_NULL_CFACK_CFPOLL', 'WIFI_MAC_QOSDATA', 'WIFI_MAC_QOSDATA_CFACK', 'WIFI_MAC_QOSDATA_CFPOLL', 'WIFI_MAC_QOSDATA_CFACK_CFPOLL', 'WIFI_MAC_QOSDATA_NULL', 'WIFI_MAC_QOSDATA_NULL_CFPOLL', 'WIFI_MAC_QOSDATA_NULL_CFACK_CFPOLL'], import_from_module='ns.wifi') ## address.h (module 'network'): ns3::Address [class] module.add_class('Address', import_from_module='ns.network') ## address.h (module 'network'): ns3::Address::MaxSize_e [enumeration] @@ -48,6 +48,8 @@ module.add_class('CallbackBase', import_from_module='ns.core') ## event-id.h (module 'core'): ns3::EventId [class] module.add_class('EventId', import_from_module='ns.core') + ## hash.h (module 'core'): ns3::Hasher [class] + module.add_class('Hasher', import_from_module='ns.core') ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress [class] module.add_class('Inet6SocketAddress', import_from_module='ns.network') ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress [class] @@ -136,6 +138,8 @@ module.add_class('PacketTagList', import_from_module='ns.network') ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData [struct] module.add_class('TagData', import_from_module='ns.network', outer_class=root_module['ns3::PacketTagList']) + ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData_e [enumeration] + module.add_enum('TagData_e', ['MAX_SIZE'], outer_class=root_module['ns3::PacketTagList::TagData'], import_from_module='ns.network') ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Object', 'ns3::ObjectBase', 'ns3::ObjectDeleter'], parent=root_module['ns3::ObjectBase'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simulator.h (module 'core'): ns3::Simulator [class] @@ -173,9 +177,9 @@ ## ipv4-header.h (module 'internet'): ns3::Ipv4Header [class] module.add_class('Ipv4Header', import_from_module='ns.internet', parent=root_module['ns3::Header']) ## ipv4-header.h (module 'internet'): ns3::Ipv4Header::DscpType [enumeration] - module.add_enum('DscpType', ['DscpDefault', 'CS1', 'AF11', 'AF12', 'AF13', 'CS2', 'AF21', 'AF22', 'AF23', 'CS3', 'AF31', 'AF32', 'AF33', 'CS4', 'AF41', 'AF42', 'AF43', 'CS5', 'EF', 'CS6', 'CS7'], outer_class=root_module['ns3::Ipv4Header'], import_from_module='ns.internet') + module.add_enum('DscpType', ['DscpDefault', 'DSCP_CS1', 'DSCP_AF11', 'DSCP_AF12', 'DSCP_AF13', 'DSCP_CS2', 'DSCP_AF21', 'DSCP_AF22', 'DSCP_AF23', 'DSCP_CS3', 'DSCP_AF31', 'DSCP_AF32', 'DSCP_AF33', 'DSCP_CS4', 'DSCP_AF41', 'DSCP_AF42', 'DSCP_AF43', 'DSCP_CS5', 'DSCP_EF', 'DSCP_CS6', 'DSCP_CS7'], outer_class=root_module['ns3::Ipv4Header'], import_from_module='ns.internet') ## ipv4-header.h (module 'internet'): ns3::Ipv4Header::EcnType [enumeration] - module.add_enum('EcnType', ['NotECT', 'ECT1', 'ECT0', 'CE'], outer_class=root_module['ns3::Ipv4Header'], import_from_module='ns.internet') + module.add_enum('EcnType', ['ECN_NotECT', 'ECN_ECT1', 'ECN_ECT0', 'ECN_CE'], outer_class=root_module['ns3::Ipv4Header'], import_from_module='ns.internet') ## ipv6-header.h (module 'internet'): ns3::Ipv6Header [class] module.add_class('Ipv6Header', import_from_module='ns.internet', parent=root_module['ns3::Header']) ## ipv6-header.h (module 'internet'): ns3::Ipv6Header::NextHeader_e [enumeration] @@ -198,6 +202,8 @@ module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::CallbackImplBase', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::EventImpl', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] + module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Hash::Implementation', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Ipv4MulticastRoute', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] @@ -352,8 +358,6 @@ module.add_class('Packet', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter >']) ## random-variable-stream.h (module 'core'): ns3::ParetoRandomVariable [class] module.add_class('ParetoRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) - ## nstime.h (module 'core'): ns3::TimeChecker [class] - module.add_class('TimeChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) ## nstime.h (module 'core'): ns3::TimeValue [class] module.add_class('TimeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## type-id.h (module 'core'): ns3::TypeIdChecker [class] @@ -364,6 +368,8 @@ module.add_class('AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker']) ## address.h (module 'network'): ns3::AddressValue [class] module.add_class('AddressValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue']) + ## ipv4-list-routing.h (module 'internet'): ns3::Ipv4ListRouting [class] + module.add_class('Ipv4ListRouting', import_from_module='ns.internet', parent=root_module['ns3::Ipv4RoutingProtocol']) module.add_container('std::list< ns3::Ptr< ns3::Packet > >', 'ns3::Ptr< ns3::Packet >', container_type='list') module.add_container('std::map< unsigned int, unsigned int >', ('unsigned int', 'unsigned int'), container_type='map') @@ -373,6 +379,12 @@ register_types_ns3_FatalImpl(nested_module) + ## Register a nested module for the namespace Hash + + nested_module = module.add_cpp_namespace('Hash') + register_types_ns3_Hash(nested_module) + + ## Register a nested module for the namespace aodv nested_module = module.add_cpp_namespace('aodv') @@ -383,6 +395,36 @@ root_module = module.get_root() +def register_types_ns3_Hash(module): + root_module = module.get_root() + + ## hash-function.h (module 'core'): ns3::Hash::Implementation [class] + module.add_class('Implementation', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash64Function_ptr') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash64Function_ptr*') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash64Function_ptr&') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash32Function_ptr') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash32Function_ptr*') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash32Function_ptr&') + + ## Register a nested module for the namespace Function + + nested_module = module.add_cpp_namespace('Function') + register_types_ns3_Hash_Function(nested_module) + + +def register_types_ns3_Hash_Function(module): + root_module = module.get_root() + + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a [class] + module.add_class('Fnv1a', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32 [class] + module.add_class('Hash32', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64 [class] + module.add_class('Hash64', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3 [class] + module.add_class('Murmur3', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + def register_types_ns3_aodv(module): root_module = module.get_root() @@ -434,6 +476,7 @@ register_Ns3ByteTagListIteratorItem_methods(root_module, root_module['ns3::ByteTagList::Iterator::Item']) register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase']) register_Ns3EventId_methods(root_module, root_module['ns3::EventId']) + register_Ns3Hasher_methods(root_module, root_module['ns3::Hasher']) register_Ns3Inet6SocketAddress_methods(root_module, root_module['ns3::Inet6SocketAddress']) register_Ns3InetSocketAddress_methods(root_module, root_module['ns3::InetSocketAddress']) register_Ns3IntToType__0_methods(root_module, root_module['ns3::IntToType< 0 >']) @@ -487,6 +530,7 @@ register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter >']) + register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3Ipv4MulticastRoute_Ns3Empty_Ns3DefaultDeleter__lt__ns3Ipv4MulticastRoute__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Ipv4MulticastRoute, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3Ipv4Route_Ns3Empty_Ns3DefaultDeleter__lt__ns3Ipv4Route__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Ipv4Route, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3NixVector_Ns3Empty_Ns3DefaultDeleter__lt__ns3NixVector__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter >']) @@ -555,12 +599,17 @@ register_Ns3OutputStreamWrapper_methods(root_module, root_module['ns3::OutputStreamWrapper']) register_Ns3Packet_methods(root_module, root_module['ns3::Packet']) register_Ns3ParetoRandomVariable_methods(root_module, root_module['ns3::ParetoRandomVariable']) - register_Ns3TimeChecker_methods(root_module, root_module['ns3::TimeChecker']) register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue']) register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker']) register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue']) register_Ns3AddressChecker_methods(root_module, root_module['ns3::AddressChecker']) register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue']) + register_Ns3Ipv4ListRouting_methods(root_module, root_module['ns3::Ipv4ListRouting']) + register_Ns3HashImplementation_methods(root_module, root_module['ns3::Hash::Implementation']) + register_Ns3HashFunctionFnv1a_methods(root_module, root_module['ns3::Hash::Function::Fnv1a']) + register_Ns3HashFunctionHash32_methods(root_module, root_module['ns3::Hash::Function::Hash32']) + register_Ns3HashFunctionHash64_methods(root_module, root_module['ns3::Hash::Function::Hash64']) + register_Ns3HashFunctionMurmur3_methods(root_module, root_module['ns3::Hash::Function::Murmur3']) register_Ns3AodvDuplicatePacketDetection_methods(root_module, root_module['ns3::aodv::DuplicatePacketDetection']) register_Ns3AodvIdCache_methods(root_module, root_module['ns3::aodv::IdCache']) register_Ns3AodvNeighbors_methods(root_module, root_module['ns3::aodv::Neighbors']) @@ -1100,6 +1149,35 @@ is_const=True) return +def register_Ns3Hasher_methods(root_module, cls): + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Hasher const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hasher const &', 'arg0')]) + ## hash.h (module 'core'): ns3::Hasher::Hasher() [constructor] + cls.add_constructor([]) + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Ptr hp) [constructor] + cls.add_constructor([param('ns3::Ptr< ns3::Hash::Implementation >', 'hp')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(std::string const s) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(std::string const s) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): ns3::Hasher & ns3::Hasher::clear() [member function] + cls.add_method('clear', + 'ns3::Hasher &', + []) + return + def register_Ns3Inet6SocketAddress_methods(root_module, cls): ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(ns3::Inet6SocketAddress const & arg0) [copy constructor] cls.add_constructor([param('ns3::Inet6SocketAddress const &', 'arg0')]) @@ -1598,6 +1676,11 @@ 'bool', [], is_const=True) + ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsDocumentation() const [member function] + cls.add_method('IsDocumentation', + 'bool', + [], + is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsEqual(ns3::Ipv6Address const & other) const [member function] cls.add_method('IsEqual', 'bool', @@ -1637,16 +1720,36 @@ 'bool', [], is_const=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac16Address addr, ns3::Ipv6Address prefix) [member function] + cls.add_method('MakeAutoconfiguredAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac16Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac48Address addr, ns3::Ipv6Address prefix) [member function] cls.add_method('MakeAutoconfiguredAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac64Address addr, ns3::Ipv6Address prefix) [member function] + cls.add_method('MakeAutoconfiguredAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac64Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], + is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac16Address mac) [member function] + cls.add_method('MakeAutoconfiguredLinkLocalAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac16Address', 'mac')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac48Address mac) [member function] cls.add_method('MakeAutoconfiguredLinkLocalAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'mac')], is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac64Address mac) [member function] + cls.add_method('MakeAutoconfiguredLinkLocalAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac64Address', 'mac')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeIpv4MappedAddress(ns3::Ipv4Address addr) [member function] cls.add_method('MakeIpv4MappedAddress', 'ns3::Ipv6Address', @@ -2205,6 +2308,10 @@ cls.add_method('RemoveAll', 'void', []) + ## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Replace(ns3::Tag & tag) [member function] + cls.add_method('Replace', + 'bool', + [param('ns3::Tag &', 'tag')]) return def register_Ns3PacketTagListTagData_methods(root_module, cls): @@ -2541,6 +2648,11 @@ 'std::string', [], is_const=True) + ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetHash() const [member function] + cls.add_method('GetHash', + 'uint32_t', + [], + is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeId::GetName() const [member function] cls.add_method('GetName', 'std::string', @@ -2600,6 +2712,16 @@ 'bool', [param('std::string', 'name'), param('ns3::TypeId::AttributeInformation *', 'info', transfer_ownership=False)], is_const=True) + ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByHash(uint32_t hash) [member function] + cls.add_method('LookupByHash', + 'ns3::TypeId', + [param('uint32_t', 'hash')], + is_static=True) + ## type-id.h (module 'core'): static bool ns3::TypeId::LookupByHashFailSafe(uint32_t hash, ns3::TypeId * tid) [member function] + cls.add_method('LookupByHashFailSafe', + 'bool', + [param('uint32_t', 'hash'), param('ns3::TypeId *', 'tid')], + is_static=True) ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByName(std::string name) [member function] cls.add_method('LookupByName', 'ns3::TypeId', @@ -3342,6 +3464,18 @@ is_static=True) return +def register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter< ns3::Hash::Implementation > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + def register_Ns3SimpleRefCount__Ns3Ipv4MulticastRoute_Ns3Empty_Ns3DefaultDeleter__lt__ns3Ipv4MulticastRoute__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] cls.add_constructor([]) @@ -4159,11 +4293,26 @@ 'bool', [], is_const=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Max() [member function] + cls.add_method('Max', + 'ns3::Time', + [], + is_static=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Min() [member function] + cls.add_method('Min', + 'ns3::Time', + [], + is_static=True) ## nstime.h (module 'core'): static void ns3::Time::SetResolution(ns3::Time::Unit resolution) [member function] cls.add_method('SetResolution', 'void', [param('ns3::Time::Unit', 'resolution')], is_static=True) + ## nstime.h (module 'core'): static bool ns3::Time::StaticInit() [member function] + cls.add_method('StaticInit', + 'bool', + [], + is_static=True) ## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function] cls.add_method('To', 'ns3::int64x64_t', @@ -4710,10 +4859,18 @@ cls.add_method('SetNoMoreFragments', 'void', []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetNoOrder() [member function] + cls.add_method('SetNoOrder', + 'void', + []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetNoRetry() [member function] cls.add_method('SetNoRetry', 'void', []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetOrder() [member function] + cls.add_method('SetOrder', + 'void', + []) ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetProbeReq() [member function] cls.add_method('SetProbeReq', 'void', @@ -5636,6 +5793,11 @@ 'bool', [param('uint32_t', 'interface'), param('uint32_t', 'addressIndex')], is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): bool ns3::Ipv4::RemoveAddress(uint32_t interface, ns3::Ipv4Address address) [member function] + cls.add_method('RemoveAddress', + 'bool', + [param('uint32_t', 'interface'), param('ns3::Ipv4Address', 'address')], + is_pure_virtual=True, is_virtual=True) ## ipv4.h (module 'internet'): ns3::Ipv4Address ns3::Ipv4::SelectSourceAddress(ns3::Ptr device, ns3::Ipv4Address dst, ns3::Ipv4InterfaceAddress::InterfaceAddressScope_e scope) [member function] cls.add_method('SelectSourceAddress', 'ns3::Ipv4Address', @@ -5798,6 +5960,10 @@ cls.add_method('RemoveAddress', 'ns3::Ipv4InterfaceAddress', [param('uint32_t', 'index')]) + ## ipv4-interface.h (module 'internet'): ns3::Ipv4InterfaceAddress ns3::Ipv4Interface::RemoveAddress(ns3::Ipv4Address address) [member function] + cls.add_method('RemoveAddress', + 'ns3::Ipv4InterfaceAddress', + [param('ns3::Ipv4Address', 'address')]) ## ipv4-interface.h (module 'internet'): void ns3::Ipv4Interface::Send(ns3::Ptr p, ns3::Ipv4Address dest) [member function] cls.add_method('Send', 'void', @@ -5958,6 +6124,11 @@ 'bool', [param('uint32_t', 'interfaceIndex'), param('uint32_t', 'addressIndex')], is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::RemoveAddress(uint32_t interface, ns3::Ipv4Address address) [member function] + cls.add_method('RemoveAddress', + 'bool', + [param('uint32_t', 'interface'), param('ns3::Ipv4Address', 'address')], + is_virtual=True) ## ipv4-l3-protocol.h (module 'internet'): ns3::Ipv4Address ns3::Ipv4L3Protocol::SelectSourceAddress(ns3::Ptr device, ns3::Ipv4Address dst, ns3::Ipv4InterfaceAddress::InterfaceAddressScope_e scope) [member function] cls.add_method('SelectSourceAddress', 'ns3::Ipv4Address', @@ -6350,6 +6521,10 @@ cls.add_method('RemoveAddress', 'ns3::Ipv6InterfaceAddress', [param('uint32_t', 'index')]) + ## ipv6-interface.h (module 'internet'): ns3::Ipv6InterfaceAddress ns3::Ipv6Interface::RemoveAddress(ns3::Ipv6Address address) [member function] + cls.add_method('RemoveAddress', + 'ns3::Ipv6InterfaceAddress', + [param('ns3::Ipv6Address', 'address')]) ## ipv6-interface.h (module 'internet'): void ns3::Ipv6Interface::Send(ns3::Ptr p, ns3::Ipv6Address dest) [member function] cls.add_method('Send', 'void', @@ -7054,6 +7229,10 @@ cls.add_method('RemoveTrailer', 'uint32_t', [param('ns3::Trailer &', 'trailer')]) + ## packet.h (module 'network'): bool ns3::Packet::ReplacePacketTag(ns3::Tag & tag) [member function] + cls.add_method('ReplacePacketTag', + 'bool', + [param('ns3::Tag &', 'tag')]) ## packet.h (module 'network'): uint32_t ns3::Packet::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function] cls.add_method('Serialize', 'uint32_t', @@ -7108,13 +7287,6 @@ is_virtual=True) return -def register_Ns3TimeChecker_methods(root_module, cls): - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker() [constructor] - cls.add_constructor([]) - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker(ns3::TimeChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TimeChecker const &', 'arg0')]) - return - def register_Ns3TimeValue_methods(root_module, cls): ## nstime.h (module 'core'): ns3::TimeValue::TimeValue() [constructor] cls.add_constructor([]) @@ -7228,6 +7400,188 @@ [param('ns3::Address const &', 'value')]) return +def register_Ns3Ipv4ListRouting_methods(root_module, cls): + ## ipv4-list-routing.h (module 'internet'): ns3::Ipv4ListRouting::Ipv4ListRouting(ns3::Ipv4ListRouting const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv4ListRouting const &', 'arg0')]) + ## ipv4-list-routing.h (module 'internet'): ns3::Ipv4ListRouting::Ipv4ListRouting() [constructor] + cls.add_constructor([]) + ## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::AddRoutingProtocol(ns3::Ptr routingProtocol, int16_t priority) [member function] + cls.add_method('AddRoutingProtocol', + 'void', + [param('ns3::Ptr< ns3::Ipv4RoutingProtocol >', 'routingProtocol'), param('int16_t', 'priority')], + is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): uint32_t ns3::Ipv4ListRouting::GetNRoutingProtocols() const [member function] + cls.add_method('GetNRoutingProtocols', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): ns3::Ptr ns3::Ipv4ListRouting::GetRoutingProtocol(uint32_t index, int16_t & priority) const [member function] + cls.add_method('GetRoutingProtocol', + 'ns3::Ptr< ns3::Ipv4RoutingProtocol >', + [param('uint32_t', 'index'), param('int16_t &', 'priority', direction=2)], + is_const=True, is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): static ns3::TypeId ns3::Ipv4ListRouting::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::NotifyAddAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] + cls.add_method('NotifyAddAddress', + 'void', + [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], + is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::NotifyInterfaceDown(uint32_t interface) [member function] + cls.add_method('NotifyInterfaceDown', + 'void', + [param('uint32_t', 'interface')], + is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::NotifyInterfaceUp(uint32_t interface) [member function] + cls.add_method('NotifyInterfaceUp', + 'void', + [param('uint32_t', 'interface')], + is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::NotifyRemoveAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] + cls.add_method('NotifyRemoveAddress', + 'void', + [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], + is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::PrintRoutingTable(ns3::Ptr stream) const [member function] + cls.add_method('PrintRoutingTable', + 'void', + [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')], + is_const=True, is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): bool ns3::Ipv4ListRouting::RouteInput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr idev, ns3::Callback, ns3::Ptr, ns3::Ipv4Header const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> ucb, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback, ns3::Ipv4Header const&, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> ecb) [member function] + cls.add_method('RouteInput', + 'bool', + [param('ns3::Ptr< ns3::Packet const >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'lcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')], + is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): ns3::Ptr ns3::Ipv4ListRouting::RouteOutput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr oif, ns3::Socket::SocketErrno & sockerr) [member function] + cls.add_method('RouteOutput', + 'ns3::Ptr< ns3::Ipv4Route >', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice >', 'oif'), param('ns3::Socket::SocketErrno &', 'sockerr')], + is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::SetIpv4(ns3::Ptr ipv4) [member function] + cls.add_method('SetIpv4', + 'void', + [param('ns3::Ptr< ns3::Ipv4 >', 'ipv4')], + is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='protected', is_virtual=True) + ## ipv4-list-routing.h (module 'internet'): void ns3::Ipv4ListRouting::DoInitialize() [member function] + cls.add_method('DoInitialize', + 'void', + [], + visibility='protected', is_virtual=True) + return + +def register_Ns3HashImplementation_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation(ns3::Hash::Implementation const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Implementation const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation() [constructor] + cls.add_constructor([]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Implementation::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_pure_virtual=True, is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Implementation::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Implementation::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + return + +def register_Ns3HashFunctionFnv1a_methods(root_module, cls): + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a(ns3::Hash::Function::Fnv1a const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Fnv1a const &', 'arg0')]) + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a() [constructor] + cls.add_constructor([]) + ## hash-fnv.h (module 'core'): uint32_t ns3::Hash::Function::Fnv1a::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): uint64_t ns3::Hash::Function::Fnv1a::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): void ns3::Hash::Function::Fnv1a::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash32_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Function::Hash32 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash32 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Hash32Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash32Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash32::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash32::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash64_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Function::Hash64 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash64 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Hash64Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash64Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash64::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Function::Hash64::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash64::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionMurmur3_methods(root_module, cls): + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3(ns3::Hash::Function::Murmur3 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Murmur3 const &', 'arg0')]) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3() [constructor] + cls.add_constructor([]) + ## hash-murmur3.h (module 'core'): uint32_t ns3::Hash::Function::Murmur3::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): uint64_t ns3::Hash::Function::Murmur3::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): void ns3::Hash::Function::Murmur3::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + def register_Ns3AodvDuplicatePacketDetection_methods(root_module, cls): ## aodv-dpd.h (module 'aodv'): ns3::aodv::DuplicatePacketDetection::DuplicatePacketDetection(ns3::aodv::DuplicatePacketDetection const & arg0) [copy constructor] cls.add_constructor([param('ns3::aodv::DuplicatePacketDetection const &', 'arg0')]) @@ -8171,12 +8525,20 @@ def register_functions(root_module): module = root_module register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) + register_functions_ns3_Hash(module.get_submodule('Hash'), root_module) register_functions_ns3_aodv(module.get_submodule('aodv'), root_module) return def register_functions_ns3_FatalImpl(module, root_module): return +def register_functions_ns3_Hash(module, root_module): + register_functions_ns3_Hash_Function(module.get_submodule('Function'), root_module) + return + +def register_functions_ns3_Hash_Function(module, root_module): + return + def register_functions_ns3_aodv(module, root_module): return diff -Naur ns-3.17/src/aodv/helper/aodv-helper.h ns-3.18/src/aodv/helper/aodv-helper.h --- ns-3.17/src/aodv/helper/aodv-helper.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/aodv/helper/aodv-helper.h 2013-10-26 07:07:29.619364382 -0700 @@ -38,9 +38,9 @@ AodvHelper(); /** - * \internal * \returns pointer to clone of this OlsrHelper * + * \internal * This method is mainly for internal use by the other helpers; * clients are expected to free the dynamic memory allocated by this method */ @@ -52,7 +52,7 @@ * * This method will be called by ns3::InternetStackHelper::Install * - * TODO: support installing AODV on the subset of all available IP interfaces + * \todo support installing AODV on the subset of all available IP interfaces */ virtual Ptr Create (Ptr node) const; /** @@ -76,6 +76,7 @@ int64_t AssignStreams (NodeContainer c, int64_t stream); private: + /** the factory to create AODV routing object */ ObjectFactory m_agentFactory; }; diff -Naur ns-3.17/src/aodv/model/aodv-routing-protocol.cc ns-3.18/src/aodv/model/aodv-routing-protocol.cc --- ns-3.17/src/aodv/model/aodv-routing-protocol.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/aodv/model/aodv-routing-protocol.cc 2013-10-26 07:07:29.619364382 -0700 @@ -135,7 +135,7 @@ MaxQueueTime (Seconds (30)), DestinationOnly (false), GratuitousReply (true), - EnableHello (true), + EnableHello (false), m_routingTable (DeletePeriod), m_queue (MaxQueueLen, MaxQueueTime), m_requestId (0), @@ -147,12 +147,10 @@ m_rerrCount (0), m_htimer (Timer::CANCEL_ON_DESTROY), m_rreqRateLimitTimer (Timer::CANCEL_ON_DESTROY), - m_rerrRateLimitTimer (Timer::CANCEL_ON_DESTROY) + m_rerrRateLimitTimer (Timer::CANCEL_ON_DESTROY), + m_lastBcastTime (Seconds (0)) { - if (EnableHello) - { - m_nb.SetCallback (MakeCallback (&RoutingProtocol::SendRerrWhenBreaksLinkToNextHop, this)); - } + m_nb.SetCallback (MakeCallback (&RoutingProtocol::SendRerrWhenBreaksLinkToNextHop, this)); } TypeId @@ -334,6 +332,7 @@ NS_LOG_FUNCTION (this << header << (oif ? oif->GetIfIndex () : 0)); if (!p) { + NS_LOG_DEBUG("Packet is == 0"); return LoopbackRoute (header, oif); // later } if (m_socketAddresses.empty ()) @@ -368,6 +367,7 @@ // routed to loopback, received from loopback and passed to RouteInput (see below) uint32_t iif = (oif ? m_ipv4->GetInterfaceForDevice (oif) : -1); DeferredRouteOutputTag tag (iif); + NS_LOG_DEBUG ("Valid Route not found"); if (!p->PeekPacketTag (tag)) { p->AddPacketTag (tag); @@ -903,20 +903,19 @@ destination = iface.GetBroadcast (); } NS_LOG_DEBUG ("Send RREQ with id " << rreqHeader.GetId () << " to socket"); - socket->SendTo (packet, 0, InetSocketAddress (destination, AODV_PORT)); + m_lastBcastTime = Simulator::Now (); + Simulator::Schedule (Time (MilliSeconds (m_uniformRandomVariable->GetInteger (0, 10))), &RoutingProtocol::SendTo, this, socket, packet, destination); } ScheduleRreqRetry (dst); - if (EnableHello) - { - if (!m_htimer.IsRunning ()) - { - m_htimer.Cancel (); - m_htimer.Schedule (HelloInterval - Time (0.01 * MilliSeconds (m_uniformRandomVariable->GetInteger (0, 10)))); - } - } } void +RoutingProtocol::SendTo (Ptr socket, Ptr packet, Ipv4Address destination) +{ + socket->SendTo (packet, 0, InetSocketAddress (destination, AODV_PORT)); + +} +void RoutingProtocol::ScheduleRreqRetry (Ipv4Address dst) { NS_LOG_FUNCTION (this << dst); @@ -1101,7 +1100,32 @@ toOrigin.SetLifeTime (std::max (Time (2 * NetTraversalTime - 2 * hop * NodeTraversalTime), toOrigin.GetLifeTime ())); m_routingTable.Update (toOrigin); + //m_nb.Update (src, Time (AllowedHelloLoss * HelloInterval)); + } + + + RoutingTableEntry toNeighbor; + if (!m_routingTable.LookupRoute (src, toNeighbor)) + { + NS_LOG_DEBUG ("Neighbor:" << src << " not found in routing table. Creating an entry"); + Ptr dev = m_ipv4->GetNetDevice (m_ipv4->GetInterfaceForAddress (receiver)); + RoutingTableEntry newEntry (dev, src, false, rreqHeader.GetOriginSeqno (), + m_ipv4->GetAddress (m_ipv4->GetInterfaceForAddress (receiver), 0), + 1, src, ActiveRouteTimeout); + m_routingTable.AddRoute (newEntry); + } + else + { + toNeighbor.SetLifeTime (ActiveRouteTimeout); + toNeighbor.SetValidSeqNo (false); + toNeighbor.SetSeqNo (rreqHeader.GetOriginSeqno ()); + toNeighbor.SetFlag (VALID); + toNeighbor.SetOutputDevice (m_ipv4->GetNetDevice (m_ipv4->GetInterfaceForAddress (receiver))); + toNeighbor.SetInterface (m_ipv4->GetAddress (m_ipv4->GetInterfaceForAddress (receiver), 0)); + m_routingTable.Update (toNeighbor); } + m_nb.Update (src, Time (AllowedHelloLoss * HelloInterval)); + NS_LOG_LOGIC (receiver << " receive RREQ with hop count " << static_cast(rreqHeader.GetHopCount ()) << " ID " << rreqHeader.GetId () << " to destination " << rreqHeader.GetDst ()); @@ -1170,16 +1194,9 @@ { destination = iface.GetBroadcast (); } - socket->SendTo (packet, 0, InetSocketAddress (destination, AODV_PORT)); - } + m_lastBcastTime = Simulator::Now (); + Simulator::Schedule (Time (MilliSeconds (m_uniformRandomVariable->GetInteger (0, 10))), &RoutingProtocol::SendTo, this, socket, packet, destination); - if (EnableHello) - { - if (!m_htimer.IsRunning ()) - { - m_htimer.Cancel (); - m_htimer.Schedule (HelloInterval - Time (0.1 * MilliSeconds (m_uniformRandomVariable->GetInteger (0, 10)))); - } } } @@ -1539,10 +1556,20 @@ RoutingProtocol::HelloTimerExpire () { NS_LOG_FUNCTION (this); - SendHello (); + Time offset = Time (Seconds (0)); + if (m_lastBcastTime > Time (Seconds (0))) + { + offset = Simulator::Now () - m_lastBcastTime; + NS_LOG_DEBUG ("Hello deferred due to last bcast at:" << m_lastBcastTime); + } + else + { + SendHello (); + } m_htimer.Cancel (); - Time t = Time (0.01 * MilliSeconds (m_uniformRandomVariable->GetInteger (0, 100))); - m_htimer.Schedule (HelloInterval - t); + Time diff = HelloInterval - offset; + m_htimer.Schedule (std::max (Time (Seconds (0)), diff)); + m_lastBcastTime = Time (Seconds (0)); } void @@ -1598,7 +1625,8 @@ { destination = iface.GetBroadcast (); } - socket->SendTo (packet, 0, InetSocketAddress (destination, AODV_PORT)); + Time jitter = Time (MilliSeconds (m_uniformRandomVariable->GetInteger (0, 10))); + Simulator::Schedule (jitter, &RoutingProtocol::SendTo, this , socket, packet, destination); } } @@ -1757,7 +1785,7 @@ Ptr socket = FindSocketWithInterfaceAddress (toPrecursor.GetInterface ()); NS_ASSERT (socket); NS_LOG_LOGIC ("one precursor => unicast RERR to " << toPrecursor.GetDestination () << " from " << toPrecursor.GetInterface ().GetLocal ()); - socket->SendTo (packet, 0, InetSocketAddress (precursors.front (), AODV_PORT)); + Simulator::Schedule (Time (MilliSeconds (m_uniformRandomVariable->GetInteger (0, 10))), &RoutingProtocol::SendTo, this, socket, packet, precursors.front ()); m_rerrCount++; } return; @@ -1790,8 +1818,7 @@ { destination = i->GetBroadcast (); } - socket->SendTo (packet, 0, InetSocketAddress (destination, AODV_PORT)); - m_rerrCount++; + Simulator::Schedule (Time (MilliSeconds (m_uniformRandomVariable->GetInteger (0, 10))), &RoutingProtocol::SendTo, this, socket, packet, destination); } } diff -Naur ns-3.17/src/aodv/model/aodv-routing-protocol.h ns-3.18/src/aodv/model/aodv-routing-protocol.h --- ns-3.17/src/aodv/model/aodv-routing-protocol.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/aodv/model/aodv-routing-protocol.h 2013-10-26 07:07:29.619364382 -0700 @@ -248,6 +248,8 @@ void SendRerrWhenNoRouteToForward (Ipv4Address dst, uint32_t dstSeqNo, Ipv4Address origin); //\} + void SendTo (Ptr socket, Ptr packet, Ipv4Address destination); + /// Hello timer Timer m_htimer; /// Schedule next send of hello message @@ -269,6 +271,8 @@ /// Provides uniform random variables. Ptr m_uniformRandomVariable; + /// Keep track of the last bcast time + Time m_lastBcastTime; }; } diff -Naur ns-3.17/src/aodv/test/aodv-chain-regression-test-0-0.pcap ns-3.18/src/aodv/test/aodv-chain-regression-test-0-0.pcap --- ns-3.17/src/aodv/test/aodv-chain-regression-test-0-0.pcap 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/aodv/test/aodv-chain-regression-test-0-0.pcap 2013-10-26 07:07:29.635364382 -0700 @@ -1,180 +1,159 @@ -òiXXE4 +òiXXE4   (  -XXE4 +xXXE4   (  -TTE0 - - - -} -@@< +L@@<  - Ԁ @@  +ۑԀ@@   - @@<  +ѡ@@<  - ԀhTT<0E0 +~Ԁ^TT<0E0    -+xԀ@@0 ++nԀ@@   -P@@<@ +@@<@  -`Ԁxx<@ET@ +ԀAxx<0ET@  -Ԁ|@@P +5Ԁ @@P  -KԀxx<`ET? - -Ԁxx<pET= - - ԀH^TTE0 - - - -xx<PET@ +Ԁ xx<`ET?  -Ԁxx<ET? - -kTT`E0 +HTT@E0    -Ԁpxx<ET= +Ԁxx<pET= + +Ԁxx<PET@ + +Ԁxx<ET? + +Ԁpxx<ET=  -Ԁ>^TTE0 +Ԁ((TTE0    -ATTpE0 +TT`E0    -xx<ET@ +xx<pET@  -Ԁxx<ET? +Ԁxx<ET?  -Ԁpxx<ET= +Ԁpxx<ET=  -ԀN]TTE0 +ԀTTE0    ->TTE0 + TTE0    -xx<ET@ +xx<ET@  -Ԁxx<ET? +Ԁxx<ET?  -Ԁxx<ET= +Ԁxx<ET=  -ԀP[TTE0 +ԀTTE0    -8;TTE0  +TTE0    -xx<ET -@ +xx<ET @  -Ԁxx< ET -? +Ԁxx<ET ?  -xx< ET -? +xx<ET ?  -\xx< ET -? +`xx<ET ?  -q -xx< ET -? +xx<ET ?  -[xx< ET -? +xx<ET ?  -^xx< ET -? +!xx<ET ?  -/xx< ET -? +*xx<ET ?  -0TT<0E0 - - - -0ԀDXTT@E0 ++TT E0    -x7TTE0  +FTT<0E0 + + + +FԀ TTE0 +    -XXE4  +XXE4       -BXXPE4 - -   - -UTT`E0  +/TT@E0    -4TTE0 +3XXPE4 + +   + +(#TTE0    -STTpE0 - +;TT`E0     -1TTE0 +TTE0    -QTTE0  +;TTpE0 +    -4 XXE4 +'X XXE4      -B6 XXE4  +X XXE4       -b/TT E0 +@ TTE0    -QTTE0  +a TTE0     -+TT0E0 + < TT E0    - PTTE0 + h| TTE0     - +TT@E0 - - - - \ No newline at end of file + \ No newline at end of file diff -Naur ns-3.17/src/aodv/test/aodv-chain-regression-test-1-0.pcap ns-3.18/src/aodv/test/aodv-chain-regression-test-1-0.pcap --- ns-3.17/src/aodv/test/aodv-chain-regression-test-1-0.pcap 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/aodv/test/aodv-chain-regression-test-1-0.pcap 2013-10-26 07:07:29.635364382 -0700 @@ -1,222 +1,199 @@ -òi'XXE4 +òi`XXE4   (  -IXXE4 +XXE4   (  -XXE4 +I<XXE4   (  -pTTE0 - - - -@@< +N@@<  -G Ԁ @@  +Ԁ@@   - -@@< +܏@@<  - -Ԁ TT<0E0 +ԀTT<0E0    -+ ԀI @@  ++Ԁ?@@   -K @@<  +A@@<  -[ Ԁ TT<0E0 +QԀբTT<0E0    -+ԀZ@@0 ++Ԁ@@   -@@<@ +@@<@  -Ԁfxx<@ET@ +Ԁxx<0ET@  -vԀ @@P + Ԁ@@P  -@@<@ +@@<@  -Ԁxx<`ET? +ԀTxx<`ET?  -ԀN@@P - -Ԁkxx<`ET> +IԀԀ"xx<`ET>  - Ԁxx<pET> +Ԁxx<pET>  -ԀAxx<pET= +Ԁxx<pET=  -6Ԁ]TTE0 - - - -oTTE0 - - - -xx<PET@ +Ԁxx<PET@  -Ԁxx<ET? +Ԁxx<ET?  - ԀԀYxx<ET> + Ԁxx<ET> + +ԀYxx<ET>  -iԀxx<ET= +iԀxx<ET=  -Ԁ]TTE0 +Ԁ'TTE0    -oTTE0 +0TTE0    -ATTpE0 +@TT`E0    -xx<ET@ +xx<pET@  -Ԁxx<ET? +Ԁxx<ET?  - Ԁxx<ET> + Ԁxx<ET>  -ԀYxx<ET> +ԀYxx<ET>  -iԀxx<ET= +iԀxx<ET=  -Ԁ\TTE0 +ԀTTE0    -lTTE0 + TTE0    -v?TTE0 +( +TTE0    -xx<ET@ +xx<ET@  -Ԁxx<ET? +Ԁxx<ET?  - Ԁxx<ET> + Ԁxx<ET>  -Ԁxx<ET> +Ԁxx<ET>  -Ԁxx<ET= +Ԁxx<ET=  - ԀZTTE0 + ԀTTE0    -plTTE0 +DTTE0    -;TTE0  +TTE0    -xx<ET -@ +xx<ET @  -Ԁxx< ET -? +Ԁxx<ET ?  -Mxx< ET -? +Vxx<ET ?  -xx< ET -? +xx<ET ?  - xx< ET -? +1xx<ET ?  -xx< ET -? +6xx<ET ?  -xx< ET -? + xx<ET ?  -.xx< ET -? +)xx<ET ?  -g0TT<0E0 - - - -,1ԀWTT@E0 +N+TT E0    -8TTE0  +3FTT<0E0 + + + +FԀ( +TTE0 +    -XXE4  +XXE4       -XXPE4 - -   - -~TTT`E0  +p/TT@E0    -5TTE0 +X3XXPE4 + +   + +#TTE0    -RTTpE0 - +(;TT`E0     -82TTE0 +XTTE0    -@QTTE0  +(;TTpE0 +    -5 XXE4 +X XXE4      -5 XXE4  + XXE4       -/TT E0 +@A TTE0    -6QTTE0  +` TTE0     - ,TT0E0 + X= TT E0    - PTTE0 + { TTE0     - ,TT@E0 - - - - \ No newline at end of file + \ No newline at end of file diff -Naur ns-3.17/src/aodv/test/aodv-chain-regression-test-2-0.pcap ns-3.18/src/aodv/test/aodv-chain-regression-test-2-0.pcap --- ns-3.17/src/aodv/test/aodv-chain-regression-test-2-0.pcap 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/aodv/test/aodv-chain-regression-test-2-0.pcap 2013-10-26 07:07:29.635364382 -0700 @@ -1,200 +1,161 @@ -òiXXE4 +òixXXE4   (  -XXE4 +;XXE4   (  ->XXE4 +aPXXE4   (  -@@< +H^TTE0 + + + +t@@<   - Ԁ&@@  +vԀ@@0  -H@@< +މ@@<  -Ԁ - TT<0E0 +ԀaTT<@E0    -+ Ԁz @@  ++qԀI@@   -} -@@< +L@@<  - -ԀG TT<0E0 +\ԀTT<0E0    -+ Ԁ @@  ++ۑԀ@@   - ԀhTT<0E0 +~Ԁ^TT<0E0    -+P@@<@ ++@@<@  -Ԁ|@@P +5Ԁ @@P  -@@<@ ++@@<@  -KԀxx<`ET? +Ԁ xx<`ET?  -Ԁ@@P +Ԁ@@P  -@@<@ +@@<P  -Ԁxx<`ET> +Ԁjxx<`ET>  -Ԁ:@@P +_Ԁ@@`  - Ԁ=xx<`ET= +Ԁxx<pET=  -Ԁxx<pET? +OԀxx<ET?  -Ԁ*xx<pET> +Ԁxx<pET>  -Ԁxx<pET= +Ԁxx<pET=  -H^TTE0 - - - -TTE0 - - - -0oTTE0 - - - -Ԁxx<ET? +Ԁxx<ET?  -Ԁ,xx<ET> +Ԁ,xx<ET>  !Ԁxx<ET=  NԀCxx<ET?  -SԀxx<ET> +SԀxx<ET>  -Ԁpxx<ET= +Ԁpxx<ET=  ->^TTE0 +((TTE0    -TTE0 - - - -nTTE0 +0TTE0    -Ԁxx<ET? +@TTE0 + + + +Ԁxx<ET?  -Ԁ,xx<ET> +Ԁ,xx<ET>  -!Ԁxx<ET= +!Ԁxx<ET=  NԀCxx<ET?  -SԀxx<ET> +SԀxx<ET>  -Ԁpxx<ET= +Ԁpxx<ET=  -N]TTE0 +TTE0    -FTTE0 - - - -jlTTE0 +` TTE0    -Ԁxx<ET? +HTTE0 + + + +Ԁxx<ET?  -Ԁ,xx<ET> +Ԁ,xx<ET>  -!Ԁxx<ET= +!Ԁxx<ET=  NԀxx<ET?  -Ԁxx<ET> +Ԁxx<ET>  -Ԁxx<ET= +Ԁxx<ET=  -P[TTE0 +TTE0    -TTE0 +CTTE0 + + + +ATTTE0    -kTTE0 +xTTE0    -hTT E0 +` TT E0    -eTT0E0 +7TT0E0    -TT<@E0 - - - -TT<@E0 - - - -TT<@E0 - - - -TT<@E0 - - - -#TT<@E0 - - - -d-TT<@E0 - - - -8TT<@E0 - - - -bTTPE0  +` TT@E0    -h_TT`E0 - +CTTPE0     -n^TTpE0  - - - - ZTTE0  + 7TT`E0 +    diff -Naur ns-3.17/src/aodv/test/aodv-chain-regression-test-3-0.pcap ns-3.18/src/aodv/test/aodv-chain-regression-test-3-0.pcap --- ns-3.17/src/aodv/test/aodv-chain-regression-test-3-0.pcap 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/aodv/test/aodv-chain-regression-test-3-0.pcap 2013-10-26 07:07:29.635364382 -0700 @@ -1,67 +1,62 @@ -òiXXE4 +òiI<XXE4   (  -XXE4 +OXXE4   (  -@@ +]TTE0 + + + +s@@  -y@@< +t@@<   -&ԀTT<E0 +tԀuTT<E0    -+Ԁ@@  ++uԀK@@0  -@@< +N@@<  -ԀTT<0E0 +^ԀيTT<@E0    -+G Ԁ @@  ++Ԁ@@   - -Ԁ TT<0E0 +ԀTT<0E0    -+@@<@ ++@@<@  -ԀN@@P +IԀ@@P  -p@@<@ +'@@<P  -Ԁkxx<`ET> +Ԁ"xx<`ET>  -{Ԁ@@P +2Ԁ@@`  -@@<  +@@<   -Ԁxx<`ET= +ԀDxx<pET=  -yԀSxx<0ET@ +9Ԁxx<0ET@  -cԀxx<pET? +#Ԁxx<ET?  - Ԁxx<pET> +Ԁxx<pET>  -TT@E0 +TT@E0    -@TTE0 - - - -oTTE0 - - - - Ԁxx<ET> + Ԁxx<ET>  ԀCxx<ET=  @@ -69,116 +64,116 @@  !Ԁxx<ET?  -ԀYxx<ET> - -TT`E0 +ԀYxx<ET>  +0TTE0 +  - -,TTE0 + +1@TTE0    -oTTE0 - +XTT`E0 +  - - Ԁxx<ET> + + Ԁxx<ET>  -ԀCxx<ET= +ԀCxx<ET=  7Ԁxx<pET@  !Ԁxx<ET?  -ԀYxx<ET> - -TTE0 +ԀYxx<ET>  + TTE0 +  - -TTE0 + +HTTE0    -lTTE0 - +TTE0 +  - - Ԁxx<ET> + + Ԁxx<ET>  -ԀCxx<ET= +ԀCxx<ET=  7Ԁxx<ET@  !Ԁxx<ET?  -Ԁxx<ET> +Ԁxx<ET>  -vTTE0 +DTTE0 + + + +STTE0 + + + +TTE0    -(TTE0 +q_TT E0    -plTTE0 - - - -,TTE0  +TTE0     -TT E0 +STT0E0    -TTE0 +TTE0     -JTT0E0 +HTT@E0    -kTT<@E0 +z TT<PE0     -0ԀTTE0  +? ԀTTE0     -LTTPE0  +[TT`E0 +    -TTE0  +TTE0     -TT`E0 - +I<TTpE0     -VTTE0  +TTE0     - TTpE0  + YcTTE0     - bTTE0 + XTTE0    - * TTE0  - - - - \ No newline at end of file + \ No newline at end of file diff -Naur ns-3.17/src/aodv/test/aodv-chain-regression-test-4-0.pcap ns-3.18/src/aodv/test/aodv-chain-regression-test-4-0.pcap --- ns-3.17/src/aodv/test/aodv-chain-regression-test-4-0.pcap 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/aodv/test/aodv-chain-regression-test-4-0.pcap 2013-10-26 07:07:29.635364382 -0700 @@ -1,136 +1,135 @@ -òi>XXE4 +òiaPXXE4   (  -`@@ +H^TTE0 + + + +s@@  -@@< +t@@<   -ԀHTT<E0 +tԀ;uTT<E0    -+ Ԁ&@@  ++vԀ@@0  -Ԁ - TT<0E0 +ԀaTT<@E0    -+@@<@ ++@@<P  -Ԁ:@@P +_Ԁ@@`  -\@@<  +@@<   - Ԁ=xx<`ET= +Ԁxx<pET=  -MԀxx<0ET@ + Ԁ[xx<0ET@  -Ԁxx<pET? +OԀxx<ET?  -TT@E0 +XTT@E0    -TTE0 - - - -!Ԁxx<ET= +!Ԁxx<ET=   ԀYxx<PET@  NԀCxx<ET?  -vTT`E0 - - - -TTE0 +@TTE0    -!Ԁxx<ET= +TT`E0 + + + +!Ԁxx<ET=   ԀYxx<pET@  NԀCxx<ET?  -TTE0 - - - -FTTE0 +HTTE0    -!Ԁxx<ET= +TTE0 + + + +!Ԁxx<ET=   ԀYxx<ET@  NԀxx<ET?  -TTE0 +ATTTE0 + + + + TTE0    -TTE0 +_TT E0    -TTE0  + TTE0     - TT E0 +ATTT0E0    -TTE0 +TTE0     -TT0E0 +HTT@E0    -TT<@E0 + TT<PE0     -Ԁ TTE0  + Ԁ@TTE0     -TTPE0  +\TT`E0 +    -TTE0  +XTTE0     -0TT`E0 - +<TTpE0     -ήTTE0  +TTE0     -\ TTpE0  + cTTE0     - ڬTTE0 + TTE0    - TTE0  - - - - \ No newline at end of file + \ No newline at end of file diff -Naur ns-3.17/src/aodv/test/aodv-regression.cc ns-3.18/src/aodv/test/aodv-regression.cc --- ns-3.17/src/aodv/test/aodv-regression.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/aodv/test/aodv-regression.cc 2013-10-26 07:07:29.635364382 -0700 @@ -57,11 +57,14 @@ SetDataDir (NS_TEST_SOURCEDIR); // General RREQ-RREP-RRER test case AddTestCase (new ChainRegressionTest ("aodv-chain-regression-test"), TestCase::QUICK); - // Bug 606 test case, should crash if bug is not fixed + /// \internal + /// \bugid{606} test case, should crash if bug is not fixed AddTestCase (new ChainRegressionTest ("bug-606-test", Seconds (10), 3, Seconds (1)), TestCase::QUICK); - // Bug 772 UDP test case + /// \internal + /// \bugid{772} UDP test case AddTestCase (new Bug772ChainTest ("udp-chain-test", "ns3::UdpSocketFactory", Seconds (3), 10), TestCase::QUICK); - // Bug 772 TCP test case + /// \internal + /// \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); @@ -161,10 +164,10 @@ internetStack.Install (*m_nodes); streamsUsed += internetStack.AssignStreams (*m_nodes, streamsUsed); // InternetStack uses m_size more streams - NS_TEST_ASSERT_MSG_EQ (streamsUsed, (devices.GetN () * 6) + m_size, "Stream assignment mismatch"); + NS_TEST_ASSERT_MSG_EQ (streamsUsed, (devices.GetN () * 8) + m_size, "Stream assignment mismatch"); streamsUsed += aodv.AssignStreams (*m_nodes, streamsUsed); // AODV uses m_size more streams - NS_TEST_ASSERT_MSG_EQ (streamsUsed, ((devices.GetN () * 6) + (2*m_size)), "Stream assignment mismatch"); + NS_TEST_ASSERT_MSG_EQ (streamsUsed, ((devices.GetN () * 8) + (2*m_size)), "Stream assignment mismatch"); Ipv4AddressHelper address; address.SetBase ("10.1.1.0", "255.255.255.0"); diff -Naur ns-3.17/src/aodv/test/aodv-regression.h ns-3.18/src/aodv/test/aodv-regression.h --- ns-3.17/src/aodv/test/aodv-regression.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/aodv/test/aodv-regression.h 2013-10-26 07:07:29.635364382 -0700 @@ -165,7 +165,7 @@ ~ChainRegressionTest (); private: - /// XXX It is important to have pointers here + /// \internal It is important to have pointers here NodeContainer * m_nodes; /// PCAP file names prefix diff -Naur ns-3.17/src/aodv/test/bug-606-test-0-0.pcap ns-3.18/src/aodv/test/bug-606-test-0-0.pcap --- ns-3.17/src/aodv/test/bug-606-test-0-0.pcap 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/aodv/test/bug-606-test-0-0.pcap 2013-10-26 07:07:29.635364382 -0700 @@ -1,135 +1,125 @@ -òiXXE4 +òiXXE4   (  -XXE4 + XXE4   (  -O@@< +3)@@<  -rԀ@@  +V*ԀI@@   -@@< +I@@<  -ZԀ:TT<0E0 +JԀyKTT<0E0    -+JԀ@@  ++KԀ1W@@   -! @@<@ +3X@@<@  -1 Ԁ xx<0ET@ +CXԀXxx<0ET@  -t -ԀN @@P +YԀHqTT@E0 + + + +Ty@@P  - ԀQ xx<`ET? +#zԀW{xx<`ET?  -Ԁxx<pET? +|Ԁ}xx<pET?  -Ԁ8TT@E0 +}Ԁxx<PET@  - - -XTTE0 +Ԁxx<ET? + +!Ԁ1xx<ET? + +AԀTTE0    -xx<PET@ - -Ԁxx<ET? - -!Ԁxx<ET? - -/Ԁ.TT`E0 +HqTT`E0    -TTE0 - - - -@@p +(#@@p  -@@< +*$@@<  -Ԁxx<ET@ +:$Ԁ$xx<ET@  -Ԁ\@@ +%Ԁ/TTE0 + + + +fE@@  -+Ԁxx<ET? +5FԀGxx<ET?  -@@< +RTTE0 + + + +\@@<  -QԀF @@ +]Ԁ|@@  -h @@< +}@@<  - -Ԁ7 xx<ET? +}Ԁ~xx<ET?  -G ԀTTE0 +~Ԁxx<ET@  - - -xTT E0 +Ԁxx< ET? + +!Ԁxx<0ET? + +ԀTT@E0    -xx<ET@ - -Ԁxx<0ET? - -!ԀCxx<@ET? - -SԀTTE0 +eTTE0    -0TTPE0 - - - -@@ +(#@@  -RTTE0 +0uTTE0     @@  -ĸTTE0  +UTTE0     @@  -TT E0 +HqTT E0    @@0  -XX@E4 +XX@E4      -:TTPE0 - - - -TT`E0 +'TTPE0    - fTTpE0 + (#TT`E0    - 4 XXE4 + @ XXpE4      diff -Naur ns-3.17/src/aodv/test/bug-606-test-1-0.pcap ns-3.18/src/aodv/test/bug-606-test-1-0.pcap --- ns-3.17/src/aodv/test/bug-606-test-1-0.pcap 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/aodv/test/bug-606-test-1-0.pcap 2013-10-26 07:07:29.635364382 -0700 @@ -1,169 +1,149 @@ -òi'XXE4 +òi`XXE4   (  -IXXE4 +H XXE4   (  -l@@ +(@@  -@@< +(@@<  -Ԁ5TT<E0 +o)Ԁ*TT<E0    -+EԀ@@  ++)*ԀYI@@   -@@< +\J@@<  --ԀTT<0E0 +lJԀJTT<0E0    -+vԀ@@  ++KԀW@@   -@@<@ +W@@<@  -^ Ԁ8 -xx<0ET@ +pXԀYxx<0ET@  -H -Ԁ -@@P +YԀqTT@E0 + + + +x@@P  - @@<  +y@@<   - Ԁ xx<`ET? +yԀzxx<`ET?  - Ԁyxx<0ET@ +{Ԁ|xx<0ET@  -Ԁxx<pET? +|Ԁ%}xx<pET?  -ԀTT@E0 +~Ԁ(TT@E0    -TT@E0 +xx<PET@  - - -TTE0 - - - -xx<PET@ - -Ԁxx<ET? +Ԁxx<ET?   Ԁxx<PET@  -Ԁgxx<ET? - -[ԀpTT`E0 +Ԁyxx<ET?  +mԀ0TTE0 +  - -TT`E0 + +qTT`E0    -tTTE0 - +8TT`E0 +  - -p@@p + +#@@p  -@@< +#@@<  -?Ԁxx<ET@ +g$Ԁ%xx<ET@  -Ԁ@@ +%Ԁp/TTE0 + + + +D@@  -@@<p +E@@<p  -Ԁxx<ET? +FԀFxx<ET?  -ԀQ@@ +GԀRTTE0 + + + +[@@  -@@< +[@@<  -;Ԁxx<ET@ +T\ԀI]xx<ET@  -%Ԁ@@ +Y]Ԁ|@@  - @@< +}@@<  - Ԁ -xx<ET? +}Ԁ2~xx<ET?  -t ԀTTE0 +'ԀTTE0    -TTE0 +xx<ET@  - - -TT E0 - - - -xx<ET@ - -Ԁxx<0ET? +Ԁxx< ET?   Ԁxx<ET@  -Ԁxx<@ET? - -ԀTTE0 +ԀLxx<0ET?  +@Ԁ0TT@E0 +  - -TTE0 + +fTTE0    -TTPE0 - +TTE0 +  - -jTT`E0 + +0TTPE0    -TTpE0 +'TT`E0    -8 -@@ - -DTTE0  +'TTpE0    -8 -@@ - -:TTE0 - +TTE0    -8 -@@ - -TTE0  +p/TTE0     - 8 -@@ - - TTE0  + +TTE0 +    diff -Naur ns-3.17/src/aodv/test/bug-606-test-2-0.pcap ns-3.18/src/aodv/test/bug-606-test-2-0.pcap --- ns-3.17/src/aodv/test/bug-606-test-2-0.pcap 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/aodv/test/bug-606-test-2-0.pcap 2013-10-26 07:07:29.635364382 -0700 @@ -1,119 +1,113 @@ -òiXXE4 +òi XXE4   (  -@@ +0(@@  -O@@< +3)@@<  -_ԀTT<E0 +C)Ԁ)TT<E0    -+rԀ@@  ++V*ԀI@@   -ZԀ:TT<0E0 +JԀyKTT<0E0    -+! @@<@ ++3X@@<@  -t -ԀN @@P +YԀTy@@P  -p @@<  +vy@@<   - ԀQ xx<`ET? +#zԀW{xx<`ET?  -a Ԁ xx<0ET@ +g{Ԁ{xx<0ET@  -Ԁxx<pET? +|Ԁ}xx<pET?  -TT@E0 +TT@E0    -XTTE0 - - - -Ԁxx<ET? +Ԁxx<ET?  Ԁ,xx<PET@  -!Ԁxx<ET? +!Ԁ1xx<ET?  -TT`E0 +TTE0 + + + +TT`E0    -TTE0 +*$@@< + +%Ԁ/TTE0    -@@< - -Ԁ\@@ +fE@@  -~@@<p +E@@<p  -+Ԁxx<ET? +5FԀGxx<ET?  -Ԁ@@ +GԀ[@@  -@@< +\@@<  -Ԁ]xx<ET@ +(\Ԁ\xx<ET@  -QԀF @@ +]Ԁ|@@  - -Ԁ7 xx<ET? +}Ԁ~xx<ET?  -XTTE0 +TTE0    -xTT E0 - - - -Ԁxx<0ET? +Ԁxx< ET?  Ԁ,xx<ET@  -!ԀCxx<@ET? +!Ԁxx<0ET?  -TTE0 - - - -0TTPE0 +TT@E0    -VTTE0  +pTTE0 + + + +ȯTTE0     -TTE0 +@TTE0     -ԭTTE0  +TTE0     -TTE0  +TTE0     -ިTTE0  +XTTE0     - @TT E0 + @TT E0    diff -Naur ns-3.17/src/aodv/test/bug-772.h ns-3.18/src/aodv/test/bug-772.h --- ns-3.17/src/aodv/test/bug-772.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/aodv/test/bug-772.h 2013-10-26 07:07:29.635364382 -0700 @@ -31,9 +31,9 @@ /** * \ingroup aodv * - * \brief AODV deferred route lookup test case (see bug 772) + * \brief AODV deferred route lookup test case (see \bugid{772}) * - * TODO: describe expected packet trace + * \todo describe expected packet trace */ class Bug772ChainTest : public TestCase { @@ -50,7 +50,7 @@ ~Bug772ChainTest (); private: - /// XXX It is important to have pointers here + /// \internal It is important to have pointers here NodeContainer * m_nodes; /// PCAP file names prefix diff -Naur ns-3.17/src/aodv/test/tcp-chain-test-0-0.pcap ns-3.18/src/aodv/test/tcp-chain-test-0-0.pcap --- ns-3.17/src/aodv/test/tcp-chain-test-0-0.pcap 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/aodv/test/tcp-chain-test-0-0.pcap 2013-10-26 07:07:29.635364382 -0700 @@ -1,298 +1,300 @@ -òiTTE0 +òiXTTE0    -8DTTE0 +TTE0    -XXE4 +@XXE4   (  -BXXE4 +pGXXE4   (  -@@<  +G(@@<   -Ԁ@@0 +)Ԁ-@@0  -@@<  +-@@<   -xԀ TT<@E0 +.Ԁ/TT<@E0    - Ԁ!@@0 + /ԀR@@0  -Q"@@<P +S@@<P  -a"Ԁ"LL<@E(@ +TԀVTLL<@E(@   - Pl#ԀX$@@` + PUԀ/Y@@`  -'%Ԁ#&LL<pE(? +YԀZLL<pE(?   - Pj>Ԁ ?LL<E(8 + PԀ+LL<E(8  - P?Ԁj?LL<PE(@ + P;ԀLL<PE(@   - P'@Ԁ@LL<E(? + PFԀLL<E(?   - PTTE0 - - - -BTT`E0 - - - -Idd<pE@@ + PIdd<`E@@   - PtMԀPdd<E@? + PtMԀPdd<E@?   - PqԀarLL<E(8 + PqԀarLL<E(8  - PqrԀrdd<E@@ + PqrԀrdd<pE@@   - PCvԀydd<E@? + PCvԀydd<E@?   - Pnz<E@ + Pz<E@   - 1P}<E@ + 1P|<E@   - 1P~<E@ + 1P<E@   - 1PԀ<E? + 1PԀM<E?   - 1Ph<E? + 1PXԀLL<E(8 + + + P +Ԁߓdd<E@@   - 1PԀ9LL<E(8 + PdԀΚdd<E@? +  - - PIԀߓdd<E@@ + PYdd<E@@   - PdԀΚdd<E@? + P_dd<E@@   - PPdd<E@ @ + PԀNdd<E@?   - PDdd<E@ @ + PǦ<E @   - PɢԀ3dd<E@ ? + P,Ԁ<E ?   - P<E + PQԀLL< E(8 + + + PԀdd<E@ @   - PԀR< E + aPTԀdd<0E@ ?   - PԀLL<0E(8 + aPdd<E@ @ +  - - PԀdd<E@ @ + yPadd<E@ @   - aPTԀdd<@E@ ? + yPԀPdd<@E@ ?   - aP.dd<E@ @ + yP<E @   - yPdd<E@ @ + Pc<E @   - yP%Ԁdd<PE@ ? + P*<E @   - yPP<E @ + PԀ<PE ?   - PԀ<`E ? + Pa<PE ?   - P *Ԁ*LL<pE(8 + PԀLL<`E(8  -  yP*Ԁ#:Ԁ:LL<E(8 +  yPԀ%ԀZ&LL<pE(8  - P:Ԁ' dd<E@@ + Pj&Ԁ' dd<E@ @   - PD+ Ԁ. dd<E@? + PD+ Ԁ. dd<E@ ?   - P9/ dd<E@@ + Po/ dd<E@@   - )P3 dd<E@@ + )P24 dd<E@@   - )P97 Ԁ: dd<E@? + )P7 Ԁ!; dd<E@?   - )P; < E@ + )P; <E@   - AP> < E@ + APX> <E@   - APCA < E@ + AP@ <E@   - APB ԀC <E? + AP*B ԀtC <E?   - AP^a Ԁb LL<E(8 - - - APb Ԁq dd<0E@@ + APE <E?   - P4u ԀVu dd<@E@@ + AP{ Ԁ{ LL<E(8 + + + AP{ Ԁq dd< E@@   - P y dd<@E@@ + P4u ԀVu dd<0E@@   - P5} dd<@E@@ + PAy dd<0E@@   - P Ԁ$ dd<E@? + P~ dd<0E@@   - P <PE@ + P" Ԁ dd<E@?   - P7 <PE@ + PD <@E@   - Pe <PE@ + P Ԁ <E?   - Pʊ Ԁ <E? + P <E?   - P <E? + P <E?   - P ԀR LL<E( 8 + P Ԁ LL<E( 8  - Pb Ԁ ԀW LL<E( + P Ԁy Ԁ LL<E( 8  - qPg Ԁ dd<`E@@ + qP+ Ԁ dd<PE@@ + + + qP$ Ԁ dd<E@?   - qP$ Ԁ dd< E@? + qPO dd<`E@@   - qPF dd<pE@@ + P dd<`E@@   - P dd<pE@@ + PF Ԁ dd< E@?   - P Ԁ dd<0E@? + P <pE@   - P <E@ + P <pE@   - P <E@ + P <pE@   - Pt <E@ + P Ԁ] <0E?   - P Ԁ# <@E? + P <0E?   - P~ Ԁ LL<PE( 8 + P ԀH LL<@E( 8  - P0 ԀTT`E0 + PX ԀTTE0 + + + +?TTPE0    -O@@ - -R@@<p - -bԀ.dd<E@@ +Odd<E@@   - !PԀE@@ - -dd<E@@ + !PԀ>dd<`E@?   - 9Pdd<E@@ + !Pdd<E@@   - 9Pddd<E@@ + 9Pdd<E@@   - 9PԀSdd<E@? + 9PGԀdd<pE@?   - 9P<E@ + 9Pr<E@   - QPKԀdd<E@? + QP <E@   - 9P*<E? + QPy<E@   - QPj<E? + QPԀ(<E?   - QP}<E? + QP;<E?   - QP?TTE0 - - - - dd<E@@ + QP@@ + +@@< + +Ԁdd<E@@   - PԀdd<E@? + PdԀh@@ + +7Ԁdd<E@?   - Pdd<E@@ + Pdd<E@@   - P%Ԁdd<E@? + PMԀdd<E@?    P \ No newline at end of file diff -Naur ns-3.17/src/aodv/test/tcp-chain-test-9-0.pcap ns-3.18/src/aodv/test/tcp-chain-test-9-0.pcap --- ns-3.17/src/aodv/test/tcp-chain-test-9-0.pcap 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/aodv/test/tcp-chain-test-9-0.pcap 2013-10-26 07:07:29.635364382 -0700 @@ -1,69 +1,65 @@ -òi8TTE0 +òidTTE0 + + + + pTTE0     -xTTE0 - - - - @@ - -@@  +@@  +ԀNTT< E0 + +@  -@@< + + w@@0 +  - - $@@< +@@<   - Ԁ{ TT<0E0 + FԀ8TT<@E0      -_ Ԁ -Ԁx TT<@E0 +_HԀ!@@<P +  +4ԀDTT`E0  -@ + + + 0oTT E0 + + +  - @@<P -  -Ԁ4Ԁ\5LL<`E(8 + +8ԀڵLL<pE(8   - Pl5Ԁ5@@  + PԀ2@@0  - )7@@<p + 5@@<    -97Ԁ7LL<0E(@ +EԀLL<@E(@  - PC8Ԁ8LL<E(? + PPԀLL<E(?  - PrFԀGLL<E(8 + PԀ2LL<E(8   - P$GԀTT@E0 - - - - - - -:TTE0 - - - - gԀkjdd<E@8 + PBԀgԀkjdd<E@8    P{jԀjLL<PE(@ @@ -72,22 +68,22 @@  PkԀLlLL<E(?  - PԀgdd<E@8 + PԀ^dd<E@8   - PwԀ՗Ԁ<E8 + PnԀԀ<E8   - 1P/Ԁ}LL<`E(@ + 1PԀ>LL<`E(@  - P:Ԁ$LL<E(? + PԀLL<E(?  - PԀ[dd<E@8 + PԀ[dd<E@8   - PkԀ;Ԁdd<E@ 8 + PkԀ;Ԁdd<E@8    PԀLL<pE(@ @@ -99,11 +95,11 @@  PLL< E(?  - PԀ<0E -8 + PԀ:<0E 8   - PԀԀKdd<@E@ 8 + PJԀԀKdd<@E@ +8    aP[ԀLL<E(@ @@ -112,132 +108,165 @@   yPfԀ>LL<PE(?  -  yPT*Ԁ-dd<`E@ 8 - +  yPjLL<PE(?  - yP-Ԁs1Ԁ2<pE 8 - + +  yPLL<PE(?  - P2Ԁ3LL<E(@ + +  yP{LL<PE(? + + +  yPmLL<PE(? + + +  yPԀ=LL<PE(?  - P3Ԁ4LL<E(? +  yPԀLL<PE(?  - PD Ԁ;H dd<E@8 +  yPdd<`E@ 8   - PKH ԀQ ԀT dd<E@8 + yPԀ@<pE 8   - )PT ԀKU LL<E(@ + PPԀLL<E(@  - APV ԀV LL<E(? + P[ԀE LL<E(?  - AP\ Ԁ] <E8 + PD Ԁ;H dd<E@ 8   - AP^ Ԁ Ԁ+ dd<E@8 + PKH ԀIR ԀU dd<E@8   - P; Ԁ LL<E( @ + )PU ԀV LL<E(@ + + + APV ԀW LL<E(? + + + APY LL<E(?  - PF Ԁ0 LL<E( ? + APZ LL<E(?  - P+ LL<E( ? + APk_ LL<E(?  - Pژ LL<E( ? + APd LL<E(?  - P+ Ԁ dd<E@8 + APr Ԁu LL<E(? + + + APx <E8   - P Ԁ< Ԁ <E8 + AP%x Ԁ Ԁ+ dd<E@8   - P Ԁ LL<E( -@ + P; Ԁ LL<E( @  - qP ԀC LL<E( -? + PF Ԁ LL<E( ?  - qP Ԁ dd< E@8 + PL Ԁ dd<E@8   - qP+ ԀD Ԁ dd<0E@8 + Pƶ Ԁ Ԁ <E8   - P Ԁ LL<E( @ + P Ԁ` LL<E( +@  - P Ԁ LL<@E( ? + qP Ԁ LL<E( +?  - P LL<@E( ? + qP Ԁ dd< E@8 +  - - P ԀL <PE8 + qP+ Ԁ ԀB dd<0E@8   - P\ ԀTTE0  + PR Ԁ LL<E( @  - + P] Ԁ LL<@E( ?  - + + P LL<@E( ?  -TT`E0 - - - - 1@@<p + + P Ԁ> <PE8 + + + PN Ԁ@@<`   -Ԁ@@ +Ԁ@@p   -@@< +@@<   - Ԁedd<E@8 + dԀdd<E@8   - !PuԀ@@ + !PԀ"LL<E( @  - - ;@@< -  + + 9PrLL<E( @  -KԀLL<E( @ + + 9PLL<E( @  - 9PqԀK@@ + 9PԀ^@@  -Ԁdd<E@8 +ԀCdd<E@8   - 9P ԀlԀ<E8 + 9PSԀL Ԁ <E8   - QPԀ LL< E(@ + QP Ԁ LL<E( @ + + +  PԀ`TTE0 + + + + `gTTE0  -  P Ԁ2Ԁdd<E@8 + + + + +hԀfldd<E@8   - PԀLL<0E(@ + PvlԀփ@@  + + + ل@@< +  + +ԀvLL<0E(@  -  PԀԀdd<E@8 +  P3ԀԀDdd<E@8   - P,ԀzLL<@E(@ + PTԀLL<@E(@  -  P7Ԁ \ No newline at end of file +  P_Ԁ \ No newline at end of file diff -Naur ns-3.17/src/aodv/test/udp-chain-test-0-0.pcap ns-3.18/src/aodv/test/udp-chain-test-0-0.pcap --- ns-3.17/src/aodv/test/udp-chain-test-0-0.pcap 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/aodv/test/udp-chain-test-0-0.pcap 2013-10-26 07:07:29.635364382 -0700 @@ -1,75 +1,75 @@ -òixiTT E0 - - - -P-TT +òiTT E0    -8hTT E0 +TT E0 + + + +pTT E0    --TT +TT E0    -IXX E4 +YXX E4   (  -2KXX +yXX E4   (  -d@@< + @@< 0  -IfԀ g@@ +xԀ |@@ @  -<pE8 +6Ԁ|iԀNp<pE8   - NԀ1Ԁ<E8 + ^pԀ1Ԁ<E8    Ԁ!Ԁ<E8 @@ -61,36 +61,35 @@   Ԁ Ԁ <E8   -  Ԁ ;TTE0 +  ԀuTTE0    - Ԁs<E -8 + Ԁs<E 8   - Ԁ0~TT0E0 + Ԁ8TT0E0     -K@@< +V@@<   -pSԀ/T@@ +^^Ԁ}@@   -QT@@<@ +}@@<@   - TԀ3\<E 8 + ~Ԁͅ<E 8   - C\ԀԀS< E 8 + ݅Ԁ%!Ԁ'< E 8   - cԀqԀC<0E 8 + (ԀqԀC<0E 8    SԀa# diff -Naur ns-3.17/src/applications/bindings/modulegen__gcc_ILP32.py ns-3.18/src/applications/bindings/modulegen__gcc_ILP32.py --- ns-3.17/src/applications/bindings/modulegen__gcc_ILP32.py 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/applications/bindings/modulegen__gcc_ILP32.py 2013-10-26 07:07:30.587364407 -0700 @@ -40,8 +40,8 @@ module.add_class('AttributeConstructionList', import_from_module='ns.core') ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::Item [struct] module.add_class('Item', import_from_module='ns.core', outer_class=root_module['ns3::AttributeConstructionList']) - ## average.h (module 'tools'): ns3::Average [class] - module.add_class('Average', import_from_module='ns.tools', template_parameters=['double']) + ## average.h (module 'stats'): ns3::Average [class] + module.add_class('Average', import_from_module='ns.stats', template_parameters=['double']) ## buffer.h (module 'network'): ns3::Buffer [class] module.add_class('Buffer', import_from_module='ns.network') ## buffer.h (module 'network'): ns3::Buffer::Iterator [class] @@ -66,8 +66,12 @@ module.add_class('DataOutputCallback', allow_subclassing=True, import_from_module='ns.stats') ## data-rate.h (module 'network'): ns3::DataRate [class] module.add_class('DataRate', import_from_module='ns.network') + ## delay-jitter-estimation.h (module 'network'): ns3::DelayJitterEstimation [class] + module.add_class('DelayJitterEstimation', import_from_module='ns.network') ## event-id.h (module 'core'): ns3::EventId [class] module.add_class('EventId', import_from_module='ns.core') + ## hash.h (module 'core'): ns3::Hasher [class] + module.add_class('Hasher', import_from_module='ns.core') ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress [class] module.add_class('Inet6SocketAddress', import_from_module='ns.network') ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress [class] @@ -88,6 +92,10 @@ root_module['ns3::Ipv6Address'].implicitly_converts_to(root_module['ns3::Address']) ## ipv6-address.h (module 'network'): ns3::Ipv6Prefix [class] module.add_class('Ipv6Prefix', import_from_module='ns.network') + ## mac16-address.h (module 'network'): ns3::Mac16Address [class] + module.add_class('Mac16Address', import_from_module='ns.network') + ## mac16-address.h (module 'network'): ns3::Mac16Address [class] + root_module['ns3::Mac16Address'].implicitly_converts_to(root_module['ns3::Address']) ## mac48-address.h (module 'network'): ns3::Mac48Address [class] module.add_class('Mac48Address', import_from_module='ns.network') ## mac48-address.h (module 'network'): ns3::Mac48Address [class] @@ -136,6 +144,8 @@ module.add_class('PacketTagList', import_from_module='ns.network') ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData [struct] module.add_class('TagData', import_from_module='ns.network', outer_class=root_module['ns3::PacketTagList']) + ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData_e [enumeration] + module.add_enum('TagData_e', ['MAX_SIZE'], outer_class=root_module['ns3::PacketTagList::TagData'], import_from_module='ns.network') ## packetbb.h (module 'network'): ns3::PbbAddressTlvBlock [class] module.add_class('PbbAddressTlvBlock', import_from_module='ns.network') ## packetbb.h (module 'network'): ns3::PbbTlvBlock [class] @@ -150,6 +160,8 @@ module.add_class('PcapHelperForDevice', allow_subclassing=True, import_from_module='ns.network') ## ping6-helper.h (module 'applications'): ns3::Ping6Helper [class] module.add_class('Ping6Helper') + ## radvd-helper.h (module 'applications'): ns3::RadvdHelper [class] + module.add_class('RadvdHelper') ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Object', 'ns3::ObjectBase', 'ns3::ObjectDeleter'], parent=root_module['ns3::ObjectBase'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simulator.h (module 'core'): ns3::Simulator [class] @@ -238,6 +250,8 @@ module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::CallbackImplBase', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::EventImpl', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] + module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Hash::Implementation', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::NixVector', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] @@ -324,6 +338,8 @@ module.add_class('ConstantRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## data-calculator.h (module 'stats'): ns3::DataCalculator [class] module.add_class('DataCalculator', import_from_module='ns.stats', parent=root_module['ns3::Object']) + ## data-collection-object.h (module 'stats'): ns3::DataCollectionObject [class] + module.add_class('DataCollectionObject', import_from_module='ns.stats', parent=root_module['ns3::Object']) ## data-output-interface.h (module 'stats'): ns3::DataOutputInterface [class] module.add_class('DataOutputInterface', import_from_module='ns.stats', parent=root_module['ns3::Object']) ## data-rate.h (module 'network'): ns3::DataRateChecker [class] @@ -332,12 +348,18 @@ module.add_class('DataRateValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue']) ## random-variable-stream.h (module 'core'): ns3::DeterministicRandomVariable [class] module.add_class('DeterministicRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) + ## double.h (module 'core'): ns3::DoubleValue [class] + module.add_class('DoubleValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## drop-tail-queue.h (module 'network'): ns3::DropTailQueue [class] module.add_class('DropTailQueue', import_from_module='ns.network', parent=root_module['ns3::Queue']) ## random-variable-stream.h (module 'core'): ns3::EmpiricalRandomVariable [class] module.add_class('EmpiricalRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## attribute.h (module 'core'): ns3::EmptyAttributeValue [class] module.add_class('EmptyAttributeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) + ## enum.h (module 'core'): ns3::EnumChecker [class] + module.add_class('EnumChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) + ## enum.h (module 'core'): ns3::EnumValue [class] + module.add_class('EnumValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## random-variable-stream.h (module 'core'): ns3::ErlangRandomVariable [class] module.add_class('ErlangRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## error-model.h (module 'network'): ns3::ErrorModel [class] @@ -352,6 +374,8 @@ module.add_class('ExponentialRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## random-variable-stream.h (module 'core'): ns3::GammaRandomVariable [class] module.add_class('GammaRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) + ## integer.h (module 'core'): ns3::IntegerValue [class] + module.add_class('IntegerValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## ipv4-address.h (module 'network'): ns3::Ipv4AddressChecker [class] module.add_class('Ipv4AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker']) ## ipv4-address.h (module 'network'): ns3::Ipv4AddressValue [class] @@ -372,12 +396,22 @@ module.add_class('ListErrorModel', import_from_module='ns.network', parent=root_module['ns3::ErrorModel']) ## random-variable-stream.h (module 'core'): ns3::LogNormalRandomVariable [class] module.add_class('LogNormalRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) + ## mac16-address.h (module 'network'): ns3::Mac16AddressChecker [class] + module.add_class('Mac16AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker']) + ## mac16-address.h (module 'network'): ns3::Mac16AddressValue [class] + module.add_class('Mac16AddressValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue']) ## mac48-address.h (module 'network'): ns3::Mac48AddressChecker [class] module.add_class('Mac48AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker']) ## mac48-address.h (module 'network'): ns3::Mac48AddressValue [class] module.add_class('Mac48AddressValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue']) + ## mac64-address.h (module 'network'): ns3::Mac64AddressChecker [class] + module.add_class('Mac64AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker']) + ## mac64-address.h (module 'network'): ns3::Mac64AddressValue [class] + module.add_class('Mac64AddressValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue']) ## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator [class] module.add_class('MinMaxAvgTotalCalculator', import_from_module='ns.stats', template_parameters=['double'], parent=[root_module['ns3::DataCalculator'], root_module['ns3::StatisticalSummary']]) + ## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator [class] + module.add_class('MinMaxAvgTotalCalculator', import_from_module='ns.stats', template_parameters=['unsigned int'], parent=[root_module['ns3::DataCalculator'], root_module['ns3::StatisticalSummary']]) ## net-device.h (module 'network'): ns3::NetDevice [class] module.add_class('NetDevice', import_from_module='ns.network', parent=root_module['ns3::Object']) ## net-device.h (module 'network'): ns3::NetDevice::PacketType [enumeration] @@ -400,6 +434,8 @@ module.add_class('Packet', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter >']) ## packet-sink.h (module 'applications'): ns3::PacketSink [class] module.add_class('PacketSink', parent=root_module['ns3::Application']) + ## packet-data-calculators.h (module 'network'): ns3::PacketSizeMinMaxAvgTotalCalculator [class] + module.add_class('PacketSizeMinMaxAvgTotalCalculator', import_from_module='ns.network', parent=root_module['ns3::MinMaxAvgTotalCalculator< unsigned int >']) ## packet-socket.h (module 'network'): ns3::PacketSocket [class] module.add_class('PacketSocket', import_from_module='ns.network', parent=root_module['ns3::Socket']) ## packet-socket-factory.h (module 'network'): ns3::PacketSocketFactory [class] @@ -424,6 +460,8 @@ module.add_class('PbbTlv', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::PbbTlv, ns3::empty, ns3::DefaultDeleter >']) ## ping6.h (module 'applications'): ns3::Ping6 [class] module.add_class('Ping6', parent=root_module['ns3::Application']) + ## probe.h (module 'stats'): ns3::Probe [class] + module.add_class('Probe', import_from_module='ns.stats', parent=root_module['ns3::DataCollectionObject']) ## radvd.h (module 'applications'): ns3::Radvd [class] module.add_class('Radvd', parent=root_module['ns3::Application']) ## radvd-interface.h (module 'applications'): ns3::RadvdInterface [class] @@ -440,8 +478,6 @@ module.add_class('SimpleChannel', import_from_module='ns.network', parent=root_module['ns3::Channel']) ## simple-net-device.h (module 'network'): ns3::SimpleNetDevice [class] module.add_class('SimpleNetDevice', import_from_module='ns.network', parent=root_module['ns3::NetDevice']) - ## nstime.h (module 'core'): ns3::TimeChecker [class] - module.add_class('TimeChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) ## nstime.h (module 'core'): ns3::TimeValue [class] module.add_class('TimeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## type-id.h (module 'core'): ns3::TypeIdChecker [class] @@ -458,14 +494,24 @@ module.add_class('UdpServer', parent=root_module['ns3::Application']) ## udp-trace-client.h (module 'applications'): ns3::UdpTraceClient [class] module.add_class('UdpTraceClient', parent=root_module['ns3::Application']) + ## uinteger.h (module 'core'): ns3::UintegerValue [class] + module.add_class('UintegerValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## v4ping.h (module 'applications'): ns3::V4Ping [class] module.add_class('V4Ping', parent=root_module['ns3::Application']) ## address.h (module 'network'): ns3::AddressChecker [class] module.add_class('AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker']) ## address.h (module 'network'): ns3::AddressValue [class] module.add_class('AddressValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue']) + ## application-packet-probe.h (module 'applications'): ns3::ApplicationPacketProbe [class] + module.add_class('ApplicationPacketProbe', parent=root_module['ns3::Probe']) ## error-model.h (module 'network'): ns3::BurstErrorModel [class] module.add_class('BurstErrorModel', import_from_module='ns.network', parent=root_module['ns3::ErrorModel']) + ## basic-data-calculators.h (module 'stats'): ns3::CounterCalculator [class] + module.add_class('CounterCalculator', import_from_module='ns.stats', template_parameters=['unsigned int'], parent=root_module['ns3::DataCalculator']) + ## packet-data-calculators.h (module 'network'): ns3::PacketCounterCalculator [class] + module.add_class('PacketCounterCalculator', import_from_module='ns.network', parent=root_module['ns3::CounterCalculator< unsigned int >']) + ## packet-probe.h (module 'network'): ns3::PacketProbe [class] + module.add_class('PacketProbe', import_from_module='ns.network', parent=root_module['ns3::Probe']) ## packetbb.h (module 'network'): ns3::PbbAddressTlv [class] module.add_class('PbbAddressTlv', import_from_module='ns.network', parent=root_module['ns3::PbbTlv']) module.add_container('std::vector< ns3::Ipv6Address >', 'ns3::Ipv6Address', container_type='vector') @@ -473,6 +519,9 @@ module.add_container('std::list< unsigned int >', 'unsigned int', container_type='list') module.add_container('std::list< ns3::Ptr< ns3::Socket > >', 'ns3::Ptr< ns3::Socket >', container_type='list') module.add_container('std::list< ns3::Ptr< ns3::RadvdPrefix > >', 'ns3::Ptr< ns3::RadvdPrefix >', container_type='list') + typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ns3::GenericPhyTxEndCallback') + typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >*', 'ns3::GenericPhyTxEndCallback*') + typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >&', 'ns3::GenericPhyTxEndCallback&') typehandlers.add_type_alias('ns3::SequenceNumber< short unsigned int, short int >', 'ns3::SequenceNumber16') typehandlers.add_type_alias('ns3::SequenceNumber< short unsigned int, short int >*', 'ns3::SequenceNumber16*') typehandlers.add_type_alias('ns3::SequenceNumber< short unsigned int, short int >&', 'ns3::SequenceNumber16&') @@ -488,9 +537,6 @@ typehandlers.add_type_alias('ns3::Callback< bool, ns3::Ptr< ns3::Packet >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ns3::GenericPhyTxStartCallback') typehandlers.add_type_alias('ns3::Callback< bool, ns3::Ptr< ns3::Packet >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >*', 'ns3::GenericPhyTxStartCallback*') typehandlers.add_type_alias('ns3::Callback< bool, ns3::Ptr< ns3::Packet >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >&', 'ns3::GenericPhyTxStartCallback&') - typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ns3::GenericPhyTxEndCallback') - typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >*', 'ns3::GenericPhyTxEndCallback*') - typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >&', 'ns3::GenericPhyTxEndCallback&') typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ns3::GenericPhyRxEndOkCallback') typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >*', 'ns3::GenericPhyRxEndOkCallback*') typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >&', 'ns3::GenericPhyRxEndOkCallback&') @@ -501,20 +547,66 @@ register_types_ns3_FatalImpl(nested_module) + ## Register a nested module for the namespace Hash + + nested_module = module.add_cpp_namespace('Hash') + register_types_ns3_Hash(nested_module) + + ## Register a nested module for the namespace addressUtils nested_module = module.add_cpp_namespace('addressUtils') register_types_ns3_addressUtils(nested_module) + + ## Register a nested module for the namespace internal + + nested_module = module.add_cpp_namespace('internal') + register_types_ns3_internal(nested_module) + def register_types_ns3_FatalImpl(module): root_module = module.get_root() +def register_types_ns3_Hash(module): + root_module = module.get_root() + + ## hash-function.h (module 'core'): ns3::Hash::Implementation [class] + module.add_class('Implementation', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash32Function_ptr') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash32Function_ptr*') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash32Function_ptr&') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash64Function_ptr') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash64Function_ptr*') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash64Function_ptr&') + + ## Register a nested module for the namespace Function + + nested_module = module.add_cpp_namespace('Function') + register_types_ns3_Hash_Function(nested_module) + + +def register_types_ns3_Hash_Function(module): + root_module = module.get_root() + + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a [class] + module.add_class('Fnv1a', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32 [class] + module.add_class('Hash32', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64 [class] + module.add_class('Hash64', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3 [class] + module.add_class('Murmur3', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + def register_types_ns3_addressUtils(module): root_module = module.get_root() +def register_types_ns3_internal(module): + root_module = module.get_root() + + def register_methods(root_module): register_Ns3Address_methods(root_module, root_module['ns3::Address']) register_Ns3ApplicationContainer_methods(root_module, root_module['ns3::ApplicationContainer']) @@ -536,13 +628,16 @@ register_Ns3ChannelList_methods(root_module, root_module['ns3::ChannelList']) register_Ns3DataOutputCallback_methods(root_module, root_module['ns3::DataOutputCallback']) register_Ns3DataRate_methods(root_module, root_module['ns3::DataRate']) + register_Ns3DelayJitterEstimation_methods(root_module, root_module['ns3::DelayJitterEstimation']) register_Ns3EventId_methods(root_module, root_module['ns3::EventId']) + register_Ns3Hasher_methods(root_module, root_module['ns3::Hasher']) register_Ns3Inet6SocketAddress_methods(root_module, root_module['ns3::Inet6SocketAddress']) register_Ns3InetSocketAddress_methods(root_module, root_module['ns3::InetSocketAddress']) register_Ns3Ipv4Address_methods(root_module, root_module['ns3::Ipv4Address']) register_Ns3Ipv4Mask_methods(root_module, root_module['ns3::Ipv4Mask']) register_Ns3Ipv6Address_methods(root_module, root_module['ns3::Ipv6Address']) register_Ns3Ipv6Prefix_methods(root_module, root_module['ns3::Ipv6Prefix']) + register_Ns3Mac16Address_methods(root_module, root_module['ns3::Mac16Address']) register_Ns3Mac48Address_methods(root_module, root_module['ns3::Mac48Address']) register_Ns3Mac64Address_methods(root_module, root_module['ns3::Mac64Address']) register_Ns3NetDeviceContainer_methods(root_module, root_module['ns3::NetDeviceContainer']) @@ -569,6 +664,7 @@ register_Ns3PcapHelper_methods(root_module, root_module['ns3::PcapHelper']) register_Ns3PcapHelperForDevice_methods(root_module, root_module['ns3::PcapHelperForDevice']) register_Ns3Ping6Helper_methods(root_module, root_module['ns3::Ping6Helper']) + register_Ns3RadvdHelper_methods(root_module, root_module['ns3::RadvdHelper']) register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, root_module['ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter >']) register_Ns3Simulator_methods(root_module, root_module['ns3::Simulator']) register_Ns3StatisticalSummary_methods(root_module, root_module['ns3::StatisticalSummary']) @@ -608,6 +704,7 @@ register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter >']) + register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3NixVector_Ns3Empty_Ns3DefaultDeleter__lt__ns3NixVector__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3OutputStreamWrapper_Ns3Empty_Ns3DefaultDeleter__lt__ns3OutputStreamWrapper__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3Packet_Ns3Empty_Ns3DefaultDeleter__lt__ns3Packet__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter >']) @@ -647,13 +744,17 @@ register_Ns3Channel_methods(root_module, root_module['ns3::Channel']) register_Ns3ConstantRandomVariable_methods(root_module, root_module['ns3::ConstantRandomVariable']) register_Ns3DataCalculator_methods(root_module, root_module['ns3::DataCalculator']) + register_Ns3DataCollectionObject_methods(root_module, root_module['ns3::DataCollectionObject']) register_Ns3DataOutputInterface_methods(root_module, root_module['ns3::DataOutputInterface']) register_Ns3DataRateChecker_methods(root_module, root_module['ns3::DataRateChecker']) register_Ns3DataRateValue_methods(root_module, root_module['ns3::DataRateValue']) register_Ns3DeterministicRandomVariable_methods(root_module, root_module['ns3::DeterministicRandomVariable']) + register_Ns3DoubleValue_methods(root_module, root_module['ns3::DoubleValue']) register_Ns3DropTailQueue_methods(root_module, root_module['ns3::DropTailQueue']) register_Ns3EmpiricalRandomVariable_methods(root_module, root_module['ns3::EmpiricalRandomVariable']) register_Ns3EmptyAttributeValue_methods(root_module, root_module['ns3::EmptyAttributeValue']) + register_Ns3EnumChecker_methods(root_module, root_module['ns3::EnumChecker']) + register_Ns3EnumValue_methods(root_module, root_module['ns3::EnumValue']) register_Ns3ErlangRandomVariable_methods(root_module, root_module['ns3::ErlangRandomVariable']) register_Ns3ErrorModel_methods(root_module, root_module['ns3::ErrorModel']) register_Ns3EthernetHeader_methods(root_module, root_module['ns3::EthernetHeader']) @@ -661,6 +762,7 @@ register_Ns3EventImpl_methods(root_module, root_module['ns3::EventImpl']) register_Ns3ExponentialRandomVariable_methods(root_module, root_module['ns3::ExponentialRandomVariable']) register_Ns3GammaRandomVariable_methods(root_module, root_module['ns3::GammaRandomVariable']) + register_Ns3IntegerValue_methods(root_module, root_module['ns3::IntegerValue']) register_Ns3Ipv4AddressChecker_methods(root_module, root_module['ns3::Ipv4AddressChecker']) register_Ns3Ipv4AddressValue_methods(root_module, root_module['ns3::Ipv4AddressValue']) register_Ns3Ipv4MaskChecker_methods(root_module, root_module['ns3::Ipv4MaskChecker']) @@ -671,9 +773,14 @@ register_Ns3Ipv6PrefixValue_methods(root_module, root_module['ns3::Ipv6PrefixValue']) register_Ns3ListErrorModel_methods(root_module, root_module['ns3::ListErrorModel']) register_Ns3LogNormalRandomVariable_methods(root_module, root_module['ns3::LogNormalRandomVariable']) + register_Ns3Mac16AddressChecker_methods(root_module, root_module['ns3::Mac16AddressChecker']) + register_Ns3Mac16AddressValue_methods(root_module, root_module['ns3::Mac16AddressValue']) register_Ns3Mac48AddressChecker_methods(root_module, root_module['ns3::Mac48AddressChecker']) register_Ns3Mac48AddressValue_methods(root_module, root_module['ns3::Mac48AddressValue']) + register_Ns3Mac64AddressChecker_methods(root_module, root_module['ns3::Mac64AddressChecker']) + register_Ns3Mac64AddressValue_methods(root_module, root_module['ns3::Mac64AddressValue']) register_Ns3MinMaxAvgTotalCalculator__Double_methods(root_module, root_module['ns3::MinMaxAvgTotalCalculator< double >']) + register_Ns3MinMaxAvgTotalCalculator__Unsigned_int_methods(root_module, root_module['ns3::MinMaxAvgTotalCalculator< unsigned int >']) register_Ns3NetDevice_methods(root_module, root_module['ns3::NetDevice']) register_Ns3NixVector_methods(root_module, root_module['ns3::NixVector']) register_Ns3Node_methods(root_module, root_module['ns3::Node']) @@ -684,6 +791,7 @@ register_Ns3OutputStreamWrapper_methods(root_module, root_module['ns3::OutputStreamWrapper']) register_Ns3Packet_methods(root_module, root_module['ns3::Packet']) register_Ns3PacketSink_methods(root_module, root_module['ns3::PacketSink']) + register_Ns3PacketSizeMinMaxAvgTotalCalculator_methods(root_module, root_module['ns3::PacketSizeMinMaxAvgTotalCalculator']) register_Ns3PacketSocket_methods(root_module, root_module['ns3::PacketSocket']) register_Ns3PacketSocketFactory_methods(root_module, root_module['ns3::PacketSocketFactory']) register_Ns3ParetoRandomVariable_methods(root_module, root_module['ns3::ParetoRandomVariable']) @@ -696,6 +804,7 @@ register_Ns3PbbPacket_methods(root_module, root_module['ns3::PbbPacket']) register_Ns3PbbTlv_methods(root_module, root_module['ns3::PbbTlv']) register_Ns3Ping6_methods(root_module, root_module['ns3::Ping6']) + register_Ns3Probe_methods(root_module, root_module['ns3::Probe']) register_Ns3Radvd_methods(root_module, root_module['ns3::Radvd']) register_Ns3RadvdInterface_methods(root_module, root_module['ns3::RadvdInterface']) register_Ns3RadvdPrefix_methods(root_module, root_module['ns3::RadvdPrefix']) @@ -703,7 +812,6 @@ register_Ns3ReceiveListErrorModel_methods(root_module, root_module['ns3::ReceiveListErrorModel']) register_Ns3SimpleChannel_methods(root_module, root_module['ns3::SimpleChannel']) register_Ns3SimpleNetDevice_methods(root_module, root_module['ns3::SimpleNetDevice']) - register_Ns3TimeChecker_methods(root_module, root_module['ns3::TimeChecker']) register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue']) register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker']) register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue']) @@ -712,11 +820,21 @@ register_Ns3UdpEchoServer_methods(root_module, root_module['ns3::UdpEchoServer']) register_Ns3UdpServer_methods(root_module, root_module['ns3::UdpServer']) register_Ns3UdpTraceClient_methods(root_module, root_module['ns3::UdpTraceClient']) + register_Ns3UintegerValue_methods(root_module, root_module['ns3::UintegerValue']) register_Ns3V4Ping_methods(root_module, root_module['ns3::V4Ping']) register_Ns3AddressChecker_methods(root_module, root_module['ns3::AddressChecker']) register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue']) + register_Ns3ApplicationPacketProbe_methods(root_module, root_module['ns3::ApplicationPacketProbe']) register_Ns3BurstErrorModel_methods(root_module, root_module['ns3::BurstErrorModel']) + register_Ns3CounterCalculator__Unsigned_int_methods(root_module, root_module['ns3::CounterCalculator< unsigned int >']) + register_Ns3PacketCounterCalculator_methods(root_module, root_module['ns3::PacketCounterCalculator']) + register_Ns3PacketProbe_methods(root_module, root_module['ns3::PacketProbe']) register_Ns3PbbAddressTlv_methods(root_module, root_module['ns3::PbbAddressTlv']) + register_Ns3HashImplementation_methods(root_module, root_module['ns3::Hash::Implementation']) + register_Ns3HashFunctionFnv1a_methods(root_module, root_module['ns3::Hash::Function::Fnv1a']) + register_Ns3HashFunctionHash32_methods(root_module, root_module['ns3::Hash::Function::Hash32']) + register_Ns3HashFunctionHash64_methods(root_module, root_module['ns3::Hash::Function::Hash64']) + register_Ns3HashFunctionMurmur3_methods(root_module, root_module['ns3::Hash::Function::Murmur3']) return def register_Ns3Address_methods(root_module, cls): @@ -881,42 +999,42 @@ cls.add_method('CreateFileStream', 'ns3::Ptr< ns3::OutputStreamWrapper >', [param('std::string', 'filename'), param('std::_Ios_Openmode', 'filemode', default_value='std::ios_base::out')]) - ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultDequeueSinkWithContext(ns3::Ptr file, std::string context, ns3::Ptr p) [member function] + ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultDequeueSinkWithContext(ns3::Ptr file, std::string context, ns3::Ptr p) [member function] cls.add_method('DefaultDequeueSinkWithContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('std::string', 'context'), param('ns3::Ptr< ns3::Packet const >', 'p')], is_static=True) - ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultDequeueSinkWithoutContext(ns3::Ptr file, ns3::Ptr p) [member function] + ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultDequeueSinkWithoutContext(ns3::Ptr file, ns3::Ptr p) [member function] cls.add_method('DefaultDequeueSinkWithoutContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('ns3::Ptr< ns3::Packet const >', 'p')], is_static=True) - ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultDropSinkWithContext(ns3::Ptr file, std::string context, ns3::Ptr p) [member function] + ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultDropSinkWithContext(ns3::Ptr file, std::string context, ns3::Ptr p) [member function] cls.add_method('DefaultDropSinkWithContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('std::string', 'context'), param('ns3::Ptr< ns3::Packet const >', 'p')], is_static=True) - ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultDropSinkWithoutContext(ns3::Ptr file, ns3::Ptr p) [member function] + ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultDropSinkWithoutContext(ns3::Ptr file, ns3::Ptr p) [member function] cls.add_method('DefaultDropSinkWithoutContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('ns3::Ptr< ns3::Packet const >', 'p')], is_static=True) - ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultEnqueueSinkWithContext(ns3::Ptr file, std::string context, ns3::Ptr p) [member function] + ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultEnqueueSinkWithContext(ns3::Ptr file, std::string context, ns3::Ptr p) [member function] cls.add_method('DefaultEnqueueSinkWithContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('std::string', 'context'), param('ns3::Ptr< ns3::Packet const >', 'p')], is_static=True) - ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultEnqueueSinkWithoutContext(ns3::Ptr file, ns3::Ptr p) [member function] + ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultEnqueueSinkWithoutContext(ns3::Ptr file, ns3::Ptr p) [member function] cls.add_method('DefaultEnqueueSinkWithoutContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('ns3::Ptr< ns3::Packet const >', 'p')], is_static=True) - ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultReceiveSinkWithContext(ns3::Ptr file, std::string context, ns3::Ptr p) [member function] + ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultReceiveSinkWithContext(ns3::Ptr file, std::string context, ns3::Ptr p) [member function] cls.add_method('DefaultReceiveSinkWithContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('std::string', 'context'), param('ns3::Ptr< ns3::Packet const >', 'p')], is_static=True) - ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultReceiveSinkWithoutContext(ns3::Ptr file, ns3::Ptr p) [member function] + ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultReceiveSinkWithoutContext(ns3::Ptr file, ns3::Ptr p) [member function] cls.add_method('DefaultReceiveSinkWithoutContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('ns3::Ptr< ns3::Packet const >', 'p')], @@ -1031,64 +1149,64 @@ return def register_Ns3Average__Double_methods(root_module, cls): - ## average.h (module 'tools'): ns3::Average::Average(ns3::Average const & arg0) [copy constructor] + ## average.h (module 'stats'): ns3::Average::Average(ns3::Average const & arg0) [copy constructor] cls.add_constructor([param('ns3::Average< double > const &', 'arg0')]) - ## average.h (module 'tools'): ns3::Average::Average() [constructor] + ## average.h (module 'stats'): ns3::Average::Average() [constructor] cls.add_constructor([]) - ## average.h (module 'tools'): double ns3::Average::Avg() const [member function] + ## average.h (module 'stats'): double ns3::Average::Avg() const [member function] cls.add_method('Avg', 'double', [], is_const=True) - ## average.h (module 'tools'): uint32_t ns3::Average::Count() const [member function] + ## average.h (module 'stats'): uint32_t ns3::Average::Count() const [member function] cls.add_method('Count', 'uint32_t', [], is_const=True) - ## average.h (module 'tools'): double ns3::Average::Error90() const [member function] + ## average.h (module 'stats'): double ns3::Average::Error90() const [member function] cls.add_method('Error90', 'double', [], is_const=True) - ## average.h (module 'tools'): double ns3::Average::Error95() const [member function] + ## average.h (module 'stats'): double ns3::Average::Error95() const [member function] cls.add_method('Error95', 'double', [], is_const=True) - ## average.h (module 'tools'): double ns3::Average::Error99() const [member function] + ## average.h (module 'stats'): double ns3::Average::Error99() const [member function] cls.add_method('Error99', 'double', [], is_const=True) - ## average.h (module 'tools'): double ns3::Average::Max() const [member function] + ## average.h (module 'stats'): double ns3::Average::Max() const [member function] cls.add_method('Max', 'double', [], is_const=True) - ## average.h (module 'tools'): double ns3::Average::Mean() const [member function] + ## average.h (module 'stats'): double ns3::Average::Mean() const [member function] cls.add_method('Mean', 'double', [], is_const=True) - ## average.h (module 'tools'): double ns3::Average::Min() const [member function] + ## average.h (module 'stats'): double ns3::Average::Min() const [member function] cls.add_method('Min', 'double', [], is_const=True) - ## average.h (module 'tools'): void ns3::Average::Reset() [member function] + ## average.h (module 'stats'): void ns3::Average::Reset() [member function] cls.add_method('Reset', 'void', []) - ## average.h (module 'tools'): double ns3::Average::Stddev() const [member function] + ## average.h (module 'stats'): double ns3::Average::Stddev() const [member function] cls.add_method('Stddev', 'double', [], is_const=True) - ## average.h (module 'tools'): void ns3::Average::Update(double const & x) [member function] + ## average.h (module 'stats'): void ns3::Average::Update(double const & x) [member function] cls.add_method('Update', 'void', [param('double const &', 'x')]) - ## average.h (module 'tools'): double ns3::Average::Var() const [member function] + ## average.h (module 'stats'): double ns3::Average::Var() const [member function] cls.add_method('Var', 'double', [], @@ -1587,6 +1705,32 @@ is_const=True) return +def register_Ns3DelayJitterEstimation_methods(root_module, cls): + ## delay-jitter-estimation.h (module 'network'): ns3::DelayJitterEstimation::DelayJitterEstimation(ns3::DelayJitterEstimation const & arg0) [copy constructor] + cls.add_constructor([param('ns3::DelayJitterEstimation const &', 'arg0')]) + ## delay-jitter-estimation.h (module 'network'): ns3::DelayJitterEstimation::DelayJitterEstimation() [constructor] + cls.add_constructor([]) + ## delay-jitter-estimation.h (module 'network'): ns3::Time ns3::DelayJitterEstimation::GetLastDelay() const [member function] + cls.add_method('GetLastDelay', + 'ns3::Time', + [], + is_const=True) + ## delay-jitter-estimation.h (module 'network'): uint64_t ns3::DelayJitterEstimation::GetLastJitter() const [member function] + cls.add_method('GetLastJitter', + 'uint64_t', + [], + is_const=True) + ## delay-jitter-estimation.h (module 'network'): static void ns3::DelayJitterEstimation::PrepareTx(ns3::Ptr packet) [member function] + cls.add_method('PrepareTx', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')], + is_static=True) + ## delay-jitter-estimation.h (module 'network'): void ns3::DelayJitterEstimation::RecordRx(ns3::Ptr packet) [member function] + cls.add_method('RecordRx', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')]) + return + def register_Ns3EventId_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_binary_comparison_operator('==') @@ -1632,6 +1776,35 @@ is_const=True) return +def register_Ns3Hasher_methods(root_module, cls): + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Hasher const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hasher const &', 'arg0')]) + ## hash.h (module 'core'): ns3::Hasher::Hasher() [constructor] + cls.add_constructor([]) + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Ptr hp) [constructor] + cls.add_constructor([param('ns3::Ptr< ns3::Hash::Implementation >', 'hp')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(std::string const s) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(std::string const s) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): ns3::Hasher & ns3::Hasher::clear() [member function] + cls.add_method('clear', + 'ns3::Hasher &', + []) + return + def register_Ns3Inet6SocketAddress_methods(root_module, cls): ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(ns3::Inet6SocketAddress const & arg0) [copy constructor] cls.add_constructor([param('ns3::Inet6SocketAddress const &', 'arg0')]) @@ -1983,6 +2156,11 @@ 'bool', [], is_const=True) + ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsDocumentation() const [member function] + cls.add_method('IsDocumentation', + 'bool', + [], + is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsEqual(ns3::Ipv6Address const & other) const [member function] cls.add_method('IsEqual', 'bool', @@ -2022,16 +2200,36 @@ 'bool', [], is_const=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac16Address addr, ns3::Ipv6Address prefix) [member function] + cls.add_method('MakeAutoconfiguredAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac16Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac48Address addr, ns3::Ipv6Address prefix) [member function] cls.add_method('MakeAutoconfiguredAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac64Address addr, ns3::Ipv6Address prefix) [member function] + cls.add_method('MakeAutoconfiguredAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac64Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], + is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac16Address mac) [member function] + cls.add_method('MakeAutoconfiguredLinkLocalAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac16Address', 'mac')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac48Address mac) [member function] cls.add_method('MakeAutoconfiguredLinkLocalAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'mac')], is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac64Address mac) [member function] + cls.add_method('MakeAutoconfiguredLinkLocalAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac64Address', 'mac')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeIpv4MappedAddress(ns3::Ipv4Address addr) [member function] cls.add_method('MakeIpv4MappedAddress', 'ns3::Ipv6Address', @@ -2120,6 +2318,43 @@ is_const=True) return +def register_Ns3Mac16Address_methods(root_module, cls): + cls.add_binary_comparison_operator('!=') + cls.add_binary_comparison_operator('<') + cls.add_output_stream_operator() + cls.add_binary_comparison_operator('==') + ## mac16-address.h (module 'network'): ns3::Mac16Address::Mac16Address(ns3::Mac16Address const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Mac16Address const &', 'arg0')]) + ## mac16-address.h (module 'network'): ns3::Mac16Address::Mac16Address() [constructor] + cls.add_constructor([]) + ## mac16-address.h (module 'network'): ns3::Mac16Address::Mac16Address(char const * str) [constructor] + cls.add_constructor([param('char const *', 'str')]) + ## mac16-address.h (module 'network'): static ns3::Mac16Address ns3::Mac16Address::Allocate() [member function] + cls.add_method('Allocate', + 'ns3::Mac16Address', + [], + is_static=True) + ## mac16-address.h (module 'network'): static ns3::Mac16Address ns3::Mac16Address::ConvertFrom(ns3::Address const & address) [member function] + cls.add_method('ConvertFrom', + 'ns3::Mac16Address', + [param('ns3::Address const &', 'address')], + is_static=True) + ## mac16-address.h (module 'network'): void ns3::Mac16Address::CopyFrom(uint8_t const * buffer) [member function] + cls.add_method('CopyFrom', + 'void', + [param('uint8_t const *', 'buffer')]) + ## mac16-address.h (module 'network'): void ns3::Mac16Address::CopyTo(uint8_t * buffer) const [member function] + cls.add_method('CopyTo', + 'void', + [param('uint8_t *', 'buffer')], + is_const=True) + ## mac16-address.h (module 'network'): static bool ns3::Mac16Address::IsMatchingType(ns3::Address const & address) [member function] + cls.add_method('IsMatchingType', + 'bool', + [param('ns3::Address const &', 'address')], + is_static=True) + return + def register_Ns3Mac48Address_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_binary_comparison_operator('<') @@ -2194,6 +2429,7 @@ def register_Ns3Mac64Address_methods(root_module, cls): cls.add_binary_comparison_operator('!=') + cls.add_binary_comparison_operator('<') cls.add_output_stream_operator() cls.add_binary_comparison_operator('==') ## mac64-address.h (module 'network'): ns3::Mac64Address::Mac64Address(ns3::Mac64Address const & arg0) [copy constructor] @@ -2808,6 +3044,10 @@ cls.add_method('RemoveAll', 'void', []) + ## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Replace(ns3::Tag & tag) [member function] + cls.add_method('Replace', + 'bool', + [param('ns3::Tag &', 'tag')]) return def register_Ns3PacketTagListTagData_methods(root_module, cls): @@ -3105,11 +3345,11 @@ cls.add_method('Write', 'void', [param('uint32_t', 'tsSec'), param('uint32_t', 'tsUsec'), param('uint8_t const * const', 'data'), param('uint32_t', 'totalLen')]) - ## pcap-file.h (module 'network'): void ns3::PcapFile::Write(uint32_t tsSec, uint32_t tsUsec, ns3::Ptr p) [member function] + ## pcap-file.h (module 'network'): void ns3::PcapFile::Write(uint32_t tsSec, uint32_t tsUsec, ns3::Ptr p) [member function] 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 p) [member function] + ## pcap-file.h (module 'network'): void ns3::PcapFile::Write(uint32_t tsSec, uint32_t tsUsec, ns3::Header & header, ns3::Ptr 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')]) @@ -3205,6 +3445,41 @@ [param('std::vector< ns3::Ipv6Address >', 'routers')]) return +def register_Ns3RadvdHelper_methods(root_module, cls): + ## radvd-helper.h (module 'applications'): ns3::RadvdHelper::RadvdHelper(ns3::RadvdHelper const & arg0) [copy constructor] + cls.add_constructor([param('ns3::RadvdHelper const &', 'arg0')]) + ## radvd-helper.h (module 'applications'): ns3::RadvdHelper::RadvdHelper() [constructor] + cls.add_constructor([]) + ## radvd-helper.h (module 'applications'): void ns3::RadvdHelper::AddAnnouncedPrefix(uint32_t interface, ns3::Ipv6Address prefix, uint32_t prefixLength) [member function] + cls.add_method('AddAnnouncedPrefix', + 'void', + [param('uint32_t', 'interface'), param('ns3::Ipv6Address', 'prefix'), param('uint32_t', 'prefixLength')]) + ## radvd-helper.h (module 'applications'): void ns3::RadvdHelper::ClearPrefixes() [member function] + cls.add_method('ClearPrefixes', + 'void', + []) + ## radvd-helper.h (module 'applications'): void ns3::RadvdHelper::DisableDefaultRouterForInterface(uint32_t interface) [member function] + cls.add_method('DisableDefaultRouterForInterface', + 'void', + [param('uint32_t', 'interface')]) + ## radvd-helper.h (module 'applications'): void ns3::RadvdHelper::EnableDefaultRouterForInterface(uint32_t interface) [member function] + cls.add_method('EnableDefaultRouterForInterface', + 'void', + [param('uint32_t', 'interface')]) + ## radvd-helper.h (module 'applications'): ns3::Ptr ns3::RadvdHelper::GetRadvdInterface(uint32_t interface) [member function] + cls.add_method('GetRadvdInterface', + 'ns3::Ptr< ns3::RadvdInterface >', + [param('uint32_t', 'interface')]) + ## radvd-helper.h (module 'applications'): ns3::ApplicationContainer ns3::RadvdHelper::Install(ns3::Ptr node) [member function] + cls.add_method('Install', + 'ns3::ApplicationContainer', + [param('ns3::Ptr< ns3::Node >', 'node')]) + ## radvd-helper.h (module 'applications'): void ns3::RadvdHelper::SetAttribute(std::string name, ns3::AttributeValue const & value) [member function] + cls.add_method('SetAttribute', + 'void', + [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) + return + def register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount::SimpleRefCount() [constructor] cls.add_constructor([]) @@ -3517,6 +3792,11 @@ 'std::string', [], is_const=True) + ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetHash() const [member function] + cls.add_method('GetHash', + 'uint32_t', + [], + is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeId::GetName() const [member function] cls.add_method('GetName', 'std::string', @@ -3576,6 +3856,16 @@ 'bool', [param('std::string', 'name'), param('ns3::TypeId::AttributeInformation *', 'info', transfer_ownership=False)], is_const=True) + ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByHash(uint32_t hash) [member function] + cls.add_method('LookupByHash', + 'ns3::TypeId', + [param('uint32_t', 'hash')], + is_static=True) + ## type-id.h (module 'core'): static bool ns3::TypeId::LookupByHashFailSafe(uint32_t hash, ns3::TypeId * tid) [member function] + cls.add_method('LookupByHashFailSafe', + 'bool', + [param('uint32_t', 'hash'), param('ns3::TypeId *', 'tid')], + is_static=True) ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByName(std::string name) [member function] cls.add_method('LookupByName', 'ns3::TypeId', @@ -4319,11 +4609,11 @@ cls.add_method('Init', 'void', [param('uint32_t', 'dataLinkType'), param('uint32_t', 'snapLen', default_value='std::numeric_limits::max()'), param('int32_t', 'tzCorrection', default_value='ns3::PcapFile::ZONE_DEFAULT')]) - ## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Write(ns3::Time t, ns3::Ptr p) [member function] + ## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Write(ns3::Time t, ns3::Ptr p) [member function] 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 p) [member function] + ## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Write(ns3::Time t, ns3::Header & header, ns3::Ptr p) [member function] cls.add_method('Write', 'void', [param('ns3::Time', 't'), param('ns3::Header &', 'header'), param('ns3::Ptr< ns3::Packet const >', 'p')]) @@ -4418,7 +4708,7 @@ 'bool', [], is_const=True) - ## queue.h (module 'network'): ns3::Ptr ns3::Queue::Peek() const [member function] + ## queue.h (module 'network'): ns3::Ptr ns3::Queue::Peek() const [member function] cls.add_method('Peek', 'ns3::Ptr< ns3::Packet const >', [], @@ -4442,7 +4732,7 @@ 'bool', [param('ns3::Ptr< ns3::Packet >', 'p')], is_pure_virtual=True, visibility='private', is_virtual=True) - ## queue.h (module 'network'): ns3::Ptr ns3::Queue::DoPeek() const [member function] + ## queue.h (module 'network'): ns3::Ptr ns3::Queue::DoPeek() const [member function] cls.add_method('DoPeek', 'ns3::Ptr< ns3::Packet const >', [], @@ -4636,7 +4926,7 @@ 'bool', [param('ns3::Ptr< ns3::Packet >', 'p')], visibility='private', is_virtual=True) - ## red-queue.h (module 'network'): ns3::Ptr ns3::RedQueue::DoPeek() const [member function] + ## red-queue.h (module 'network'): ns3::Ptr ns3::RedQueue::DoPeek() const [member function] cls.add_method('DoPeek', 'ns3::Ptr< ns3::Packet const >', [], @@ -4807,6 +5097,18 @@ is_static=True) return +def register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter< ns3::Hash::Implementation > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + def register_Ns3SimpleRefCount__Ns3NixVector_Ns3Empty_Ns3DefaultDeleter__lt__ns3NixVector__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] cls.add_constructor([]) @@ -5689,11 +5991,26 @@ 'bool', [], is_const=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Max() [member function] + cls.add_method('Max', + 'ns3::Time', + [], + is_static=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Min() [member function] + cls.add_method('Min', + 'ns3::Time', + [], + is_static=True) ## nstime.h (module 'core'): static void ns3::Time::SetResolution(ns3::Time::Unit resolution) [member function] cls.add_method('SetResolution', 'void', [param('ns3::Time::Unit', 'resolution')], is_static=True) + ## nstime.h (module 'core'): static bool ns3::Time::StaticInit() [member function] + cls.add_method('StaticInit', + 'bool', + [], + is_static=True) ## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function] cls.add_method('To', 'ns3::int64x64_t', @@ -6348,6 +6665,40 @@ visibility='protected', is_virtual=True) return +def register_Ns3DataCollectionObject_methods(root_module, cls): + ## data-collection-object.h (module 'stats'): ns3::DataCollectionObject::DataCollectionObject(ns3::DataCollectionObject const & arg0) [copy constructor] + cls.add_constructor([param('ns3::DataCollectionObject const &', 'arg0')]) + ## data-collection-object.h (module 'stats'): ns3::DataCollectionObject::DataCollectionObject() [constructor] + cls.add_constructor([]) + ## data-collection-object.h (module 'stats'): void ns3::DataCollectionObject::Disable() [member function] + cls.add_method('Disable', + 'void', + []) + ## data-collection-object.h (module 'stats'): void ns3::DataCollectionObject::Enable() [member function] + cls.add_method('Enable', + 'void', + []) + ## data-collection-object.h (module 'stats'): std::string ns3::DataCollectionObject::GetName() const [member function] + cls.add_method('GetName', + 'std::string', + [], + is_const=True) + ## data-collection-object.h (module 'stats'): static ns3::TypeId ns3::DataCollectionObject::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## data-collection-object.h (module 'stats'): bool ns3::DataCollectionObject::IsEnabled() const [member function] + cls.add_method('IsEnabled', + 'bool', + [], + is_const=True, is_virtual=True) + ## data-collection-object.h (module 'stats'): void ns3::DataCollectionObject::SetName(std::string name) [member function] + cls.add_method('SetName', + 'void', + [param('std::string', 'name')]) + return + def register_Ns3DataOutputInterface_methods(root_module, cls): ## data-output-interface.h (module 'stats'): ns3::DataOutputInterface::DataOutputInterface(ns3::DataOutputInterface const & arg0) [copy constructor] cls.add_constructor([param('ns3::DataOutputInterface const &', 'arg0')]) @@ -6438,6 +6789,39 @@ is_virtual=True) return +def register_Ns3DoubleValue_methods(root_module, cls): + ## double.h (module 'core'): ns3::DoubleValue::DoubleValue() [constructor] + cls.add_constructor([]) + ## double.h (module 'core'): ns3::DoubleValue::DoubleValue(ns3::DoubleValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::DoubleValue const &', 'arg0')]) + ## double.h (module 'core'): ns3::DoubleValue::DoubleValue(double const & value) [constructor] + cls.add_constructor([param('double const &', 'value')]) + ## double.h (module 'core'): ns3::Ptr ns3::DoubleValue::Copy() const [member function] + cls.add_method('Copy', + 'ns3::Ptr< ns3::AttributeValue >', + [], + is_const=True, is_virtual=True) + ## double.h (module 'core'): bool ns3::DoubleValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] + cls.add_method('DeserializeFromString', + 'bool', + [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_virtual=True) + ## double.h (module 'core'): double ns3::DoubleValue::Get() const [member function] + cls.add_method('Get', + 'double', + [], + is_const=True) + ## double.h (module 'core'): std::string ns3::DoubleValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## double.h (module 'core'): void ns3::DoubleValue::Set(double const & value) [member function] + cls.add_method('Set', + 'void', + [param('double const &', 'value')]) + return + def register_Ns3DropTailQueue_methods(root_module, cls): ## drop-tail-queue.h (module 'network'): ns3::DropTailQueue::DropTailQueue(ns3::DropTailQueue const & arg0) [copy constructor] cls.add_constructor([param('ns3::DropTailQueue const &', 'arg0')]) @@ -6466,7 +6850,7 @@ 'bool', [param('ns3::Ptr< ns3::Packet >', 'p')], visibility='private', is_virtual=True) - ## drop-tail-queue.h (module 'network'): ns3::Ptr ns3::DropTailQueue::DoPeek() const [member function] + ## drop-tail-queue.h (module 'network'): ns3::Ptr ns3::DropTailQueue::DoPeek() const [member function] cls.add_method('DoPeek', 'ns3::Ptr< ns3::Packet const >', [], @@ -6529,6 +6913,84 @@ is_const=True, visibility='private', is_virtual=True) return +def register_Ns3EnumChecker_methods(root_module, cls): + ## enum.h (module 'core'): ns3::EnumChecker::EnumChecker(ns3::EnumChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::EnumChecker const &', 'arg0')]) + ## enum.h (module 'core'): ns3::EnumChecker::EnumChecker() [constructor] + cls.add_constructor([]) + ## enum.h (module 'core'): void ns3::EnumChecker::Add(int v, std::string name) [member function] + cls.add_method('Add', + 'void', + [param('int', 'v'), param('std::string', 'name')]) + ## enum.h (module 'core'): void ns3::EnumChecker::AddDefault(int v, std::string name) [member function] + cls.add_method('AddDefault', + 'void', + [param('int', 'v'), param('std::string', 'name')]) + ## enum.h (module 'core'): bool ns3::EnumChecker::Check(ns3::AttributeValue const & value) const [member function] + cls.add_method('Check', + 'bool', + [param('ns3::AttributeValue const &', 'value')], + is_const=True, is_virtual=True) + ## enum.h (module 'core'): bool ns3::EnumChecker::Copy(ns3::AttributeValue const & src, ns3::AttributeValue & dst) const [member function] + cls.add_method('Copy', + 'bool', + [param('ns3::AttributeValue const &', 'src'), param('ns3::AttributeValue &', 'dst')], + is_const=True, is_virtual=True) + ## enum.h (module 'core'): ns3::Ptr ns3::EnumChecker::Create() const [member function] + cls.add_method('Create', + 'ns3::Ptr< ns3::AttributeValue >', + [], + is_const=True, is_virtual=True) + ## enum.h (module 'core'): std::string ns3::EnumChecker::GetUnderlyingTypeInformation() const [member function] + cls.add_method('GetUnderlyingTypeInformation', + 'std::string', + [], + is_const=True, is_virtual=True) + ## enum.h (module 'core'): std::string ns3::EnumChecker::GetValueTypeName() const [member function] + cls.add_method('GetValueTypeName', + 'std::string', + [], + is_const=True, is_virtual=True) + ## enum.h (module 'core'): bool ns3::EnumChecker::HasUnderlyingTypeInformation() const [member function] + cls.add_method('HasUnderlyingTypeInformation', + 'bool', + [], + is_const=True, is_virtual=True) + return + +def register_Ns3EnumValue_methods(root_module, cls): + ## enum.h (module 'core'): ns3::EnumValue::EnumValue(ns3::EnumValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::EnumValue const &', 'arg0')]) + ## enum.h (module 'core'): ns3::EnumValue::EnumValue() [constructor] + cls.add_constructor([]) + ## enum.h (module 'core'): ns3::EnumValue::EnumValue(int v) [constructor] + cls.add_constructor([param('int', 'v')]) + ## enum.h (module 'core'): ns3::Ptr ns3::EnumValue::Copy() const [member function] + cls.add_method('Copy', + 'ns3::Ptr< ns3::AttributeValue >', + [], + is_const=True, is_virtual=True) + ## enum.h (module 'core'): bool ns3::EnumValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] + cls.add_method('DeserializeFromString', + 'bool', + [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_virtual=True) + ## enum.h (module 'core'): int ns3::EnumValue::Get() const [member function] + cls.add_method('Get', + 'int', + [], + is_const=True) + ## enum.h (module 'core'): std::string ns3::EnumValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## enum.h (module 'core'): void ns3::EnumValue::Set(int v) [member function] + cls.add_method('Set', + 'void', + [param('int', 'v')]) + return + def register_Ns3ErlangRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::ErlangRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', @@ -6700,11 +7162,11 @@ cls.add_constructor([param('ns3::EthernetTrailer const &', 'arg0')]) ## ethernet-trailer.h (module 'network'): ns3::EthernetTrailer::EthernetTrailer() [constructor] cls.add_constructor([]) - ## ethernet-trailer.h (module 'network'): void ns3::EthernetTrailer::CalcFcs(ns3::Ptr p) [member function] + ## ethernet-trailer.h (module 'network'): void ns3::EthernetTrailer::CalcFcs(ns3::Ptr p) [member function] cls.add_method('CalcFcs', 'void', [param('ns3::Ptr< ns3::Packet const >', 'p')]) - ## ethernet-trailer.h (module 'network'): bool ns3::EthernetTrailer::CheckFcs(ns3::Ptr p) const [member function] + ## ethernet-trailer.h (module 'network'): bool ns3::EthernetTrailer::CheckFcs(ns3::Ptr p) const [member function] cls.add_method('CheckFcs', 'bool', [param('ns3::Ptr< ns3::Packet const >', 'p')], @@ -6858,6 +7320,39 @@ is_virtual=True) return +def register_Ns3IntegerValue_methods(root_module, cls): + ## integer.h (module 'core'): ns3::IntegerValue::IntegerValue() [constructor] + cls.add_constructor([]) + ## integer.h (module 'core'): ns3::IntegerValue::IntegerValue(ns3::IntegerValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::IntegerValue const &', 'arg0')]) + ## integer.h (module 'core'): ns3::IntegerValue::IntegerValue(int64_t const & value) [constructor] + cls.add_constructor([param('int64_t const &', 'value')]) + ## integer.h (module 'core'): ns3::Ptr ns3::IntegerValue::Copy() const [member function] + cls.add_method('Copy', + 'ns3::Ptr< ns3::AttributeValue >', + [], + is_const=True, is_virtual=True) + ## integer.h (module 'core'): bool ns3::IntegerValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] + cls.add_method('DeserializeFromString', + 'bool', + [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_virtual=True) + ## integer.h (module 'core'): int64_t ns3::IntegerValue::Get() const [member function] + cls.add_method('Get', + 'int64_t', + [], + is_const=True) + ## integer.h (module 'core'): std::string ns3::IntegerValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## integer.h (module 'core'): void ns3::IntegerValue::Set(int64_t const & value) [member function] + cls.add_method('Set', + 'void', + [param('int64_t const &', 'value')]) + return + def register_Ns3Ipv4AddressChecker_methods(root_module, cls): ## ipv4-address.h (module 'network'): ns3::Ipv4AddressChecker::Ipv4AddressChecker() [constructor] cls.add_constructor([]) @@ -7087,6 +7582,46 @@ is_virtual=True) return +def register_Ns3Mac16AddressChecker_methods(root_module, cls): + ## mac16-address.h (module 'network'): ns3::Mac16AddressChecker::Mac16AddressChecker() [constructor] + cls.add_constructor([]) + ## mac16-address.h (module 'network'): ns3::Mac16AddressChecker::Mac16AddressChecker(ns3::Mac16AddressChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Mac16AddressChecker const &', 'arg0')]) + return + +def register_Ns3Mac16AddressValue_methods(root_module, cls): + ## mac16-address.h (module 'network'): ns3::Mac16AddressValue::Mac16AddressValue() [constructor] + cls.add_constructor([]) + ## mac16-address.h (module 'network'): ns3::Mac16AddressValue::Mac16AddressValue(ns3::Mac16AddressValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Mac16AddressValue const &', 'arg0')]) + ## mac16-address.h (module 'network'): ns3::Mac16AddressValue::Mac16AddressValue(ns3::Mac16Address const & value) [constructor] + cls.add_constructor([param('ns3::Mac16Address const &', 'value')]) + ## mac16-address.h (module 'network'): ns3::Ptr ns3::Mac16AddressValue::Copy() const [member function] + cls.add_method('Copy', + 'ns3::Ptr< ns3::AttributeValue >', + [], + is_const=True, is_virtual=True) + ## mac16-address.h (module 'network'): bool ns3::Mac16AddressValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] + cls.add_method('DeserializeFromString', + 'bool', + [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_virtual=True) + ## mac16-address.h (module 'network'): ns3::Mac16Address ns3::Mac16AddressValue::Get() const [member function] + cls.add_method('Get', + 'ns3::Mac16Address', + [], + is_const=True) + ## mac16-address.h (module 'network'): std::string ns3::Mac16AddressValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## mac16-address.h (module 'network'): void ns3::Mac16AddressValue::Set(ns3::Mac16Address const & value) [member function] + cls.add_method('Set', + 'void', + [param('ns3::Mac16Address const &', 'value')]) + return + def register_Ns3Mac48AddressChecker_methods(root_module, cls): ## mac48-address.h (module 'network'): ns3::Mac48AddressChecker::Mac48AddressChecker() [constructor] cls.add_constructor([]) @@ -7127,6 +7662,46 @@ [param('ns3::Mac48Address const &', 'value')]) return +def register_Ns3Mac64AddressChecker_methods(root_module, cls): + ## mac64-address.h (module 'network'): ns3::Mac64AddressChecker::Mac64AddressChecker() [constructor] + cls.add_constructor([]) + ## mac64-address.h (module 'network'): ns3::Mac64AddressChecker::Mac64AddressChecker(ns3::Mac64AddressChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Mac64AddressChecker const &', 'arg0')]) + return + +def register_Ns3Mac64AddressValue_methods(root_module, cls): + ## mac64-address.h (module 'network'): ns3::Mac64AddressValue::Mac64AddressValue() [constructor] + cls.add_constructor([]) + ## mac64-address.h (module 'network'): ns3::Mac64AddressValue::Mac64AddressValue(ns3::Mac64AddressValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Mac64AddressValue const &', 'arg0')]) + ## mac64-address.h (module 'network'): ns3::Mac64AddressValue::Mac64AddressValue(ns3::Mac64Address const & value) [constructor] + cls.add_constructor([param('ns3::Mac64Address const &', 'value')]) + ## mac64-address.h (module 'network'): ns3::Ptr ns3::Mac64AddressValue::Copy() const [member function] + cls.add_method('Copy', + 'ns3::Ptr< ns3::AttributeValue >', + [], + is_const=True, is_virtual=True) + ## mac64-address.h (module 'network'): bool ns3::Mac64AddressValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] + cls.add_method('DeserializeFromString', + 'bool', + [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_virtual=True) + ## mac64-address.h (module 'network'): ns3::Mac64Address ns3::Mac64AddressValue::Get() const [member function] + cls.add_method('Get', + 'ns3::Mac64Address', + [], + is_const=True) + ## mac64-address.h (module 'network'): std::string ns3::Mac64AddressValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## mac64-address.h (module 'network'): void ns3::Mac64AddressValue::Set(ns3::Mac64Address const & value) [member function] + cls.add_method('Set', + 'void', + [param('ns3::Mac64Address const &', 'value')]) + return + def register_Ns3MinMaxAvgTotalCalculator__Double_methods(root_module, cls): ## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator::MinMaxAvgTotalCalculator(ns3::MinMaxAvgTotalCalculator const & arg0) [copy constructor] cls.add_constructor([param('ns3::MinMaxAvgTotalCalculator< double > const &', 'arg0')]) @@ -7192,6 +7767,71 @@ visibility='protected', is_virtual=True) return +def register_Ns3MinMaxAvgTotalCalculator__Unsigned_int_methods(root_module, cls): + ## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator::MinMaxAvgTotalCalculator(ns3::MinMaxAvgTotalCalculator const & arg0) [copy constructor] + cls.add_constructor([param('ns3::MinMaxAvgTotalCalculator< unsigned int > const &', 'arg0')]) + ## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator::MinMaxAvgTotalCalculator() [constructor] + cls.add_constructor([]) + ## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator::Output(ns3::DataOutputCallback & callback) const [member function] + cls.add_method('Output', + 'void', + [param('ns3::DataOutputCallback &', 'callback')], + is_const=True, is_virtual=True) + ## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator::Reset() [member function] + cls.add_method('Reset', + 'void', + []) + ## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator::Update(unsigned int const i) [member function] + cls.add_method('Update', + 'void', + [param('unsigned int const', 'i')]) + ## basic-data-calculators.h (module 'stats'): long int ns3::MinMaxAvgTotalCalculator::getCount() const [member function] + cls.add_method('getCount', + 'long int', + [], + is_const=True, is_virtual=True) + ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator::getMax() const [member function] + cls.add_method('getMax', + 'double', + [], + is_const=True, is_virtual=True) + ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator::getMean() const [member function] + cls.add_method('getMean', + 'double', + [], + is_const=True, is_virtual=True) + ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator::getMin() const [member function] + cls.add_method('getMin', + 'double', + [], + is_const=True, is_virtual=True) + ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator::getSqrSum() const [member function] + cls.add_method('getSqrSum', + 'double', + [], + is_const=True, is_virtual=True) + ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator::getStddev() const [member function] + cls.add_method('getStddev', + 'double', + [], + is_const=True, is_virtual=True) + ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator::getSum() const [member function] + cls.add_method('getSum', + 'double', + [], + is_const=True, is_virtual=True) + ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator::getVariance() const [member function] + cls.add_method('getVariance', + 'double', + [], + is_const=True, is_virtual=True) + ## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='protected', is_virtual=True) + return + def register_Ns3NetDevice_methods(root_module, cls): ## net-device.h (module 'network'): ns3::NetDevice::NetDevice() [constructor] cls.add_constructor([]) @@ -7601,7 +8241,7 @@ cls.add_constructor([param('uint8_t const *', 'buffer'), param('uint32_t', 'size'), param('bool', 'magic')]) ## packet.h (module 'network'): ns3::Packet::Packet(uint8_t const * buffer, uint32_t size) [constructor] cls.add_constructor([param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) - ## packet.h (module 'network'): void ns3::Packet::AddAtEnd(ns3::Ptr packet) [member function] + ## packet.h (module 'network'): void ns3::Packet::AddAtEnd(ns3::Ptr packet) [member function] cls.add_method('AddAtEnd', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) @@ -7759,6 +8399,10 @@ cls.add_method('RemoveTrailer', 'uint32_t', [param('ns3::Trailer &', 'trailer')]) + ## packet.h (module 'network'): bool ns3::Packet::ReplacePacketTag(ns3::Tag & tag) [member function] + cls.add_method('ReplacePacketTag', + 'bool', + [param('ns3::Tag &', 'tag')]) ## packet.h (module 'network'): uint32_t ns3::Packet::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function] cls.add_method('Serialize', 'uint32_t', @@ -7812,6 +8456,26 @@ visibility='private', is_virtual=True) return +def register_Ns3PacketSizeMinMaxAvgTotalCalculator_methods(root_module, cls): + ## packet-data-calculators.h (module 'network'): ns3::PacketSizeMinMaxAvgTotalCalculator::PacketSizeMinMaxAvgTotalCalculator(ns3::PacketSizeMinMaxAvgTotalCalculator const & arg0) [copy constructor] + cls.add_constructor([param('ns3::PacketSizeMinMaxAvgTotalCalculator const &', 'arg0')]) + ## packet-data-calculators.h (module 'network'): ns3::PacketSizeMinMaxAvgTotalCalculator::PacketSizeMinMaxAvgTotalCalculator() [constructor] + cls.add_constructor([]) + ## packet-data-calculators.h (module 'network'): void ns3::PacketSizeMinMaxAvgTotalCalculator::FrameUpdate(std::string path, ns3::Ptr packet, ns3::Mac48Address realto) [member function] + 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'): void ns3::PacketSizeMinMaxAvgTotalCalculator::PacketUpdate(std::string path, ns3::Ptr packet) [member function] + cls.add_method('PacketUpdate', + 'void', + [param('std::string', 'path'), param('ns3::Ptr< ns3::Packet const >', 'packet')]) + ## packet-data-calculators.h (module 'network'): void ns3::PacketSizeMinMaxAvgTotalCalculator::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='protected', is_virtual=True) + return + def register_Ns3PacketSocket_methods(root_module, cls): ## packet-socket.h (module 'network'): ns3::PacketSocket::PacketSocket(ns3::PacketSocket const & arg0) [copy constructor] cls.add_constructor([param('ns3::PacketSocket const &', 'arg0')]) @@ -9021,6 +9685,33 @@ visibility='private', is_virtual=True) return +def register_Ns3Probe_methods(root_module, cls): + ## probe.h (module 'stats'): ns3::Probe::Probe(ns3::Probe const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Probe const &', 'arg0')]) + ## probe.h (module 'stats'): ns3::Probe::Probe() [constructor] + cls.add_constructor([]) + ## probe.h (module 'stats'): bool ns3::Probe::ConnectByObject(std::string traceSource, ns3::Ptr obj) [member function] + cls.add_method('ConnectByObject', + 'bool', + [param('std::string', 'traceSource'), param('ns3::Ptr< ns3::Object >', 'obj')], + is_pure_virtual=True, is_virtual=True) + ## probe.h (module 'stats'): void ns3::Probe::ConnectByPath(std::string path) [member function] + cls.add_method('ConnectByPath', + 'void', + [param('std::string', 'path')], + is_pure_virtual=True, is_virtual=True) + ## probe.h (module 'stats'): static ns3::TypeId ns3::Probe::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## probe.h (module 'stats'): bool ns3::Probe::IsEnabled() const [member function] + cls.add_method('IsEnabled', + 'bool', + [], + is_const=True, is_virtual=True) + return + def register_Ns3Radvd_methods(root_module, cls): ## radvd.h (module 'applications'): ns3::Radvd::Radvd(ns3::Radvd const & arg0) [copy constructor] cls.add_constructor([param('ns3::Radvd const &', 'arg0')]) @@ -9595,13 +10286,6 @@ visibility='protected', is_virtual=True) return -def register_Ns3TimeChecker_methods(root_module, cls): - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker() [constructor] - cls.add_constructor([]) - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker(ns3::TimeChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TimeChecker const &', 'arg0')]) - return - def register_Ns3TimeValue_methods(root_module, cls): ## nstime.h (module 'core'): ns3::TimeValue::TimeValue() [constructor] cls.add_constructor([]) @@ -9900,6 +10584,39 @@ visibility='private', is_virtual=True) return +def register_Ns3UintegerValue_methods(root_module, cls): + ## uinteger.h (module 'core'): ns3::UintegerValue::UintegerValue() [constructor] + cls.add_constructor([]) + ## uinteger.h (module 'core'): ns3::UintegerValue::UintegerValue(ns3::UintegerValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::UintegerValue const &', 'arg0')]) + ## uinteger.h (module 'core'): ns3::UintegerValue::UintegerValue(uint64_t const & value) [constructor] + cls.add_constructor([param('uint64_t const &', 'value')]) + ## uinteger.h (module 'core'): ns3::Ptr ns3::UintegerValue::Copy() const [member function] + cls.add_method('Copy', + 'ns3::Ptr< ns3::AttributeValue >', + [], + is_const=True, is_virtual=True) + ## uinteger.h (module 'core'): bool ns3::UintegerValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] + cls.add_method('DeserializeFromString', + 'bool', + [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_virtual=True) + ## uinteger.h (module 'core'): uint64_t ns3::UintegerValue::Get() const [member function] + cls.add_method('Get', + 'uint64_t', + [], + is_const=True) + ## uinteger.h (module 'core'): std::string ns3::UintegerValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## uinteger.h (module 'core'): void ns3::UintegerValue::Set(uint64_t const & value) [member function] + cls.add_method('Set', + 'void', + [param('uint64_t const &', 'value')]) + return + def register_Ns3V4Ping_methods(root_module, cls): ## v4ping.h (module 'applications'): ns3::V4Ping::V4Ping(ns3::V4Ping const & arg0) [copy constructor] cls.add_constructor([param('ns3::V4Ping const &', 'arg0')]) @@ -9967,6 +10684,37 @@ [param('ns3::Address const &', 'value')]) return +def register_Ns3ApplicationPacketProbe_methods(root_module, cls): + ## application-packet-probe.h (module 'applications'): ns3::ApplicationPacketProbe::ApplicationPacketProbe(ns3::ApplicationPacketProbe const & arg0) [copy constructor] + cls.add_constructor([param('ns3::ApplicationPacketProbe const &', 'arg0')]) + ## application-packet-probe.h (module 'applications'): ns3::ApplicationPacketProbe::ApplicationPacketProbe() [constructor] + cls.add_constructor([]) + ## application-packet-probe.h (module 'applications'): bool ns3::ApplicationPacketProbe::ConnectByObject(std::string traceSource, ns3::Ptr obj) [member function] + cls.add_method('ConnectByObject', + 'bool', + [param('std::string', 'traceSource'), param('ns3::Ptr< ns3::Object >', 'obj')], + is_virtual=True) + ## application-packet-probe.h (module 'applications'): void ns3::ApplicationPacketProbe::ConnectByPath(std::string path) [member function] + cls.add_method('ConnectByPath', + 'void', + [param('std::string', 'path')], + is_virtual=True) + ## application-packet-probe.h (module 'applications'): static ns3::TypeId ns3::ApplicationPacketProbe::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## application-packet-probe.h (module 'applications'): void ns3::ApplicationPacketProbe::SetValue(ns3::Ptr packet, ns3::Address const & address) [member function] + cls.add_method('SetValue', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Address const &', 'address')]) + ## application-packet-probe.h (module 'applications'): static void ns3::ApplicationPacketProbe::SetValueByPath(std::string path, ns3::Ptr packet, ns3::Address const & address) [member function] + cls.add_method('SetValueByPath', + 'void', + [param('std::string', 'path'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Address const &', 'address')], + is_static=True) + return + def register_Ns3BurstErrorModel_methods(root_module, cls): ## error-model.h (module 'network'): ns3::BurstErrorModel::BurstErrorModel(ns3::BurstErrorModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::BurstErrorModel const &', 'arg0')]) @@ -10010,6 +10758,87 @@ visibility='private', is_virtual=True) return +def register_Ns3CounterCalculator__Unsigned_int_methods(root_module, cls): + ## basic-data-calculators.h (module 'stats'): ns3::CounterCalculator::CounterCalculator(ns3::CounterCalculator const & arg0) [copy constructor] + cls.add_constructor([param('ns3::CounterCalculator< unsigned int > const &', 'arg0')]) + ## basic-data-calculators.h (module 'stats'): ns3::CounterCalculator::CounterCalculator() [constructor] + cls.add_constructor([]) + ## basic-data-calculators.h (module 'stats'): unsigned int ns3::CounterCalculator::GetCount() const [member function] + cls.add_method('GetCount', + 'unsigned int', + [], + is_const=True) + ## basic-data-calculators.h (module 'stats'): void ns3::CounterCalculator::Output(ns3::DataOutputCallback & callback) const [member function] + cls.add_method('Output', + 'void', + [param('ns3::DataOutputCallback &', 'callback')], + is_const=True, is_virtual=True) + ## basic-data-calculators.h (module 'stats'): void ns3::CounterCalculator::Update() [member function] + cls.add_method('Update', + 'void', + []) + ## basic-data-calculators.h (module 'stats'): void ns3::CounterCalculator::Update(unsigned int const i) [member function] + cls.add_method('Update', + 'void', + [param('unsigned int const', 'i')]) + ## basic-data-calculators.h (module 'stats'): void ns3::CounterCalculator::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='protected', is_virtual=True) + return + +def register_Ns3PacketCounterCalculator_methods(root_module, cls): + ## packet-data-calculators.h (module 'network'): ns3::PacketCounterCalculator::PacketCounterCalculator(ns3::PacketCounterCalculator const & arg0) [copy constructor] + cls.add_constructor([param('ns3::PacketCounterCalculator const &', 'arg0')]) + ## packet-data-calculators.h (module 'network'): ns3::PacketCounterCalculator::PacketCounterCalculator() [constructor] + cls.add_constructor([]) + ## packet-data-calculators.h (module 'network'): void ns3::PacketCounterCalculator::FrameUpdate(std::string path, ns3::Ptr packet, ns3::Mac48Address realto) [member function] + 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'): void ns3::PacketCounterCalculator::PacketUpdate(std::string path, ns3::Ptr packet) [member function] + cls.add_method('PacketUpdate', + 'void', + [param('std::string', 'path'), param('ns3::Ptr< ns3::Packet const >', 'packet')]) + ## packet-data-calculators.h (module 'network'): void ns3::PacketCounterCalculator::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='protected', is_virtual=True) + return + +def register_Ns3PacketProbe_methods(root_module, cls): + ## packet-probe.h (module 'network'): ns3::PacketProbe::PacketProbe(ns3::PacketProbe const & arg0) [copy constructor] + cls.add_constructor([param('ns3::PacketProbe const &', 'arg0')]) + ## packet-probe.h (module 'network'): ns3::PacketProbe::PacketProbe() [constructor] + cls.add_constructor([]) + ## packet-probe.h (module 'network'): bool ns3::PacketProbe::ConnectByObject(std::string traceSource, ns3::Ptr obj) [member function] + cls.add_method('ConnectByObject', + 'bool', + [param('std::string', 'traceSource'), param('ns3::Ptr< ns3::Object >', 'obj')], + is_virtual=True) + ## packet-probe.h (module 'network'): void ns3::PacketProbe::ConnectByPath(std::string path) [member function] + cls.add_method('ConnectByPath', + 'void', + [param('std::string', 'path')], + is_virtual=True) + ## packet-probe.h (module 'network'): static ns3::TypeId ns3::PacketProbe::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## packet-probe.h (module 'network'): void ns3::PacketProbe::SetValue(ns3::Ptr packet) [member function] + cls.add_method('SetValue', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')]) + ## packet-probe.h (module 'network'): static void ns3::PacketProbe::SetValueByPath(std::string path, ns3::Ptr packet) [member function] + cls.add_method('SetValueByPath', + 'void', + [param('std::string', 'path'), param('ns3::Ptr< ns3::Packet const >', 'packet')], + is_static=True) + return + def register_Ns3PbbAddressTlv_methods(root_module, cls): ## packetbb.h (module 'network'): ns3::PbbAddressTlv::PbbAddressTlv() [constructor] cls.add_constructor([]) @@ -10054,18 +10883,135 @@ [param('bool', 'isMultivalue')]) return +def register_Ns3HashImplementation_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation(ns3::Hash::Implementation const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Implementation const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation() [constructor] + cls.add_constructor([]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Implementation::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_pure_virtual=True, is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Implementation::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Implementation::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + return + +def register_Ns3HashFunctionFnv1a_methods(root_module, cls): + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a(ns3::Hash::Function::Fnv1a const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Fnv1a const &', 'arg0')]) + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a() [constructor] + cls.add_constructor([]) + ## hash-fnv.h (module 'core'): uint32_t ns3::Hash::Function::Fnv1a::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): uint64_t ns3::Hash::Function::Fnv1a::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): void ns3::Hash::Function::Fnv1a::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash32_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Function::Hash32 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash32 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Hash32Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash32Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash32::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash32::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash64_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Function::Hash64 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash64 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Hash64Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash64Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash64::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Function::Hash64::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash64::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionMurmur3_methods(root_module, cls): + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3(ns3::Hash::Function::Murmur3 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Murmur3 const &', 'arg0')]) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3() [constructor] + cls.add_constructor([]) + ## hash-murmur3.h (module 'core'): uint32_t ns3::Hash::Function::Murmur3::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): uint64_t ns3::Hash::Function::Murmur3::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): void ns3::Hash::Function::Murmur3::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + def register_functions(root_module): module = root_module register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) + register_functions_ns3_Hash(module.get_submodule('Hash'), root_module) register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module) + register_functions_ns3_internal(module.get_submodule('internal'), root_module) return def register_functions_ns3_FatalImpl(module, root_module): return +def register_functions_ns3_Hash(module, root_module): + register_functions_ns3_Hash_Function(module.get_submodule('Function'), root_module) + return + +def register_functions_ns3_Hash_Function(module, root_module): + return + def register_functions_ns3_addressUtils(module, root_module): return +def register_functions_ns3_internal(module, root_module): + return + def main(): out = FileCodeSink(sys.stdout) root_module = module_init() diff -Naur ns-3.17/src/applications/bindings/modulegen__gcc_LP64.py ns-3.18/src/applications/bindings/modulegen__gcc_LP64.py --- ns-3.17/src/applications/bindings/modulegen__gcc_LP64.py 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/applications/bindings/modulegen__gcc_LP64.py 2013-10-26 07:07:30.579364407 -0700 @@ -40,8 +40,8 @@ module.add_class('AttributeConstructionList', import_from_module='ns.core') ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::Item [struct] module.add_class('Item', import_from_module='ns.core', outer_class=root_module['ns3::AttributeConstructionList']) - ## average.h (module 'tools'): ns3::Average [class] - module.add_class('Average', import_from_module='ns.tools', template_parameters=['double']) + ## average.h (module 'stats'): ns3::Average [class] + module.add_class('Average', import_from_module='ns.stats', template_parameters=['double']) ## buffer.h (module 'network'): ns3::Buffer [class] module.add_class('Buffer', import_from_module='ns.network') ## buffer.h (module 'network'): ns3::Buffer::Iterator [class] @@ -66,8 +66,12 @@ module.add_class('DataOutputCallback', allow_subclassing=True, import_from_module='ns.stats') ## data-rate.h (module 'network'): ns3::DataRate [class] module.add_class('DataRate', import_from_module='ns.network') + ## delay-jitter-estimation.h (module 'network'): ns3::DelayJitterEstimation [class] + module.add_class('DelayJitterEstimation', import_from_module='ns.network') ## event-id.h (module 'core'): ns3::EventId [class] module.add_class('EventId', import_from_module='ns.core') + ## hash.h (module 'core'): ns3::Hasher [class] + module.add_class('Hasher', import_from_module='ns.core') ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress [class] module.add_class('Inet6SocketAddress', import_from_module='ns.network') ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress [class] @@ -88,6 +92,10 @@ root_module['ns3::Ipv6Address'].implicitly_converts_to(root_module['ns3::Address']) ## ipv6-address.h (module 'network'): ns3::Ipv6Prefix [class] module.add_class('Ipv6Prefix', import_from_module='ns.network') + ## mac16-address.h (module 'network'): ns3::Mac16Address [class] + module.add_class('Mac16Address', import_from_module='ns.network') + ## mac16-address.h (module 'network'): ns3::Mac16Address [class] + root_module['ns3::Mac16Address'].implicitly_converts_to(root_module['ns3::Address']) ## mac48-address.h (module 'network'): ns3::Mac48Address [class] module.add_class('Mac48Address', import_from_module='ns.network') ## mac48-address.h (module 'network'): ns3::Mac48Address [class] @@ -136,6 +144,8 @@ module.add_class('PacketTagList', import_from_module='ns.network') ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData [struct] module.add_class('TagData', import_from_module='ns.network', outer_class=root_module['ns3::PacketTagList']) + ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData_e [enumeration] + module.add_enum('TagData_e', ['MAX_SIZE'], outer_class=root_module['ns3::PacketTagList::TagData'], import_from_module='ns.network') ## packetbb.h (module 'network'): ns3::PbbAddressTlvBlock [class] module.add_class('PbbAddressTlvBlock', import_from_module='ns.network') ## packetbb.h (module 'network'): ns3::PbbTlvBlock [class] @@ -150,6 +160,8 @@ module.add_class('PcapHelperForDevice', allow_subclassing=True, import_from_module='ns.network') ## ping6-helper.h (module 'applications'): ns3::Ping6Helper [class] module.add_class('Ping6Helper') + ## radvd-helper.h (module 'applications'): ns3::RadvdHelper [class] + module.add_class('RadvdHelper') ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Object', 'ns3::ObjectBase', 'ns3::ObjectDeleter'], parent=root_module['ns3::ObjectBase'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simulator.h (module 'core'): ns3::Simulator [class] @@ -238,6 +250,8 @@ module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::CallbackImplBase', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::EventImpl', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] + module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Hash::Implementation', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::NixVector', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] @@ -324,6 +338,8 @@ module.add_class('ConstantRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## data-calculator.h (module 'stats'): ns3::DataCalculator [class] module.add_class('DataCalculator', import_from_module='ns.stats', parent=root_module['ns3::Object']) + ## data-collection-object.h (module 'stats'): ns3::DataCollectionObject [class] + module.add_class('DataCollectionObject', import_from_module='ns.stats', parent=root_module['ns3::Object']) ## data-output-interface.h (module 'stats'): ns3::DataOutputInterface [class] module.add_class('DataOutputInterface', import_from_module='ns.stats', parent=root_module['ns3::Object']) ## data-rate.h (module 'network'): ns3::DataRateChecker [class] @@ -332,12 +348,18 @@ module.add_class('DataRateValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue']) ## random-variable-stream.h (module 'core'): ns3::DeterministicRandomVariable [class] module.add_class('DeterministicRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) + ## double.h (module 'core'): ns3::DoubleValue [class] + module.add_class('DoubleValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## drop-tail-queue.h (module 'network'): ns3::DropTailQueue [class] module.add_class('DropTailQueue', import_from_module='ns.network', parent=root_module['ns3::Queue']) ## random-variable-stream.h (module 'core'): ns3::EmpiricalRandomVariable [class] module.add_class('EmpiricalRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## attribute.h (module 'core'): ns3::EmptyAttributeValue [class] module.add_class('EmptyAttributeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) + ## enum.h (module 'core'): ns3::EnumChecker [class] + module.add_class('EnumChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) + ## enum.h (module 'core'): ns3::EnumValue [class] + module.add_class('EnumValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## random-variable-stream.h (module 'core'): ns3::ErlangRandomVariable [class] module.add_class('ErlangRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## error-model.h (module 'network'): ns3::ErrorModel [class] @@ -352,6 +374,8 @@ module.add_class('ExponentialRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## random-variable-stream.h (module 'core'): ns3::GammaRandomVariable [class] module.add_class('GammaRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) + ## integer.h (module 'core'): ns3::IntegerValue [class] + module.add_class('IntegerValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## ipv4-address.h (module 'network'): ns3::Ipv4AddressChecker [class] module.add_class('Ipv4AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker']) ## ipv4-address.h (module 'network'): ns3::Ipv4AddressValue [class] @@ -372,12 +396,22 @@ module.add_class('ListErrorModel', import_from_module='ns.network', parent=root_module['ns3::ErrorModel']) ## random-variable-stream.h (module 'core'): ns3::LogNormalRandomVariable [class] module.add_class('LogNormalRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) + ## mac16-address.h (module 'network'): ns3::Mac16AddressChecker [class] + module.add_class('Mac16AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker']) + ## mac16-address.h (module 'network'): ns3::Mac16AddressValue [class] + module.add_class('Mac16AddressValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue']) ## mac48-address.h (module 'network'): ns3::Mac48AddressChecker [class] module.add_class('Mac48AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker']) ## mac48-address.h (module 'network'): ns3::Mac48AddressValue [class] module.add_class('Mac48AddressValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue']) + ## mac64-address.h (module 'network'): ns3::Mac64AddressChecker [class] + module.add_class('Mac64AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker']) + ## mac64-address.h (module 'network'): ns3::Mac64AddressValue [class] + module.add_class('Mac64AddressValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue']) ## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator [class] module.add_class('MinMaxAvgTotalCalculator', import_from_module='ns.stats', template_parameters=['double'], parent=[root_module['ns3::DataCalculator'], root_module['ns3::StatisticalSummary']]) + ## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator [class] + module.add_class('MinMaxAvgTotalCalculator', import_from_module='ns.stats', template_parameters=['unsigned int'], parent=[root_module['ns3::DataCalculator'], root_module['ns3::StatisticalSummary']]) ## net-device.h (module 'network'): ns3::NetDevice [class] module.add_class('NetDevice', import_from_module='ns.network', parent=root_module['ns3::Object']) ## net-device.h (module 'network'): ns3::NetDevice::PacketType [enumeration] @@ -400,6 +434,8 @@ module.add_class('Packet', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter >']) ## packet-sink.h (module 'applications'): ns3::PacketSink [class] module.add_class('PacketSink', parent=root_module['ns3::Application']) + ## packet-data-calculators.h (module 'network'): ns3::PacketSizeMinMaxAvgTotalCalculator [class] + module.add_class('PacketSizeMinMaxAvgTotalCalculator', import_from_module='ns.network', parent=root_module['ns3::MinMaxAvgTotalCalculator< unsigned int >']) ## packet-socket.h (module 'network'): ns3::PacketSocket [class] module.add_class('PacketSocket', import_from_module='ns.network', parent=root_module['ns3::Socket']) ## packet-socket-factory.h (module 'network'): ns3::PacketSocketFactory [class] @@ -424,6 +460,8 @@ module.add_class('PbbTlv', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::PbbTlv, ns3::empty, ns3::DefaultDeleter >']) ## ping6.h (module 'applications'): ns3::Ping6 [class] module.add_class('Ping6', parent=root_module['ns3::Application']) + ## probe.h (module 'stats'): ns3::Probe [class] + module.add_class('Probe', import_from_module='ns.stats', parent=root_module['ns3::DataCollectionObject']) ## radvd.h (module 'applications'): ns3::Radvd [class] module.add_class('Radvd', parent=root_module['ns3::Application']) ## radvd-interface.h (module 'applications'): ns3::RadvdInterface [class] @@ -440,8 +478,6 @@ module.add_class('SimpleChannel', import_from_module='ns.network', parent=root_module['ns3::Channel']) ## simple-net-device.h (module 'network'): ns3::SimpleNetDevice [class] module.add_class('SimpleNetDevice', import_from_module='ns.network', parent=root_module['ns3::NetDevice']) - ## nstime.h (module 'core'): ns3::TimeChecker [class] - module.add_class('TimeChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) ## nstime.h (module 'core'): ns3::TimeValue [class] module.add_class('TimeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## type-id.h (module 'core'): ns3::TypeIdChecker [class] @@ -458,14 +494,24 @@ module.add_class('UdpServer', parent=root_module['ns3::Application']) ## udp-trace-client.h (module 'applications'): ns3::UdpTraceClient [class] module.add_class('UdpTraceClient', parent=root_module['ns3::Application']) + ## uinteger.h (module 'core'): ns3::UintegerValue [class] + module.add_class('UintegerValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## v4ping.h (module 'applications'): ns3::V4Ping [class] module.add_class('V4Ping', parent=root_module['ns3::Application']) ## address.h (module 'network'): ns3::AddressChecker [class] module.add_class('AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker']) ## address.h (module 'network'): ns3::AddressValue [class] module.add_class('AddressValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue']) + ## application-packet-probe.h (module 'applications'): ns3::ApplicationPacketProbe [class] + module.add_class('ApplicationPacketProbe', parent=root_module['ns3::Probe']) ## error-model.h (module 'network'): ns3::BurstErrorModel [class] module.add_class('BurstErrorModel', import_from_module='ns.network', parent=root_module['ns3::ErrorModel']) + ## basic-data-calculators.h (module 'stats'): ns3::CounterCalculator [class] + module.add_class('CounterCalculator', import_from_module='ns.stats', template_parameters=['unsigned int'], parent=root_module['ns3::DataCalculator']) + ## packet-data-calculators.h (module 'network'): ns3::PacketCounterCalculator [class] + module.add_class('PacketCounterCalculator', import_from_module='ns.network', parent=root_module['ns3::CounterCalculator< unsigned int >']) + ## packet-probe.h (module 'network'): ns3::PacketProbe [class] + module.add_class('PacketProbe', import_from_module='ns.network', parent=root_module['ns3::Probe']) ## packetbb.h (module 'network'): ns3::PbbAddressTlv [class] module.add_class('PbbAddressTlv', import_from_module='ns.network', parent=root_module['ns3::PbbTlv']) module.add_container('std::vector< ns3::Ipv6Address >', 'ns3::Ipv6Address', container_type='vector') @@ -473,6 +519,9 @@ module.add_container('std::list< unsigned int >', 'unsigned int', container_type='list') module.add_container('std::list< ns3::Ptr< ns3::Socket > >', 'ns3::Ptr< ns3::Socket >', container_type='list') module.add_container('std::list< ns3::Ptr< ns3::RadvdPrefix > >', 'ns3::Ptr< ns3::RadvdPrefix >', container_type='list') + typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ns3::GenericPhyTxEndCallback') + typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >*', 'ns3::GenericPhyTxEndCallback*') + typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >&', 'ns3::GenericPhyTxEndCallback&') typehandlers.add_type_alias('ns3::SequenceNumber< short unsigned int, short int >', 'ns3::SequenceNumber16') typehandlers.add_type_alias('ns3::SequenceNumber< short unsigned int, short int >*', 'ns3::SequenceNumber16*') typehandlers.add_type_alias('ns3::SequenceNumber< short unsigned int, short int >&', 'ns3::SequenceNumber16&') @@ -488,9 +537,6 @@ typehandlers.add_type_alias('ns3::Callback< bool, ns3::Ptr< ns3::Packet >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ns3::GenericPhyTxStartCallback') typehandlers.add_type_alias('ns3::Callback< bool, ns3::Ptr< ns3::Packet >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >*', 'ns3::GenericPhyTxStartCallback*') typehandlers.add_type_alias('ns3::Callback< bool, ns3::Ptr< ns3::Packet >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >&', 'ns3::GenericPhyTxStartCallback&') - typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ns3::GenericPhyTxEndCallback') - typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >*', 'ns3::GenericPhyTxEndCallback*') - typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >&', 'ns3::GenericPhyTxEndCallback&') typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ns3::GenericPhyRxEndOkCallback') typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >*', 'ns3::GenericPhyRxEndOkCallback*') typehandlers.add_type_alias('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >&', 'ns3::GenericPhyRxEndOkCallback&') @@ -501,20 +547,66 @@ register_types_ns3_FatalImpl(nested_module) + ## Register a nested module for the namespace Hash + + nested_module = module.add_cpp_namespace('Hash') + register_types_ns3_Hash(nested_module) + + ## Register a nested module for the namespace addressUtils nested_module = module.add_cpp_namespace('addressUtils') register_types_ns3_addressUtils(nested_module) + + ## Register a nested module for the namespace internal + + nested_module = module.add_cpp_namespace('internal') + register_types_ns3_internal(nested_module) + def register_types_ns3_FatalImpl(module): root_module = module.get_root() +def register_types_ns3_Hash(module): + root_module = module.get_root() + + ## hash-function.h (module 'core'): ns3::Hash::Implementation [class] + module.add_class('Implementation', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash32Function_ptr') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash32Function_ptr*') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash32Function_ptr&') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash64Function_ptr') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash64Function_ptr*') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash64Function_ptr&') + + ## Register a nested module for the namespace Function + + nested_module = module.add_cpp_namespace('Function') + register_types_ns3_Hash_Function(nested_module) + + +def register_types_ns3_Hash_Function(module): + root_module = module.get_root() + + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a [class] + module.add_class('Fnv1a', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32 [class] + module.add_class('Hash32', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64 [class] + module.add_class('Hash64', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3 [class] + module.add_class('Murmur3', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + def register_types_ns3_addressUtils(module): root_module = module.get_root() +def register_types_ns3_internal(module): + root_module = module.get_root() + + def register_methods(root_module): register_Ns3Address_methods(root_module, root_module['ns3::Address']) register_Ns3ApplicationContainer_methods(root_module, root_module['ns3::ApplicationContainer']) @@ -536,13 +628,16 @@ register_Ns3ChannelList_methods(root_module, root_module['ns3::ChannelList']) register_Ns3DataOutputCallback_methods(root_module, root_module['ns3::DataOutputCallback']) register_Ns3DataRate_methods(root_module, root_module['ns3::DataRate']) + register_Ns3DelayJitterEstimation_methods(root_module, root_module['ns3::DelayJitterEstimation']) register_Ns3EventId_methods(root_module, root_module['ns3::EventId']) + register_Ns3Hasher_methods(root_module, root_module['ns3::Hasher']) register_Ns3Inet6SocketAddress_methods(root_module, root_module['ns3::Inet6SocketAddress']) register_Ns3InetSocketAddress_methods(root_module, root_module['ns3::InetSocketAddress']) register_Ns3Ipv4Address_methods(root_module, root_module['ns3::Ipv4Address']) register_Ns3Ipv4Mask_methods(root_module, root_module['ns3::Ipv4Mask']) register_Ns3Ipv6Address_methods(root_module, root_module['ns3::Ipv6Address']) register_Ns3Ipv6Prefix_methods(root_module, root_module['ns3::Ipv6Prefix']) + register_Ns3Mac16Address_methods(root_module, root_module['ns3::Mac16Address']) register_Ns3Mac48Address_methods(root_module, root_module['ns3::Mac48Address']) register_Ns3Mac64Address_methods(root_module, root_module['ns3::Mac64Address']) register_Ns3NetDeviceContainer_methods(root_module, root_module['ns3::NetDeviceContainer']) @@ -569,6 +664,7 @@ register_Ns3PcapHelper_methods(root_module, root_module['ns3::PcapHelper']) register_Ns3PcapHelperForDevice_methods(root_module, root_module['ns3::PcapHelperForDevice']) register_Ns3Ping6Helper_methods(root_module, root_module['ns3::Ping6Helper']) + register_Ns3RadvdHelper_methods(root_module, root_module['ns3::RadvdHelper']) register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, root_module['ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter >']) register_Ns3Simulator_methods(root_module, root_module['ns3::Simulator']) register_Ns3StatisticalSummary_methods(root_module, root_module['ns3::StatisticalSummary']) @@ -608,6 +704,7 @@ register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter >']) + register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3NixVector_Ns3Empty_Ns3DefaultDeleter__lt__ns3NixVector__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3OutputStreamWrapper_Ns3Empty_Ns3DefaultDeleter__lt__ns3OutputStreamWrapper__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3Packet_Ns3Empty_Ns3DefaultDeleter__lt__ns3Packet__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter >']) @@ -647,13 +744,17 @@ register_Ns3Channel_methods(root_module, root_module['ns3::Channel']) register_Ns3ConstantRandomVariable_methods(root_module, root_module['ns3::ConstantRandomVariable']) register_Ns3DataCalculator_methods(root_module, root_module['ns3::DataCalculator']) + register_Ns3DataCollectionObject_methods(root_module, root_module['ns3::DataCollectionObject']) register_Ns3DataOutputInterface_methods(root_module, root_module['ns3::DataOutputInterface']) register_Ns3DataRateChecker_methods(root_module, root_module['ns3::DataRateChecker']) register_Ns3DataRateValue_methods(root_module, root_module['ns3::DataRateValue']) register_Ns3DeterministicRandomVariable_methods(root_module, root_module['ns3::DeterministicRandomVariable']) + register_Ns3DoubleValue_methods(root_module, root_module['ns3::DoubleValue']) register_Ns3DropTailQueue_methods(root_module, root_module['ns3::DropTailQueue']) register_Ns3EmpiricalRandomVariable_methods(root_module, root_module['ns3::EmpiricalRandomVariable']) register_Ns3EmptyAttributeValue_methods(root_module, root_module['ns3::EmptyAttributeValue']) + register_Ns3EnumChecker_methods(root_module, root_module['ns3::EnumChecker']) + register_Ns3EnumValue_methods(root_module, root_module['ns3::EnumValue']) register_Ns3ErlangRandomVariable_methods(root_module, root_module['ns3::ErlangRandomVariable']) register_Ns3ErrorModel_methods(root_module, root_module['ns3::ErrorModel']) register_Ns3EthernetHeader_methods(root_module, root_module['ns3::EthernetHeader']) @@ -661,6 +762,7 @@ register_Ns3EventImpl_methods(root_module, root_module['ns3::EventImpl']) register_Ns3ExponentialRandomVariable_methods(root_module, root_module['ns3::ExponentialRandomVariable']) register_Ns3GammaRandomVariable_methods(root_module, root_module['ns3::GammaRandomVariable']) + register_Ns3IntegerValue_methods(root_module, root_module['ns3::IntegerValue']) register_Ns3Ipv4AddressChecker_methods(root_module, root_module['ns3::Ipv4AddressChecker']) register_Ns3Ipv4AddressValue_methods(root_module, root_module['ns3::Ipv4AddressValue']) register_Ns3Ipv4MaskChecker_methods(root_module, root_module['ns3::Ipv4MaskChecker']) @@ -671,9 +773,14 @@ register_Ns3Ipv6PrefixValue_methods(root_module, root_module['ns3::Ipv6PrefixValue']) register_Ns3ListErrorModel_methods(root_module, root_module['ns3::ListErrorModel']) register_Ns3LogNormalRandomVariable_methods(root_module, root_module['ns3::LogNormalRandomVariable']) + register_Ns3Mac16AddressChecker_methods(root_module, root_module['ns3::Mac16AddressChecker']) + register_Ns3Mac16AddressValue_methods(root_module, root_module['ns3::Mac16AddressValue']) register_Ns3Mac48AddressChecker_methods(root_module, root_module['ns3::Mac48AddressChecker']) register_Ns3Mac48AddressValue_methods(root_module, root_module['ns3::Mac48AddressValue']) + register_Ns3Mac64AddressChecker_methods(root_module, root_module['ns3::Mac64AddressChecker']) + register_Ns3Mac64AddressValue_methods(root_module, root_module['ns3::Mac64AddressValue']) register_Ns3MinMaxAvgTotalCalculator__Double_methods(root_module, root_module['ns3::MinMaxAvgTotalCalculator< double >']) + register_Ns3MinMaxAvgTotalCalculator__Unsigned_int_methods(root_module, root_module['ns3::MinMaxAvgTotalCalculator< unsigned int >']) register_Ns3NetDevice_methods(root_module, root_module['ns3::NetDevice']) register_Ns3NixVector_methods(root_module, root_module['ns3::NixVector']) register_Ns3Node_methods(root_module, root_module['ns3::Node']) @@ -684,6 +791,7 @@ register_Ns3OutputStreamWrapper_methods(root_module, root_module['ns3::OutputStreamWrapper']) register_Ns3Packet_methods(root_module, root_module['ns3::Packet']) register_Ns3PacketSink_methods(root_module, root_module['ns3::PacketSink']) + register_Ns3PacketSizeMinMaxAvgTotalCalculator_methods(root_module, root_module['ns3::PacketSizeMinMaxAvgTotalCalculator']) register_Ns3PacketSocket_methods(root_module, root_module['ns3::PacketSocket']) register_Ns3PacketSocketFactory_methods(root_module, root_module['ns3::PacketSocketFactory']) register_Ns3ParetoRandomVariable_methods(root_module, root_module['ns3::ParetoRandomVariable']) @@ -696,6 +804,7 @@ register_Ns3PbbPacket_methods(root_module, root_module['ns3::PbbPacket']) register_Ns3PbbTlv_methods(root_module, root_module['ns3::PbbTlv']) register_Ns3Ping6_methods(root_module, root_module['ns3::Ping6']) + register_Ns3Probe_methods(root_module, root_module['ns3::Probe']) register_Ns3Radvd_methods(root_module, root_module['ns3::Radvd']) register_Ns3RadvdInterface_methods(root_module, root_module['ns3::RadvdInterface']) register_Ns3RadvdPrefix_methods(root_module, root_module['ns3::RadvdPrefix']) @@ -703,7 +812,6 @@ register_Ns3ReceiveListErrorModel_methods(root_module, root_module['ns3::ReceiveListErrorModel']) register_Ns3SimpleChannel_methods(root_module, root_module['ns3::SimpleChannel']) register_Ns3SimpleNetDevice_methods(root_module, root_module['ns3::SimpleNetDevice']) - register_Ns3TimeChecker_methods(root_module, root_module['ns3::TimeChecker']) register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue']) register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker']) register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue']) @@ -712,11 +820,21 @@ register_Ns3UdpEchoServer_methods(root_module, root_module['ns3::UdpEchoServer']) register_Ns3UdpServer_methods(root_module, root_module['ns3::UdpServer']) register_Ns3UdpTraceClient_methods(root_module, root_module['ns3::UdpTraceClient']) + register_Ns3UintegerValue_methods(root_module, root_module['ns3::UintegerValue']) register_Ns3V4Ping_methods(root_module, root_module['ns3::V4Ping']) register_Ns3AddressChecker_methods(root_module, root_module['ns3::AddressChecker']) register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue']) + register_Ns3ApplicationPacketProbe_methods(root_module, root_module['ns3::ApplicationPacketProbe']) register_Ns3BurstErrorModel_methods(root_module, root_module['ns3::BurstErrorModel']) + register_Ns3CounterCalculator__Unsigned_int_methods(root_module, root_module['ns3::CounterCalculator< unsigned int >']) + register_Ns3PacketCounterCalculator_methods(root_module, root_module['ns3::PacketCounterCalculator']) + register_Ns3PacketProbe_methods(root_module, root_module['ns3::PacketProbe']) register_Ns3PbbAddressTlv_methods(root_module, root_module['ns3::PbbAddressTlv']) + register_Ns3HashImplementation_methods(root_module, root_module['ns3::Hash::Implementation']) + register_Ns3HashFunctionFnv1a_methods(root_module, root_module['ns3::Hash::Function::Fnv1a']) + register_Ns3HashFunctionHash32_methods(root_module, root_module['ns3::Hash::Function::Hash32']) + register_Ns3HashFunctionHash64_methods(root_module, root_module['ns3::Hash::Function::Hash64']) + register_Ns3HashFunctionMurmur3_methods(root_module, root_module['ns3::Hash::Function::Murmur3']) return def register_Ns3Address_methods(root_module, cls): @@ -881,42 +999,42 @@ cls.add_method('CreateFileStream', 'ns3::Ptr< ns3::OutputStreamWrapper >', [param('std::string', 'filename'), param('std::_Ios_Openmode', 'filemode', default_value='std::ios_base::out')]) - ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultDequeueSinkWithContext(ns3::Ptr file, std::string context, ns3::Ptr p) [member function] + ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultDequeueSinkWithContext(ns3::Ptr file, std::string context, ns3::Ptr p) [member function] cls.add_method('DefaultDequeueSinkWithContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('std::string', 'context'), param('ns3::Ptr< ns3::Packet const >', 'p')], is_static=True) - ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultDequeueSinkWithoutContext(ns3::Ptr file, ns3::Ptr p) [member function] + ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultDequeueSinkWithoutContext(ns3::Ptr file, ns3::Ptr p) [member function] cls.add_method('DefaultDequeueSinkWithoutContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('ns3::Ptr< ns3::Packet const >', 'p')], is_static=True) - ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultDropSinkWithContext(ns3::Ptr file, std::string context, ns3::Ptr p) [member function] + ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultDropSinkWithContext(ns3::Ptr file, std::string context, ns3::Ptr p) [member function] cls.add_method('DefaultDropSinkWithContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('std::string', 'context'), param('ns3::Ptr< ns3::Packet const >', 'p')], is_static=True) - ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultDropSinkWithoutContext(ns3::Ptr file, ns3::Ptr p) [member function] + ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultDropSinkWithoutContext(ns3::Ptr file, ns3::Ptr p) [member function] cls.add_method('DefaultDropSinkWithoutContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('ns3::Ptr< ns3::Packet const >', 'p')], is_static=True) - ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultEnqueueSinkWithContext(ns3::Ptr file, std::string context, ns3::Ptr p) [member function] + ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultEnqueueSinkWithContext(ns3::Ptr file, std::string context, ns3::Ptr p) [member function] cls.add_method('DefaultEnqueueSinkWithContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('std::string', 'context'), param('ns3::Ptr< ns3::Packet const >', 'p')], is_static=True) - ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultEnqueueSinkWithoutContext(ns3::Ptr file, ns3::Ptr p) [member function] + ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultEnqueueSinkWithoutContext(ns3::Ptr file, ns3::Ptr p) [member function] cls.add_method('DefaultEnqueueSinkWithoutContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('ns3::Ptr< ns3::Packet const >', 'p')], is_static=True) - ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultReceiveSinkWithContext(ns3::Ptr file, std::string context, ns3::Ptr p) [member function] + ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultReceiveSinkWithContext(ns3::Ptr file, std::string context, ns3::Ptr p) [member function] cls.add_method('DefaultReceiveSinkWithContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('std::string', 'context'), param('ns3::Ptr< ns3::Packet const >', 'p')], is_static=True) - ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultReceiveSinkWithoutContext(ns3::Ptr file, ns3::Ptr p) [member function] + ## trace-helper.h (module 'network'): static void ns3::AsciiTraceHelper::DefaultReceiveSinkWithoutContext(ns3::Ptr file, ns3::Ptr p) [member function] cls.add_method('DefaultReceiveSinkWithoutContext', 'void', [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'file'), param('ns3::Ptr< ns3::Packet const >', 'p')], @@ -1031,64 +1149,64 @@ return def register_Ns3Average__Double_methods(root_module, cls): - ## average.h (module 'tools'): ns3::Average::Average(ns3::Average const & arg0) [copy constructor] + ## average.h (module 'stats'): ns3::Average::Average(ns3::Average const & arg0) [copy constructor] cls.add_constructor([param('ns3::Average< double > const &', 'arg0')]) - ## average.h (module 'tools'): ns3::Average::Average() [constructor] + ## average.h (module 'stats'): ns3::Average::Average() [constructor] cls.add_constructor([]) - ## average.h (module 'tools'): double ns3::Average::Avg() const [member function] + ## average.h (module 'stats'): double ns3::Average::Avg() const [member function] cls.add_method('Avg', 'double', [], is_const=True) - ## average.h (module 'tools'): uint32_t ns3::Average::Count() const [member function] + ## average.h (module 'stats'): uint32_t ns3::Average::Count() const [member function] cls.add_method('Count', 'uint32_t', [], is_const=True) - ## average.h (module 'tools'): double ns3::Average::Error90() const [member function] + ## average.h (module 'stats'): double ns3::Average::Error90() const [member function] cls.add_method('Error90', 'double', [], is_const=True) - ## average.h (module 'tools'): double ns3::Average::Error95() const [member function] + ## average.h (module 'stats'): double ns3::Average::Error95() const [member function] cls.add_method('Error95', 'double', [], is_const=True) - ## average.h (module 'tools'): double ns3::Average::Error99() const [member function] + ## average.h (module 'stats'): double ns3::Average::Error99() const [member function] cls.add_method('Error99', 'double', [], is_const=True) - ## average.h (module 'tools'): double ns3::Average::Max() const [member function] + ## average.h (module 'stats'): double ns3::Average::Max() const [member function] cls.add_method('Max', 'double', [], is_const=True) - ## average.h (module 'tools'): double ns3::Average::Mean() const [member function] + ## average.h (module 'stats'): double ns3::Average::Mean() const [member function] cls.add_method('Mean', 'double', [], is_const=True) - ## average.h (module 'tools'): double ns3::Average::Min() const [member function] + ## average.h (module 'stats'): double ns3::Average::Min() const [member function] cls.add_method('Min', 'double', [], is_const=True) - ## average.h (module 'tools'): void ns3::Average::Reset() [member function] + ## average.h (module 'stats'): void ns3::Average::Reset() [member function] cls.add_method('Reset', 'void', []) - ## average.h (module 'tools'): double ns3::Average::Stddev() const [member function] + ## average.h (module 'stats'): double ns3::Average::Stddev() const [member function] cls.add_method('Stddev', 'double', [], is_const=True) - ## average.h (module 'tools'): void ns3::Average::Update(double const & x) [member function] + ## average.h (module 'stats'): void ns3::Average::Update(double const & x) [member function] cls.add_method('Update', 'void', [param('double const &', 'x')]) - ## average.h (module 'tools'): double ns3::Average::Var() const [member function] + ## average.h (module 'stats'): double ns3::Average::Var() const [member function] cls.add_method('Var', 'double', [], @@ -1587,6 +1705,32 @@ is_const=True) return +def register_Ns3DelayJitterEstimation_methods(root_module, cls): + ## delay-jitter-estimation.h (module 'network'): ns3::DelayJitterEstimation::DelayJitterEstimation(ns3::DelayJitterEstimation const & arg0) [copy constructor] + cls.add_constructor([param('ns3::DelayJitterEstimation const &', 'arg0')]) + ## delay-jitter-estimation.h (module 'network'): ns3::DelayJitterEstimation::DelayJitterEstimation() [constructor] + cls.add_constructor([]) + ## delay-jitter-estimation.h (module 'network'): ns3::Time ns3::DelayJitterEstimation::GetLastDelay() const [member function] + cls.add_method('GetLastDelay', + 'ns3::Time', + [], + is_const=True) + ## delay-jitter-estimation.h (module 'network'): uint64_t ns3::DelayJitterEstimation::GetLastJitter() const [member function] + cls.add_method('GetLastJitter', + 'uint64_t', + [], + is_const=True) + ## delay-jitter-estimation.h (module 'network'): static void ns3::DelayJitterEstimation::PrepareTx(ns3::Ptr packet) [member function] + cls.add_method('PrepareTx', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')], + is_static=True) + ## delay-jitter-estimation.h (module 'network'): void ns3::DelayJitterEstimation::RecordRx(ns3::Ptr packet) [member function] + cls.add_method('RecordRx', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')]) + return + def register_Ns3EventId_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_binary_comparison_operator('==') @@ -1632,6 +1776,35 @@ is_const=True) return +def register_Ns3Hasher_methods(root_module, cls): + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Hasher const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hasher const &', 'arg0')]) + ## hash.h (module 'core'): ns3::Hasher::Hasher() [constructor] + cls.add_constructor([]) + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Ptr hp) [constructor] + cls.add_constructor([param('ns3::Ptr< ns3::Hash::Implementation >', 'hp')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(std::string const s) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(std::string const s) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): ns3::Hasher & ns3::Hasher::clear() [member function] + cls.add_method('clear', + 'ns3::Hasher &', + []) + return + def register_Ns3Inet6SocketAddress_methods(root_module, cls): ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(ns3::Inet6SocketAddress const & arg0) [copy constructor] cls.add_constructor([param('ns3::Inet6SocketAddress const &', 'arg0')]) @@ -1983,6 +2156,11 @@ 'bool', [], is_const=True) + ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsDocumentation() const [member function] + cls.add_method('IsDocumentation', + 'bool', + [], + is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsEqual(ns3::Ipv6Address const & other) const [member function] cls.add_method('IsEqual', 'bool', @@ -2022,16 +2200,36 @@ 'bool', [], is_const=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac16Address addr, ns3::Ipv6Address prefix) [member function] + cls.add_method('MakeAutoconfiguredAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac16Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac48Address addr, ns3::Ipv6Address prefix) [member function] cls.add_method('MakeAutoconfiguredAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac64Address addr, ns3::Ipv6Address prefix) [member function] + cls.add_method('MakeAutoconfiguredAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac64Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], + is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac16Address mac) [member function] + cls.add_method('MakeAutoconfiguredLinkLocalAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac16Address', 'mac')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac48Address mac) [member function] cls.add_method('MakeAutoconfiguredLinkLocalAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'mac')], is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac64Address mac) [member function] + cls.add_method('MakeAutoconfiguredLinkLocalAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac64Address', 'mac')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeIpv4MappedAddress(ns3::Ipv4Address addr) [member function] cls.add_method('MakeIpv4MappedAddress', 'ns3::Ipv6Address', @@ -2120,6 +2318,43 @@ is_const=True) return +def register_Ns3Mac16Address_methods(root_module, cls): + cls.add_binary_comparison_operator('!=') + cls.add_binary_comparison_operator('<') + cls.add_output_stream_operator() + cls.add_binary_comparison_operator('==') + ## mac16-address.h (module 'network'): ns3::Mac16Address::Mac16Address(ns3::Mac16Address const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Mac16Address const &', 'arg0')]) + ## mac16-address.h (module 'network'): ns3::Mac16Address::Mac16Address() [constructor] + cls.add_constructor([]) + ## mac16-address.h (module 'network'): ns3::Mac16Address::Mac16Address(char const * str) [constructor] + cls.add_constructor([param('char const *', 'str')]) + ## mac16-address.h (module 'network'): static ns3::Mac16Address ns3::Mac16Address::Allocate() [member function] + cls.add_method('Allocate', + 'ns3::Mac16Address', + [], + is_static=True) + ## mac16-address.h (module 'network'): static ns3::Mac16Address ns3::Mac16Address::ConvertFrom(ns3::Address const & address) [member function] + cls.add_method('ConvertFrom', + 'ns3::Mac16Address', + [param('ns3::Address const &', 'address')], + is_static=True) + ## mac16-address.h (module 'network'): void ns3::Mac16Address::CopyFrom(uint8_t const * buffer) [member function] + cls.add_method('CopyFrom', + 'void', + [param('uint8_t const *', 'buffer')]) + ## mac16-address.h (module 'network'): void ns3::Mac16Address::CopyTo(uint8_t * buffer) const [member function] + cls.add_method('CopyTo', + 'void', + [param('uint8_t *', 'buffer')], + is_const=True) + ## mac16-address.h (module 'network'): static bool ns3::Mac16Address::IsMatchingType(ns3::Address const & address) [member function] + cls.add_method('IsMatchingType', + 'bool', + [param('ns3::Address const &', 'address')], + is_static=True) + return + def register_Ns3Mac48Address_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_binary_comparison_operator('<') @@ -2194,6 +2429,7 @@ def register_Ns3Mac64Address_methods(root_module, cls): cls.add_binary_comparison_operator('!=') + cls.add_binary_comparison_operator('<') cls.add_output_stream_operator() cls.add_binary_comparison_operator('==') ## mac64-address.h (module 'network'): ns3::Mac64Address::Mac64Address(ns3::Mac64Address const & arg0) [copy constructor] @@ -2808,6 +3044,10 @@ cls.add_method('RemoveAll', 'void', []) + ## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Replace(ns3::Tag & tag) [member function] + cls.add_method('Replace', + 'bool', + [param('ns3::Tag &', 'tag')]) return def register_Ns3PacketTagListTagData_methods(root_module, cls): @@ -3105,11 +3345,11 @@ cls.add_method('Write', 'void', [param('uint32_t', 'tsSec'), param('uint32_t', 'tsUsec'), param('uint8_t const * const', 'data'), param('uint32_t', 'totalLen')]) - ## pcap-file.h (module 'network'): void ns3::PcapFile::Write(uint32_t tsSec, uint32_t tsUsec, ns3::Ptr p) [member function] + ## pcap-file.h (module 'network'): void ns3::PcapFile::Write(uint32_t tsSec, uint32_t tsUsec, ns3::Ptr p) [member function] 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 p) [member function] + ## pcap-file.h (module 'network'): void ns3::PcapFile::Write(uint32_t tsSec, uint32_t tsUsec, ns3::Header & header, ns3::Ptr 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')]) @@ -3205,6 +3445,41 @@ [param('std::vector< ns3::Ipv6Address >', 'routers')]) return +def register_Ns3RadvdHelper_methods(root_module, cls): + ## radvd-helper.h (module 'applications'): ns3::RadvdHelper::RadvdHelper(ns3::RadvdHelper const & arg0) [copy constructor] + cls.add_constructor([param('ns3::RadvdHelper const &', 'arg0')]) + ## radvd-helper.h (module 'applications'): ns3::RadvdHelper::RadvdHelper() [constructor] + cls.add_constructor([]) + ## radvd-helper.h (module 'applications'): void ns3::RadvdHelper::AddAnnouncedPrefix(uint32_t interface, ns3::Ipv6Address prefix, uint32_t prefixLength) [member function] + cls.add_method('AddAnnouncedPrefix', + 'void', + [param('uint32_t', 'interface'), param('ns3::Ipv6Address', 'prefix'), param('uint32_t', 'prefixLength')]) + ## radvd-helper.h (module 'applications'): void ns3::RadvdHelper::ClearPrefixes() [member function] + cls.add_method('ClearPrefixes', + 'void', + []) + ## radvd-helper.h (module 'applications'): void ns3::RadvdHelper::DisableDefaultRouterForInterface(uint32_t interface) [member function] + cls.add_method('DisableDefaultRouterForInterface', + 'void', + [param('uint32_t', 'interface')]) + ## radvd-helper.h (module 'applications'): void ns3::RadvdHelper::EnableDefaultRouterForInterface(uint32_t interface) [member function] + cls.add_method('EnableDefaultRouterForInterface', + 'void', + [param('uint32_t', 'interface')]) + ## radvd-helper.h (module 'applications'): ns3::Ptr ns3::RadvdHelper::GetRadvdInterface(uint32_t interface) [member function] + cls.add_method('GetRadvdInterface', + 'ns3::Ptr< ns3::RadvdInterface >', + [param('uint32_t', 'interface')]) + ## radvd-helper.h (module 'applications'): ns3::ApplicationContainer ns3::RadvdHelper::Install(ns3::Ptr node) [member function] + cls.add_method('Install', + 'ns3::ApplicationContainer', + [param('ns3::Ptr< ns3::Node >', 'node')]) + ## radvd-helper.h (module 'applications'): void ns3::RadvdHelper::SetAttribute(std::string name, ns3::AttributeValue const & value) [member function] + cls.add_method('SetAttribute', + 'void', + [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) + return + def register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount::SimpleRefCount() [constructor] cls.add_constructor([]) @@ -3517,6 +3792,11 @@ 'std::string', [], is_const=True) + ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetHash() const [member function] + cls.add_method('GetHash', + 'uint32_t', + [], + is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeId::GetName() const [member function] cls.add_method('GetName', 'std::string', @@ -3576,6 +3856,16 @@ 'bool', [param('std::string', 'name'), param('ns3::TypeId::AttributeInformation *', 'info', transfer_ownership=False)], is_const=True) + ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByHash(uint32_t hash) [member function] + cls.add_method('LookupByHash', + 'ns3::TypeId', + [param('uint32_t', 'hash')], + is_static=True) + ## type-id.h (module 'core'): static bool ns3::TypeId::LookupByHashFailSafe(uint32_t hash, ns3::TypeId * tid) [member function] + cls.add_method('LookupByHashFailSafe', + 'bool', + [param('uint32_t', 'hash'), param('ns3::TypeId *', 'tid')], + is_static=True) ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByName(std::string name) [member function] cls.add_method('LookupByName', 'ns3::TypeId', @@ -4319,11 +4609,11 @@ cls.add_method('Init', 'void', [param('uint32_t', 'dataLinkType'), param('uint32_t', 'snapLen', default_value='std::numeric_limits::max()'), param('int32_t', 'tzCorrection', default_value='ns3::PcapFile::ZONE_DEFAULT')]) - ## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Write(ns3::Time t, ns3::Ptr p) [member function] + ## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Write(ns3::Time t, ns3::Ptr p) [member function] 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 p) [member function] + ## pcap-file-wrapper.h (module 'network'): void ns3::PcapFileWrapper::Write(ns3::Time t, ns3::Header & header, ns3::Ptr p) [member function] cls.add_method('Write', 'void', [param('ns3::Time', 't'), param('ns3::Header &', 'header'), param('ns3::Ptr< ns3::Packet const >', 'p')]) @@ -4418,7 +4708,7 @@ 'bool', [], is_const=True) - ## queue.h (module 'network'): ns3::Ptr ns3::Queue::Peek() const [member function] + ## queue.h (module 'network'): ns3::Ptr ns3::Queue::Peek() const [member function] cls.add_method('Peek', 'ns3::Ptr< ns3::Packet const >', [], @@ -4442,7 +4732,7 @@ 'bool', [param('ns3::Ptr< ns3::Packet >', 'p')], is_pure_virtual=True, visibility='private', is_virtual=True) - ## queue.h (module 'network'): ns3::Ptr ns3::Queue::DoPeek() const [member function] + ## queue.h (module 'network'): ns3::Ptr ns3::Queue::DoPeek() const [member function] cls.add_method('DoPeek', 'ns3::Ptr< ns3::Packet const >', [], @@ -4636,7 +4926,7 @@ 'bool', [param('ns3::Ptr< ns3::Packet >', 'p')], visibility='private', is_virtual=True) - ## red-queue.h (module 'network'): ns3::Ptr ns3::RedQueue::DoPeek() const [member function] + ## red-queue.h (module 'network'): ns3::Ptr ns3::RedQueue::DoPeek() const [member function] cls.add_method('DoPeek', 'ns3::Ptr< ns3::Packet const >', [], @@ -4807,6 +5097,18 @@ is_static=True) return +def register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter< ns3::Hash::Implementation > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + def register_Ns3SimpleRefCount__Ns3NixVector_Ns3Empty_Ns3DefaultDeleter__lt__ns3NixVector__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] cls.add_constructor([]) @@ -5689,11 +5991,26 @@ 'bool', [], is_const=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Max() [member function] + cls.add_method('Max', + 'ns3::Time', + [], + is_static=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Min() [member function] + cls.add_method('Min', + 'ns3::Time', + [], + is_static=True) ## nstime.h (module 'core'): static void ns3::Time::SetResolution(ns3::Time::Unit resolution) [member function] cls.add_method('SetResolution', 'void', [param('ns3::Time::Unit', 'resolution')], is_static=True) + ## nstime.h (module 'core'): static bool ns3::Time::StaticInit() [member function] + cls.add_method('StaticInit', + 'bool', + [], + is_static=True) ## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function] cls.add_method('To', 'ns3::int64x64_t', @@ -6348,6 +6665,40 @@ visibility='protected', is_virtual=True) return +def register_Ns3DataCollectionObject_methods(root_module, cls): + ## data-collection-object.h (module 'stats'): ns3::DataCollectionObject::DataCollectionObject(ns3::DataCollectionObject const & arg0) [copy constructor] + cls.add_constructor([param('ns3::DataCollectionObject const &', 'arg0')]) + ## data-collection-object.h (module 'stats'): ns3::DataCollectionObject::DataCollectionObject() [constructor] + cls.add_constructor([]) + ## data-collection-object.h (module 'stats'): void ns3::DataCollectionObject::Disable() [member function] + cls.add_method('Disable', + 'void', + []) + ## data-collection-object.h (module 'stats'): void ns3::DataCollectionObject::Enable() [member function] + cls.add_method('Enable', + 'void', + []) + ## data-collection-object.h (module 'stats'): std::string ns3::DataCollectionObject::GetName() const [member function] + cls.add_method('GetName', + 'std::string', + [], + is_const=True) + ## data-collection-object.h (module 'stats'): static ns3::TypeId ns3::DataCollectionObject::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## data-collection-object.h (module 'stats'): bool ns3::DataCollectionObject::IsEnabled() const [member function] + cls.add_method('IsEnabled', + 'bool', + [], + is_const=True, is_virtual=True) + ## data-collection-object.h (module 'stats'): void ns3::DataCollectionObject::SetName(std::string name) [member function] + cls.add_method('SetName', + 'void', + [param('std::string', 'name')]) + return + def register_Ns3DataOutputInterface_methods(root_module, cls): ## data-output-interface.h (module 'stats'): ns3::DataOutputInterface::DataOutputInterface(ns3::DataOutputInterface const & arg0) [copy constructor] cls.add_constructor([param('ns3::DataOutputInterface const &', 'arg0')]) @@ -6438,6 +6789,39 @@ is_virtual=True) return +def register_Ns3DoubleValue_methods(root_module, cls): + ## double.h (module 'core'): ns3::DoubleValue::DoubleValue() [constructor] + cls.add_constructor([]) + ## double.h (module 'core'): ns3::DoubleValue::DoubleValue(ns3::DoubleValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::DoubleValue const &', 'arg0')]) + ## double.h (module 'core'): ns3::DoubleValue::DoubleValue(double const & value) [constructor] + cls.add_constructor([param('double const &', 'value')]) + ## double.h (module 'core'): ns3::Ptr ns3::DoubleValue::Copy() const [member function] + cls.add_method('Copy', + 'ns3::Ptr< ns3::AttributeValue >', + [], + is_const=True, is_virtual=True) + ## double.h (module 'core'): bool ns3::DoubleValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] + cls.add_method('DeserializeFromString', + 'bool', + [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_virtual=True) + ## double.h (module 'core'): double ns3::DoubleValue::Get() const [member function] + cls.add_method('Get', + 'double', + [], + is_const=True) + ## double.h (module 'core'): std::string ns3::DoubleValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## double.h (module 'core'): void ns3::DoubleValue::Set(double const & value) [member function] + cls.add_method('Set', + 'void', + [param('double const &', 'value')]) + return + def register_Ns3DropTailQueue_methods(root_module, cls): ## drop-tail-queue.h (module 'network'): ns3::DropTailQueue::DropTailQueue(ns3::DropTailQueue const & arg0) [copy constructor] cls.add_constructor([param('ns3::DropTailQueue const &', 'arg0')]) @@ -6466,7 +6850,7 @@ 'bool', [param('ns3::Ptr< ns3::Packet >', 'p')], visibility='private', is_virtual=True) - ## drop-tail-queue.h (module 'network'): ns3::Ptr ns3::DropTailQueue::DoPeek() const [member function] + ## drop-tail-queue.h (module 'network'): ns3::Ptr ns3::DropTailQueue::DoPeek() const [member function] cls.add_method('DoPeek', 'ns3::Ptr< ns3::Packet const >', [], @@ -6529,6 +6913,84 @@ is_const=True, visibility='private', is_virtual=True) return +def register_Ns3EnumChecker_methods(root_module, cls): + ## enum.h (module 'core'): ns3::EnumChecker::EnumChecker(ns3::EnumChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::EnumChecker const &', 'arg0')]) + ## enum.h (module 'core'): ns3::EnumChecker::EnumChecker() [constructor] + cls.add_constructor([]) + ## enum.h (module 'core'): void ns3::EnumChecker::Add(int v, std::string name) [member function] + cls.add_method('Add', + 'void', + [param('int', 'v'), param('std::string', 'name')]) + ## enum.h (module 'core'): void ns3::EnumChecker::AddDefault(int v, std::string name) [member function] + cls.add_method('AddDefault', + 'void', + [param('int', 'v'), param('std::string', 'name')]) + ## enum.h (module 'core'): bool ns3::EnumChecker::Check(ns3::AttributeValue const & value) const [member function] + cls.add_method('Check', + 'bool', + [param('ns3::AttributeValue const &', 'value')], + is_const=True, is_virtual=True) + ## enum.h (module 'core'): bool ns3::EnumChecker::Copy(ns3::AttributeValue const & src, ns3::AttributeValue & dst) const [member function] + cls.add_method('Copy', + 'bool', + [param('ns3::AttributeValue const &', 'src'), param('ns3::AttributeValue &', 'dst')], + is_const=True, is_virtual=True) + ## enum.h (module 'core'): ns3::Ptr ns3::EnumChecker::Create() const [member function] + cls.add_method('Create', + 'ns3::Ptr< ns3::AttributeValue >', + [], + is_const=True, is_virtual=True) + ## enum.h (module 'core'): std::string ns3::EnumChecker::GetUnderlyingTypeInformation() const [member function] + cls.add_method('GetUnderlyingTypeInformation', + 'std::string', + [], + is_const=True, is_virtual=True) + ## enum.h (module 'core'): std::string ns3::EnumChecker::GetValueTypeName() const [member function] + cls.add_method('GetValueTypeName', + 'std::string', + [], + is_const=True, is_virtual=True) + ## enum.h (module 'core'): bool ns3::EnumChecker::HasUnderlyingTypeInformation() const [member function] + cls.add_method('HasUnderlyingTypeInformation', + 'bool', + [], + is_const=True, is_virtual=True) + return + +def register_Ns3EnumValue_methods(root_module, cls): + ## enum.h (module 'core'): ns3::EnumValue::EnumValue(ns3::EnumValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::EnumValue const &', 'arg0')]) + ## enum.h (module 'core'): ns3::EnumValue::EnumValue() [constructor] + cls.add_constructor([]) + ## enum.h (module 'core'): ns3::EnumValue::EnumValue(int v) [constructor] + cls.add_constructor([param('int', 'v')]) + ## enum.h (module 'core'): ns3::Ptr ns3::EnumValue::Copy() const [member function] + cls.add_method('Copy', + 'ns3::Ptr< ns3::AttributeValue >', + [], + is_const=True, is_virtual=True) + ## enum.h (module 'core'): bool ns3::EnumValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] + cls.add_method('DeserializeFromString', + 'bool', + [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_virtual=True) + ## enum.h (module 'core'): int ns3::EnumValue::Get() const [member function] + cls.add_method('Get', + 'int', + [], + is_const=True) + ## enum.h (module 'core'): std::string ns3::EnumValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## enum.h (module 'core'): void ns3::EnumValue::Set(int v) [member function] + cls.add_method('Set', + 'void', + [param('int', 'v')]) + return + def register_Ns3ErlangRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::ErlangRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', @@ -6700,11 +7162,11 @@ cls.add_constructor([param('ns3::EthernetTrailer const &', 'arg0')]) ## ethernet-trailer.h (module 'network'): ns3::EthernetTrailer::EthernetTrailer() [constructor] cls.add_constructor([]) - ## ethernet-trailer.h (module 'network'): void ns3::EthernetTrailer::CalcFcs(ns3::Ptr p) [member function] + ## ethernet-trailer.h (module 'network'): void ns3::EthernetTrailer::CalcFcs(ns3::Ptr p) [member function] cls.add_method('CalcFcs', 'void', [param('ns3::Ptr< ns3::Packet const >', 'p')]) - ## ethernet-trailer.h (module 'network'): bool ns3::EthernetTrailer::CheckFcs(ns3::Ptr p) const [member function] + ## ethernet-trailer.h (module 'network'): bool ns3::EthernetTrailer::CheckFcs(ns3::Ptr p) const [member function] cls.add_method('CheckFcs', 'bool', [param('ns3::Ptr< ns3::Packet const >', 'p')], @@ -6858,6 +7320,39 @@ is_virtual=True) return +def register_Ns3IntegerValue_methods(root_module, cls): + ## integer.h (module 'core'): ns3::IntegerValue::IntegerValue() [constructor] + cls.add_constructor([]) + ## integer.h (module 'core'): ns3::IntegerValue::IntegerValue(ns3::IntegerValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::IntegerValue const &', 'arg0')]) + ## integer.h (module 'core'): ns3::IntegerValue::IntegerValue(int64_t const & value) [constructor] + cls.add_constructor([param('int64_t const &', 'value')]) + ## integer.h (module 'core'): ns3::Ptr ns3::IntegerValue::Copy() const [member function] + cls.add_method('Copy', + 'ns3::Ptr< ns3::AttributeValue >', + [], + is_const=True, is_virtual=True) + ## integer.h (module 'core'): bool ns3::IntegerValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] + cls.add_method('DeserializeFromString', + 'bool', + [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_virtual=True) + ## integer.h (module 'core'): int64_t ns3::IntegerValue::Get() const [member function] + cls.add_method('Get', + 'int64_t', + [], + is_const=True) + ## integer.h (module 'core'): std::string ns3::IntegerValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## integer.h (module 'core'): void ns3::IntegerValue::Set(int64_t const & value) [member function] + cls.add_method('Set', + 'void', + [param('int64_t const &', 'value')]) + return + def register_Ns3Ipv4AddressChecker_methods(root_module, cls): ## ipv4-address.h (module 'network'): ns3::Ipv4AddressChecker::Ipv4AddressChecker() [constructor] cls.add_constructor([]) @@ -7087,6 +7582,46 @@ is_virtual=True) return +def register_Ns3Mac16AddressChecker_methods(root_module, cls): + ## mac16-address.h (module 'network'): ns3::Mac16AddressChecker::Mac16AddressChecker() [constructor] + cls.add_constructor([]) + ## mac16-address.h (module 'network'): ns3::Mac16AddressChecker::Mac16AddressChecker(ns3::Mac16AddressChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Mac16AddressChecker const &', 'arg0')]) + return + +def register_Ns3Mac16AddressValue_methods(root_module, cls): + ## mac16-address.h (module 'network'): ns3::Mac16AddressValue::Mac16AddressValue() [constructor] + cls.add_constructor([]) + ## mac16-address.h (module 'network'): ns3::Mac16AddressValue::Mac16AddressValue(ns3::Mac16AddressValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Mac16AddressValue const &', 'arg0')]) + ## mac16-address.h (module 'network'): ns3::Mac16AddressValue::Mac16AddressValue(ns3::Mac16Address const & value) [constructor] + cls.add_constructor([param('ns3::Mac16Address const &', 'value')]) + ## mac16-address.h (module 'network'): ns3::Ptr ns3::Mac16AddressValue::Copy() const [member function] + cls.add_method('Copy', + 'ns3::Ptr< ns3::AttributeValue >', + [], + is_const=True, is_virtual=True) + ## mac16-address.h (module 'network'): bool ns3::Mac16AddressValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] + cls.add_method('DeserializeFromString', + 'bool', + [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_virtual=True) + ## mac16-address.h (module 'network'): ns3::Mac16Address ns3::Mac16AddressValue::Get() const [member function] + cls.add_method('Get', + 'ns3::Mac16Address', + [], + is_const=True) + ## mac16-address.h (module 'network'): std::string ns3::Mac16AddressValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## mac16-address.h (module 'network'): void ns3::Mac16AddressValue::Set(ns3::Mac16Address const & value) [member function] + cls.add_method('Set', + 'void', + [param('ns3::Mac16Address const &', 'value')]) + return + def register_Ns3Mac48AddressChecker_methods(root_module, cls): ## mac48-address.h (module 'network'): ns3::Mac48AddressChecker::Mac48AddressChecker() [constructor] cls.add_constructor([]) @@ -7127,6 +7662,46 @@ [param('ns3::Mac48Address const &', 'value')]) return +def register_Ns3Mac64AddressChecker_methods(root_module, cls): + ## mac64-address.h (module 'network'): ns3::Mac64AddressChecker::Mac64AddressChecker() [constructor] + cls.add_constructor([]) + ## mac64-address.h (module 'network'): ns3::Mac64AddressChecker::Mac64AddressChecker(ns3::Mac64AddressChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Mac64AddressChecker const &', 'arg0')]) + return + +def register_Ns3Mac64AddressValue_methods(root_module, cls): + ## mac64-address.h (module 'network'): ns3::Mac64AddressValue::Mac64AddressValue() [constructor] + cls.add_constructor([]) + ## mac64-address.h (module 'network'): ns3::Mac64AddressValue::Mac64AddressValue(ns3::Mac64AddressValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Mac64AddressValue const &', 'arg0')]) + ## mac64-address.h (module 'network'): ns3::Mac64AddressValue::Mac64AddressValue(ns3::Mac64Address const & value) [constructor] + cls.add_constructor([param('ns3::Mac64Address const &', 'value')]) + ## mac64-address.h (module 'network'): ns3::Ptr ns3::Mac64AddressValue::Copy() const [member function] + cls.add_method('Copy', + 'ns3::Ptr< ns3::AttributeValue >', + [], + is_const=True, is_virtual=True) + ## mac64-address.h (module 'network'): bool ns3::Mac64AddressValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] + cls.add_method('DeserializeFromString', + 'bool', + [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_virtual=True) + ## mac64-address.h (module 'network'): ns3::Mac64Address ns3::Mac64AddressValue::Get() const [member function] + cls.add_method('Get', + 'ns3::Mac64Address', + [], + is_const=True) + ## mac64-address.h (module 'network'): std::string ns3::Mac64AddressValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## mac64-address.h (module 'network'): void ns3::Mac64AddressValue::Set(ns3::Mac64Address const & value) [member function] + cls.add_method('Set', + 'void', + [param('ns3::Mac64Address const &', 'value')]) + return + def register_Ns3MinMaxAvgTotalCalculator__Double_methods(root_module, cls): ## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator::MinMaxAvgTotalCalculator(ns3::MinMaxAvgTotalCalculator const & arg0) [copy constructor] cls.add_constructor([param('ns3::MinMaxAvgTotalCalculator< double > const &', 'arg0')]) @@ -7192,6 +7767,71 @@ visibility='protected', is_virtual=True) return +def register_Ns3MinMaxAvgTotalCalculator__Unsigned_int_methods(root_module, cls): + ## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator::MinMaxAvgTotalCalculator(ns3::MinMaxAvgTotalCalculator const & arg0) [copy constructor] + cls.add_constructor([param('ns3::MinMaxAvgTotalCalculator< unsigned int > const &', 'arg0')]) + ## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator::MinMaxAvgTotalCalculator() [constructor] + cls.add_constructor([]) + ## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator::Output(ns3::DataOutputCallback & callback) const [member function] + cls.add_method('Output', + 'void', + [param('ns3::DataOutputCallback &', 'callback')], + is_const=True, is_virtual=True) + ## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator::Reset() [member function] + cls.add_method('Reset', + 'void', + []) + ## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator::Update(unsigned int const i) [member function] + cls.add_method('Update', + 'void', + [param('unsigned int const', 'i')]) + ## basic-data-calculators.h (module 'stats'): long int ns3::MinMaxAvgTotalCalculator::getCount() const [member function] + cls.add_method('getCount', + 'long int', + [], + is_const=True, is_virtual=True) + ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator::getMax() const [member function] + cls.add_method('getMax', + 'double', + [], + is_const=True, is_virtual=True) + ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator::getMean() const [member function] + cls.add_method('getMean', + 'double', + [], + is_const=True, is_virtual=True) + ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator::getMin() const [member function] + cls.add_method('getMin', + 'double', + [], + is_const=True, is_virtual=True) + ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator::getSqrSum() const [member function] + cls.add_method('getSqrSum', + 'double', + [], + is_const=True, is_virtual=True) + ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator::getStddev() const [member function] + cls.add_method('getStddev', + 'double', + [], + is_const=True, is_virtual=True) + ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator::getSum() const [member function] + cls.add_method('getSum', + 'double', + [], + is_const=True, is_virtual=True) + ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator::getVariance() const [member function] + cls.add_method('getVariance', + 'double', + [], + is_const=True, is_virtual=True) + ## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='protected', is_virtual=True) + return + def register_Ns3NetDevice_methods(root_module, cls): ## net-device.h (module 'network'): ns3::NetDevice::NetDevice() [constructor] cls.add_constructor([]) @@ -7601,7 +8241,7 @@ cls.add_constructor([param('uint8_t const *', 'buffer'), param('uint32_t', 'size'), param('bool', 'magic')]) ## packet.h (module 'network'): ns3::Packet::Packet(uint8_t const * buffer, uint32_t size) [constructor] cls.add_constructor([param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) - ## packet.h (module 'network'): void ns3::Packet::AddAtEnd(ns3::Ptr packet) [member function] + ## packet.h (module 'network'): void ns3::Packet::AddAtEnd(ns3::Ptr packet) [member function] cls.add_method('AddAtEnd', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) @@ -7759,6 +8399,10 @@ cls.add_method('RemoveTrailer', 'uint32_t', [param('ns3::Trailer &', 'trailer')]) + ## packet.h (module 'network'): bool ns3::Packet::ReplacePacketTag(ns3::Tag & tag) [member function] + cls.add_method('ReplacePacketTag', + 'bool', + [param('ns3::Tag &', 'tag')]) ## packet.h (module 'network'): uint32_t ns3::Packet::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function] cls.add_method('Serialize', 'uint32_t', @@ -7812,6 +8456,26 @@ visibility='private', is_virtual=True) return +def register_Ns3PacketSizeMinMaxAvgTotalCalculator_methods(root_module, cls): + ## packet-data-calculators.h (module 'network'): ns3::PacketSizeMinMaxAvgTotalCalculator::PacketSizeMinMaxAvgTotalCalculator(ns3::PacketSizeMinMaxAvgTotalCalculator const & arg0) [copy constructor] + cls.add_constructor([param('ns3::PacketSizeMinMaxAvgTotalCalculator const &', 'arg0')]) + ## packet-data-calculators.h (module 'network'): ns3::PacketSizeMinMaxAvgTotalCalculator::PacketSizeMinMaxAvgTotalCalculator() [constructor] + cls.add_constructor([]) + ## packet-data-calculators.h (module 'network'): void ns3::PacketSizeMinMaxAvgTotalCalculator::FrameUpdate(std::string path, ns3::Ptr packet, ns3::Mac48Address realto) [member function] + 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'): void ns3::PacketSizeMinMaxAvgTotalCalculator::PacketUpdate(std::string path, ns3::Ptr packet) [member function] + cls.add_method('PacketUpdate', + 'void', + [param('std::string', 'path'), param('ns3::Ptr< ns3::Packet const >', 'packet')]) + ## packet-data-calculators.h (module 'network'): void ns3::PacketSizeMinMaxAvgTotalCalculator::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='protected', is_virtual=True) + return + def register_Ns3PacketSocket_methods(root_module, cls): ## packet-socket.h (module 'network'): ns3::PacketSocket::PacketSocket(ns3::PacketSocket const & arg0) [copy constructor] cls.add_constructor([param('ns3::PacketSocket const &', 'arg0')]) @@ -9021,6 +9685,33 @@ visibility='private', is_virtual=True) return +def register_Ns3Probe_methods(root_module, cls): + ## probe.h (module 'stats'): ns3::Probe::Probe(ns3::Probe const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Probe const &', 'arg0')]) + ## probe.h (module 'stats'): ns3::Probe::Probe() [constructor] + cls.add_constructor([]) + ## probe.h (module 'stats'): bool ns3::Probe::ConnectByObject(std::string traceSource, ns3::Ptr obj) [member function] + cls.add_method('ConnectByObject', + 'bool', + [param('std::string', 'traceSource'), param('ns3::Ptr< ns3::Object >', 'obj')], + is_pure_virtual=True, is_virtual=True) + ## probe.h (module 'stats'): void ns3::Probe::ConnectByPath(std::string path) [member function] + cls.add_method('ConnectByPath', + 'void', + [param('std::string', 'path')], + is_pure_virtual=True, is_virtual=True) + ## probe.h (module 'stats'): static ns3::TypeId ns3::Probe::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## probe.h (module 'stats'): bool ns3::Probe::IsEnabled() const [member function] + cls.add_method('IsEnabled', + 'bool', + [], + is_const=True, is_virtual=True) + return + def register_Ns3Radvd_methods(root_module, cls): ## radvd.h (module 'applications'): ns3::Radvd::Radvd(ns3::Radvd const & arg0) [copy constructor] cls.add_constructor([param('ns3::Radvd const &', 'arg0')]) @@ -9595,13 +10286,6 @@ visibility='protected', is_virtual=True) return -def register_Ns3TimeChecker_methods(root_module, cls): - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker() [constructor] - cls.add_constructor([]) - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker(ns3::TimeChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TimeChecker const &', 'arg0')]) - return - def register_Ns3TimeValue_methods(root_module, cls): ## nstime.h (module 'core'): ns3::TimeValue::TimeValue() [constructor] cls.add_constructor([]) @@ -9900,6 +10584,39 @@ visibility='private', is_virtual=True) return +def register_Ns3UintegerValue_methods(root_module, cls): + ## uinteger.h (module 'core'): ns3::UintegerValue::UintegerValue() [constructor] + cls.add_constructor([]) + ## uinteger.h (module 'core'): ns3::UintegerValue::UintegerValue(ns3::UintegerValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::UintegerValue const &', 'arg0')]) + ## uinteger.h (module 'core'): ns3::UintegerValue::UintegerValue(uint64_t const & value) [constructor] + cls.add_constructor([param('uint64_t const &', 'value')]) + ## uinteger.h (module 'core'): ns3::Ptr ns3::UintegerValue::Copy() const [member function] + cls.add_method('Copy', + 'ns3::Ptr< ns3::AttributeValue >', + [], + is_const=True, is_virtual=True) + ## uinteger.h (module 'core'): bool ns3::UintegerValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] + cls.add_method('DeserializeFromString', + 'bool', + [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_virtual=True) + ## uinteger.h (module 'core'): uint64_t ns3::UintegerValue::Get() const [member function] + cls.add_method('Get', + 'uint64_t', + [], + is_const=True) + ## uinteger.h (module 'core'): std::string ns3::UintegerValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## uinteger.h (module 'core'): void ns3::UintegerValue::Set(uint64_t const & value) [member function] + cls.add_method('Set', + 'void', + [param('uint64_t const &', 'value')]) + return + def register_Ns3V4Ping_methods(root_module, cls): ## v4ping.h (module 'applications'): ns3::V4Ping::V4Ping(ns3::V4Ping const & arg0) [copy constructor] cls.add_constructor([param('ns3::V4Ping const &', 'arg0')]) @@ -9967,6 +10684,37 @@ [param('ns3::Address const &', 'value')]) return +def register_Ns3ApplicationPacketProbe_methods(root_module, cls): + ## application-packet-probe.h (module 'applications'): ns3::ApplicationPacketProbe::ApplicationPacketProbe(ns3::ApplicationPacketProbe const & arg0) [copy constructor] + cls.add_constructor([param('ns3::ApplicationPacketProbe const &', 'arg0')]) + ## application-packet-probe.h (module 'applications'): ns3::ApplicationPacketProbe::ApplicationPacketProbe() [constructor] + cls.add_constructor([]) + ## application-packet-probe.h (module 'applications'): bool ns3::ApplicationPacketProbe::ConnectByObject(std::string traceSource, ns3::Ptr obj) [member function] + cls.add_method('ConnectByObject', + 'bool', + [param('std::string', 'traceSource'), param('ns3::Ptr< ns3::Object >', 'obj')], + is_virtual=True) + ## application-packet-probe.h (module 'applications'): void ns3::ApplicationPacketProbe::ConnectByPath(std::string path) [member function] + cls.add_method('ConnectByPath', + 'void', + [param('std::string', 'path')], + is_virtual=True) + ## application-packet-probe.h (module 'applications'): static ns3::TypeId ns3::ApplicationPacketProbe::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## application-packet-probe.h (module 'applications'): void ns3::ApplicationPacketProbe::SetValue(ns3::Ptr packet, ns3::Address const & address) [member function] + cls.add_method('SetValue', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Address const &', 'address')]) + ## application-packet-probe.h (module 'applications'): static void ns3::ApplicationPacketProbe::SetValueByPath(std::string path, ns3::Ptr packet, ns3::Address const & address) [member function] + cls.add_method('SetValueByPath', + 'void', + [param('std::string', 'path'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Address const &', 'address')], + is_static=True) + return + def register_Ns3BurstErrorModel_methods(root_module, cls): ## error-model.h (module 'network'): ns3::BurstErrorModel::BurstErrorModel(ns3::BurstErrorModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::BurstErrorModel const &', 'arg0')]) @@ -10010,6 +10758,87 @@ visibility='private', is_virtual=True) return +def register_Ns3CounterCalculator__Unsigned_int_methods(root_module, cls): + ## basic-data-calculators.h (module 'stats'): ns3::CounterCalculator::CounterCalculator(ns3::CounterCalculator const & arg0) [copy constructor] + cls.add_constructor([param('ns3::CounterCalculator< unsigned int > const &', 'arg0')]) + ## basic-data-calculators.h (module 'stats'): ns3::CounterCalculator::CounterCalculator() [constructor] + cls.add_constructor([]) + ## basic-data-calculators.h (module 'stats'): unsigned int ns3::CounterCalculator::GetCount() const [member function] + cls.add_method('GetCount', + 'unsigned int', + [], + is_const=True) + ## basic-data-calculators.h (module 'stats'): void ns3::CounterCalculator::Output(ns3::DataOutputCallback & callback) const [member function] + cls.add_method('Output', + 'void', + [param('ns3::DataOutputCallback &', 'callback')], + is_const=True, is_virtual=True) + ## basic-data-calculators.h (module 'stats'): void ns3::CounterCalculator::Update() [member function] + cls.add_method('Update', + 'void', + []) + ## basic-data-calculators.h (module 'stats'): void ns3::CounterCalculator::Update(unsigned int const i) [member function] + cls.add_method('Update', + 'void', + [param('unsigned int const', 'i')]) + ## basic-data-calculators.h (module 'stats'): void ns3::CounterCalculator::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='protected', is_virtual=True) + return + +def register_Ns3PacketCounterCalculator_methods(root_module, cls): + ## packet-data-calculators.h (module 'network'): ns3::PacketCounterCalculator::PacketCounterCalculator(ns3::PacketCounterCalculator const & arg0) [copy constructor] + cls.add_constructor([param('ns3::PacketCounterCalculator const &', 'arg0')]) + ## packet-data-calculators.h (module 'network'): ns3::PacketCounterCalculator::PacketCounterCalculator() [constructor] + cls.add_constructor([]) + ## packet-data-calculators.h (module 'network'): void ns3::PacketCounterCalculator::FrameUpdate(std::string path, ns3::Ptr packet, ns3::Mac48Address realto) [member function] + 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'): void ns3::PacketCounterCalculator::PacketUpdate(std::string path, ns3::Ptr packet) [member function] + cls.add_method('PacketUpdate', + 'void', + [param('std::string', 'path'), param('ns3::Ptr< ns3::Packet const >', 'packet')]) + ## packet-data-calculators.h (module 'network'): void ns3::PacketCounterCalculator::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='protected', is_virtual=True) + return + +def register_Ns3PacketProbe_methods(root_module, cls): + ## packet-probe.h (module 'network'): ns3::PacketProbe::PacketProbe(ns3::PacketProbe const & arg0) [copy constructor] + cls.add_constructor([param('ns3::PacketProbe const &', 'arg0')]) + ## packet-probe.h (module 'network'): ns3::PacketProbe::PacketProbe() [constructor] + cls.add_constructor([]) + ## packet-probe.h (module 'network'): bool ns3::PacketProbe::ConnectByObject(std::string traceSource, ns3::Ptr obj) [member function] + cls.add_method('ConnectByObject', + 'bool', + [param('std::string', 'traceSource'), param('ns3::Ptr< ns3::Object >', 'obj')], + is_virtual=True) + ## packet-probe.h (module 'network'): void ns3::PacketProbe::ConnectByPath(std::string path) [member function] + cls.add_method('ConnectByPath', + 'void', + [param('std::string', 'path')], + is_virtual=True) + ## packet-probe.h (module 'network'): static ns3::TypeId ns3::PacketProbe::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## packet-probe.h (module 'network'): void ns3::PacketProbe::SetValue(ns3::Ptr packet) [member function] + cls.add_method('SetValue', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')]) + ## packet-probe.h (module 'network'): static void ns3::PacketProbe::SetValueByPath(std::string path, ns3::Ptr packet) [member function] + cls.add_method('SetValueByPath', + 'void', + [param('std::string', 'path'), param('ns3::Ptr< ns3::Packet const >', 'packet')], + is_static=True) + return + def register_Ns3PbbAddressTlv_methods(root_module, cls): ## packetbb.h (module 'network'): ns3::PbbAddressTlv::PbbAddressTlv() [constructor] cls.add_constructor([]) @@ -10054,18 +10883,135 @@ [param('bool', 'isMultivalue')]) return +def register_Ns3HashImplementation_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation(ns3::Hash::Implementation const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Implementation const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation() [constructor] + cls.add_constructor([]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Implementation::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_pure_virtual=True, is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Implementation::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Implementation::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + return + +def register_Ns3HashFunctionFnv1a_methods(root_module, cls): + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a(ns3::Hash::Function::Fnv1a const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Fnv1a const &', 'arg0')]) + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a() [constructor] + cls.add_constructor([]) + ## hash-fnv.h (module 'core'): uint32_t ns3::Hash::Function::Fnv1a::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): uint64_t ns3::Hash::Function::Fnv1a::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): void ns3::Hash::Function::Fnv1a::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash32_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Function::Hash32 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash32 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Hash32Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash32Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash32::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash32::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash64_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Function::Hash64 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash64 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Hash64Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash64Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash64::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Function::Hash64::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash64::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionMurmur3_methods(root_module, cls): + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3(ns3::Hash::Function::Murmur3 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Murmur3 const &', 'arg0')]) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3() [constructor] + cls.add_constructor([]) + ## hash-murmur3.h (module 'core'): uint32_t ns3::Hash::Function::Murmur3::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): uint64_t ns3::Hash::Function::Murmur3::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): void ns3::Hash::Function::Murmur3::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + def register_functions(root_module): module = root_module register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) + register_functions_ns3_Hash(module.get_submodule('Hash'), root_module) register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module) + register_functions_ns3_internal(module.get_submodule('internal'), root_module) return def register_functions_ns3_FatalImpl(module, root_module): return +def register_functions_ns3_Hash(module, root_module): + register_functions_ns3_Hash_Function(module.get_submodule('Function'), root_module) + return + +def register_functions_ns3_Hash_Function(module, root_module): + return + def register_functions_ns3_addressUtils(module, root_module): return +def register_functions_ns3_internal(module, root_module): + return + def main(): out = FileCodeSink(sys.stdout) root_module = module_init() diff -Naur ns-3.17/src/applications/helper/radvd-helper.cc ns-3.18/src/applications/helper/radvd-helper.cc --- ns-3.17/src/applications/helper/radvd-helper.cc 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/src/applications/helper/radvd-helper.cc 2013-10-26 07:07:30.563364407 -0700 @@ -0,0 +1,128 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2013 Universita' di Firenze + * + * 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: Tommaso Pecorella + */ + +#include "ns3/log.h" +#include "ns3/assert.h" +#include "ns3/radvd.h" +#include "ns3/radvd-interface.h" +#include "ns3/radvd-prefix.h" + +#include "radvd-helper.h" + +NS_LOG_COMPONENT_DEFINE ("RadvdHelper"); + +namespace ns3 +{ + +RadvdHelper::RadvdHelper () +{ + m_factory.SetTypeId (Radvd::GetTypeId ()); +} + +void RadvdHelper::AddAnnouncedPrefix (uint32_t interface, Ipv6Address prefix, uint32_t prefixLength) +{ + NS_LOG_FUNCTION(this << int(interface) << prefix << int(prefixLength)); + if (prefixLength != 64) + { + NS_LOG_WARN("Adding a non-64 prefix is generally a bad idea. Autoconfiguration might not work."); + } + + bool prefixFound = false; + if (m_radvdInterfaces.find(interface) == m_radvdInterfaces.end()) + { + m_radvdInterfaces[interface] = Create (interface); + } + else + { + RadvdInterface::RadvdPrefixList prefixList = m_radvdInterfaces[interface]->GetPrefixes(); + RadvdInterface::RadvdPrefixListCI iter; + for (iter=prefixList.begin(); iter!=prefixList.end(); iter++) + { + if ((*iter)->GetNetwork() == prefix) + { + NS_LOG_LOGIC("Not adding the same prefix twice, skipping " << prefix << " " << int(prefixLength)); + prefixFound = true; + break; + } + } + } + if (!prefixFound) + { + Ptr routerPrefix = Create (prefix, prefixLength); + m_radvdInterfaces[interface]->AddPrefix(routerPrefix); + } +} + +void RadvdHelper::EnableDefaultRouterForInterface (uint32_t interface) +{ + if (m_radvdInterfaces.find(interface) == m_radvdInterfaces.end()) + { + m_radvdInterfaces[interface] = Create (interface); + } + uint32_t maxRtrAdvInterval = m_radvdInterfaces[interface]->GetMaxRtrAdvInterval(); + m_radvdInterfaces[interface]->SetDefaultLifeTime(3*maxRtrAdvInterval/1000); +} + +void RadvdHelper::DisableDefaultRouterForInterface (uint32_t interface) +{ + if (m_radvdInterfaces.find(interface) == m_radvdInterfaces.end()) + { + m_radvdInterfaces[interface] = Create (interface); + } + m_radvdInterfaces[interface]->SetDefaultLifeTime(0); +} + +Ptr RadvdHelper::GetRadvdInterface (uint32_t interface) +{ + if (m_radvdInterfaces.find(interface) == m_radvdInterfaces.end()) + { + m_radvdInterfaces[interface] = Create (interface); + } + return m_radvdInterfaces[interface]; +} + +void RadvdHelper::ClearPrefixes() +{ + m_radvdInterfaces.clear(); +} + +void RadvdHelper::SetAttribute (std::string name, const AttributeValue& value) +{ + m_factory.Set (name, value); +} + +ApplicationContainer RadvdHelper::Install (Ptr node) +{ + ApplicationContainer apps; + Ptr radvd = m_factory.Create (); + for (RadvdInterfaceMapI iter = m_radvdInterfaces.begin(); iter != m_radvdInterfaces.end(); iter ++) + { + if (!iter->second->GetPrefixes().empty()) + { + radvd->AddConfiguration(iter->second); + } + } + node->AddApplication (radvd); + apps.Add (radvd); + return apps; +} + +} /* namespace ns3 */ + diff -Naur ns-3.17/src/applications/helper/radvd-helper.h ns-3.18/src/applications/helper/radvd-helper.h --- ns-3.17/src/applications/helper/radvd-helper.h 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/src/applications/helper/radvd-helper.h 2013-10-26 07:07:30.567364406 -0700 @@ -0,0 +1,112 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2013 Universita' di Firenze + * + * 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: Tommaso Pecorella + */ + +#ifndef RADVD_HELPER_H +#define RADVD_HELPER_H + +#include +#include +#include + +#include "ns3/object-factory.h" +#include "ns3/ipv6-address.h" + +#include "ns3/application-container.h" +#include "ns3/node-container.h" +#include "ns3/radvd-interface.h" + +namespace ns3 { + +/** + * \class RadvdHelper + * \brief Radvd application helper. + */ +class RadvdHelper +{ +public: + /** + * \brief Constructor. + */ + RadvdHelper (); + + /** + * \brief Add a new prefix to be announced through an interface. + * \param interface outgoing interface + * \param prefix announced IPv6 prefix + * \param prefixLength announced IPv6 prefix length + */ + void AddAnnouncedPrefix (uint32_t interface, Ipv6Address prefix, uint32_t prefixLength); + + /** + * \brief Enable the router as default router for the interface. + * The effect is to set the Router Lifetime to the default value (30 minutes) + * \param interface outgoing interface + */ + void EnableDefaultRouterForInterface (uint32_t interface); + + /** + * \brief Disable the router as default router for the interface. + * The effect is to set the Router Lifetime to zero + * \param interface outgoing interface + */ + void DisableDefaultRouterForInterface (uint32_t interface); + + /** + * \brief Get the low-level radvdInterface specification for an interface. + * This method is provided to enable fine-grain parameter setup. + * \param interface outgoing interface + */ + Ptr GetRadvdInterface (uint32_t interface); + + /** + * \brief Clear the stored Prefixes + */ + void ClearPrefixes (); + + /** + * \brief Set some attributes. + * \param name attribute name + * \param value attribute value + */ + void SetAttribute (std::string name, const AttributeValue& value); + + /** + * \brief Install the application in a Node. + * \param node the Node + * \return application container + */ + ApplicationContainer Install (Ptr node); + +private: + /** + * \brief An object factory. + */ + ObjectFactory m_factory; + + typedef std::map > RadvdInterfaceMap; + typedef std::map >::iterator RadvdInterfaceMapI; + + RadvdInterfaceMap m_radvdInterfaces; +}; + +} /* namespace ns3 */ + +#endif /* RADVD_HELPER_H */ + diff -Naur ns-3.17/src/applications/model/application-packet-probe.cc ns-3.18/src/applications/model/application-packet-probe.cc --- ns-3.17/src/applications/model/application-packet-probe.cc 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/src/applications/model/application-packet-probe.cc 2013-10-26 07:07:30.567364406 -0700 @@ -0,0 +1,119 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2011 Bucknell University + * + * 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 + * + * Authors: L. Felipe Perrone (perrone@bucknell.edu) + * Tiago G. Rodrigues (tgr002@bucknell.edu) + * + * Modified by: Mitch Watrous (watrous@u.washington.edu) + */ + +#include "ns3/application-packet-probe.h" +#include "ns3/object.h" +#include "ns3/log.h" +#include "ns3/names.h" +#include "ns3/config.h" +#include "ns3/trace-source-accessor.h" + +NS_LOG_COMPONENT_DEFINE ("ApplicationPacketProbe"); + +namespace ns3 { + +NS_OBJECT_ENSURE_REGISTERED (ApplicationPacketProbe); + +TypeId +ApplicationPacketProbe::GetTypeId () +{ + static TypeId tid = TypeId ("ns3::ApplicationPacketProbe") + .SetParent () + .AddConstructor () + .AddTraceSource ( "Output", + "The packet plus its socket address that serve as the output for this probe", + MakeTraceSourceAccessor (&ApplicationPacketProbe::m_output)) + .AddTraceSource ( "OutputBytes", + "The number of bytes in the packet", + MakeTraceSourceAccessor (&ApplicationPacketProbe::m_outputBytes)) + ; + return tid; +} + +ApplicationPacketProbe::ApplicationPacketProbe () +{ + NS_LOG_FUNCTION (this); + m_packet = 0; +} + +ApplicationPacketProbe::~ApplicationPacketProbe () +{ + NS_LOG_FUNCTION (this); +} + +void +ApplicationPacketProbe::SetValue (Ptr packet, const Address& address) +{ + NS_LOG_FUNCTION (this << packet << address); + m_packet = packet; + m_address = address; + m_output (packet, address); + + uint32_t packetSizeNew = packet->GetSize (); + m_outputBytes (m_packetSizeOld, packetSizeNew); + m_packetSizeOld = packetSizeNew; +} + +void +ApplicationPacketProbe::SetValueByPath (std::string path, Ptr packet, const Address& address) +{ + NS_LOG_FUNCTION (path << packet << address); + Ptr probe = Names::Find (path); + NS_ASSERT_MSG (probe, "Error: Can't find probe for path " << path); + probe->SetValue (packet, address); +} + +bool +ApplicationPacketProbe::ConnectByObject (std::string traceSource, Ptr obj) +{ + NS_LOG_FUNCTION (this << traceSource << obj); + NS_LOG_DEBUG ("Name of probe (if any) in names database: " << Names::FindPath (obj)); + bool connected = obj->TraceConnectWithoutContext (traceSource, MakeCallback (&ns3::ApplicationPacketProbe::TraceSink, this)); + return connected; +} + +void +ApplicationPacketProbe::ConnectByPath (std::string path) +{ + NS_LOG_FUNCTION (this << path); + NS_LOG_DEBUG ("Name of probe to search for in config database: " << path); + Config::ConnectWithoutContext (path, MakeCallback (&ns3::ApplicationPacketProbe::TraceSink, this)); +} + +void +ApplicationPacketProbe::TraceSink (Ptr packet, const Address& address) +{ + NS_LOG_FUNCTION (this << packet << address); + if (IsEnabled ()) + { + m_packet = packet; + m_address = address; + m_output (packet, address); + + uint32_t packetSizeNew = packet->GetSize (); + m_outputBytes (m_packetSizeOld, packetSizeNew); + m_packetSizeOld = packetSizeNew; + } +} + +} // namespace ns3 diff -Naur ns-3.17/src/applications/model/application-packet-probe.h ns-3.18/src/applications/model/application-packet-probe.h --- ns-3.17/src/applications/model/application-packet-probe.h 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/src/applications/model/application-packet-probe.h 2013-10-26 07:07:30.567364406 -0700 @@ -0,0 +1,120 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2011 Bucknell University + * + * 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 + * + * Authors: L. Felipe Perrone (perrone@bucknell.edu) + * Tiago G. Rodrigues (tgr002@bucknell.edu) + * + * Modified by: Mitch Watrous (watrous@u.washington.edu) + */ + +#ifndef APPLICATION_PACKET_PROBE_H +#define APPLICATION_PACKET_PROBE_H + +#include "ns3/object.h" +#include "ns3/callback.h" +#include "ns3/boolean.h" +#include "ns3/nstime.h" +#include "ns3/packet.h" +#include "ns3/application.h" +#include "ns3/traced-value.h" +#include "ns3/simulator.h" +#include "ns3/probe.h" + +namespace ns3 { + +/** + * This class is designed to probe an underlying ns3 TraceSource + * exporting a packet and a socket address. This probe exports a + * trace source "Output" with arguments of type Ptr and + * const Address&. This probe exports another trace source + * "OutputBytes" with arguments of type uint32_t, which is the number + * of bytes in the packet. The trace sources emit values when either + * the probed trace source emits a new value, or when SetValue () is + * called. + */ +class ApplicationPacketProbe : public Probe +{ +public: + static TypeId GetTypeId (); + ApplicationPacketProbe (); + virtual ~ApplicationPacketProbe (); + + /** + * \brief Set a probe value + * + * \param packet set the traced packet equal to this + * \param address set the socket address for the traced packet equal to this + */ + void SetValue (Ptr packet, const Address& address); + + /** + * \brief Set a probe value by its name in the Config system + * + * \param path config path to access the probe + * \param packet set the traced packet equal to this + * \param address set the socket address for the traced packet equal to this + */ + static void SetValueByPath (std::string path, Ptr packet, const Address& address); + + /** + * \brief connect to a trace source attribute provided by a given object + * + * \param traceSource the name of the attribute TraceSource to connect to + * \param obj ns3::Object to connect to + * \return true if the trace source was successfully connected + */ + virtual bool ConnectByObject (std::string traceSource, Ptr obj); + + /** + * \brief connect to a trace source provided by a config path + * + * \param path Config path to bind to + * + * Note, if an invalid path is provided, the probe will not be connected + * to anything. + */ + virtual void ConnectByPath (std::string path); + +private: + /** + * \brief Method to connect to an underlying ns3::TraceSource with + * arguments of type Ptr and const Address& + * + * \param packet the traced packet + * \param address the socket address for the traced packet + * + * \internal + */ + void TraceSink (Ptr packet, const Address& address); + + TracedCallback, const Address&> m_output; + TracedCallback m_outputBytes; + + /// The traced packet. + Ptr m_packet; + + /// The socket address for the traced packet. + Address m_address; + + /// The size of the traced packet. + uint32_t m_packetSizeOld; +}; + + +} // namespace ns3 + +#endif // APPLICATION_PACKET_PROBE_H diff -Naur ns-3.17/src/applications/model/ping6.cc ns-3.18/src/applications/model/ping6.cc --- ns-3.17/src/applications/model/ping6.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/applications/model/ping6.cc 2013-10-26 07:07:30.571364406 -0700 @@ -171,8 +171,17 @@ /* hack to have ifIndex in Ipv6RawSocketImpl * maybe add a SetIfIndex in Ipv6RawSocketImpl directly */ - src = GetNode ()->GetObject ()->GetAddress (m_ifIndex, 0).GetAddress (); - } + Ipv6InterfaceAddress dstIa (m_peerAddress); + for (uint32_t i = 0; i < GetNode ()->GetObject ()->GetNAddresses (m_ifIndex); i++) + { + src = GetNode ()->GetObject ()->GetAddress (m_ifIndex, i).GetAddress (); + Ipv6InterfaceAddress srcIa (src); + if ( srcIa.GetScope() == dstIa.GetScope() ) + { + break; + } + } + } else { src = m_localAddress; diff -Naur ns-3.17/src/applications/model/radvd-interface.cc ns-3.18/src/applications/model/radvd-interface.cc --- ns-3.17/src/applications/model/radvd-interface.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/applications/model/radvd-interface.cc 2013-10-26 07:07:30.567364406 -0700 @@ -41,7 +41,7 @@ m_reachableTime = 0; /* means unspecified for the router */ m_retransTimer = 0; /* means unspecified for the router */ m_curHopLimit = 64; - m_defaultLifeTime = 3 * m_maxRtrAdvInterval; + m_defaultLifeTime = (3 * m_maxRtrAdvInterval) / 1000; m_defaultPreference = 1; m_sourceLLAddress = true; m_homeAgentFlag = false; diff -Naur ns-3.17/src/applications/model/radvd-interface.h ns-3.18/src/applications/model/radvd-interface.h --- ns-3.17/src/applications/model/radvd-interface.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/applications/model/radvd-interface.h 2013-10-26 07:07:30.567364406 -0700 @@ -36,6 +36,10 @@ class RadvdInterface : public SimpleRefCount { public: + typedef std::list > RadvdPrefixList; + typedef std::list >::iterator RadvdPrefixListI; + typedef std::list >::const_iterator RadvdPrefixListCI; + /** * \brief Constructor. * \param interface interface index @@ -65,7 +69,7 @@ * \brief Get list of prefixes advertised for this interface. * \return list of IPv6 prefixes */ - std::list > GetPrefixes () const; + RadvdPrefixList GetPrefixes () const; /** * \brief Add a prefix to advertise on interface. @@ -302,8 +306,6 @@ void SetIntervalOpt (bool intervalOpt); private: - typedef std::list > RadvdPrefixList; - typedef std::list >::iterator RadvdPrefixListI; /** * \brief Interface to advertise RA. diff -Naur ns-3.17/src/applications/model/radvd-prefix.h ns-3.18/src/applications/model/radvd-prefix.h --- ns-3.17/src/applications/model/radvd-prefix.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/applications/model/radvd-prefix.h 2013-10-26 07:07:30.567364406 -0700 @@ -165,7 +165,7 @@ bool m_onLinkFlag; /** - * \brief Autonomous flag, it is used for autonomous address configuration (RFC 2462). + * \brief Autonomous flag, it is used for autonomous address configuration (\RFC{2462}). */ bool m_autonomousFlag; diff -Naur ns-3.17/src/applications/test/udp-client-server-test.cc ns-3.18/src/applications/test/udp-client-server-test.cc --- ns-3.17/src/applications/test/udp-client-server-test.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/applications/test/udp-client-server-test.cc 2013-10-26 07:07:30.587364407 -0700 @@ -257,7 +257,7 @@ } /** - * Test fix for bug 1378 + * Test fix for \bugid{1378} */ class UdpEchoClientSetFillTestCase : public TestCase diff -Naur ns-3.17/src/applications/wscript ns-3.18/src/applications/wscript --- ns-3.17/src/applications/wscript 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/applications/wscript 2013-10-26 07:07:30.563364407 -0700 @@ -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('applications', ['internet', 'config-store', 'tools']) + module = bld.create_ns3_module('applications', ['internet', 'config-store','stats']) module.source = [ 'model/bulk-send-application.cc', 'model/onoff-application.cc', @@ -18,6 +18,7 @@ 'model/udp-echo-client.cc', 'model/udp-echo-server.cc', 'model/v4ping.cc', + 'model/application-packet-probe.cc', 'helper/bulk-send-helper.cc', 'helper/on-off-helper.cc', 'helper/packet-sink-helper.cc', @@ -25,6 +26,7 @@ 'helper/udp-client-server-helper.cc', 'helper/udp-echo-helper.cc', 'helper/v4ping-helper.cc', + 'helper/radvd-helper.cc', ] applications_test = bld.create_ns3_module_test_library('applications') @@ -50,6 +52,7 @@ 'model/udp-echo-client.h', 'model/udp-echo-server.h', 'model/v4ping.h', + 'model/application-packet-probe.h', 'helper/bulk-send-helper.h', 'helper/on-off-helper.h', 'helper/packet-sink-helper.h', @@ -57,6 +60,7 @@ 'helper/udp-client-server-helper.h', 'helper/udp-echo-helper.h', 'helper/v4ping-helper.h', + 'helper/radvd-helper.h', ] bld.ns3_python_bindings() diff -Naur ns-3.17/src/bridge/bindings/modulegen__gcc_ILP32.py ns-3.18/src/bridge/bindings/modulegen__gcc_ILP32.py --- ns-3.17/src/bridge/bindings/modulegen__gcc_ILP32.py 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/bridge/bindings/modulegen__gcc_ILP32.py 2013-10-26 07:07:30.075364394 -0700 @@ -32,6 +32,8 @@ module.add_class('BridgeHelper') ## callback.h (module 'core'): ns3::CallbackBase [class] module.add_class('CallbackBase', import_from_module='ns.core') + ## hash.h (module 'core'): ns3::Hasher [class] + module.add_class('Hasher', import_from_module='ns.core') ## ipv4-address.h (module 'network'): ns3::Ipv4Address [class] module.add_class('Ipv4Address', import_from_module='ns.network') ## ipv4-address.h (module 'network'): ns3::Ipv4Address [class] @@ -84,6 +86,8 @@ module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeValue', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::CallbackImplBase', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] + module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Hash::Implementation', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::TraceSourceAccessor', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## nstime.h (module 'core'): ns3::Time [class] @@ -138,8 +142,6 @@ module.add_class('ObjectFactoryChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) ## object-factory.h (module 'core'): ns3::ObjectFactoryValue [class] module.add_class('ObjectFactoryValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) - ## nstime.h (module 'core'): ns3::TimeChecker [class] - module.add_class('TimeChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) ## nstime.h (module 'core'): ns3::TimeValue [class] module.add_class('TimeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## type-id.h (module 'core'): ns3::TypeIdChecker [class] @@ -160,17 +162,54 @@ nested_module = module.add_cpp_namespace('FatalImpl') register_types_ns3_FatalImpl(nested_module) + + ## Register a nested module for the namespace Hash + + nested_module = module.add_cpp_namespace('Hash') + register_types_ns3_Hash(nested_module) + def register_types_ns3_FatalImpl(module): root_module = module.get_root() +def register_types_ns3_Hash(module): + root_module = module.get_root() + + ## hash-function.h (module 'core'): ns3::Hash::Implementation [class] + module.add_class('Implementation', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash32Function_ptr') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash32Function_ptr*') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash32Function_ptr&') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash64Function_ptr') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash64Function_ptr*') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash64Function_ptr&') + + ## Register a nested module for the namespace Function + + nested_module = module.add_cpp_namespace('Function') + register_types_ns3_Hash_Function(nested_module) + + +def register_types_ns3_Hash_Function(module): + root_module = module.get_root() + + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a [class] + module.add_class('Fnv1a', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32 [class] + module.add_class('Hash32', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64 [class] + module.add_class('Hash64', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3 [class] + module.add_class('Murmur3', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + def register_methods(root_module): register_Ns3Address_methods(root_module, root_module['ns3::Address']) register_Ns3AttributeConstructionList_methods(root_module, root_module['ns3::AttributeConstructionList']) register_Ns3AttributeConstructionListItem_methods(root_module, root_module['ns3::AttributeConstructionList::Item']) register_Ns3BridgeHelper_methods(root_module, root_module['ns3::BridgeHelper']) register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase']) + register_Ns3Hasher_methods(root_module, root_module['ns3::Hasher']) register_Ns3Ipv4Address_methods(root_module, root_module['ns3::Ipv4Address']) register_Ns3Ipv4Mask_methods(root_module, root_module['ns3::Ipv4Mask']) register_Ns3Ipv6Address_methods(root_module, root_module['ns3::Ipv6Address']) @@ -193,6 +232,7 @@ register_Ns3SimpleRefCount__Ns3AttributeChecker_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeChecker__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter >']) + register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter >']) register_Ns3Time_methods(root_module, root_module['ns3::Time']) register_Ns3TraceSourceAccessor_methods(root_module, root_module['ns3::TraceSourceAccessor']) @@ -217,7 +257,6 @@ register_Ns3NetDevice_methods(root_module, root_module['ns3::NetDevice']) register_Ns3ObjectFactoryChecker_methods(root_module, root_module['ns3::ObjectFactoryChecker']) register_Ns3ObjectFactoryValue_methods(root_module, root_module['ns3::ObjectFactoryValue']) - register_Ns3TimeChecker_methods(root_module, root_module['ns3::TimeChecker']) register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue']) register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker']) register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue']) @@ -225,6 +264,11 @@ register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue']) register_Ns3BridgeChannel_methods(root_module, root_module['ns3::BridgeChannel']) register_Ns3BridgeNetDevice_methods(root_module, root_module['ns3::BridgeNetDevice']) + register_Ns3HashImplementation_methods(root_module, root_module['ns3::Hash::Implementation']) + register_Ns3HashFunctionFnv1a_methods(root_module, root_module['ns3::Hash::Function::Fnv1a']) + register_Ns3HashFunctionHash32_methods(root_module, root_module['ns3::Hash::Function::Hash32']) + register_Ns3HashFunctionHash64_methods(root_module, root_module['ns3::Hash::Function::Hash64']) + register_Ns3HashFunctionMurmur3_methods(root_module, root_module['ns3::Hash::Function::Murmur3']) return def register_Ns3Address_methods(root_module, cls): @@ -375,6 +419,35 @@ is_static=True, visibility='protected') return +def register_Ns3Hasher_methods(root_module, cls): + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Hasher const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hasher const &', 'arg0')]) + ## hash.h (module 'core'): ns3::Hasher::Hasher() [constructor] + cls.add_constructor([]) + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Ptr hp) [constructor] + cls.add_constructor([param('ns3::Ptr< ns3::Hash::Implementation >', 'hp')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(std::string const s) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(std::string const s) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): ns3::Hasher & ns3::Hasher::clear() [member function] + cls.add_method('clear', + 'ns3::Hasher &', + []) + return + def register_Ns3Ipv4Address_methods(root_module, cls): cls.add_binary_comparison_operator('<') cls.add_binary_comparison_operator('!=') @@ -640,6 +713,11 @@ 'bool', [], is_const=True) + ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsDocumentation() const [member function] + cls.add_method('IsDocumentation', + 'bool', + [], + is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsEqual(ns3::Ipv6Address const & other) const [member function] cls.add_method('IsEqual', 'bool', @@ -679,16 +757,36 @@ 'bool', [], is_const=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac16Address addr, ns3::Ipv6Address prefix) [member function] + cls.add_method('MakeAutoconfiguredAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac16Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac48Address addr, ns3::Ipv6Address prefix) [member function] cls.add_method('MakeAutoconfiguredAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac64Address addr, ns3::Ipv6Address prefix) [member function] + cls.add_method('MakeAutoconfiguredAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac64Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], + is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac16Address mac) [member function] + cls.add_method('MakeAutoconfiguredLinkLocalAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac16Address', 'mac')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac48Address mac) [member function] cls.add_method('MakeAutoconfiguredLinkLocalAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'mac')], is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac64Address mac) [member function] + cls.add_method('MakeAutoconfiguredLinkLocalAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac64Address', 'mac')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeIpv4MappedAddress(ns3::Ipv4Address addr) [member function] cls.add_method('MakeIpv4MappedAddress', 'ns3::Ipv6Address', @@ -1126,6 +1224,11 @@ 'std::string', [], is_const=True) + ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetHash() const [member function] + cls.add_method('GetHash', + 'uint32_t', + [], + is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeId::GetName() const [member function] cls.add_method('GetName', 'std::string', @@ -1185,6 +1288,16 @@ 'bool', [param('std::string', 'name'), param('ns3::TypeId::AttributeInformation *', 'info', transfer_ownership=False)], is_const=True) + ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByHash(uint32_t hash) [member function] + cls.add_method('LookupByHash', + 'ns3::TypeId', + [param('uint32_t', 'hash')], + is_static=True) + ## type-id.h (module 'core'): static bool ns3::TypeId::LookupByHashFailSafe(uint32_t hash, ns3::TypeId * tid) [member function] + cls.add_method('LookupByHashFailSafe', + 'bool', + [param('uint32_t', 'hash'), param('ns3::TypeId *', 'tid')], + is_static=True) ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByName(std::string name) [member function] cls.add_method('LookupByName', 'ns3::TypeId', @@ -1480,6 +1593,18 @@ is_static=True) return +def register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter< ns3::Hash::Implementation > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + def register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] cls.add_constructor([]) @@ -1626,11 +1751,26 @@ 'bool', [], is_const=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Max() [member function] + cls.add_method('Max', + 'ns3::Time', + [], + is_static=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Min() [member function] + cls.add_method('Min', + 'ns3::Time', + [], + is_static=True) ## nstime.h (module 'core'): static void ns3::Time::SetResolution(ns3::Time::Unit resolution) [member function] cls.add_method('SetResolution', 'void', [param('ns3::Time::Unit', 'resolution')], is_static=True) + ## nstime.h (module 'core'): static bool ns3::Time::StaticInit() [member function] + cls.add_method('StaticInit', + 'bool', + [], + is_static=True) ## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function] cls.add_method('To', 'ns3::int64x64_t', @@ -2234,13 +2374,6 @@ [param('ns3::ObjectFactory const &', 'value')]) return -def register_Ns3TimeChecker_methods(root_module, cls): - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker() [constructor] - cls.add_constructor([]) - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker(ns3::TimeChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TimeChecker const &', 'arg0')]) - return - def register_Ns3TimeValue_methods(root_module, cls): ## nstime.h (module 'core'): ns3::TimeValue::TimeValue() [constructor] cls.add_constructor([]) @@ -2552,14 +2685,127 @@ visibility='protected') return +def register_Ns3HashImplementation_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation(ns3::Hash::Implementation const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Implementation const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation() [constructor] + cls.add_constructor([]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Implementation::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_pure_virtual=True, is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Implementation::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Implementation::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + return + +def register_Ns3HashFunctionFnv1a_methods(root_module, cls): + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a(ns3::Hash::Function::Fnv1a const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Fnv1a const &', 'arg0')]) + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a() [constructor] + cls.add_constructor([]) + ## hash-fnv.h (module 'core'): uint32_t ns3::Hash::Function::Fnv1a::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): uint64_t ns3::Hash::Function::Fnv1a::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): void ns3::Hash::Function::Fnv1a::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash32_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Function::Hash32 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash32 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Hash32Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash32Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash32::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash32::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash64_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Function::Hash64 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash64 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Hash64Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash64Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash64::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Function::Hash64::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash64::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionMurmur3_methods(root_module, cls): + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3(ns3::Hash::Function::Murmur3 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Murmur3 const &', 'arg0')]) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3() [constructor] + cls.add_constructor([]) + ## hash-murmur3.h (module 'core'): uint32_t ns3::Hash::Function::Murmur3::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): uint64_t ns3::Hash::Function::Murmur3::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): void ns3::Hash::Function::Murmur3::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + def register_functions(root_module): module = root_module register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) + register_functions_ns3_Hash(module.get_submodule('Hash'), root_module) return def register_functions_ns3_FatalImpl(module, root_module): return +def register_functions_ns3_Hash(module, root_module): + register_functions_ns3_Hash_Function(module.get_submodule('Function'), root_module) + return + +def register_functions_ns3_Hash_Function(module, root_module): + return + def main(): out = FileCodeSink(sys.stdout) root_module = module_init() diff -Naur ns-3.17/src/bridge/bindings/modulegen__gcc_LP64.py ns-3.18/src/bridge/bindings/modulegen__gcc_LP64.py --- ns-3.17/src/bridge/bindings/modulegen__gcc_LP64.py 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/bridge/bindings/modulegen__gcc_LP64.py 2013-10-26 07:07:30.075364394 -0700 @@ -32,6 +32,8 @@ module.add_class('BridgeHelper') ## callback.h (module 'core'): ns3::CallbackBase [class] module.add_class('CallbackBase', import_from_module='ns.core') + ## hash.h (module 'core'): ns3::Hasher [class] + module.add_class('Hasher', import_from_module='ns.core') ## ipv4-address.h (module 'network'): ns3::Ipv4Address [class] module.add_class('Ipv4Address', import_from_module='ns.network') ## ipv4-address.h (module 'network'): ns3::Ipv4Address [class] @@ -84,6 +86,8 @@ module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeValue', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::CallbackImplBase', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] + module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Hash::Implementation', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::TraceSourceAccessor', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## nstime.h (module 'core'): ns3::Time [class] @@ -138,8 +142,6 @@ module.add_class('ObjectFactoryChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) ## object-factory.h (module 'core'): ns3::ObjectFactoryValue [class] module.add_class('ObjectFactoryValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) - ## nstime.h (module 'core'): ns3::TimeChecker [class] - module.add_class('TimeChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) ## nstime.h (module 'core'): ns3::TimeValue [class] module.add_class('TimeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## type-id.h (module 'core'): ns3::TypeIdChecker [class] @@ -160,17 +162,54 @@ nested_module = module.add_cpp_namespace('FatalImpl') register_types_ns3_FatalImpl(nested_module) + + ## Register a nested module for the namespace Hash + + nested_module = module.add_cpp_namespace('Hash') + register_types_ns3_Hash(nested_module) + def register_types_ns3_FatalImpl(module): root_module = module.get_root() +def register_types_ns3_Hash(module): + root_module = module.get_root() + + ## hash-function.h (module 'core'): ns3::Hash::Implementation [class] + module.add_class('Implementation', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash32Function_ptr') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash32Function_ptr*') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash32Function_ptr&') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash64Function_ptr') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash64Function_ptr*') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash64Function_ptr&') + + ## Register a nested module for the namespace Function + + nested_module = module.add_cpp_namespace('Function') + register_types_ns3_Hash_Function(nested_module) + + +def register_types_ns3_Hash_Function(module): + root_module = module.get_root() + + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a [class] + module.add_class('Fnv1a', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32 [class] + module.add_class('Hash32', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64 [class] + module.add_class('Hash64', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3 [class] + module.add_class('Murmur3', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + def register_methods(root_module): register_Ns3Address_methods(root_module, root_module['ns3::Address']) register_Ns3AttributeConstructionList_methods(root_module, root_module['ns3::AttributeConstructionList']) register_Ns3AttributeConstructionListItem_methods(root_module, root_module['ns3::AttributeConstructionList::Item']) register_Ns3BridgeHelper_methods(root_module, root_module['ns3::BridgeHelper']) register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase']) + register_Ns3Hasher_methods(root_module, root_module['ns3::Hasher']) register_Ns3Ipv4Address_methods(root_module, root_module['ns3::Ipv4Address']) register_Ns3Ipv4Mask_methods(root_module, root_module['ns3::Ipv4Mask']) register_Ns3Ipv6Address_methods(root_module, root_module['ns3::Ipv6Address']) @@ -193,6 +232,7 @@ register_Ns3SimpleRefCount__Ns3AttributeChecker_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeChecker__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter >']) + register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter >']) register_Ns3Time_methods(root_module, root_module['ns3::Time']) register_Ns3TraceSourceAccessor_methods(root_module, root_module['ns3::TraceSourceAccessor']) @@ -217,7 +257,6 @@ register_Ns3NetDevice_methods(root_module, root_module['ns3::NetDevice']) register_Ns3ObjectFactoryChecker_methods(root_module, root_module['ns3::ObjectFactoryChecker']) register_Ns3ObjectFactoryValue_methods(root_module, root_module['ns3::ObjectFactoryValue']) - register_Ns3TimeChecker_methods(root_module, root_module['ns3::TimeChecker']) register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue']) register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker']) register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue']) @@ -225,6 +264,11 @@ register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue']) register_Ns3BridgeChannel_methods(root_module, root_module['ns3::BridgeChannel']) register_Ns3BridgeNetDevice_methods(root_module, root_module['ns3::BridgeNetDevice']) + register_Ns3HashImplementation_methods(root_module, root_module['ns3::Hash::Implementation']) + register_Ns3HashFunctionFnv1a_methods(root_module, root_module['ns3::Hash::Function::Fnv1a']) + register_Ns3HashFunctionHash32_methods(root_module, root_module['ns3::Hash::Function::Hash32']) + register_Ns3HashFunctionHash64_methods(root_module, root_module['ns3::Hash::Function::Hash64']) + register_Ns3HashFunctionMurmur3_methods(root_module, root_module['ns3::Hash::Function::Murmur3']) return def register_Ns3Address_methods(root_module, cls): @@ -375,6 +419,35 @@ is_static=True, visibility='protected') return +def register_Ns3Hasher_methods(root_module, cls): + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Hasher const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hasher const &', 'arg0')]) + ## hash.h (module 'core'): ns3::Hasher::Hasher() [constructor] + cls.add_constructor([]) + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Ptr hp) [constructor] + cls.add_constructor([param('ns3::Ptr< ns3::Hash::Implementation >', 'hp')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(std::string const s) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(std::string const s) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): ns3::Hasher & ns3::Hasher::clear() [member function] + cls.add_method('clear', + 'ns3::Hasher &', + []) + return + def register_Ns3Ipv4Address_methods(root_module, cls): cls.add_binary_comparison_operator('<') cls.add_binary_comparison_operator('!=') @@ -640,6 +713,11 @@ 'bool', [], is_const=True) + ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsDocumentation() const [member function] + cls.add_method('IsDocumentation', + 'bool', + [], + is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsEqual(ns3::Ipv6Address const & other) const [member function] cls.add_method('IsEqual', 'bool', @@ -679,16 +757,36 @@ 'bool', [], is_const=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac16Address addr, ns3::Ipv6Address prefix) [member function] + cls.add_method('MakeAutoconfiguredAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac16Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac48Address addr, ns3::Ipv6Address prefix) [member function] cls.add_method('MakeAutoconfiguredAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac64Address addr, ns3::Ipv6Address prefix) [member function] + cls.add_method('MakeAutoconfiguredAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac64Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], + is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac16Address mac) [member function] + cls.add_method('MakeAutoconfiguredLinkLocalAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac16Address', 'mac')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac48Address mac) [member function] cls.add_method('MakeAutoconfiguredLinkLocalAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'mac')], is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac64Address mac) [member function] + cls.add_method('MakeAutoconfiguredLinkLocalAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac64Address', 'mac')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeIpv4MappedAddress(ns3::Ipv4Address addr) [member function] cls.add_method('MakeIpv4MappedAddress', 'ns3::Ipv6Address', @@ -1126,6 +1224,11 @@ 'std::string', [], is_const=True) + ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetHash() const [member function] + cls.add_method('GetHash', + 'uint32_t', + [], + is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeId::GetName() const [member function] cls.add_method('GetName', 'std::string', @@ -1185,6 +1288,16 @@ 'bool', [param('std::string', 'name'), param('ns3::TypeId::AttributeInformation *', 'info', transfer_ownership=False)], is_const=True) + ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByHash(uint32_t hash) [member function] + cls.add_method('LookupByHash', + 'ns3::TypeId', + [param('uint32_t', 'hash')], + is_static=True) + ## type-id.h (module 'core'): static bool ns3::TypeId::LookupByHashFailSafe(uint32_t hash, ns3::TypeId * tid) [member function] + cls.add_method('LookupByHashFailSafe', + 'bool', + [param('uint32_t', 'hash'), param('ns3::TypeId *', 'tid')], + is_static=True) ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByName(std::string name) [member function] cls.add_method('LookupByName', 'ns3::TypeId', @@ -1480,6 +1593,18 @@ is_static=True) return +def register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter< ns3::Hash::Implementation > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + def register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] cls.add_constructor([]) @@ -1626,11 +1751,26 @@ 'bool', [], is_const=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Max() [member function] + cls.add_method('Max', + 'ns3::Time', + [], + is_static=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Min() [member function] + cls.add_method('Min', + 'ns3::Time', + [], + is_static=True) ## nstime.h (module 'core'): static void ns3::Time::SetResolution(ns3::Time::Unit resolution) [member function] cls.add_method('SetResolution', 'void', [param('ns3::Time::Unit', 'resolution')], is_static=True) + ## nstime.h (module 'core'): static bool ns3::Time::StaticInit() [member function] + cls.add_method('StaticInit', + 'bool', + [], + is_static=True) ## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function] cls.add_method('To', 'ns3::int64x64_t', @@ -2234,13 +2374,6 @@ [param('ns3::ObjectFactory const &', 'value')]) return -def register_Ns3TimeChecker_methods(root_module, cls): - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker() [constructor] - cls.add_constructor([]) - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker(ns3::TimeChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TimeChecker const &', 'arg0')]) - return - def register_Ns3TimeValue_methods(root_module, cls): ## nstime.h (module 'core'): ns3::TimeValue::TimeValue() [constructor] cls.add_constructor([]) @@ -2552,14 +2685,127 @@ visibility='protected') return +def register_Ns3HashImplementation_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation(ns3::Hash::Implementation const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Implementation const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation() [constructor] + cls.add_constructor([]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Implementation::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_pure_virtual=True, is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Implementation::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Implementation::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + return + +def register_Ns3HashFunctionFnv1a_methods(root_module, cls): + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a(ns3::Hash::Function::Fnv1a const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Fnv1a const &', 'arg0')]) + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a() [constructor] + cls.add_constructor([]) + ## hash-fnv.h (module 'core'): uint32_t ns3::Hash::Function::Fnv1a::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): uint64_t ns3::Hash::Function::Fnv1a::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): void ns3::Hash::Function::Fnv1a::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash32_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Function::Hash32 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash32 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Hash32Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash32Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash32::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash32::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash64_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Function::Hash64 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash64 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Hash64Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash64Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash64::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Function::Hash64::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash64::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionMurmur3_methods(root_module, cls): + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3(ns3::Hash::Function::Murmur3 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Murmur3 const &', 'arg0')]) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3() [constructor] + cls.add_constructor([]) + ## hash-murmur3.h (module 'core'): uint32_t ns3::Hash::Function::Murmur3::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): uint64_t ns3::Hash::Function::Murmur3::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): void ns3::Hash::Function::Murmur3::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + def register_functions(root_module): module = root_module register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) + register_functions_ns3_Hash(module.get_submodule('Hash'), root_module) return def register_functions_ns3_FatalImpl(module, root_module): return +def register_functions_ns3_Hash(module, root_module): + register_functions_ns3_Hash_Function(module.get_submodule('Function'), root_module) + return + +def register_functions_ns3_Hash_Function(module, root_module): + return + def main(): out = FileCodeSink(sys.stdout) root_module = module_init() diff -Naur ns-3.17/src/buildings/bindings/modulegen__gcc_ILP32.py ns-3.18/src/buildings/bindings/modulegen__gcc_ILP32.py --- ns-3.17/src/buildings/bindings/modulegen__gcc_ILP32.py 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/bindings/modulegen__gcc_ILP32.py 2013-10-26 07:07:29.551364380 -0700 @@ -46,6 +46,8 @@ module.add_class('CallbackBase', import_from_module='ns.core') ## constant-velocity-helper.h (module 'mobility'): ns3::ConstantVelocityHelper [class] module.add_class('ConstantVelocityHelper', import_from_module='ns.mobility') + ## hash.h (module 'core'): ns3::Hasher [class] + module.add_class('Hasher', import_from_module='ns.core') ## ipv4-address.h (module 'network'): ns3::Ipv4Address [class] module.add_class('Ipv4Address', import_from_module='ns.network') ## ipv4-address.h (module 'network'): ns3::Ipv4Address [class] @@ -122,6 +124,8 @@ module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeValue', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::CallbackImplBase', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] + module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Hash::Implementation', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::TraceSourceAccessor', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## propagation-loss-model.h (module 'propagation'): ns3::ThreeLogDistancePropagationLossModel [class] @@ -224,8 +228,8 @@ module.add_class('LogNormalRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## propagation-loss-model.h (module 'propagation'): ns3::MatrixPropagationLossModel [class] module.add_class('MatrixPropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) - ## mobility-model.h (module 'mobility'): ns3::MobilityModel [class] - module.add_class('MobilityModel', import_from_module='ns.mobility', parent=root_module['ns3::Object']) + ## mobility-building-info.h (module 'buildings'): ns3::MobilityBuildingInfo [class] + module.add_class('MobilityBuildingInfo', parent=root_module['ns3::Object']) ## propagation-loss-model.h (module 'propagation'): ns3::NakagamiPropagationLossModel [class] module.add_class('NakagamiPropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## net-device.h (module 'network'): ns3::NetDevice [class] @@ -244,8 +248,6 @@ module.add_class('OhBuildingsPropagationLossModel', parent=root_module['ns3::BuildingsPropagationLossModel']) ## random-variable-stream.h (module 'core'): ns3::ParetoRandomVariable [class] module.add_class('ParetoRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) - ## nstime.h (module 'core'): ns3::TimeChecker [class] - module.add_class('TimeChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) ## nstime.h (module 'core'): ns3::TimeValue [class] module.add_class('TimeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## type-id.h (module 'core'): ns3::TypeIdChecker [class] @@ -264,8 +266,6 @@ module.add_class('AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker']) ## address.h (module 'network'): ns3::AddressValue [class] module.add_class('AddressValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue']) - ## buildings-mobility-model.h (module 'buildings'): ns3::BuildingsMobilityModel [class] - module.add_class('BuildingsMobilityModel', parent=root_module['ns3::MobilityModel']) typehandlers.add_type_alias('ns3::Vector3DValue', 'ns3::VectorValue') typehandlers.add_type_alias('ns3::Vector3DValue*', 'ns3::VectorValue*') typehandlers.add_type_alias('ns3::Vector3DValue&', 'ns3::VectorValue&') @@ -284,11 +284,47 @@ nested_module = module.add_cpp_namespace('FatalImpl') register_types_ns3_FatalImpl(nested_module) + + ## Register a nested module for the namespace Hash + + nested_module = module.add_cpp_namespace('Hash') + register_types_ns3_Hash(nested_module) + def register_types_ns3_FatalImpl(module): root_module = module.get_root() +def register_types_ns3_Hash(module): + root_module = module.get_root() + + ## hash-function.h (module 'core'): ns3::Hash::Implementation [class] + module.add_class('Implementation', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash32Function_ptr') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash32Function_ptr*') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash32Function_ptr&') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash64Function_ptr') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash64Function_ptr*') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash64Function_ptr&') + + ## Register a nested module for the namespace Function + + nested_module = module.add_cpp_namespace('Function') + register_types_ns3_Hash_Function(nested_module) + + +def register_types_ns3_Hash_Function(module): + root_module = module.get_root() + + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a [class] + module.add_class('Fnv1a', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32 [class] + module.add_class('Hash32', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64 [class] + module.add_class('Hash64', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3 [class] + module.add_class('Murmur3', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + def register_methods(root_module): register_Ns3Address_methods(root_module, root_module['ns3::Address']) register_Ns3AttributeConstructionList_methods(root_module, root_module['ns3::AttributeConstructionList']) @@ -299,6 +335,7 @@ register_Ns3BuildingsHelper_methods(root_module, root_module['ns3::BuildingsHelper']) register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase']) register_Ns3ConstantVelocityHelper_methods(root_module, root_module['ns3::ConstantVelocityHelper']) + register_Ns3Hasher_methods(root_module, root_module['ns3::Hasher']) register_Ns3Ipv4Address_methods(root_module, root_module['ns3::Ipv4Address']) register_Ns3Ipv4Mask_methods(root_module, root_module['ns3::Ipv4Mask']) register_Ns3Ipv6Address_methods(root_module, root_module['ns3::Ipv6Address']) @@ -334,6 +371,7 @@ register_Ns3SimpleRefCount__Ns3AttributeChecker_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeChecker__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter >']) + register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter >']) register_Ns3ThreeLogDistancePropagationLossModel_methods(root_module, root_module['ns3::ThreeLogDistancePropagationLossModel']) register_Ns3Time_methods(root_module, root_module['ns3::Time']) @@ -380,7 +418,7 @@ register_Ns3LogDistancePropagationLossModel_methods(root_module, root_module['ns3::LogDistancePropagationLossModel']) register_Ns3LogNormalRandomVariable_methods(root_module, root_module['ns3::LogNormalRandomVariable']) register_Ns3MatrixPropagationLossModel_methods(root_module, root_module['ns3::MatrixPropagationLossModel']) - register_Ns3MobilityModel_methods(root_module, root_module['ns3::MobilityModel']) + register_Ns3MobilityBuildingInfo_methods(root_module, root_module['ns3::MobilityBuildingInfo']) register_Ns3NakagamiPropagationLossModel_methods(root_module, root_module['ns3::NakagamiPropagationLossModel']) register_Ns3NetDevice_methods(root_module, root_module['ns3::NetDevice']) register_Ns3Node_methods(root_module, root_module['ns3::Node']) @@ -389,7 +427,6 @@ register_Ns3ObjectFactoryValue_methods(root_module, root_module['ns3::ObjectFactoryValue']) register_Ns3OhBuildingsPropagationLossModel_methods(root_module, root_module['ns3::OhBuildingsPropagationLossModel']) register_Ns3ParetoRandomVariable_methods(root_module, root_module['ns3::ParetoRandomVariable']) - register_Ns3TimeChecker_methods(root_module, root_module['ns3::TimeChecker']) register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue']) register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker']) register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue']) @@ -399,7 +436,11 @@ register_Ns3Vector3DValue_methods(root_module, root_module['ns3::Vector3DValue']) register_Ns3AddressChecker_methods(root_module, root_module['ns3::AddressChecker']) register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue']) - register_Ns3BuildingsMobilityModel_methods(root_module, root_module['ns3::BuildingsMobilityModel']) + register_Ns3HashImplementation_methods(root_module, root_module['ns3::Hash::Implementation']) + register_Ns3HashFunctionFnv1a_methods(root_module, root_module['ns3::Hash::Function::Fnv1a']) + register_Ns3HashFunctionHash32_methods(root_module, root_module['ns3::Hash::Function::Hash32']) + register_Ns3HashFunctionHash64_methods(root_module, root_module['ns3::Hash::Function::Hash64']) + register_Ns3HashFunctionMurmur3_methods(root_module, root_module['ns3::Hash::Function::Murmur3']) return def register_Ns3Address_methods(root_module, cls): @@ -637,10 +678,20 @@ cls.add_constructor([]) ## buildings-helper.h (module 'buildings'): ns3::BuildingsHelper::BuildingsHelper(ns3::BuildingsHelper const & arg0) [copy constructor] cls.add_constructor([param('ns3::BuildingsHelper const &', 'arg0')]) - ## buildings-helper.h (module 'buildings'): static void ns3::BuildingsHelper::MakeConsistent(ns3::Ptr bmm) [member function] + ## buildings-helper.h (module 'buildings'): static void ns3::BuildingsHelper::Install(ns3::Ptr node) [member function] + cls.add_method('Install', + 'void', + [param('ns3::Ptr< ns3::Node >', 'node')], + is_static=True) + ## buildings-helper.h (module 'buildings'): static void ns3::BuildingsHelper::Install(ns3::NodeContainer c) [member function] + cls.add_method('Install', + 'void', + [param('ns3::NodeContainer', 'c')], + is_static=True) + ## buildings-helper.h (module 'buildings'): static void ns3::BuildingsHelper::MakeConsistent(ns3::Ptr bmm) [member function] cls.add_method('MakeConsistent', 'void', - [param('ns3::Ptr< ns3::BuildingsMobilityModel >', 'bmm')], + [param('ns3::Ptr< ns3::MobilityModel >', 'bmm')], is_static=True) ## buildings-helper.h (module 'buildings'): static void ns3::BuildingsHelper::MakeMobilityModelConsistent() [member function] cls.add_method('MakeMobilityModelConsistent', @@ -721,6 +772,35 @@ is_const=True) return +def register_Ns3Hasher_methods(root_module, cls): + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Hasher const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hasher const &', 'arg0')]) + ## hash.h (module 'core'): ns3::Hasher::Hasher() [constructor] + cls.add_constructor([]) + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Ptr hp) [constructor] + cls.add_constructor([param('ns3::Ptr< ns3::Hash::Implementation >', 'hp')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(std::string const s) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(std::string const s) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): ns3::Hasher & ns3::Hasher::clear() [member function] + cls.add_method('clear', + 'ns3::Hasher &', + []) + return + def register_Ns3Ipv4Address_methods(root_module, cls): cls.add_binary_comparison_operator('<') cls.add_binary_comparison_operator('!=') @@ -986,6 +1066,11 @@ 'bool', [], is_const=True) + ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsDocumentation() const [member function] + cls.add_method('IsDocumentation', + 'bool', + [], + is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsEqual(ns3::Ipv6Address const & other) const [member function] cls.add_method('IsEqual', 'bool', @@ -1025,16 +1110,36 @@ 'bool', [], is_const=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac16Address addr, ns3::Ipv6Address prefix) [member function] + cls.add_method('MakeAutoconfiguredAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac16Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac48Address addr, ns3::Ipv6Address prefix) [member function] cls.add_method('MakeAutoconfiguredAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac64Address addr, ns3::Ipv6Address prefix) [member function] + cls.add_method('MakeAutoconfiguredAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac64Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], + is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac16Address mac) [member function] + cls.add_method('MakeAutoconfiguredLinkLocalAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac16Address', 'mac')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac48Address mac) [member function] cls.add_method('MakeAutoconfiguredLinkLocalAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'mac')], is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac64Address mac) [member function] + cls.add_method('MakeAutoconfiguredLinkLocalAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac64Address', 'mac')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeIpv4MappedAddress(ns3::Ipv4Address addr) [member function] cls.add_method('MakeIpv4MappedAddress', 'ns3::Ipv6Address', @@ -1419,6 +1524,11 @@ 'std::string', [], is_const=True) + ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetHash() const [member function] + cls.add_method('GetHash', + 'uint32_t', + [], + is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeId::GetName() const [member function] cls.add_method('GetName', 'std::string', @@ -1478,6 +1588,16 @@ 'bool', [param('std::string', 'name'), param('ns3::TypeId::AttributeInformation *', 'info', transfer_ownership=False)], is_const=True) + ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByHash(uint32_t hash) [member function] + cls.add_method('LookupByHash', + 'ns3::TypeId', + [param('uint32_t', 'hash')], + is_static=True) + ## type-id.h (module 'core'): static bool ns3::TypeId::LookupByHashFailSafe(uint32_t hash, ns3::TypeId * tid) [member function] + cls.add_method('LookupByHashFailSafe', + 'bool', + [param('uint32_t', 'hash'), param('ns3::TypeId *', 'tid')], + is_static=True) ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByName(std::string name) [member function] cls.add_method('LookupByName', 'ns3::TypeId', @@ -2155,6 +2275,18 @@ is_static=True) return +def register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter< ns3::Hash::Implementation > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + def register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] cls.add_constructor([]) @@ -2321,11 +2453,26 @@ 'bool', [], is_const=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Max() [member function] + cls.add_method('Max', + 'ns3::Time', + [], + is_static=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Min() [member function] + cls.add_method('Min', + 'ns3::Time', + [], + is_static=True) ## nstime.h (module 'core'): static void ns3::Time::SetResolution(ns3::Time::Unit resolution) [member function] cls.add_method('SetResolution', 'void', [param('ns3::Time::Unit', 'resolution')], is_static=True) + ## nstime.h (module 'core'): static bool ns3::Time::StaticInit() [member function] + cls.add_method('StaticInit', + 'bool', + [], + is_static=True) ## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function] cls.add_method('To', 'ns3::int64x64_t', @@ -2421,14 +2568,10 @@ is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::TwoRayGroundPropagationLossModel::TwoRayGroundPropagationLossModel() [constructor] cls.add_constructor([]) - ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetLambda(double frequency, double speed) [member function] - cls.add_method('SetLambda', - 'void', - [param('double', 'frequency'), param('double', 'speed')]) - ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetLambda(double lambda) [member function] - cls.add_method('SetLambda', + ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetFrequency(double frequency) [member function] + cls.add_method('SetFrequency', 'void', - [param('double', 'lambda')]) + [param('double', 'frequency')]) ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetSystemLoss(double systemLoss) [member function] cls.add_method('SetSystemLoss', 'void', @@ -2442,8 +2585,8 @@ 'double', [], is_const=True) - ## propagation-loss-model.h (module 'propagation'): double ns3::TwoRayGroundPropagationLossModel::GetLambda() const [member function] - cls.add_method('GetLambda', + ## propagation-loss-model.h (module 'propagation'): double ns3::TwoRayGroundPropagationLossModel::GetFrequency() const [member function] + cls.add_method('GetFrequency', 'double', [], is_const=True) @@ -2906,30 +3049,30 @@ 'int64_t', [param('int64_t', 'stream')], visibility='protected', is_virtual=True) - ## buildings-propagation-loss-model.h (module 'buildings'): double ns3::BuildingsPropagationLossModel::EvaluateSigma(ns3::Ptr a, ns3::Ptr b) const [member function] + ## buildings-propagation-loss-model.h (module 'buildings'): double ns3::BuildingsPropagationLossModel::EvaluateSigma(ns3::Ptr a, ns3::Ptr b) const [member function] cls.add_method('EvaluateSigma', 'double', - [param('ns3::Ptr< ns3::BuildingsMobilityModel >', 'a'), param('ns3::Ptr< ns3::BuildingsMobilityModel >', 'b')], + [param('ns3::Ptr< ns3::MobilityBuildingInfo >', 'a'), param('ns3::Ptr< ns3::MobilityBuildingInfo >', 'b')], is_const=True, visibility='protected') - ## buildings-propagation-loss-model.h (module 'buildings'): double ns3::BuildingsPropagationLossModel::ExternalWallLoss(ns3::Ptr a) const [member function] + ## buildings-propagation-loss-model.h (module 'buildings'): double ns3::BuildingsPropagationLossModel::ExternalWallLoss(ns3::Ptr a) const [member function] cls.add_method('ExternalWallLoss', 'double', - [param('ns3::Ptr< ns3::BuildingsMobilityModel >', 'a')], + [param('ns3::Ptr< ns3::MobilityBuildingInfo >', 'a')], is_const=True, visibility='protected') ## buildings-propagation-loss-model.h (module 'buildings'): double ns3::BuildingsPropagationLossModel::GetShadowing(ns3::Ptr a, ns3::Ptr b) const [member function] cls.add_method('GetShadowing', 'double', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, visibility='protected') - ## buildings-propagation-loss-model.h (module 'buildings'): double ns3::BuildingsPropagationLossModel::HeightLoss(ns3::Ptr n) const [member function] + ## buildings-propagation-loss-model.h (module 'buildings'): double ns3::BuildingsPropagationLossModel::HeightLoss(ns3::Ptr n) const [member function] cls.add_method('HeightLoss', 'double', - [param('ns3::Ptr< ns3::BuildingsMobilityModel >', 'n')], + [param('ns3::Ptr< ns3::MobilityBuildingInfo >', 'n')], is_const=True, visibility='protected') - ## buildings-propagation-loss-model.h (module 'buildings'): double ns3::BuildingsPropagationLossModel::InternalWallsLoss(ns3::Ptr a, ns3::Ptr b) const [member function] + ## buildings-propagation-loss-model.h (module 'buildings'): double ns3::BuildingsPropagationLossModel::InternalWallsLoss(ns3::Ptr a, ns3::Ptr b) const [member function] cls.add_method('InternalWallsLoss', 'double', - [param('ns3::Ptr< ns3::BuildingsMobilityModel >', 'a'), param('ns3::Ptr< ns3::BuildingsMobilityModel >', 'b')], + [param('ns3::Ptr< ns3::MobilityBuildingInfo >', 'a'), param('ns3::Ptr< ns3::MobilityBuildingInfo >', 'b')], is_const=True, visibility='protected') return @@ -3201,14 +3344,10 @@ is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::FriisPropagationLossModel::FriisPropagationLossModel() [constructor] cls.add_constructor([]) - ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetLambda(double frequency, double speed) [member function] - cls.add_method('SetLambda', - 'void', - [param('double', 'frequency'), param('double', 'speed')]) - ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetLambda(double lambda) [member function] - cls.add_method('SetLambda', + ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetFrequency(double frequency) [member function] + cls.add_method('SetFrequency', 'void', - [param('double', 'lambda')]) + [param('double', 'frequency')]) ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetSystemLoss(double systemLoss) [member function] cls.add_method('SetSystemLoss', 'void', @@ -3222,8 +3361,8 @@ 'double', [], is_const=True) - ## propagation-loss-model.h (module 'propagation'): double ns3::FriisPropagationLossModel::GetLambda() const [member function] - cls.add_method('GetLambda', + ## propagation-loss-model.h (module 'propagation'): double ns3::FriisPropagationLossModel::GetFrequency() const [member function] + cls.add_method('GetFrequency', 'double', [], is_const=True) @@ -3720,69 +3859,54 @@ visibility='private', is_virtual=True) return -def register_Ns3MobilityModel_methods(root_module, cls): - ## mobility-model.h (module 'mobility'): ns3::MobilityModel::MobilityModel(ns3::MobilityModel const & arg0) [copy constructor] - cls.add_constructor([param('ns3::MobilityModel const &', 'arg0')]) - ## mobility-model.h (module 'mobility'): ns3::MobilityModel::MobilityModel() [constructor] +def register_Ns3MobilityBuildingInfo_methods(root_module, cls): + ## mobility-building-info.h (module 'buildings'): ns3::MobilityBuildingInfo::MobilityBuildingInfo(ns3::MobilityBuildingInfo const & arg0) [copy constructor] + cls.add_constructor([param('ns3::MobilityBuildingInfo const &', 'arg0')]) + ## mobility-building-info.h (module 'buildings'): ns3::MobilityBuildingInfo::MobilityBuildingInfo() [constructor] cls.add_constructor([]) - ## mobility-model.h (module 'mobility'): int64_t ns3::MobilityModel::AssignStreams(int64_t stream) [member function] - cls.add_method('AssignStreams', - 'int64_t', - [param('int64_t', 'stream')]) - ## mobility-model.h (module 'mobility'): double ns3::MobilityModel::GetDistanceFrom(ns3::Ptr position) const [member function] - cls.add_method('GetDistanceFrom', - 'double', - [param('ns3::Ptr< ns3::MobilityModel const >', 'position')], - is_const=True) - ## mobility-model.h (module 'mobility'): ns3::Vector ns3::MobilityModel::GetPosition() const [member function] - cls.add_method('GetPosition', - 'ns3::Vector', - [], - is_const=True) - ## mobility-model.h (module 'mobility'): double ns3::MobilityModel::GetRelativeSpeed(ns3::Ptr other) const [member function] - cls.add_method('GetRelativeSpeed', - 'double', - [param('ns3::Ptr< ns3::MobilityModel const >', 'other')], - is_const=True) - ## mobility-model.h (module 'mobility'): static ns3::TypeId ns3::MobilityModel::GetTypeId() [member function] + ## mobility-building-info.h (module 'buildings'): ns3::MobilityBuildingInfo::MobilityBuildingInfo(ns3::Ptr building) [constructor] + cls.add_constructor([param('ns3::Ptr< ns3::Building >', 'building')]) + ## mobility-building-info.h (module 'buildings'): ns3::Ptr ns3::MobilityBuildingInfo::GetBuilding() [member function] + cls.add_method('GetBuilding', + 'ns3::Ptr< ns3::Building >', + []) + ## mobility-building-info.h (module 'buildings'): uint8_t ns3::MobilityBuildingInfo::GetFloorNumber() [member function] + cls.add_method('GetFloorNumber', + 'uint8_t', + []) + ## mobility-building-info.h (module 'buildings'): uint8_t ns3::MobilityBuildingInfo::GetRoomNumberX() [member function] + cls.add_method('GetRoomNumberX', + 'uint8_t', + []) + ## mobility-building-info.h (module 'buildings'): uint8_t ns3::MobilityBuildingInfo::GetRoomNumberY() [member function] + cls.add_method('GetRoomNumberY', + 'uint8_t', + []) + ## mobility-building-info.h (module 'buildings'): static ns3::TypeId ns3::MobilityBuildingInfo::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## mobility-model.h (module 'mobility'): ns3::Vector ns3::MobilityModel::GetVelocity() const [member function] - cls.add_method('GetVelocity', - 'ns3::Vector', - [], - is_const=True) - ## mobility-model.h (module 'mobility'): void ns3::MobilityModel::SetPosition(ns3::Vector const & position) [member function] - cls.add_method('SetPosition', + ## mobility-building-info.h (module 'buildings'): bool ns3::MobilityBuildingInfo::IsIndoor() [member function] + cls.add_method('IsIndoor', + 'bool', + []) + ## mobility-building-info.h (module 'buildings'): bool ns3::MobilityBuildingInfo::IsOutdoor() [member function] + cls.add_method('IsOutdoor', + 'bool', + []) + ## mobility-building-info.h (module 'buildings'): void ns3::MobilityBuildingInfo::SetIndoor(ns3::Ptr building, uint8_t nfloor, uint8_t nroomx, uint8_t nroomy) [member function] + cls.add_method('SetIndoor', 'void', - [param('ns3::Vector const &', 'position')]) - ## mobility-model.h (module 'mobility'): void ns3::MobilityModel::NotifyCourseChange() const [member function] - cls.add_method('NotifyCourseChange', + [param('ns3::Ptr< ns3::Building >', 'building'), param('uint8_t', 'nfloor'), param('uint8_t', 'nroomx'), param('uint8_t', 'nroomy')]) + ## mobility-building-info.h (module 'buildings'): void ns3::MobilityBuildingInfo::SetIndoor(uint8_t nfloor, uint8_t nroomx, uint8_t nroomy) [member function] + cls.add_method('SetIndoor', 'void', - [], - is_const=True, visibility='protected') - ## mobility-model.h (module 'mobility'): int64_t ns3::MobilityModel::DoAssignStreams(int64_t start) [member function] - cls.add_method('DoAssignStreams', - 'int64_t', - [param('int64_t', 'start')], - visibility='private', is_virtual=True) - ## mobility-model.h (module 'mobility'): ns3::Vector ns3::MobilityModel::DoGetPosition() const [member function] - cls.add_method('DoGetPosition', - 'ns3::Vector', - [], - is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) - ## mobility-model.h (module 'mobility'): ns3::Vector ns3::MobilityModel::DoGetVelocity() const [member function] - cls.add_method('DoGetVelocity', - 'ns3::Vector', - [], - is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) - ## mobility-model.h (module 'mobility'): void ns3::MobilityModel::DoSetPosition(ns3::Vector const & position) [member function] - cls.add_method('DoSetPosition', + [param('uint8_t', 'nfloor'), param('uint8_t', 'nroomx'), param('uint8_t', 'nroomy')]) + ## mobility-building-info.h (module 'buildings'): void ns3::MobilityBuildingInfo::SetOutdoor() [member function] + cls.add_method('SetOutdoor', 'void', - [param('ns3::Vector const &', 'position')], - is_pure_virtual=True, visibility='private', is_virtual=True) + []) return def register_Ns3NakagamiPropagationLossModel_methods(root_module, cls): @@ -4163,13 +4287,6 @@ is_virtual=True) return -def register_Ns3TimeChecker_methods(root_module, cls): - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker() [constructor] - cls.add_constructor([]) - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker(ns3::TimeChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TimeChecker const &', 'arg0')]) - return - def register_Ns3TimeValue_methods(root_module, cls): ## nstime.h (module 'core'): ns3::TimeValue::TimeValue() [constructor] cls.add_constructor([]) @@ -4363,78 +4480,127 @@ [param('ns3::Address const &', 'value')]) return -def register_Ns3BuildingsMobilityModel_methods(root_module, cls): - ## buildings-mobility-model.h (module 'buildings'): ns3::BuildingsMobilityModel::BuildingsMobilityModel(ns3::BuildingsMobilityModel const & arg0) [copy constructor] - cls.add_constructor([param('ns3::BuildingsMobilityModel const &', 'arg0')]) - ## buildings-mobility-model.h (module 'buildings'): ns3::BuildingsMobilityModel::BuildingsMobilityModel() [constructor] +def register_Ns3HashImplementation_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation(ns3::Hash::Implementation const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Implementation const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation() [constructor] cls.add_constructor([]) - ## buildings-mobility-model.h (module 'buildings'): ns3::Ptr ns3::BuildingsMobilityModel::GetBuilding() [member function] - cls.add_method('GetBuilding', - 'ns3::Ptr< ns3::Building >', - []) - ## buildings-mobility-model.h (module 'buildings'): uint8_t ns3::BuildingsMobilityModel::GetFloorNumber() [member function] - cls.add_method('GetFloorNumber', - 'uint8_t', - []) - ## buildings-mobility-model.h (module 'buildings'): uint8_t ns3::BuildingsMobilityModel::GetRoomNumberX() [member function] - cls.add_method('GetRoomNumberX', - 'uint8_t', - []) - ## buildings-mobility-model.h (module 'buildings'): uint8_t ns3::BuildingsMobilityModel::GetRoomNumberY() [member function] - cls.add_method('GetRoomNumberY', - 'uint8_t', - []) - ## buildings-mobility-model.h (module 'buildings'): static ns3::TypeId ns3::BuildingsMobilityModel::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## buildings-mobility-model.h (module 'buildings'): bool ns3::BuildingsMobilityModel::IsIndoor() [member function] - cls.add_method('IsIndoor', - 'bool', - []) - ## buildings-mobility-model.h (module 'buildings'): bool ns3::BuildingsMobilityModel::IsOutdoor() [member function] - cls.add_method('IsOutdoor', - 'bool', - []) - ## buildings-mobility-model.h (module 'buildings'): void ns3::BuildingsMobilityModel::SetIndoor(ns3::Ptr building, uint8_t nfloor, uint8_t nroomx, uint8_t nroomy) [member function] - cls.add_method('SetIndoor', - 'void', - [param('ns3::Ptr< ns3::Building >', 'building'), param('uint8_t', 'nfloor'), param('uint8_t', 'nroomx'), param('uint8_t', 'nroomy')]) - ## buildings-mobility-model.h (module 'buildings'): void ns3::BuildingsMobilityModel::SetOutdoor() [member function] - cls.add_method('SetOutdoor', + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Implementation::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_pure_virtual=True, is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Implementation::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Implementation::clear() [member function] + cls.add_method('clear', 'void', - []) - ## buildings-mobility-model.h (module 'buildings'): void ns3::BuildingsMobilityModel::DoDispose() [member function] - cls.add_method('DoDispose', + [], + is_pure_virtual=True, is_virtual=True) + return + +def register_Ns3HashFunctionFnv1a_methods(root_module, cls): + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a(ns3::Hash::Function::Fnv1a const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Fnv1a const &', 'arg0')]) + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a() [constructor] + cls.add_constructor([]) + ## hash-fnv.h (module 'core'): uint32_t ns3::Hash::Function::Fnv1a::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): uint64_t ns3::Hash::Function::Fnv1a::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): void ns3::Hash::Function::Fnv1a::clear() [member function] + cls.add_method('clear', 'void', [], - visibility='private', is_virtual=True) - ## buildings-mobility-model.h (module 'buildings'): ns3::Vector ns3::BuildingsMobilityModel::DoGetPosition() const [member function] - cls.add_method('DoGetPosition', - 'ns3::Vector', + is_virtual=True) + return + +def register_Ns3HashFunctionHash32_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Function::Hash32 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash32 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Hash32Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash32Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash32::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash32::clear() [member function] + cls.add_method('clear', + 'void', [], - is_const=True, visibility='private', is_virtual=True) - ## buildings-mobility-model.h (module 'buildings'): ns3::Vector ns3::BuildingsMobilityModel::DoGetVelocity() const [member function] - cls.add_method('DoGetVelocity', - 'ns3::Vector', + is_virtual=True) + return + +def register_Ns3HashFunctionHash64_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Function::Hash64 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash64 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Hash64Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash64Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash64::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Function::Hash64::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash64::clear() [member function] + cls.add_method('clear', + 'void', [], - is_const=True, visibility='private', is_virtual=True) - ## buildings-mobility-model.h (module 'buildings'): void ns3::BuildingsMobilityModel::DoSetPosition(ns3::Vector const & position) [member function] - cls.add_method('DoSetPosition', + is_virtual=True) + return + +def register_Ns3HashFunctionMurmur3_methods(root_module, cls): + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3(ns3::Hash::Function::Murmur3 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Murmur3 const &', 'arg0')]) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3() [constructor] + cls.add_constructor([]) + ## hash-murmur3.h (module 'core'): uint32_t ns3::Hash::Function::Murmur3::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): uint64_t ns3::Hash::Function::Murmur3::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): void ns3::Hash::Function::Murmur3::clear() [member function] + cls.add_method('clear', 'void', - [param('ns3::Vector const &', 'position')], - visibility='private', is_virtual=True) + [], + is_virtual=True) return def register_functions(root_module): module = root_module register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) + register_functions_ns3_Hash(module.get_submodule('Hash'), root_module) return def register_functions_ns3_FatalImpl(module, root_module): return +def register_functions_ns3_Hash(module, root_module): + register_functions_ns3_Hash_Function(module.get_submodule('Function'), root_module) + return + +def register_functions_ns3_Hash_Function(module, root_module): + return + def main(): out = FileCodeSink(sys.stdout) root_module = module_init() diff -Naur ns-3.17/src/buildings/bindings/modulegen__gcc_LP64.py ns-3.18/src/buildings/bindings/modulegen__gcc_LP64.py --- ns-3.17/src/buildings/bindings/modulegen__gcc_LP64.py 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/bindings/modulegen__gcc_LP64.py 2013-10-26 07:07:29.547364381 -0700 @@ -46,6 +46,8 @@ module.add_class('CallbackBase', import_from_module='ns.core') ## constant-velocity-helper.h (module 'mobility'): ns3::ConstantVelocityHelper [class] module.add_class('ConstantVelocityHelper', import_from_module='ns.mobility') + ## hash.h (module 'core'): ns3::Hasher [class] + module.add_class('Hasher', import_from_module='ns.core') ## ipv4-address.h (module 'network'): ns3::Ipv4Address [class] module.add_class('Ipv4Address', import_from_module='ns.network') ## ipv4-address.h (module 'network'): ns3::Ipv4Address [class] @@ -122,6 +124,8 @@ module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeValue', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::CallbackImplBase', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] + module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Hash::Implementation', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::TraceSourceAccessor', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## propagation-loss-model.h (module 'propagation'): ns3::ThreeLogDistancePropagationLossModel [class] @@ -224,8 +228,8 @@ module.add_class('LogNormalRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## propagation-loss-model.h (module 'propagation'): ns3::MatrixPropagationLossModel [class] module.add_class('MatrixPropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) - ## mobility-model.h (module 'mobility'): ns3::MobilityModel [class] - module.add_class('MobilityModel', import_from_module='ns.mobility', parent=root_module['ns3::Object']) + ## mobility-building-info.h (module 'buildings'): ns3::MobilityBuildingInfo [class] + module.add_class('MobilityBuildingInfo', parent=root_module['ns3::Object']) ## propagation-loss-model.h (module 'propagation'): ns3::NakagamiPropagationLossModel [class] module.add_class('NakagamiPropagationLossModel', import_from_module='ns.propagation', parent=root_module['ns3::PropagationLossModel']) ## net-device.h (module 'network'): ns3::NetDevice [class] @@ -244,8 +248,6 @@ module.add_class('OhBuildingsPropagationLossModel', parent=root_module['ns3::BuildingsPropagationLossModel']) ## random-variable-stream.h (module 'core'): ns3::ParetoRandomVariable [class] module.add_class('ParetoRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) - ## nstime.h (module 'core'): ns3::TimeChecker [class] - module.add_class('TimeChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) ## nstime.h (module 'core'): ns3::TimeValue [class] module.add_class('TimeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## type-id.h (module 'core'): ns3::TypeIdChecker [class] @@ -264,8 +266,6 @@ module.add_class('AddressChecker', import_from_module='ns.network', parent=root_module['ns3::AttributeChecker']) ## address.h (module 'network'): ns3::AddressValue [class] module.add_class('AddressValue', import_from_module='ns.network', parent=root_module['ns3::AttributeValue']) - ## buildings-mobility-model.h (module 'buildings'): ns3::BuildingsMobilityModel [class] - module.add_class('BuildingsMobilityModel', parent=root_module['ns3::MobilityModel']) typehandlers.add_type_alias('ns3::Vector3DValue', 'ns3::VectorValue') typehandlers.add_type_alias('ns3::Vector3DValue*', 'ns3::VectorValue*') typehandlers.add_type_alias('ns3::Vector3DValue&', 'ns3::VectorValue&') @@ -284,11 +284,47 @@ nested_module = module.add_cpp_namespace('FatalImpl') register_types_ns3_FatalImpl(nested_module) + + ## Register a nested module for the namespace Hash + + nested_module = module.add_cpp_namespace('Hash') + register_types_ns3_Hash(nested_module) + def register_types_ns3_FatalImpl(module): root_module = module.get_root() +def register_types_ns3_Hash(module): + root_module = module.get_root() + + ## hash-function.h (module 'core'): ns3::Hash::Implementation [class] + module.add_class('Implementation', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash32Function_ptr') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash32Function_ptr*') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash32Function_ptr&') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash64Function_ptr') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash64Function_ptr*') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash64Function_ptr&') + + ## Register a nested module for the namespace Function + + nested_module = module.add_cpp_namespace('Function') + register_types_ns3_Hash_Function(nested_module) + + +def register_types_ns3_Hash_Function(module): + root_module = module.get_root() + + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a [class] + module.add_class('Fnv1a', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32 [class] + module.add_class('Hash32', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64 [class] + module.add_class('Hash64', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3 [class] + module.add_class('Murmur3', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + def register_methods(root_module): register_Ns3Address_methods(root_module, root_module['ns3::Address']) register_Ns3AttributeConstructionList_methods(root_module, root_module['ns3::AttributeConstructionList']) @@ -299,6 +335,7 @@ register_Ns3BuildingsHelper_methods(root_module, root_module['ns3::BuildingsHelper']) register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase']) register_Ns3ConstantVelocityHelper_methods(root_module, root_module['ns3::ConstantVelocityHelper']) + register_Ns3Hasher_methods(root_module, root_module['ns3::Hasher']) register_Ns3Ipv4Address_methods(root_module, root_module['ns3::Ipv4Address']) register_Ns3Ipv4Mask_methods(root_module, root_module['ns3::Ipv4Mask']) register_Ns3Ipv6Address_methods(root_module, root_module['ns3::Ipv6Address']) @@ -334,6 +371,7 @@ register_Ns3SimpleRefCount__Ns3AttributeChecker_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeChecker__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter >']) + register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter >']) register_Ns3ThreeLogDistancePropagationLossModel_methods(root_module, root_module['ns3::ThreeLogDistancePropagationLossModel']) register_Ns3Time_methods(root_module, root_module['ns3::Time']) @@ -380,7 +418,7 @@ register_Ns3LogDistancePropagationLossModel_methods(root_module, root_module['ns3::LogDistancePropagationLossModel']) register_Ns3LogNormalRandomVariable_methods(root_module, root_module['ns3::LogNormalRandomVariable']) register_Ns3MatrixPropagationLossModel_methods(root_module, root_module['ns3::MatrixPropagationLossModel']) - register_Ns3MobilityModel_methods(root_module, root_module['ns3::MobilityModel']) + register_Ns3MobilityBuildingInfo_methods(root_module, root_module['ns3::MobilityBuildingInfo']) register_Ns3NakagamiPropagationLossModel_methods(root_module, root_module['ns3::NakagamiPropagationLossModel']) register_Ns3NetDevice_methods(root_module, root_module['ns3::NetDevice']) register_Ns3Node_methods(root_module, root_module['ns3::Node']) @@ -389,7 +427,6 @@ register_Ns3ObjectFactoryValue_methods(root_module, root_module['ns3::ObjectFactoryValue']) register_Ns3OhBuildingsPropagationLossModel_methods(root_module, root_module['ns3::OhBuildingsPropagationLossModel']) register_Ns3ParetoRandomVariable_methods(root_module, root_module['ns3::ParetoRandomVariable']) - register_Ns3TimeChecker_methods(root_module, root_module['ns3::TimeChecker']) register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue']) register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker']) register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue']) @@ -399,7 +436,11 @@ register_Ns3Vector3DValue_methods(root_module, root_module['ns3::Vector3DValue']) register_Ns3AddressChecker_methods(root_module, root_module['ns3::AddressChecker']) register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue']) - register_Ns3BuildingsMobilityModel_methods(root_module, root_module['ns3::BuildingsMobilityModel']) + register_Ns3HashImplementation_methods(root_module, root_module['ns3::Hash::Implementation']) + register_Ns3HashFunctionFnv1a_methods(root_module, root_module['ns3::Hash::Function::Fnv1a']) + register_Ns3HashFunctionHash32_methods(root_module, root_module['ns3::Hash::Function::Hash32']) + register_Ns3HashFunctionHash64_methods(root_module, root_module['ns3::Hash::Function::Hash64']) + register_Ns3HashFunctionMurmur3_methods(root_module, root_module['ns3::Hash::Function::Murmur3']) return def register_Ns3Address_methods(root_module, cls): @@ -637,10 +678,20 @@ cls.add_constructor([]) ## buildings-helper.h (module 'buildings'): ns3::BuildingsHelper::BuildingsHelper(ns3::BuildingsHelper const & arg0) [copy constructor] cls.add_constructor([param('ns3::BuildingsHelper const &', 'arg0')]) - ## buildings-helper.h (module 'buildings'): static void ns3::BuildingsHelper::MakeConsistent(ns3::Ptr bmm) [member function] + ## buildings-helper.h (module 'buildings'): static void ns3::BuildingsHelper::Install(ns3::Ptr node) [member function] + cls.add_method('Install', + 'void', + [param('ns3::Ptr< ns3::Node >', 'node')], + is_static=True) + ## buildings-helper.h (module 'buildings'): static void ns3::BuildingsHelper::Install(ns3::NodeContainer c) [member function] + cls.add_method('Install', + 'void', + [param('ns3::NodeContainer', 'c')], + is_static=True) + ## buildings-helper.h (module 'buildings'): static void ns3::BuildingsHelper::MakeConsistent(ns3::Ptr bmm) [member function] cls.add_method('MakeConsistent', 'void', - [param('ns3::Ptr< ns3::BuildingsMobilityModel >', 'bmm')], + [param('ns3::Ptr< ns3::MobilityModel >', 'bmm')], is_static=True) ## buildings-helper.h (module 'buildings'): static void ns3::BuildingsHelper::MakeMobilityModelConsistent() [member function] cls.add_method('MakeMobilityModelConsistent', @@ -721,6 +772,35 @@ is_const=True) return +def register_Ns3Hasher_methods(root_module, cls): + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Hasher const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hasher const &', 'arg0')]) + ## hash.h (module 'core'): ns3::Hasher::Hasher() [constructor] + cls.add_constructor([]) + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Ptr hp) [constructor] + cls.add_constructor([param('ns3::Ptr< ns3::Hash::Implementation >', 'hp')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(std::string const s) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(std::string const s) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): ns3::Hasher & ns3::Hasher::clear() [member function] + cls.add_method('clear', + 'ns3::Hasher &', + []) + return + def register_Ns3Ipv4Address_methods(root_module, cls): cls.add_binary_comparison_operator('<') cls.add_binary_comparison_operator('!=') @@ -986,6 +1066,11 @@ 'bool', [], is_const=True) + ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsDocumentation() const [member function] + cls.add_method('IsDocumentation', + 'bool', + [], + is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsEqual(ns3::Ipv6Address const & other) const [member function] cls.add_method('IsEqual', 'bool', @@ -1025,16 +1110,36 @@ 'bool', [], is_const=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac16Address addr, ns3::Ipv6Address prefix) [member function] + cls.add_method('MakeAutoconfiguredAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac16Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac48Address addr, ns3::Ipv6Address prefix) [member function] cls.add_method('MakeAutoconfiguredAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac64Address addr, ns3::Ipv6Address prefix) [member function] + cls.add_method('MakeAutoconfiguredAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac64Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], + is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac16Address mac) [member function] + cls.add_method('MakeAutoconfiguredLinkLocalAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac16Address', 'mac')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac48Address mac) [member function] cls.add_method('MakeAutoconfiguredLinkLocalAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'mac')], is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac64Address mac) [member function] + cls.add_method('MakeAutoconfiguredLinkLocalAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac64Address', 'mac')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeIpv4MappedAddress(ns3::Ipv4Address addr) [member function] cls.add_method('MakeIpv4MappedAddress', 'ns3::Ipv6Address', @@ -1419,6 +1524,11 @@ 'std::string', [], is_const=True) + ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetHash() const [member function] + cls.add_method('GetHash', + 'uint32_t', + [], + is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeId::GetName() const [member function] cls.add_method('GetName', 'std::string', @@ -1478,6 +1588,16 @@ 'bool', [param('std::string', 'name'), param('ns3::TypeId::AttributeInformation *', 'info', transfer_ownership=False)], is_const=True) + ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByHash(uint32_t hash) [member function] + cls.add_method('LookupByHash', + 'ns3::TypeId', + [param('uint32_t', 'hash')], + is_static=True) + ## type-id.h (module 'core'): static bool ns3::TypeId::LookupByHashFailSafe(uint32_t hash, ns3::TypeId * tid) [member function] + cls.add_method('LookupByHashFailSafe', + 'bool', + [param('uint32_t', 'hash'), param('ns3::TypeId *', 'tid')], + is_static=True) ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByName(std::string name) [member function] cls.add_method('LookupByName', 'ns3::TypeId', @@ -2155,6 +2275,18 @@ is_static=True) return +def register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter< ns3::Hash::Implementation > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + def register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] cls.add_constructor([]) @@ -2321,11 +2453,26 @@ 'bool', [], is_const=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Max() [member function] + cls.add_method('Max', + 'ns3::Time', + [], + is_static=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Min() [member function] + cls.add_method('Min', + 'ns3::Time', + [], + is_static=True) ## nstime.h (module 'core'): static void ns3::Time::SetResolution(ns3::Time::Unit resolution) [member function] cls.add_method('SetResolution', 'void', [param('ns3::Time::Unit', 'resolution')], is_static=True) + ## nstime.h (module 'core'): static bool ns3::Time::StaticInit() [member function] + cls.add_method('StaticInit', + 'bool', + [], + is_static=True) ## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function] cls.add_method('To', 'ns3::int64x64_t', @@ -2421,14 +2568,10 @@ is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::TwoRayGroundPropagationLossModel::TwoRayGroundPropagationLossModel() [constructor] cls.add_constructor([]) - ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetLambda(double frequency, double speed) [member function] - cls.add_method('SetLambda', - 'void', - [param('double', 'frequency'), param('double', 'speed')]) - ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetLambda(double lambda) [member function] - cls.add_method('SetLambda', + ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetFrequency(double frequency) [member function] + cls.add_method('SetFrequency', 'void', - [param('double', 'lambda')]) + [param('double', 'frequency')]) ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetSystemLoss(double systemLoss) [member function] cls.add_method('SetSystemLoss', 'void', @@ -2442,8 +2585,8 @@ 'double', [], is_const=True) - ## propagation-loss-model.h (module 'propagation'): double ns3::TwoRayGroundPropagationLossModel::GetLambda() const [member function] - cls.add_method('GetLambda', + ## propagation-loss-model.h (module 'propagation'): double ns3::TwoRayGroundPropagationLossModel::GetFrequency() const [member function] + cls.add_method('GetFrequency', 'double', [], is_const=True) @@ -2906,30 +3049,30 @@ 'int64_t', [param('int64_t', 'stream')], visibility='protected', is_virtual=True) - ## buildings-propagation-loss-model.h (module 'buildings'): double ns3::BuildingsPropagationLossModel::EvaluateSigma(ns3::Ptr a, ns3::Ptr b) const [member function] + ## buildings-propagation-loss-model.h (module 'buildings'): double ns3::BuildingsPropagationLossModel::EvaluateSigma(ns3::Ptr a, ns3::Ptr b) const [member function] cls.add_method('EvaluateSigma', 'double', - [param('ns3::Ptr< ns3::BuildingsMobilityModel >', 'a'), param('ns3::Ptr< ns3::BuildingsMobilityModel >', 'b')], + [param('ns3::Ptr< ns3::MobilityBuildingInfo >', 'a'), param('ns3::Ptr< ns3::MobilityBuildingInfo >', 'b')], is_const=True, visibility='protected') - ## buildings-propagation-loss-model.h (module 'buildings'): double ns3::BuildingsPropagationLossModel::ExternalWallLoss(ns3::Ptr a) const [member function] + ## buildings-propagation-loss-model.h (module 'buildings'): double ns3::BuildingsPropagationLossModel::ExternalWallLoss(ns3::Ptr a) const [member function] cls.add_method('ExternalWallLoss', 'double', - [param('ns3::Ptr< ns3::BuildingsMobilityModel >', 'a')], + [param('ns3::Ptr< ns3::MobilityBuildingInfo >', 'a')], is_const=True, visibility='protected') ## buildings-propagation-loss-model.h (module 'buildings'): double ns3::BuildingsPropagationLossModel::GetShadowing(ns3::Ptr a, ns3::Ptr b) const [member function] cls.add_method('GetShadowing', 'double', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b')], is_const=True, visibility='protected') - ## buildings-propagation-loss-model.h (module 'buildings'): double ns3::BuildingsPropagationLossModel::HeightLoss(ns3::Ptr n) const [member function] + ## buildings-propagation-loss-model.h (module 'buildings'): double ns3::BuildingsPropagationLossModel::HeightLoss(ns3::Ptr n) const [member function] cls.add_method('HeightLoss', 'double', - [param('ns3::Ptr< ns3::BuildingsMobilityModel >', 'n')], + [param('ns3::Ptr< ns3::MobilityBuildingInfo >', 'n')], is_const=True, visibility='protected') - ## buildings-propagation-loss-model.h (module 'buildings'): double ns3::BuildingsPropagationLossModel::InternalWallsLoss(ns3::Ptr a, ns3::Ptr b) const [member function] + ## buildings-propagation-loss-model.h (module 'buildings'): double ns3::BuildingsPropagationLossModel::InternalWallsLoss(ns3::Ptr a, ns3::Ptr b) const [member function] cls.add_method('InternalWallsLoss', 'double', - [param('ns3::Ptr< ns3::BuildingsMobilityModel >', 'a'), param('ns3::Ptr< ns3::BuildingsMobilityModel >', 'b')], + [param('ns3::Ptr< ns3::MobilityBuildingInfo >', 'a'), param('ns3::Ptr< ns3::MobilityBuildingInfo >', 'b')], is_const=True, visibility='protected') return @@ -3201,14 +3344,10 @@ is_static=True) ## propagation-loss-model.h (module 'propagation'): ns3::FriisPropagationLossModel::FriisPropagationLossModel() [constructor] cls.add_constructor([]) - ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetLambda(double frequency, double speed) [member function] - cls.add_method('SetLambda', - 'void', - [param('double', 'frequency'), param('double', 'speed')]) - ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetLambda(double lambda) [member function] - cls.add_method('SetLambda', + ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetFrequency(double frequency) [member function] + cls.add_method('SetFrequency', 'void', - [param('double', 'lambda')]) + [param('double', 'frequency')]) ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetSystemLoss(double systemLoss) [member function] cls.add_method('SetSystemLoss', 'void', @@ -3222,8 +3361,8 @@ 'double', [], is_const=True) - ## propagation-loss-model.h (module 'propagation'): double ns3::FriisPropagationLossModel::GetLambda() const [member function] - cls.add_method('GetLambda', + ## propagation-loss-model.h (module 'propagation'): double ns3::FriisPropagationLossModel::GetFrequency() const [member function] + cls.add_method('GetFrequency', 'double', [], is_const=True) @@ -3720,69 +3859,54 @@ visibility='private', is_virtual=True) return -def register_Ns3MobilityModel_methods(root_module, cls): - ## mobility-model.h (module 'mobility'): ns3::MobilityModel::MobilityModel(ns3::MobilityModel const & arg0) [copy constructor] - cls.add_constructor([param('ns3::MobilityModel const &', 'arg0')]) - ## mobility-model.h (module 'mobility'): ns3::MobilityModel::MobilityModel() [constructor] +def register_Ns3MobilityBuildingInfo_methods(root_module, cls): + ## mobility-building-info.h (module 'buildings'): ns3::MobilityBuildingInfo::MobilityBuildingInfo(ns3::MobilityBuildingInfo const & arg0) [copy constructor] + cls.add_constructor([param('ns3::MobilityBuildingInfo const &', 'arg0')]) + ## mobility-building-info.h (module 'buildings'): ns3::MobilityBuildingInfo::MobilityBuildingInfo() [constructor] cls.add_constructor([]) - ## mobility-model.h (module 'mobility'): int64_t ns3::MobilityModel::AssignStreams(int64_t stream) [member function] - cls.add_method('AssignStreams', - 'int64_t', - [param('int64_t', 'stream')]) - ## mobility-model.h (module 'mobility'): double ns3::MobilityModel::GetDistanceFrom(ns3::Ptr position) const [member function] - cls.add_method('GetDistanceFrom', - 'double', - [param('ns3::Ptr< ns3::MobilityModel const >', 'position')], - is_const=True) - ## mobility-model.h (module 'mobility'): ns3::Vector ns3::MobilityModel::GetPosition() const [member function] - cls.add_method('GetPosition', - 'ns3::Vector', - [], - is_const=True) - ## mobility-model.h (module 'mobility'): double ns3::MobilityModel::GetRelativeSpeed(ns3::Ptr other) const [member function] - cls.add_method('GetRelativeSpeed', - 'double', - [param('ns3::Ptr< ns3::MobilityModel const >', 'other')], - is_const=True) - ## mobility-model.h (module 'mobility'): static ns3::TypeId ns3::MobilityModel::GetTypeId() [member function] + ## mobility-building-info.h (module 'buildings'): ns3::MobilityBuildingInfo::MobilityBuildingInfo(ns3::Ptr building) [constructor] + cls.add_constructor([param('ns3::Ptr< ns3::Building >', 'building')]) + ## mobility-building-info.h (module 'buildings'): ns3::Ptr ns3::MobilityBuildingInfo::GetBuilding() [member function] + cls.add_method('GetBuilding', + 'ns3::Ptr< ns3::Building >', + []) + ## mobility-building-info.h (module 'buildings'): uint8_t ns3::MobilityBuildingInfo::GetFloorNumber() [member function] + cls.add_method('GetFloorNumber', + 'uint8_t', + []) + ## mobility-building-info.h (module 'buildings'): uint8_t ns3::MobilityBuildingInfo::GetRoomNumberX() [member function] + cls.add_method('GetRoomNumberX', + 'uint8_t', + []) + ## mobility-building-info.h (module 'buildings'): uint8_t ns3::MobilityBuildingInfo::GetRoomNumberY() [member function] + cls.add_method('GetRoomNumberY', + 'uint8_t', + []) + ## mobility-building-info.h (module 'buildings'): static ns3::TypeId ns3::MobilityBuildingInfo::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) - ## mobility-model.h (module 'mobility'): ns3::Vector ns3::MobilityModel::GetVelocity() const [member function] - cls.add_method('GetVelocity', - 'ns3::Vector', - [], - is_const=True) - ## mobility-model.h (module 'mobility'): void ns3::MobilityModel::SetPosition(ns3::Vector const & position) [member function] - cls.add_method('SetPosition', + ## mobility-building-info.h (module 'buildings'): bool ns3::MobilityBuildingInfo::IsIndoor() [member function] + cls.add_method('IsIndoor', + 'bool', + []) + ## mobility-building-info.h (module 'buildings'): bool ns3::MobilityBuildingInfo::IsOutdoor() [member function] + cls.add_method('IsOutdoor', + 'bool', + []) + ## mobility-building-info.h (module 'buildings'): void ns3::MobilityBuildingInfo::SetIndoor(ns3::Ptr building, uint8_t nfloor, uint8_t nroomx, uint8_t nroomy) [member function] + cls.add_method('SetIndoor', 'void', - [param('ns3::Vector const &', 'position')]) - ## mobility-model.h (module 'mobility'): void ns3::MobilityModel::NotifyCourseChange() const [member function] - cls.add_method('NotifyCourseChange', + [param('ns3::Ptr< ns3::Building >', 'building'), param('uint8_t', 'nfloor'), param('uint8_t', 'nroomx'), param('uint8_t', 'nroomy')]) + ## mobility-building-info.h (module 'buildings'): void ns3::MobilityBuildingInfo::SetIndoor(uint8_t nfloor, uint8_t nroomx, uint8_t nroomy) [member function] + cls.add_method('SetIndoor', 'void', - [], - is_const=True, visibility='protected') - ## mobility-model.h (module 'mobility'): int64_t ns3::MobilityModel::DoAssignStreams(int64_t start) [member function] - cls.add_method('DoAssignStreams', - 'int64_t', - [param('int64_t', 'start')], - visibility='private', is_virtual=True) - ## mobility-model.h (module 'mobility'): ns3::Vector ns3::MobilityModel::DoGetPosition() const [member function] - cls.add_method('DoGetPosition', - 'ns3::Vector', - [], - is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) - ## mobility-model.h (module 'mobility'): ns3::Vector ns3::MobilityModel::DoGetVelocity() const [member function] - cls.add_method('DoGetVelocity', - 'ns3::Vector', - [], - is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) - ## mobility-model.h (module 'mobility'): void ns3::MobilityModel::DoSetPosition(ns3::Vector const & position) [member function] - cls.add_method('DoSetPosition', + [param('uint8_t', 'nfloor'), param('uint8_t', 'nroomx'), param('uint8_t', 'nroomy')]) + ## mobility-building-info.h (module 'buildings'): void ns3::MobilityBuildingInfo::SetOutdoor() [member function] + cls.add_method('SetOutdoor', 'void', - [param('ns3::Vector const &', 'position')], - is_pure_virtual=True, visibility='private', is_virtual=True) + []) return def register_Ns3NakagamiPropagationLossModel_methods(root_module, cls): @@ -4163,13 +4287,6 @@ is_virtual=True) return -def register_Ns3TimeChecker_methods(root_module, cls): - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker() [constructor] - cls.add_constructor([]) - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker(ns3::TimeChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TimeChecker const &', 'arg0')]) - return - def register_Ns3TimeValue_methods(root_module, cls): ## nstime.h (module 'core'): ns3::TimeValue::TimeValue() [constructor] cls.add_constructor([]) @@ -4363,78 +4480,127 @@ [param('ns3::Address const &', 'value')]) return -def register_Ns3BuildingsMobilityModel_methods(root_module, cls): - ## buildings-mobility-model.h (module 'buildings'): ns3::BuildingsMobilityModel::BuildingsMobilityModel(ns3::BuildingsMobilityModel const & arg0) [copy constructor] - cls.add_constructor([param('ns3::BuildingsMobilityModel const &', 'arg0')]) - ## buildings-mobility-model.h (module 'buildings'): ns3::BuildingsMobilityModel::BuildingsMobilityModel() [constructor] +def register_Ns3HashImplementation_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation(ns3::Hash::Implementation const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Implementation const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation() [constructor] cls.add_constructor([]) - ## buildings-mobility-model.h (module 'buildings'): ns3::Ptr ns3::BuildingsMobilityModel::GetBuilding() [member function] - cls.add_method('GetBuilding', - 'ns3::Ptr< ns3::Building >', - []) - ## buildings-mobility-model.h (module 'buildings'): uint8_t ns3::BuildingsMobilityModel::GetFloorNumber() [member function] - cls.add_method('GetFloorNumber', - 'uint8_t', - []) - ## buildings-mobility-model.h (module 'buildings'): uint8_t ns3::BuildingsMobilityModel::GetRoomNumberX() [member function] - cls.add_method('GetRoomNumberX', - 'uint8_t', - []) - ## buildings-mobility-model.h (module 'buildings'): uint8_t ns3::BuildingsMobilityModel::GetRoomNumberY() [member function] - cls.add_method('GetRoomNumberY', - 'uint8_t', - []) - ## buildings-mobility-model.h (module 'buildings'): static ns3::TypeId ns3::BuildingsMobilityModel::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## buildings-mobility-model.h (module 'buildings'): bool ns3::BuildingsMobilityModel::IsIndoor() [member function] - cls.add_method('IsIndoor', - 'bool', - []) - ## buildings-mobility-model.h (module 'buildings'): bool ns3::BuildingsMobilityModel::IsOutdoor() [member function] - cls.add_method('IsOutdoor', - 'bool', - []) - ## buildings-mobility-model.h (module 'buildings'): void ns3::BuildingsMobilityModel::SetIndoor(ns3::Ptr building, uint8_t nfloor, uint8_t nroomx, uint8_t nroomy) [member function] - cls.add_method('SetIndoor', - 'void', - [param('ns3::Ptr< ns3::Building >', 'building'), param('uint8_t', 'nfloor'), param('uint8_t', 'nroomx'), param('uint8_t', 'nroomy')]) - ## buildings-mobility-model.h (module 'buildings'): void ns3::BuildingsMobilityModel::SetOutdoor() [member function] - cls.add_method('SetOutdoor', + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Implementation::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_pure_virtual=True, is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Implementation::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Implementation::clear() [member function] + cls.add_method('clear', 'void', - []) - ## buildings-mobility-model.h (module 'buildings'): void ns3::BuildingsMobilityModel::DoDispose() [member function] - cls.add_method('DoDispose', + [], + is_pure_virtual=True, is_virtual=True) + return + +def register_Ns3HashFunctionFnv1a_methods(root_module, cls): + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a(ns3::Hash::Function::Fnv1a const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Fnv1a const &', 'arg0')]) + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a() [constructor] + cls.add_constructor([]) + ## hash-fnv.h (module 'core'): uint32_t ns3::Hash::Function::Fnv1a::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): uint64_t ns3::Hash::Function::Fnv1a::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): void ns3::Hash::Function::Fnv1a::clear() [member function] + cls.add_method('clear', 'void', [], - visibility='private', is_virtual=True) - ## buildings-mobility-model.h (module 'buildings'): ns3::Vector ns3::BuildingsMobilityModel::DoGetPosition() const [member function] - cls.add_method('DoGetPosition', - 'ns3::Vector', + is_virtual=True) + return + +def register_Ns3HashFunctionHash32_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Function::Hash32 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash32 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Hash32Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash32Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash32::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash32::clear() [member function] + cls.add_method('clear', + 'void', [], - is_const=True, visibility='private', is_virtual=True) - ## buildings-mobility-model.h (module 'buildings'): ns3::Vector ns3::BuildingsMobilityModel::DoGetVelocity() const [member function] - cls.add_method('DoGetVelocity', - 'ns3::Vector', + is_virtual=True) + return + +def register_Ns3HashFunctionHash64_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Function::Hash64 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash64 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Hash64Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash64Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash64::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Function::Hash64::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash64::clear() [member function] + cls.add_method('clear', + 'void', [], - is_const=True, visibility='private', is_virtual=True) - ## buildings-mobility-model.h (module 'buildings'): void ns3::BuildingsMobilityModel::DoSetPosition(ns3::Vector const & position) [member function] - cls.add_method('DoSetPosition', + is_virtual=True) + return + +def register_Ns3HashFunctionMurmur3_methods(root_module, cls): + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3(ns3::Hash::Function::Murmur3 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Murmur3 const &', 'arg0')]) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3() [constructor] + cls.add_constructor([]) + ## hash-murmur3.h (module 'core'): uint32_t ns3::Hash::Function::Murmur3::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): uint64_t ns3::Hash::Function::Murmur3::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): void ns3::Hash::Function::Murmur3::clear() [member function] + cls.add_method('clear', 'void', - [param('ns3::Vector const &', 'position')], - visibility='private', is_virtual=True) + [], + is_virtual=True) return def register_functions(root_module): module = root_module register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) + register_functions_ns3_Hash(module.get_submodule('Hash'), root_module) return def register_functions_ns3_FatalImpl(module, root_module): return +def register_functions_ns3_Hash(module, root_module): + register_functions_ns3_Hash_Function(module.get_submodule('Function'), root_module) + return + +def register_functions_ns3_Hash_Function(module, root_module): + return + def main(): out = FileCodeSink(sys.stdout) root_module = module_init() diff -Naur ns-3.17/src/buildings/doc/Makefile ns-3.18/src/buildings/doc/Makefile --- ns-3.17/src/buildings/doc/Makefile 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/doc/Makefile 2013-10-26 07:07:29.543364381 -0700 @@ -20,12 +20,14 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF) +RESCALE = $(shell hg root)/utils/rescale-pdf.sh + %.eps : %.dia; $(DIA) -t eps $< -e $@ %.png : %.dia; $(DIA) -t png $< -e $@ %.png : %.eps; $(CONVERT) $< $@ %.pdf : %.eps $(EPSTOPDF) $< -o=$@; - if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi + @if test x$($@_width) != x; then $(RESCALE) $($@_width) $@ ; fi GRAPHS_PNG = ${GRAPHS_EPS:.eps=.png} GRAPHS_PDF = ${GRAPHS_EPS:.eps=.pdf} @@ -35,7 +37,7 @@ %.png : %.eps; $(CONVERT) $< $@ %.pdf : %.eps $(EPSTOPDF) $< -o=$@ - if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi + @if test x$($@_width) != x; then $(RESCALE) $($@_width) $@ ; fi # You can set these variables from the command line. SPHINXOPTS = diff -Naur ns-3.17/src/buildings/doc/rescale-pdf.sh ns-3.18/src/buildings/doc/rescale-pdf.sh --- ns-3.17/src/buildings/doc/rescale-pdf.sh 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/doc/rescale-pdf.sh 1969-12-31 16:00:00.000000000 -0800 @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -TMPDIR=/tmp - -TMPFILE=`mktemp` - -echo "\documentclass{book} -\usepackage{pdfpages} -\begin{document} -\includepdf[width=${1},fitpaper]{${2}} -\end{document}" >${TMPFILE}.tex -pdflatex -output-directory /tmp ${TMPFILE}.tex >/dev/null 2>/dev/null -cp ${TMPFILE}.pdf ${2} -rm -f ${TMPFILE}{,.{tex,aux,log,pdf}} diff -Naur ns-3.17/src/buildings/doc/source/buildings-design.rst ns-3.18/src/buildings/doc/source/buildings-design.rst --- ns-3.17/src/buildings/doc/source/buildings-design.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/doc/source/buildings-design.rst 2013-10-26 07:07:29.543364381 -0700 @@ -12,7 +12,7 @@ The Buildings module provides: #. a new class (``Building``) that models the presence of a building in a simulation scenario; - #. a new mobility model (``BuildingsMobilityModel``) that allows to specify the location, size and characteristics of buildings present in the simulated area, and allows the placement of nodes inside those buildings; + #. a new class (``MobilityBuildingInfo``) that allows to specify the location, size and characteristics of buildings present in the simulated area, and allows the placement of nodes inside those buildings; #. a container class with the definition of the most useful pathloss models and the correspondent variables called ``BuildingsPropagationLossModel``. #. a new propagation model (``HybridBuildingsPropagationLossModel``) working with the mobility model just introduced, that allows to model the phenomenon of indoor/outdoor propagation in the presence of buildings. #. a simplified model working only with Okumura Hata (``OhBuildingsPropagationLossModel``) considering the phenomenon of indoor/outdoor propagation in the presence of buildings. @@ -62,10 +62,10 @@ -The BuildingsMobilityModel class -++++++++++++++++++++++++++++++++ +The MobilityBuildingInfo class +++++++++++++++++++++++++++++++ -The ``BuildingsMobilityModel`` class, which inherits from the ns3 class ``MobilityModel``, is in charge of managing the standard mobility functionalities plus providing information about the position of a node with respect to building. The information managed by ``BuildingsMobilityModel`` is: +The ``MobilityBuildingInfo`` class, which inherits from the ns3 class ``Object``, is in charge of maintaining information about the position of a node with respect to building. The information managed by ``MobilityBuildingInfo`` is: * whether the node is indoor or outdoor * if indoor: @@ -73,7 +73,9 @@ * in which building the node is * in which room the node is positioned (x, y and floor room indices) -The class ``BuildingsMobilityModel`` is used by ``BuildingsPropagationLossModel`` class, which inherits from the ns3 class ``PropagationLossModel`` and manages the pathloss computation of the single components and their composition according to the nodes' positions. Moreover, it implements also the shadowing, that is the loss due to obstacles in the main path (i.e., vegetation, buildings, etc.). +The class ``MobilityBuildingInfo`` is used by ``BuildingsPropagationLossModel`` class, which inherits from the ns3 class ``PropagationLossModel`` and manages the pathloss computation of the single components and their composition according to the nodes' positions. Moreover, it implements also the shadowing, that is the loss due to obstacles in the main path (i.e., vegetation, buildings, etc.). + +It is to be noted that, ``MobilityBuildingInfo`` can be used by any other propagation model. However, based on the information at the time of this writing, only the ones defined in the building module are designed for considering the constraints introduced by the buildings. diff -Naur ns-3.17/src/buildings/doc/source/buildings-user.rst ns-3.18/src/buildings/doc/source/buildings-user.rst --- ns-3.17/src/buildings/doc/source/buildings-user.rst 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/doc/source/buildings-user.rst 2013-10-26 07:07:29.543364381 -0700 @@ -42,6 +42,12 @@ The simple ``OhBuildingMobilityLossModel`` overcome this problem by using only the Okumura Hata model and the wall penetration losses. +Helper Functionalities +---------------------- + +The ``BuildingsHelper`` class defines a set of static function for assisting in the definition of the scenario with building module. In detail, it provides the method ``Install`` for installing the building information included in ``MobilityBuildingInfo`` to a specific node (or set of nodes, i.e., the ``NodeContainer``). In order to synchronize the nodes information with their position, this helper provides the function ``MakeMobilityModelConsistent`` that puts all the ``Node``\s presents in the simulation in the right position (i.e., outdoor or indoor, in the latter also updating in terms of building, floor and room number). + + diff -Naur ns-3.17/src/buildings/examples/buildings-pathloss-profiler.cc ns-3.18/src/buildings/examples/buildings-pathloss-profiler.cc --- ns-3.17/src/buildings/examples/buildings-pathloss-profiler.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/examples/buildings-pathloss-profiler.cc 2013-10-26 07:07:29.543364381 -0700 @@ -25,6 +25,7 @@ #include "ns3/config-store.h" #include #include +#include #include #include @@ -64,15 +65,17 @@ NS_FATAL_ERROR ("Can't open output file"); } - Ptr mmEnb = CreateObject (); + Ptr mmEnb = CreateObject (); mmEnb->SetPosition (Vector (0.0, 0.0, hEnb)); if (enbIndoor) { - Ptr building1 = Create (-2, 2, -2, 2, 0.0, 20.0); + Ptr building1 = CreateObject (-2, 2, -2, 2, 0.0, 20.0); building1->SetBuildingType (Building::Residential); building1->SetExtWallsType (Building::ConcreteWithWindows); } - + + Ptr buildingInfoEnb = CreateObject (); + mmEnb->AggregateObject (buildingInfoEnb); // operation usually done by BuildingsHelper::Install BuildingsHelper::MakeConsistent (mmEnb); Ptr propagationLossModel = CreateObject (); @@ -86,8 +89,10 @@ //for (uint8_t i = 0; i < 23; i++) for (uint32_t i = 1; i < 2300; i++) { - Ptr mmUe = CreateObject (); - mmUe->SetPosition (Vector (i, 0.0, hUe)); + Ptr mmUe = CreateObject (); + mmUe->SetPosition (Vector (i, 0.0, hUe)); + Ptr buildingInfoUe = CreateObject (); + mmUe->AggregateObject (buildingInfoUe); // operation usually done by BuildingsHelper::Install BuildingsHelper::MakeConsistent (mmUe); double loss = propagationLossModel->GetLoss (mmEnb, mmUe); outFile << i << "\t" diff -Naur ns-3.17/src/buildings/helper/building-position-allocator.cc ns-3.18/src/buildings/helper/building-position-allocator.cc --- ns-3.17/src/buildings/helper/building-position-allocator.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/helper/building-position-allocator.cc 2013-10-26 07:07:29.543364381 -0700 @@ -18,7 +18,8 @@ * Author: Nicola Baldo */ #include "building-position-allocator.h" -#include "ns3/buildings-mobility-model.h" +#include +#include "ns3/mobility-model.h" #include "ns3/buildings-helper.h" #include "ns3/random-variable-stream.h" #include "ns3/double.h" @@ -209,9 +210,9 @@ { Ptr mm = (*it)->GetObject (); NS_ASSERT_MSG (mm, "no mobility model aggregated to this node"); - Ptr bmm = DynamicCast (mm); - NS_ASSERT_MSG (bmm, "mobility model aggregated to this node is not a BuildingsMobilityModel"); - BuildingsHelper::MakeConsistent (bmm); + Ptr bmm = mm->GetObject (); + NS_ASSERT_MSG (bmm, "MobilityBuildingInfo has not been aggregated to this node mobility model"); + BuildingsHelper::MakeConsistent (mm); } } @@ -239,8 +240,8 @@ NS_LOG_LOGIC ("considering node " << (*m_nodeIt)->GetId ()); Ptr mm = (*m_nodeIt)->GetObject (); NS_ASSERT_MSG (mm, "no mobility model aggregated to this node"); - Ptr bmm = DynamicCast (mm); - NS_ASSERT_MSG (bmm, "mobility model aggregated to this node is not a BuildingsMobilityModel"); + Ptr bmm = mm->GetObject (); + NS_ASSERT_MSG (bmm, "MobilityBuildingInfo has not been aggregated to this node mobility model"); ++m_nodeIt; uint32_t roomx = bmm->GetRoomNumberX (); diff -Naur ns-3.17/src/buildings/helper/buildings-helper.cc ns-3.18/src/buildings/helper/buildings-helper.cc --- ns-3.17/src/buildings/helper/buildings-helper.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/helper/buildings-helper.cc 2013-10-26 07:07:29.543364381 -0700 @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include @@ -33,6 +33,32 @@ namespace ns3 { + +void +BuildingsHelper::Install (NodeContainer c) +{ + for (NodeContainer::Iterator i = c.Begin (); i != c.End (); ++i) + { + Install (*i); + } +} + + +void +BuildingsHelper::Install (Ptr node) +{ + Ptr object = node; + Ptr model = object->GetObject (); + if (model == 0) + { + NS_ABORT_MSG_UNLESS (0 != model, "node " << node->GetId () << " does not have a MobilityModel"); + + } + Ptr buildingInfo = CreateObject (); + model->AggregateObject (buildingInfo); +} + + void BuildingsHelper::MakeMobilityModelConsistent () { @@ -42,26 +68,27 @@ Ptr mm = (*nit)->GetObject (); if (mm != 0) { - Ptr bmm = DynamicCast (mm); - NS_ABORT_MSG_UNLESS (0 != bmm, "node " << (*nit)->GetId () << " has a MobilityModel but it is not a BuildingsMobilityModel"); - MakeConsistent (bmm); + MakeConsistent (mm); + Ptr bmm = mm->GetObject (); + NS_ABORT_MSG_UNLESS (0 != bmm, "node " << (*nit)->GetId () << " has a MobilityModel that does not have a MobilityBuildingInfo"); } } } void -BuildingsHelper::MakeConsistent (Ptr bmm) +BuildingsHelper::MakeConsistent (Ptr mm) { + Ptr bmm = mm->GetObject (); bool found = false; for (BuildingList::Iterator bit = BuildingList::Begin (); bit != BuildingList::End (); ++bit) { NS_LOG_LOGIC ("checking building " << (*bit)->GetId () << " with boundaries " << (*bit)->GetBoundaries ()); - Vector pos = bmm->GetPosition (); + Vector pos = mm->GetPosition (); if ((*bit)->IsInside (pos)) { - NS_LOG_LOGIC ("BuildingsMobilityModel " << bmm << " pos " << bmm->GetPosition () << " falls inside building " << (*bit)->GetId ()); - NS_ABORT_MSG_UNLESS (found == false, " BuildingsMobilityModel already inside another building!"); + NS_LOG_LOGIC ("MobilityBuildingInfo " << bmm << " pos " << mm->GetPosition () << " falls inside building " << (*bit)->GetId ()); + NS_ABORT_MSG_UNLESS (found == false, " MobilityBuildingInfo already inside another building!"); found = true; uint16_t floor = (*bit)->GetFloor (pos); uint16_t roomX = (*bit)->GetRoomX (pos); @@ -71,7 +98,7 @@ } if (!found) { - NS_LOG_LOGIC ("BuildingsMobilityModel " << bmm << " pos " << bmm->GetPosition () << " is outdoor"); + NS_LOG_LOGIC ("MobilityBuildingInfo " << bmm << " pos " << mm->GetPosition () << " is outdoor"); bmm->SetOutdoor (); } diff -Naur ns-3.17/src/buildings/helper/buildings-helper.h ns-3.18/src/buildings/helper/buildings-helper.h --- ns-3.17/src/buildings/helper/buildings-helper.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/helper/buildings-helper.h 2013-10-26 07:07:29.543364381 -0700 @@ -30,13 +30,39 @@ namespace ns3 { -class BuildingsMobilityModel; +class MobilityModel; +class Building; class BuildingsHelper { -public: +public: + /** + * Install the MobilityBuildingInfo to a node + * + * \param node the mobility model of the node to be updated + */ + static void Install (Ptr node); // for any nodes + /** + * Install the MobilityBuildingInfo to the set of nodes in a NodeContainer + * + * \param c the NodeContainer including the nodes to be updated + */ + static void Install (NodeContainer c); // for any nodes + /** + * This method goes through the whole NodeList and, for each node in + * the list, calls BuildingsHelper::MakeConsistent() passing to it + * the MobilityModel of that node. + * + */ static void MakeMobilityModelConsistent (); - static void MakeConsistent (Ptr bmm); + /** + * Make the given mobility model consistent, by determining whether + * its position falls inside any of the building in BuildingList, and + * updating accordingly the BuildingInfo aggregated with the MobilityModel. + * + * \param bmm the mobility model to be made consistent + */ + static void MakeConsistent (Ptr bmm); }; diff -Naur ns-3.17/src/buildings/model/buildings-mobility-model.cc ns-3.18/src/buildings/model/buildings-mobility-model.cc --- ns-3.17/src/buildings/model/buildings-mobility-model.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/model/buildings-mobility-model.cc 1969-12-31 16:00:00.000000000 -0800 @@ -1,155 +0,0 @@ -/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ -/* - * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) - * - * 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: Marco Miozzo - * - */ - -#include -#include -#include -#include -#include -#include - -NS_LOG_COMPONENT_DEFINE ("BuildingsMobilityModel"); - -namespace ns3 { - -NS_OBJECT_ENSURE_REGISTERED (BuildingsMobilityModel); - -TypeId -BuildingsMobilityModel::GetTypeId (void) -{ - static TypeId tid = TypeId ("ns3::BuildingsMobilityModel") - .SetParent () - .SetGroupName ("Mobility") - .AddConstructor (); - - return tid; -} - - -BuildingsMobilityModel::BuildingsMobilityModel () -{ - NS_LOG_FUNCTION (this); - m_indoor = false; - m_nFloor = 1; - m_roomX = 1; - m_roomY = 1; -} - -void -BuildingsMobilityModel::DoDispose (void) -{ - NS_LOG_FUNCTION (this); - MobilityModel::DoDispose (); -} - -Vector -BuildingsMobilityModel::DoGetPosition (void) const -{ - NS_LOG_FUNCTION (this); - m_helper.Update (); - return m_helper.GetCurrentPosition (); -} -void -BuildingsMobilityModel::DoSetPosition (const Vector &position) -{ - NS_LOG_FUNCTION (this); - m_helper.SetPosition (position); -} -Vector -BuildingsMobilityModel::DoGetVelocity (void) const -{ - NS_LOG_FUNCTION (this); - return m_helper.GetVelocity (); -} - -bool -BuildingsMobilityModel::IsIndoor (void) -{ - NS_LOG_FUNCTION (this); - return (m_indoor); -} - -bool -BuildingsMobilityModel::IsOutdoor (void) -{ - NS_LOG_FUNCTION (this); - return (!m_indoor); -} - -void -BuildingsMobilityModel::SetIndoor (Ptr building, uint8_t nfloor, uint8_t nroomx, uint8_t nroomy) -{ - NS_LOG_FUNCTION (this); - m_indoor = true; - m_myBuilding = building; - m_nFloor = nfloor; - m_roomX = nroomx; - m_roomY = nroomy; - - NS_ASSERT_MSG (building->IsInside (m_helper.GetCurrentPosition ()), "Position of the node is outside of building bounds"); - NS_ASSERT (m_roomX > 0); - NS_ASSERT (m_roomX <= building->GetNRoomsX ()); - NS_ASSERT (m_roomY > 0); - NS_ASSERT (m_roomY <= building->GetNRoomsY ()); - NS_ASSERT (m_nFloor > 0); - NS_ASSERT (m_nFloor <= building->GetNFloors ()); - -} - - -void -BuildingsMobilityModel::SetOutdoor (void) -{ - NS_LOG_FUNCTION (this); - m_indoor = false; -} - -uint8_t -BuildingsMobilityModel::GetFloorNumber (void) -{ - NS_LOG_FUNCTION (this); - return (m_nFloor); -} - -uint8_t -BuildingsMobilityModel::GetRoomNumberX (void) -{ - NS_LOG_FUNCTION (this); - return (m_roomX); -} - -uint8_t -BuildingsMobilityModel::GetRoomNumberY (void) -{ - NS_LOG_FUNCTION (this); - return (m_roomY); -} - - -Ptr -BuildingsMobilityModel::GetBuilding () -{ - NS_LOG_FUNCTION (this); - return (m_myBuilding); -} - - -} // namespace diff -Naur ns-3.17/src/buildings/model/buildings-mobility-model.h ns-3.18/src/buildings/model/buildings-mobility-model.h --- ns-3.17/src/buildings/model/buildings-mobility-model.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/model/buildings-mobility-model.h 1969-12-31 16:00:00.000000000 -0800 @@ -1,127 +0,0 @@ -/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ -/* - * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) - * - * 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: Marco Miozzo - * - */ -#ifndef BUILDINGS_MOBILITY_MODEL_H -#define BUILDINGS_MOBILITY_MODEL_H - - - -#include -#include -#include -#include -#include -#include -#include - - - -namespace ns3 { - - -/** - * \ingroup mobility - * \brief Buildings mobility model - * - * This model implements the managment of scenarios where users might be - * either indoor (e.g., houses, offices, etc.) and outdoor. - * - */ -class BuildingsMobilityModel : public MobilityModel -{ -public: - static TypeId GetTypeId (void); - BuildingsMobilityModel (); - - /** - * - * \return true if the MobilityModel instance is indoor, false otherwise - */ - bool IsIndoor (void); - - /** - * - * \return true if the MobilityModel instance is outdoor, false otherwise - */ - bool IsOutdoor (void); - - /** - * Mark this MobilityModel instance as indoor - * - * \param building the building into which the MobilityModel instance is located - * \param nfloor the floor number 1...nFloors at which the MobilityModel instance is located - * \param nroomx the X room number 1...nRoomsX at which the MobilityModel instance is located - * \param nroomy the Y room number 1...nRoomsY at which the MobilityModel instance is located - */ - void SetIndoor (Ptr building, uint8_t nfloor, uint8_t nroomx, uint8_t nroomy); - - /** - * Mark this MobilityModel instance as outdoor - * - */ - void SetOutdoor (); - - /** - * - * \return - */ - uint8_t GetFloorNumber (void); - - /** - * - * \return - */ - uint8_t GetRoomNumberX (void); - - /** - * - * \return - */ - uint8_t GetRoomNumberY (void); - - /** - * - * \return - */ - Ptr GetBuilding (); - - - -private: - virtual void DoDispose (void); - virtual Vector DoGetPosition (void) const; - virtual void DoSetPosition (const Vector &position); - virtual Vector DoGetVelocity (void) const; - ConstantVelocityHelper m_helper; - - Ptr m_myBuilding; - bool m_indoor; - uint8_t m_nFloor; - uint8_t m_roomX; - uint8_t m_roomY; - -}; - - - -} // namespace ns3 - - -#endif // BUILDINGS_MOBILITY_MODEL_H diff -Naur ns-3.17/src/buildings/model/buildings-propagation-loss-model.cc ns-3.18/src/buildings/model/buildings-propagation-loss-model.cc --- ns-3.17/src/buildings/model/buildings-propagation-loss-model.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/model/buildings-propagation-loss-model.cc 2013-10-26 07:07:29.543364381 -0700 @@ -27,7 +27,7 @@ #include "ns3/pointer.h" #include #include "buildings-propagation-loss-model.h" -#include "ns3/buildings-mobility-model.h" +#include #include "ns3/enum.h" @@ -100,7 +100,7 @@ } double -BuildingsPropagationLossModel::ExternalWallLoss (Ptr a) const +BuildingsPropagationLossModel::ExternalWallLoss (Ptr a) const { double loss = 0.0; Ptr aBuilding = a->GetBuilding (); @@ -124,7 +124,7 @@ } double -BuildingsPropagationLossModel::HeightLoss (Ptr node) const +BuildingsPropagationLossModel::HeightLoss (Ptr node) const { double loss = 0.0; @@ -134,7 +134,7 @@ } double -BuildingsPropagationLossModel::InternalWallsLoss (Ptr a, Ptrb) const +BuildingsPropagationLossModel::InternalWallsLoss (Ptr a, Ptrb) const { // approximate the number of internal walls with the Manhattan distance in "rooms" units double dx = std::abs (a->GetRoomNumberX () - b->GetRoomNumberX ()); @@ -148,9 +148,9 @@ BuildingsPropagationLossModel::GetShadowing (Ptr a, Ptr b) const { - Ptr a1 = DynamicCast (a); - Ptr b1 = DynamicCast (b); - NS_ASSERT_MSG ((a1 != 0) && (b1 != 0), "BuildingsPropagationLossModel only works with BuildingsMobilityModel"); + Ptr a1 = a->GetObject (); + Ptr b1 = b->GetObject (); + NS_ASSERT_MSG ((a1 != 0) && (b1 != 0), "BuildingsPropagationLossModel only works with MobilityBuildingInfo"); std::map, std::map, ShadowingLoss> >::iterator ait = m_shadowingLossMap.find (a); if (ait != m_shadowingLossMap.end ()) @@ -184,7 +184,7 @@ double -BuildingsPropagationLossModel::EvaluateSigma (Ptr a, Ptr b) +BuildingsPropagationLossModel::EvaluateSigma (Ptr a, Ptr b) const { if (a->IsOutdoor ()) diff -Naur ns-3.17/src/buildings/model/buildings-propagation-loss-model.h ns-3.18/src/buildings/model/buildings-propagation-loss-model.h --- ns-3.17/src/buildings/model/buildings-propagation-loss-model.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/model/buildings-propagation-loss-model.h 2013-10-26 07:07:29.543364381 -0700 @@ -27,7 +27,8 @@ #include "ns3/propagation-loss-model.h" #include "ns3/random-variable-stream.h" #include -#include +#include + namespace ns3 { @@ -48,7 +49,8 @@ * The distance-dependent component of propagation loss is deferred * to derived classes which are expected to implement the GetLoss method. * - * \warning This model works only with BuildingsMobilityModel + * \warning This model works only when MobilityBuildingInfo is aggreegated + * to the mobility model * */ @@ -70,9 +72,9 @@ virtual double DoCalcRxPower (double txPowerDbm, Ptr a, Ptr b) const; protected: - double ExternalWallLoss (Ptr a) const; - double HeightLoss (Ptr n) const; - double InternalWallsLoss (Ptr a, Ptr b) const; + double ExternalWallLoss (Ptr a) const; + double HeightLoss (Ptr n) const; + double InternalWallsLoss (Ptr a, Ptr b) const; double GetShadowing (Ptr a, Ptr b) const; @@ -92,7 +94,7 @@ }; mutable std::map, std::map, ShadowingLoss> > m_shadowingLossMap; - double EvaluateSigma (Ptr a, Ptr b) const; + double EvaluateSigma (Ptr a, Ptr b) const; double m_shadowingSigmaExtWalls; diff -Naur ns-3.17/src/buildings/model/hybrid-buildings-propagation-loss-model.cc ns-3.18/src/buildings/model/hybrid-buildings-propagation-loss-model.cc --- ns-3.17/src/buildings/model/hybrid-buildings-propagation-loss-model.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/model/hybrid-buildings-propagation-loss-model.cc 2013-10-26 07:07:29.543364381 -0700 @@ -31,7 +31,7 @@ #include "ns3/itu-r-1411-nlos-over-rooftop-propagation-loss-model.h" #include "ns3/itu-r-1238-propagation-loss-model.h" #include "ns3/kun-2600-mhz-propagation-loss-model.h" -#include "ns3/buildings-mobility-model.h" +#include #include "ns3/enum.h" #include "hybrid-buildings-propagation-loss-model.h" @@ -146,10 +146,10 @@ double distance = a->GetDistanceFrom (b); - // get the BuildingsMobilityModel pointers - Ptr a1 = DynamicCast (a); - Ptr b1 = DynamicCast (b); - NS_ASSERT_MSG ((a1 != 0) && (b1 != 0), "HybridBuildingsPropagationLossModel only works with BuildingsMobilityModel"); + // get the MobilityBuildingInfo pointers + Ptr a1 = a->GetObject (); + Ptr b1 = b->GetObject (); + NS_ASSERT_MSG ((a1 != 0) && (b1 != 0), "HybridBuildingsPropagationLossModel only works with MobilityBuildingInfo"); double loss = 0.0; @@ -159,24 +159,24 @@ { if (distance > 1000) { - NS_LOG_INFO (this << a1->GetPosition ().z << b1->GetPosition ().z << m_rooftopHeight); - if ((a1->GetPosition ().z < m_rooftopHeight) - && (b1->GetPosition ().z < m_rooftopHeight)) + NS_LOG_INFO (this << a->GetPosition ().z << b->GetPosition ().z << m_rooftopHeight); + if ((a->GetPosition ().z < m_rooftopHeight) + && (b->GetPosition ().z < m_rooftopHeight)) { - loss = ItuR1411 (a1, b1); + loss = ItuR1411 (a, b); NS_LOG_INFO (this << " 0-0 (>1000): below rooftop -> ITUR1411 : " << loss); } else { // Over the rooftop tranmission -> Okumura Hata - loss = OkumuraHata (a1, b1); + loss = OkumuraHata (a, b); NS_LOG_INFO (this << " O-O (>1000): above rooftop -> OH : " << loss); } } else { // short range outdoor communication - loss = ItuR1411 (a1, b1); + loss = ItuR1411 (a, b); NS_LOG_INFO (this << " 0-0 (<1000) Street canyon -> ITUR1411 : " << loss); } } @@ -185,21 +185,21 @@ // b indoor if (distance > 1000) { - if ((a1->GetPosition ().z < m_rooftopHeight) - && (b1->GetPosition ().z < m_rooftopHeight)) + if ((a->GetPosition ().z < m_rooftopHeight) + && (b->GetPosition ().z < m_rooftopHeight)) { - loss = ItuR1411 (a1, b1) + ExternalWallLoss (b1) + HeightLoss (a1); + loss = ItuR1411 (a, b) + ExternalWallLoss (b1) + HeightLoss (b1); NS_LOG_INFO (this << " 0-I (>1000): below rooftop -> ITUR1411 : " << loss); } else { - loss = OkumuraHata (a1, b1) + ExternalWallLoss (b1); + loss = OkumuraHata (a, b) + ExternalWallLoss (b1); NS_LOG_INFO (this << " O-I (>1000): above the rooftop -> OH : " << loss); } } else { - loss = ItuR1411 (a1, b1) + ExternalWallLoss (b1) + HeightLoss (b1); + loss = ItuR1411 (a, b) + ExternalWallLoss (b1) + HeightLoss (b1); NS_LOG_INFO (this << " 0-I (<1000) ITUR1411 + BEL : " << loss); } } // end b1->isIndoor () @@ -212,14 +212,14 @@ if (a1->GetBuilding () == b1->GetBuilding ()) { // nodes are in same building -> indoor communication ITU-R P.1238 - loss = ItuR1238 (a1, b1) + InternalWallsLoss (a1, b1);; + loss = ItuR1238 (a, b) + InternalWallsLoss (a1, b1);; NS_LOG_INFO (this << " I-I (same building) ITUR1238 : " << loss); } else { // nodes are in different buildings - loss = ItuR1411 (a1, b1) + ExternalWallLoss (a1) + ExternalWallLoss (b1); + loss = ItuR1411 (a, b) + ExternalWallLoss (a1) + ExternalWallLoss (b1); NS_LOG_INFO (this << " I-I (different) ITUR1238 + 2*BEL : " << loss); } } @@ -228,22 +228,22 @@ // b is outdoor if (distance > 1000) { - if ((a1->GetPosition ().z < m_rooftopHeight) - && (b1->GetPosition ().z < m_rooftopHeight)) + if ((a->GetPosition ().z < m_rooftopHeight) + && (b->GetPosition ().z < m_rooftopHeight)) { - loss = ItuR1411 (a1, b1) + ExternalWallLoss (a1) + HeightLoss (a1); + loss = ItuR1411 (a, b) + ExternalWallLoss (a1) + HeightLoss (a1); NS_LOG_INFO (this << " I-O (>1000): down rooftop -> ITUR1411 : " << loss); } else { // above rooftop -> OH - loss = OkumuraHata (a1, b1) + ExternalWallLoss (a1) + HeightLoss (a1); + loss = OkumuraHata (a, b) + ExternalWallLoss (a1) + HeightLoss (a1); NS_LOG_INFO (this << " =I-O (>1000) over rooftop OH + BEL + HG: " << loss); } } else { - loss = ItuR1411 (a1, b1) + ExternalWallLoss (a1) + HeightLoss (a1); + loss = ItuR1411 (a, b) + ExternalWallLoss (a1) + HeightLoss (a1); NS_LOG_INFO (this << " I-O (<1000) ITUR1411 + BEL + HG: " << loss); } } // end b1->IsIndoor () @@ -256,7 +256,7 @@ double -HybridBuildingsPropagationLossModel::OkumuraHata (Ptr a, Ptr b) const +HybridBuildingsPropagationLossModel::OkumuraHata (Ptr a, Ptr b) const { if (m_frequency <= 2.3e9) { @@ -269,7 +269,7 @@ } double -HybridBuildingsPropagationLossModel::ItuR1411 (Ptr a, Ptr b) const +HybridBuildingsPropagationLossModel::ItuR1411 (Ptr a, Ptr b) const { if (a->GetDistanceFrom (b) < m_itu1411NlosThreshold) { @@ -282,7 +282,7 @@ } double -HybridBuildingsPropagationLossModel::ItuR1238 (Ptr a, Ptr b) const +HybridBuildingsPropagationLossModel::ItuR1238 (Ptr a, Ptr b) const { return m_ituR1238->GetLoss (a,b); } diff -Naur ns-3.17/src/buildings/model/hybrid-buildings-propagation-loss-model.h ns-3.18/src/buildings/model/hybrid-buildings-propagation-loss-model.h --- ns-3.17/src/buildings/model/hybrid-buildings-propagation-loss-model.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/model/hybrid-buildings-propagation-loss-model.h 2013-10-26 07:07:29.543364381 -0700 @@ -49,7 +49,7 @@ * - Building penetretation loss * - floors, etc... * - * \warning This model works only with BuildingsMobilityModel + * \warning This model works only with MobilityBuildingInfo * */ @@ -100,9 +100,9 @@ private: - double OkumuraHata (Ptr a, Ptr b) const; - double ItuR1411 (Ptr a, Ptr b) const; - double ItuR1238 (Ptr a, Ptr b) const; + double OkumuraHata (Ptr a, Ptr b) const; + double ItuR1411 (Ptr a, Ptr b) const; + double ItuR1238 (Ptr a, Ptr b) const; Ptr m_okumuraHata; Ptr m_ituR1411Los; diff -Naur ns-3.17/src/buildings/model/itu-r-1238-propagation-loss-model.cc ns-3.18/src/buildings/model/itu-r-1238-propagation-loss-model.cc --- ns-3.17/src/buildings/model/itu-r-1238-propagation-loss-model.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/model/itu-r-1238-propagation-loss-model.cc 2013-10-26 07:07:29.543364381 -0700 @@ -26,7 +26,7 @@ #include #include "itu-r-1238-propagation-loss-model.h" -#include "buildings-mobility-model.h" +#include NS_LOG_COMPONENT_DEFINE ("ItuR1238PropagationLossModel"); @@ -55,9 +55,9 @@ ItuR1238PropagationLossModel::GetLoss (Ptr a1, Ptr b1) const { NS_LOG_FUNCTION (this << a1 << b1); - Ptr a = DynamicCast (a1); - Ptr b = DynamicCast (b1); - NS_ASSERT_MSG ((a != 0) && (b != 0), "ItuR1238PropagationLossModel only works with BuildingsMobilityModel"); + Ptr a = a1->GetObject (); + Ptr b = b1->GetObject (); + NS_ASSERT_MSG ((a != 0) && (b != 0), "ItuR1238PropagationLossModel only works with MobilityBuildingInfo"); NS_ASSERT_MSG (a->GetBuilding ()->GetId () == b->GetBuilding ()->GetId (), "ITU-R 1238 applies only to nodes that are in the same building"); double N = 0.0; int n = std::abs (a->GetFloorNumber () - b->GetFloorNumber ()); @@ -95,8 +95,8 @@ { NS_LOG_ERROR (this << " Unkwnon Wall Type"); } - double loss = 20 * std::log10 (m_frequency / 1e6 /*MHz*/) + N * std::log10 (a->GetDistanceFrom (b)) + Lf - 28.0; - NS_LOG_INFO (this << " Node " << a->GetPosition () << " <-> " << b->GetPosition () << " loss = " << loss << " dB"); + double loss = 20 * std::log10 (m_frequency / 1e6 /*MHz*/) + N * std::log10 (a1->GetDistanceFrom (b1)) + Lf - 28.0; + NS_LOG_INFO (this << " Node " << a1->GetPosition () << " <-> " << b1->GetPosition () << " loss = " << loss << " dB"); return loss; } diff -Naur ns-3.17/src/buildings/model/mobility-building-info.cc ns-3.18/src/buildings/model/mobility-building-info.cc --- ns-3.17/src/buildings/model/mobility-building-info.cc 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/src/buildings/model/mobility-building-info.cc 2013-10-26 07:07:29.543364381 -0700 @@ -0,0 +1,159 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) + * + * 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: Marco Miozzo + * + */ + +#include +#include +#include +#include +#include +#include + +NS_LOG_COMPONENT_DEFINE ("MobilityBuildingInfo"); + +namespace ns3 { + +NS_OBJECT_ENSURE_REGISTERED (MobilityBuildingInfo); + +TypeId +MobilityBuildingInfo::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::MobilityBuildingInfo") + .SetParent () + .SetGroupName ("Building") + .AddConstructor (); + + return tid; +} + + +MobilityBuildingInfo::MobilityBuildingInfo () +{ + NS_LOG_FUNCTION (this); + m_indoor = false; + m_nFloor = 1; + m_roomX = 1; + m_roomY = 1; +} + + +MobilityBuildingInfo::MobilityBuildingInfo (Ptr building) + : m_myBuilding (building) +{ + NS_LOG_FUNCTION (this); + m_indoor = false; + m_nFloor = 1; + m_roomX = 1; + m_roomY = 1; +} + +bool +MobilityBuildingInfo::IsIndoor (void) +{ + NS_LOG_FUNCTION (this); + return (m_indoor); +} + +bool +MobilityBuildingInfo::IsOutdoor (void) +{ + NS_LOG_FUNCTION (this); + return (!m_indoor); +} + +void +MobilityBuildingInfo::SetIndoor (Ptr building, uint8_t nfloor, uint8_t nroomx, uint8_t nroomy) +{ + NS_LOG_FUNCTION (this); + m_indoor = true; + m_myBuilding = building; + m_nFloor = nfloor; + m_roomX = nroomx; + m_roomY = nroomy; + + + NS_ASSERT (m_roomX > 0); + NS_ASSERT (m_roomX <= building->GetNRoomsX ()); + NS_ASSERT (m_roomY > 0); + NS_ASSERT (m_roomY <= building->GetNRoomsY ()); + NS_ASSERT (m_nFloor > 0); + NS_ASSERT (m_nFloor <= building->GetNFloors ()); + +} + + +void +MobilityBuildingInfo::SetIndoor (uint8_t nfloor, uint8_t nroomx, uint8_t nroomy) +{ + NS_LOG_FUNCTION (this); + m_indoor = true; + m_nFloor = nfloor; + m_roomX = nroomx; + m_roomY = nroomy; + + NS_ASSERT_MSG (m_myBuilding, "Node does not have any building defined"); + NS_ASSERT (m_roomX > 0); + NS_ASSERT (m_roomX <= m_myBuilding->GetNRoomsX ()); + NS_ASSERT (m_roomY > 0); + NS_ASSERT (m_roomY <= m_myBuilding->GetNRoomsY ()); + NS_ASSERT (m_nFloor > 0); + NS_ASSERT (m_nFloor <= m_myBuilding->GetNFloors ()); + +} + + +void +MobilityBuildingInfo::SetOutdoor (void) +{ + NS_LOG_FUNCTION (this); + m_indoor = false; +} + +uint8_t +MobilityBuildingInfo::GetFloorNumber (void) +{ + NS_LOG_FUNCTION (this); + return (m_nFloor); +} + +uint8_t +MobilityBuildingInfo::GetRoomNumberX (void) +{ + NS_LOG_FUNCTION (this); + return (m_roomX); +} + +uint8_t +MobilityBuildingInfo::GetRoomNumberY (void) +{ + NS_LOG_FUNCTION (this); + return (m_roomY); +} + + +Ptr +MobilityBuildingInfo::GetBuilding () +{ + NS_LOG_FUNCTION (this); + return (m_myBuilding); +} + + +} // namespace diff -Naur ns-3.17/src/buildings/model/mobility-building-info.h ns-3.18/src/buildings/model/mobility-building-info.h --- ns-3.17/src/buildings/model/mobility-building-info.h 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/src/buildings/model/mobility-building-info.h 2013-10-26 07:07:29.543364381 -0700 @@ -0,0 +1,127 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) + * + * 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: Marco Miozzo + * + */ +#ifndef MOBILITY_BUILDING_INFO_H +#define MOBILITY_BUILDING_INFO_H + + + +#include +#include +#include +#include +#include +#include +#include + + + +namespace ns3 { + + +/** + * \ingroup buildings + * \brief mobility buildings information (to be used by mobility models) + * + * This model implements the managment of scenarios where users might be + * either indoor (e.g., houses, offices, etc.) and outdoor. + * + */ +class MobilityBuildingInfo : public Object +{ +public: + static TypeId GetTypeId (void); + MobilityBuildingInfo (); + + MobilityBuildingInfo (Ptr building); + + /** + * + * \return true if the MobilityBuildingInfo instance is indoor, false otherwise + */ + bool IsIndoor (void); + + /** + * + * \return true if the MobilityBuildingInfo instance is outdoor, false otherwise + */ + bool IsOutdoor (void); + + /** + * Mark this MobilityBuildingInfo instance as indoor + * + * \param building the building into which the MobilityBuildingInfo instance is located + * \param nfloor the floor number 1...nFloors at which the MobilityBuildingInfo instance is located + * \param nroomx the X room number 1...nRoomsX at which the MobilityBuildingInfo instance is located + * \param nroomy the Y room number 1...nRoomsY at which the MobilityBuildingInfo instance is located + */ + void SetIndoor (Ptr building, uint8_t nfloor, uint8_t nroomx, uint8_t nroomy); + + + void SetIndoor (uint8_t nfloor, uint8_t nroomx, uint8_t nroomy); + + /** + * Mark this MobilityBuildingInfo instance as outdoor + * + */ + void SetOutdoor (); + + /** + * + * \return + */ + uint8_t GetFloorNumber (void); + + /** + * + * \return + */ + uint8_t GetRoomNumberX (void); + + /** + * + * \return + */ + uint8_t GetRoomNumberY (void); + + /** + * + * \return + */ + Ptr GetBuilding (); + + + +private: + + Ptr m_myBuilding; + bool m_indoor; + uint8_t m_nFloor; + uint8_t m_roomX; + uint8_t m_roomY; + +}; + + + +} // namespace ns3 + + +#endif // MOBILITY_BUILDING_INFO_H diff -Naur ns-3.17/src/buildings/model/oh-buildings-propagation-loss-model.cc ns-3.18/src/buildings/model/oh-buildings-propagation-loss-model.cc --- ns-3.17/src/buildings/model/oh-buildings-propagation-loss-model.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/model/oh-buildings-propagation-loss-model.cc 2013-10-26 07:07:29.543364381 -0700 @@ -26,7 +26,7 @@ #include "ns3/pointer.h" #include #include "oh-buildings-propagation-loss-model.h" -#include "ns3/buildings-mobility-model.h" +#include #include "ns3/okumura-hata-propagation-loss-model.h" #include "ns3/enum.h" @@ -66,10 +66,10 @@ { NS_LOG_FUNCTION (this << a << b); - // get the BuildingsMobilityModel pointers - Ptr a1 = DynamicCast (a); - Ptr b1 = DynamicCast (b); - NS_ASSERT_MSG ((a1 != 0) && (b1 != 0), "OhBuildingsPropagationLossModel only works with BuildingsMobilityModel"); + // get the MobilityBuildingInfo pointers + Ptr a1 = a->GetObject (); + Ptr b1 = b->GetObject (); + NS_ASSERT_MSG ((a1 != 0) && (b1 != 0), "OhBuildingsPropagationLossModel only works with MobilityBuildingInfo"); double loss = 0.0; @@ -77,13 +77,13 @@ { if (b1->IsOutdoor ()) { - loss = m_okumuraHata->GetLoss (a1, b1); + loss = m_okumuraHata->GetLoss (a, b); NS_LOG_INFO (this << " O-O : " << loss); } else { // b indoor - loss = m_okumuraHata->GetLoss (a1, b1) + ExternalWallLoss (b1); + loss = m_okumuraHata->GetLoss (a, b) + ExternalWallLoss (b1); NS_LOG_INFO (this << " O-I : " << loss); } // end b1->isIndoor () } @@ -95,20 +95,20 @@ if (a1->GetBuilding () == b1->GetBuilding ()) { // nodes are in same building -> indoor communication ITU-R P.1238 - loss = m_okumuraHata->GetLoss (a1, b1) + InternalWallsLoss (a1, b1);; + loss = m_okumuraHata->GetLoss (a, b) + InternalWallsLoss (a1, b1);; NS_LOG_INFO (this << " I-I (same building)" << loss); } else { // nodes are in different buildings - loss = m_okumuraHata->GetLoss (a1, b1) + ExternalWallLoss (a1) + ExternalWallLoss (b1); + loss = m_okumuraHata->GetLoss (a, b) + ExternalWallLoss (a1) + ExternalWallLoss (b1); NS_LOG_INFO (this << " I-O-I (different buildings): " << loss); } } else { - loss = m_okumuraHata->GetLoss (a1, b1) + ExternalWallLoss (a1); + loss = m_okumuraHata->GetLoss (a, b) + ExternalWallLoss (a1); NS_LOG_INFO (this << " I-O : " << loss); } // end b1->IsIndoor () } // end a1->IsOutdoor () diff -Naur ns-3.17/src/buildings/model/oh-buildings-propagation-loss-model.h ns-3.18/src/buildings/model/oh-buildings-propagation-loss-model.h --- ns-3.17/src/buildings/model/oh-buildings-propagation-loss-model.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/model/oh-buildings-propagation-loss-model.h 2013-10-26 07:07:29.543364381 -0700 @@ -33,7 +33,7 @@ * * this model combines the OkumuraHata model with the BuildingsPropagationLossModel * - * \warning This model works with BuildingsMobilityModel only + * \warning This model works with MobilityBuildingInfo only * */ class OhBuildingsPropagationLossModel : public BuildingsPropagationLossModel diff -Naur ns-3.17/src/buildings/test/building-position-allocator-test.cc ns-3.18/src/buildings/test/building-position-allocator-test.cc --- ns-3.17/src/buildings/test/building-position-allocator-test.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/test/building-position-allocator-test.cc 2013-10-26 07:07:29.555364380 -0700 @@ -23,7 +23,9 @@ #include "ns3/log.h" #include "ns3/test.h" #include -#include +#include +#include +#include #include #include #include @@ -95,10 +97,11 @@ nodes.Create (24); MobilityHelper mobility; - mobility.SetMobilityModel ("ns3::BuildingsMobilityModel"); + mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); Ptr positionAlloc = CreateObject (); mobility.SetPositionAllocator (positionAlloc); mobility.Install (nodes); + BuildingsHelper::Install (nodes); BuildingsHelper::MakeMobilityModelConsistent (); @@ -108,14 +111,14 @@ { Ptr mm = (*it)->GetObject (); NS_ASSERT_MSG (mm, "no mobility model aggregated to this node"); - Ptr bmm = DynamicCast (mm); - NS_ASSERT_MSG (bmm, "mobility model aggregated to this node is not a BuildingsMobilityModel"); + Ptr bmm = mm->GetObject (); + NS_ASSERT_MSG (bmm, "MobilityBuildingInfo has not been aggregated to this node mobility model"); NS_TEST_ASSERT_MSG_EQ (bmm->IsIndoor (), true, "node should be indoor"); Room r (bmm->GetRoomNumberX (), bmm->GetRoomNumberY (), bmm->GetFloorNumber ()); ++(roomCounter[r]); - Vector p = bmm->GetPosition (); + Vector p = mm->GetPosition (); NS_TEST_ASSERT_MSG_GT (p.x, bmm->GetRoomNumberX (), "wrong x value"); NS_TEST_ASSERT_MSG_LT (p.x, bmm->GetRoomNumberX () + 1, "wrong x value"); NS_TEST_ASSERT_MSG_GT (p.y, bmm->GetRoomNumberY (), "wrong y value"); @@ -176,16 +179,18 @@ nodes.Create (24); MobilityHelper mobility; - mobility.SetMobilityModel ("ns3::BuildingsMobilityModel"); + mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); Ptr positionAlloc = CreateObject (); mobility.SetPositionAllocator (positionAlloc); mobility.Install (nodes); + BuildingsHelper::Install (nodes); NodeContainer copyNodes; copyNodes.Create (48); positionAlloc = CreateObject (nodes); mobility.SetPositionAllocator (positionAlloc); mobility.Install (copyNodes); + BuildingsHelper::Install (copyNodes); BuildingsHelper::MakeMobilityModelConsistent (); @@ -195,8 +200,8 @@ { Ptr mm = (*it)->GetObject (); NS_ASSERT_MSG (mm, "no mobility model aggregated to this node"); - Ptr bmm = DynamicCast (mm); - NS_ASSERT_MSG (bmm, "mobility model aggregated to this node is not a BuildingsMobilityModel"); + Ptr bmm = mm->GetObject (); + NS_ASSERT_MSG (bmm, "MobilityBuildingInfo has not been aggregated to this node mobility model"); NS_TEST_ASSERT_MSG_EQ (bmm->IsIndoor (), true, "node should be indoor"); Room r (bmm->GetRoomNumberX (), bmm->GetRoomNumberY (), bmm->GetFloorNumber ()); diff -Naur ns-3.17/src/buildings/test/buildings-helper-test.cc ns-3.18/src/buildings/test/buildings-helper-test.cc --- ns-3.17/src/buildings/test/buildings-helper-test.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/test/buildings-helper-test.cc 2013-10-26 07:07:29.551364380 -0700 @@ -22,7 +22,8 @@ #include "ns3/log.h" #include "ns3/test.h" -#include +#include +#include #include #include #include @@ -133,13 +134,13 @@ { NS_LOG_FUNCTION (this << BuildNameString (m_pib, m_bd)); MobilityHelper mobility; - mobility.SetMobilityModel ("ns3::BuildingsMobilityModel"); + mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); NodeContainer nodes; nodes.Create (1); mobility.Install (nodes); - Ptr bmm = nodes.Get (0)->GetObject (); + Ptr bmm = nodes.Get (0)->GetObject (); bmm->SetPosition (m_pib.pos); NS_LOG_LOGIC ("create building"); @@ -148,19 +149,20 @@ b->SetNFloors (m_bd.nf); b->SetNRoomsX (m_bd.nrx); b->SetNRoomsY (m_bd.nry); - + Ptr buildingInfo = CreateObject (b); + bmm->AggregateObject (buildingInfo); // operation usually done by BuildingsHelper::Install BuildingsHelper::MakeMobilityModelConsistent (); - NS_TEST_ASSERT_MSG_EQ (bmm->IsIndoor (), m_pib.indoor, "indoor/outdoor mismatch"); + NS_TEST_ASSERT_MSG_EQ (buildingInfo->IsIndoor (), m_pib.indoor, "indoor/outdoor mismatch"); if (m_pib.indoor) { - NS_LOG_LOGIC (" got bid=" << bmm->GetBuilding ()->GetId () << ", f=" << (uint32_t) bmm->GetFloorNumber () << ", rx=" << (uint32_t) bmm->GetRoomNumberX () << ", roomY=" << (uint32_t) bmm->GetRoomNumberY ()); + NS_LOG_LOGIC (" got bid=" << buildingInfo->GetBuilding ()->GetId () << ", f=" << (uint32_t) buildingInfo->GetFloorNumber () << ", rx=" << (uint32_t) buildingInfo->GetRoomNumberX () << ", roomY=" << (uint32_t) buildingInfo->GetRoomNumberY ()); // only one building in this test, so Id will be 0 - NS_TEST_ASSERT_MSG_EQ (bmm->GetBuilding ()->GetId (), 0, "Building ID mismatch"); - NS_TEST_ASSERT_MSG_EQ ((uint32_t) bmm->GetFloorNumber (), m_pib.fn, "floor number mismatch"); - NS_TEST_ASSERT_MSG_EQ ((uint32_t) bmm->GetRoomNumberX (), m_pib.rx, "x room number mismatch"); - NS_TEST_ASSERT_MSG_EQ ((uint32_t) bmm->GetRoomNumberY (), m_pib.ry, "y room number mismatch"); + NS_TEST_ASSERT_MSG_EQ (buildingInfo->GetBuilding ()->GetId (), 0, "Building ID mismatch"); + NS_TEST_ASSERT_MSG_EQ ((uint32_t) buildingInfo->GetFloorNumber (), m_pib.fn, "floor number mismatch"); + NS_TEST_ASSERT_MSG_EQ ((uint32_t) buildingInfo->GetRoomNumberX (), m_pib.rx, "x room number mismatch"); + NS_TEST_ASSERT_MSG_EQ ((uint32_t) buildingInfo->GetRoomNumberY (), m_pib.ry, "y room number mismatch"); } Simulator::Destroy (); diff -Naur ns-3.17/src/buildings/test/buildings-pathloss-test.cc ns-3.18/src/buildings/test/buildings-pathloss-test.cc --- ns-3.17/src/buildings/test/buildings-pathloss-test.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/test/buildings-pathloss-test.cc 2013-10-26 07:07:29.551364380 -0700 @@ -28,10 +28,12 @@ #include #include #include - +#include +#include #include "buildings-pathloss-test.h" + NS_LOG_COMPONENT_DEFINE ("BuildingsPathlossTest"); namespace ns3 { @@ -201,62 +203,62 @@ double hb = 30; double henbHeight = 10.0; - Ptr mm; + Ptr mm; switch (index) { case 1: - mm = CreateObject (); + mm = CreateObject (); mm->SetPosition (Vector (0.0, 0.0, hb)); break; case 2: - mm = CreateObject (); + mm = CreateObject (); mm->SetPosition (Vector (2000, 0.0, hm)); break; case 3: - mm = CreateObject (); + mm = CreateObject (); mm->SetPosition (Vector (100, 0.0, hm)); break; case 4: - mm = CreateObject (); + mm = CreateObject (); mm->SetPosition (Vector (900, 0.0, hm)); break; case 5: - mm = CreateObject (); + mm = CreateObject (); mm->SetPosition (Vector (-5, 0.0, hm)); break; case 6: - mm = CreateObject (); + mm = CreateObject (); mm->SetPosition (Vector (-5, 30, henbHeight)); break; case 7: - mm = CreateObject (); + mm = CreateObject (); mm->SetPosition (Vector (-2000, 0.0, hm)); break; case 8: - mm = CreateObject (); + mm = CreateObject (); mm->SetPosition (Vector (-100, 0.0, hm)); break; case 9: - mm = CreateObject (); + mm = CreateObject (); mm->SetPosition (Vector (0, 0.0, hm)); break; case 10: - mm = CreateObject (); + mm = CreateObject (); mm->SetPosition (Vector (-100, 0.0, henbHeight)); break; case 11: - mm = CreateObject (); + mm = CreateObject (); mm->SetPosition (Vector (-500, 0.0, henbHeight)); break; @@ -264,6 +266,8 @@ mm = 0; break; } + Ptr buildingInfo = CreateObject (); + mm->AggregateObject (buildingInfo); // operation usually done by BuildingsHelper::Install BuildingsHelper::MakeConsistent (mm); return mm; } diff -Naur ns-3.17/src/buildings/test/buildings-pathloss-test.h ns-3.18/src/buildings/test/buildings-pathloss-test.h --- ns-3.17/src/buildings/test/buildings-pathloss-test.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/test/buildings-pathloss-test.h 2013-10-26 07:07:29.551364380 -0700 @@ -22,7 +22,6 @@ #define BUILDINGS_PATHLOSS_TEST_H #include -#include #include diff -Naur ns-3.17/src/buildings/test/buildings-shadowing-test.cc ns-3.18/src/buildings/test/buildings-shadowing-test.cc --- ns-3.17/src/buildings/test/buildings-shadowing-test.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/test/buildings-shadowing-test.cc 2013-10-26 07:07:29.551364380 -0700 @@ -27,6 +27,9 @@ #include #include #include +#include +#include +#include #include "buildings-shadowing-test.h" @@ -142,62 +145,62 @@ double hb = 30; double henbHeight = 10.0; - Ptr mm; + Ptr mm; switch (index) { case 1: - mm = CreateObject (); + mm = CreateObject (); mm->SetPosition (Vector (0.0, 0.0, hb)); break; case 2: - mm = CreateObject (); + mm = CreateObject (); mm->SetPosition (Vector (2000, 0.0, hm)); break; case 3: - mm = CreateObject (); + mm = CreateObject (); mm->SetPosition (Vector (100, 0.0, hm)); break; case 4: - mm = CreateObject (); + mm = CreateObject (); mm->SetPosition (Vector (900, 0.0, hm)); break; case 5: - mm = CreateObject (); + mm = CreateObject (); mm->SetPosition (Vector (-5, 0.0, hm)); break; case 6: - mm = CreateObject (); + mm = CreateObject (); mm->SetPosition (Vector (-5, 30, henbHeight)); break; case 7: - mm = CreateObject (); + mm = CreateObject (); mm->SetPosition (Vector (-2000, 0.0, hm)); break; case 8: - mm = CreateObject (); + mm = CreateObject (); mm->SetPosition (Vector (-100, 0.0, hm)); break; case 9: - mm = CreateObject (); + mm = CreateObject (); mm->SetPosition (Vector (0, 0.0, hm)); break; case 10: - mm = CreateObject (); + mm = CreateObject (); mm->SetPosition (Vector (-100, 0.0, henbHeight)); break; case 11: - mm = CreateObject (); + mm = CreateObject (); mm->SetPosition (Vector (-500, 0.0, henbHeight)); break; @@ -205,6 +208,8 @@ mm = 0; break; } + Ptr buildingInfo = CreateObject (); + mm->AggregateObject (buildingInfo); // operation usually done by BuildingsHelper::Install BuildingsHelper::MakeConsistent (mm); return mm; } diff -Naur ns-3.17/src/buildings/test/buildings-shadowing-test.h ns-3.18/src/buildings/test/buildings-shadowing-test.h --- ns-3.17/src/buildings/test/buildings-shadowing-test.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/test/buildings-shadowing-test.h 2013-10-26 07:07:29.551364380 -0700 @@ -23,8 +23,6 @@ #include "ns3/test.h" -#include -#include namespace ns3 { diff -Naur ns-3.17/src/buildings/wscript ns-3.18/src/buildings/wscript --- ns-3.17/src/buildings/wscript 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/buildings/wscript 2013-10-26 07:07:29.543364381 -0700 @@ -6,7 +6,7 @@ module.source = [ 'model/building.cc', 'model/building-list.cc', - 'model/buildings-mobility-model.cc', + 'model/mobility-building-info.cc', 'model/itu-r-1238-propagation-loss-model.cc', 'model/buildings-propagation-loss-model.cc', 'model/hybrid-buildings-propagation-loss-model.cc', @@ -30,7 +30,7 @@ headers.source = [ 'model/building.h', 'model/building-list.h', - 'model/buildings-mobility-model.h', + 'model/mobility-building-info.h', 'model/itu-r-1238-propagation-loss-model.h', 'model/buildings-propagation-loss-model.h', 'model/hybrid-buildings-propagation-loss-model.h', diff -Naur ns-3.17/src/click/bindings/modulegen__gcc_ILP32.py ns-3.18/src/click/bindings/modulegen__gcc_ILP32.py --- ns-3.17/src/click/bindings/modulegen__gcc_ILP32.py 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/click/bindings/modulegen__gcc_ILP32.py 2013-10-26 07:07:30.547364406 -0700 @@ -21,7 +21,7 @@ root_module = module.get_root() ## log.h (module 'core'): ns3::LogLevel [enumeration] - module.add_enum('LogLevel', ['LOG_NONE', 'LOG_ERROR', 'LOG_LEVEL_ERROR', 'LOG_WARN', 'LOG_LEVEL_WARN', 'LOG_DEBUG', 'LOG_LEVEL_DEBUG', 'LOG_INFO', 'LOG_LEVEL_INFO', 'LOG_FUNCTION', 'LOG_LEVEL_FUNCTION', 'LOG_LOGIC', 'LOG_LEVEL_LOGIC', 'LOG_ALL', 'LOG_LEVEL_ALL', 'LOG_PREFIX_FUNC', 'LOG_PREFIX_TIME', 'LOG_PREFIX_NODE'], import_from_module='ns.core') + module.add_enum('LogLevel', ['LOG_NONE', 'LOG_ERROR', 'LOG_LEVEL_ERROR', 'LOG_WARN', 'LOG_LEVEL_WARN', 'LOG_DEBUG', 'LOG_LEVEL_DEBUG', 'LOG_INFO', 'LOG_LEVEL_INFO', 'LOG_FUNCTION', 'LOG_LEVEL_FUNCTION', 'LOG_LOGIC', 'LOG_LEVEL_LOGIC', 'LOG_ALL', 'LOG_LEVEL_ALL', 'LOG_PREFIX_FUNC', 'LOG_PREFIX_TIME', 'LOG_PREFIX_NODE', 'LOG_PREFIX_LEVEL', 'LOG_PREFIX_ALL'], import_from_module='ns.core') ## address.h (module 'network'): ns3::Address [class] module.add_class('Address', import_from_module='ns.network') ## address.h (module 'network'): ns3::Address::MaxSize_e [enumeration] @@ -48,6 +48,16 @@ module.add_class('CallbackBase', import_from_module='ns.core') ## event-id.h (module 'core'): ns3::EventId [class] module.add_class('EventId', import_from_module='ns.core') + ## hash.h (module 'core'): ns3::Hasher [class] + module.add_class('Hasher', import_from_module='ns.core') + ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress [class] + module.add_class('Inet6SocketAddress', import_from_module='ns.network') + ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress [class] + root_module['ns3::Inet6SocketAddress'].implicitly_converts_to(root_module['ns3::Address']) + ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress [class] + module.add_class('InetSocketAddress', import_from_module='ns.network') + ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress [class] + root_module['ns3::InetSocketAddress'].implicitly_converts_to(root_module['ns3::Address']) ## int-to-type.h (module 'core'): ns3::IntToType<0> [struct] module.add_class('IntToType', import_from_module='ns.core', template_parameters=['0']) ## int-to-type.h (module 'core'): ns3::IntToType<0>::v_e [enumeration] @@ -122,6 +132,8 @@ module.add_class('PacketTagList', import_from_module='ns.network') ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData [struct] module.add_class('TagData', import_from_module='ns.network', outer_class=root_module['ns3::PacketTagList']) + ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData_e [enumeration] + module.add_enum('TagData_e', ['MAX_SIZE'], outer_class=root_module['ns3::PacketTagList::TagData'], import_from_module='ns.network') ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Object', 'ns3::ObjectBase', 'ns3::ObjectDeleter'], parent=root_module['ns3::ObjectBase'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simulator.h (module 'core'): ns3::Simulator [class] @@ -159,9 +171,9 @@ ## ipv4-header.h (module 'internet'): ns3::Ipv4Header [class] module.add_class('Ipv4Header', import_from_module='ns.internet', parent=root_module['ns3::Header']) ## ipv4-header.h (module 'internet'): ns3::Ipv4Header::DscpType [enumeration] - module.add_enum('DscpType', ['DscpDefault', 'CS1', 'AF11', 'AF12', 'AF13', 'CS2', 'AF21', 'AF22', 'AF23', 'CS3', 'AF31', 'AF32', 'AF33', 'CS4', 'AF41', 'AF42', 'AF43', 'CS5', 'EF', 'CS6', 'CS7'], outer_class=root_module['ns3::Ipv4Header'], import_from_module='ns.internet') + module.add_enum('DscpType', ['DscpDefault', 'DSCP_CS1', 'DSCP_AF11', 'DSCP_AF12', 'DSCP_AF13', 'DSCP_CS2', 'DSCP_AF21', 'DSCP_AF22', 'DSCP_AF23', 'DSCP_CS3', 'DSCP_AF31', 'DSCP_AF32', 'DSCP_AF33', 'DSCP_CS4', 'DSCP_AF41', 'DSCP_AF42', 'DSCP_AF43', 'DSCP_CS5', 'DSCP_EF', 'DSCP_CS6', 'DSCP_CS7'], outer_class=root_module['ns3::Ipv4Header'], import_from_module='ns.internet') ## ipv4-header.h (module 'internet'): ns3::Ipv4Header::EcnType [enumeration] - module.add_enum('EcnType', ['NotECT', 'ECT1', 'ECT0', 'CE'], outer_class=root_module['ns3::Ipv4Header'], import_from_module='ns.internet') + module.add_enum('EcnType', ['ECN_NotECT', 'ECN_ECT1', 'ECN_ECT0', 'ECN_CE'], outer_class=root_module['ns3::Ipv4Header'], import_from_module='ns.internet') ## ipv6-header.h (module 'internet'): ns3::Ipv6Header [class] module.add_class('Ipv6Header', import_from_module='ns.internet', parent=root_module['ns3::Header']) ## ipv6-header.h (module 'internet'): ns3::Ipv6Header::NextHeader_e [enumeration] @@ -180,6 +192,8 @@ module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::CallbackImplBase', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::EventImpl', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] + module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Hash::Implementation', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Ipv4MulticastRoute', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] @@ -200,8 +214,14 @@ module.add_enum('SocketType', ['NS3_SOCK_STREAM', 'NS3_SOCK_SEQPACKET', 'NS3_SOCK_DGRAM', 'NS3_SOCK_RAW'], outer_class=root_module['ns3::Socket'], import_from_module='ns.network') ## socket.h (module 'network'): ns3::SocketAddressTag [class] module.add_class('SocketAddressTag', import_from_module='ns.network', parent=root_module['ns3::Tag']) + ## socket.h (module 'network'): ns3::SocketIpTosTag [class] + module.add_class('SocketIpTosTag', import_from_module='ns.network', parent=root_module['ns3::Tag']) ## socket.h (module 'network'): ns3::SocketIpTtlTag [class] module.add_class('SocketIpTtlTag', import_from_module='ns.network', parent=root_module['ns3::Tag']) + ## socket.h (module 'network'): ns3::SocketIpv6HopLimitTag [class] + module.add_class('SocketIpv6HopLimitTag', import_from_module='ns.network', parent=root_module['ns3::Tag']) + ## socket.h (module 'network'): ns3::SocketIpv6TclassTag [class] + module.add_class('SocketIpv6TclassTag', import_from_module='ns.network', parent=root_module['ns3::Tag']) ## socket.h (module 'network'): ns3::SocketSetDontFragmentTag [class] module.add_class('SocketSetDontFragmentTag', import_from_module='ns.network', parent=root_module['ns3::Tag']) ## nstime.h (module 'core'): ns3::Time [class] @@ -278,8 +298,6 @@ module.add_class('OutputStreamWrapper', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter >']) ## packet.h (module 'network'): ns3::Packet [class] module.add_class('Packet', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter >']) - ## nstime.h (module 'core'): ns3::TimeChecker [class] - module.add_class('TimeChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) ## nstime.h (module 'core'): ns3::TimeValue [class] module.add_class('TimeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## type-id.h (module 'core'): ns3::TypeIdChecker [class] @@ -305,11 +323,47 @@ nested_module = module.add_cpp_namespace('FatalImpl') register_types_ns3_FatalImpl(nested_module) + + ## Register a nested module for the namespace Hash + + nested_module = module.add_cpp_namespace('Hash') + register_types_ns3_Hash(nested_module) + def register_types_ns3_FatalImpl(module): root_module = module.get_root() +def register_types_ns3_Hash(module): + root_module = module.get_root() + + ## hash-function.h (module 'core'): ns3::Hash::Implementation [class] + module.add_class('Implementation', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash32Function_ptr') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash32Function_ptr*') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash32Function_ptr&') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash64Function_ptr') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash64Function_ptr*') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash64Function_ptr&') + + ## Register a nested module for the namespace Function + + nested_module = module.add_cpp_namespace('Function') + register_types_ns3_Hash_Function(nested_module) + + +def register_types_ns3_Hash_Function(module): + root_module = module.get_root() + + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a [class] + module.add_class('Fnv1a', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32 [class] + module.add_class('Hash32', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64 [class] + module.add_class('Hash64', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3 [class] + module.add_class('Murmur3', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + def register_methods(root_module): register_Ns3Address_methods(root_module, root_module['ns3::Address']) register_Ns3AttributeConstructionList_methods(root_module, root_module['ns3::AttributeConstructionList']) @@ -323,6 +377,9 @@ register_Ns3ByteTagListIteratorItem_methods(root_module, root_module['ns3::ByteTagList::Iterator::Item']) register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase']) register_Ns3EventId_methods(root_module, root_module['ns3::EventId']) + register_Ns3Hasher_methods(root_module, root_module['ns3::Hasher']) + register_Ns3Inet6SocketAddress_methods(root_module, root_module['ns3::Inet6SocketAddress']) + register_Ns3InetSocketAddress_methods(root_module, root_module['ns3::InetSocketAddress']) register_Ns3IntToType__0_methods(root_module, root_module['ns3::IntToType< 0 >']) register_Ns3IntToType__1_methods(root_module, root_module['ns3::IntToType< 1 >']) register_Ns3IntToType__2_methods(root_module, root_module['ns3::IntToType< 2 >']) @@ -370,6 +427,7 @@ register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter >']) + register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3Ipv4MulticastRoute_Ns3Empty_Ns3DefaultDeleter__lt__ns3Ipv4MulticastRoute__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Ipv4MulticastRoute, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3Ipv4Route_Ns3Empty_Ns3DefaultDeleter__lt__ns3Ipv4Route__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Ipv4Route, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3NixVector_Ns3Empty_Ns3DefaultDeleter__lt__ns3NixVector__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter >']) @@ -378,7 +436,10 @@ register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter >']) register_Ns3Socket_methods(root_module, root_module['ns3::Socket']) register_Ns3SocketAddressTag_methods(root_module, root_module['ns3::SocketAddressTag']) + register_Ns3SocketIpTosTag_methods(root_module, root_module['ns3::SocketIpTosTag']) register_Ns3SocketIpTtlTag_methods(root_module, root_module['ns3::SocketIpTtlTag']) + register_Ns3SocketIpv6HopLimitTag_methods(root_module, root_module['ns3::SocketIpv6HopLimitTag']) + register_Ns3SocketIpv6TclassTag_methods(root_module, root_module['ns3::SocketIpv6TclassTag']) register_Ns3SocketSetDontFragmentTag_methods(root_module, root_module['ns3::SocketSetDontFragmentTag']) register_Ns3Time_methods(root_module, root_module['ns3::Time']) register_Ns3TraceSourceAccessor_methods(root_module, root_module['ns3::TraceSourceAccessor']) @@ -413,13 +474,17 @@ register_Ns3ObjectFactoryValue_methods(root_module, root_module['ns3::ObjectFactoryValue']) register_Ns3OutputStreamWrapper_methods(root_module, root_module['ns3::OutputStreamWrapper']) register_Ns3Packet_methods(root_module, root_module['ns3::Packet']) - register_Ns3TimeChecker_methods(root_module, root_module['ns3::TimeChecker']) register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue']) register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker']) register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue']) register_Ns3AddressChecker_methods(root_module, root_module['ns3::AddressChecker']) register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue']) register_Ns3Ipv4ClickRouting_methods(root_module, root_module['ns3::Ipv4ClickRouting']) + register_Ns3HashImplementation_methods(root_module, root_module['ns3::Hash::Implementation']) + register_Ns3HashFunctionFnv1a_methods(root_module, root_module['ns3::Hash::Function::Fnv1a']) + register_Ns3HashFunctionHash32_methods(root_module, root_module['ns3::Hash::Function::Hash32']) + register_Ns3HashFunctionHash64_methods(root_module, root_module['ns3::Hash::Function::Hash64']) + register_Ns3HashFunctionMurmur3_methods(root_module, root_module['ns3::Hash::Function::Murmur3']) return def register_Ns3Address_methods(root_module, cls): @@ -945,6 +1010,121 @@ is_const=True) return +def register_Ns3Hasher_methods(root_module, cls): + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Hasher const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hasher const &', 'arg0')]) + ## hash.h (module 'core'): ns3::Hasher::Hasher() [constructor] + cls.add_constructor([]) + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Ptr hp) [constructor] + cls.add_constructor([param('ns3::Ptr< ns3::Hash::Implementation >', 'hp')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(std::string const s) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(std::string const s) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): ns3::Hasher & ns3::Hasher::clear() [member function] + cls.add_method('clear', + 'ns3::Hasher &', + []) + return + +def register_Ns3Inet6SocketAddress_methods(root_module, cls): + ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(ns3::Inet6SocketAddress const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Inet6SocketAddress const &', 'arg0')]) + ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(ns3::Ipv6Address ipv6, uint16_t port) [constructor] + cls.add_constructor([param('ns3::Ipv6Address', 'ipv6'), param('uint16_t', 'port')]) + ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(ns3::Ipv6Address ipv6) [constructor] + cls.add_constructor([param('ns3::Ipv6Address', 'ipv6')]) + ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(uint16_t port) [constructor] + cls.add_constructor([param('uint16_t', 'port')]) + ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(char const * ipv6, uint16_t port) [constructor] + cls.add_constructor([param('char const *', 'ipv6'), param('uint16_t', 'port')]) + ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(char const * ipv6) [constructor] + cls.add_constructor([param('char const *', 'ipv6')]) + ## inet6-socket-address.h (module 'network'): static ns3::Inet6SocketAddress ns3::Inet6SocketAddress::ConvertFrom(ns3::Address const & addr) [member function] + cls.add_method('ConvertFrom', + 'ns3::Inet6SocketAddress', + [param('ns3::Address const &', 'addr')], + is_static=True) + ## inet6-socket-address.h (module 'network'): ns3::Ipv6Address ns3::Inet6SocketAddress::GetIpv6() const [member function] + cls.add_method('GetIpv6', + 'ns3::Ipv6Address', + [], + is_const=True) + ## inet6-socket-address.h (module 'network'): uint16_t ns3::Inet6SocketAddress::GetPort() const [member function] + cls.add_method('GetPort', + 'uint16_t', + [], + is_const=True) + ## inet6-socket-address.h (module 'network'): static bool ns3::Inet6SocketAddress::IsMatchingType(ns3::Address const & addr) [member function] + cls.add_method('IsMatchingType', + 'bool', + [param('ns3::Address const &', 'addr')], + is_static=True) + ## inet6-socket-address.h (module 'network'): void ns3::Inet6SocketAddress::SetIpv6(ns3::Ipv6Address ipv6) [member function] + cls.add_method('SetIpv6', + 'void', + [param('ns3::Ipv6Address', 'ipv6')]) + ## inet6-socket-address.h (module 'network'): void ns3::Inet6SocketAddress::SetPort(uint16_t port) [member function] + cls.add_method('SetPort', + 'void', + [param('uint16_t', 'port')]) + return + +def register_Ns3InetSocketAddress_methods(root_module, cls): + ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(ns3::InetSocketAddress const & arg0) [copy constructor] + cls.add_constructor([param('ns3::InetSocketAddress const &', 'arg0')]) + ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(ns3::Ipv4Address ipv4, uint16_t port) [constructor] + cls.add_constructor([param('ns3::Ipv4Address', 'ipv4'), param('uint16_t', 'port')]) + ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(ns3::Ipv4Address ipv4) [constructor] + cls.add_constructor([param('ns3::Ipv4Address', 'ipv4')]) + ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(uint16_t port) [constructor] + cls.add_constructor([param('uint16_t', 'port')]) + ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(char const * ipv4, uint16_t port) [constructor] + cls.add_constructor([param('char const *', 'ipv4'), param('uint16_t', 'port')]) + ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(char const * ipv4) [constructor] + cls.add_constructor([param('char const *', 'ipv4')]) + ## inet-socket-address.h (module 'network'): static ns3::InetSocketAddress ns3::InetSocketAddress::ConvertFrom(ns3::Address const & address) [member function] + cls.add_method('ConvertFrom', + 'ns3::InetSocketAddress', + [param('ns3::Address const &', 'address')], + is_static=True) + ## inet-socket-address.h (module 'network'): ns3::Ipv4Address ns3::InetSocketAddress::GetIpv4() const [member function] + cls.add_method('GetIpv4', + 'ns3::Ipv4Address', + [], + is_const=True) + ## inet-socket-address.h (module 'network'): uint16_t ns3::InetSocketAddress::GetPort() const [member function] + cls.add_method('GetPort', + 'uint16_t', + [], + is_const=True) + ## inet-socket-address.h (module 'network'): static bool ns3::InetSocketAddress::IsMatchingType(ns3::Address const & address) [member function] + cls.add_method('IsMatchingType', + 'bool', + [param('ns3::Address const &', 'address')], + is_static=True) + ## inet-socket-address.h (module 'network'): void ns3::InetSocketAddress::SetIpv4(ns3::Ipv4Address address) [member function] + cls.add_method('SetIpv4', + 'void', + [param('ns3::Ipv4Address', 'address')]) + ## inet-socket-address.h (module 'network'): void ns3::InetSocketAddress::SetPort(uint16_t port) [member function] + cls.add_method('SetPort', + 'void', + [param('uint16_t', 'port')]) + return + def register_Ns3IntToType__0_methods(root_module, cls): ## int-to-type.h (module 'core'): ns3::IntToType<0>::IntToType() [constructor] cls.add_constructor([]) @@ -1320,6 +1500,11 @@ 'bool', [], is_const=True) + ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsDocumentation() const [member function] + cls.add_method('IsDocumentation', + 'bool', + [], + is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsEqual(ns3::Ipv6Address const & other) const [member function] cls.add_method('IsEqual', 'bool', @@ -1359,16 +1544,36 @@ 'bool', [], is_const=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac16Address addr, ns3::Ipv6Address prefix) [member function] + cls.add_method('MakeAutoconfiguredAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac16Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac48Address addr, ns3::Ipv6Address prefix) [member function] cls.add_method('MakeAutoconfiguredAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac64Address addr, ns3::Ipv6Address prefix) [member function] + cls.add_method('MakeAutoconfiguredAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac64Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], + is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac16Address mac) [member function] + cls.add_method('MakeAutoconfiguredLinkLocalAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac16Address', 'mac')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac48Address mac) [member function] cls.add_method('MakeAutoconfiguredLinkLocalAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'mac')], is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac64Address mac) [member function] + cls.add_method('MakeAutoconfiguredLinkLocalAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac64Address', 'mac')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeIpv4MappedAddress(ns3::Ipv4Address addr) [member function] cls.add_method('MakeIpv4MappedAddress', 'ns3::Ipv6Address', @@ -1529,6 +1734,11 @@ cls.add_method('EnvVarCheck', 'void', [param('char const *', 'name')]) + ## log.h (module 'core'): std::string ns3::LogComponent::GetLevelLabel(ns3::LogLevel const level) const [member function] + cls.add_method('GetLevelLabel', + 'std::string', + [param('ns3::LogLevel const', 'level')], + is_const=True) ## log.h (module 'core'): bool ns3::LogComponent::IsEnabled(ns3::LogLevel level) const [member function] cls.add_method('IsEnabled', 'bool', @@ -1825,6 +2035,10 @@ cls.add_method('RemoveAll', 'void', []) + ## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Replace(ns3::Tag & tag) [member function] + cls.add_method('Replace', + 'bool', + [param('ns3::Tag &', 'tag')]) return def register_Ns3PacketTagListTagData_methods(root_module, cls): @@ -2191,6 +2405,11 @@ 'std::string', [], is_const=True) + ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetHash() const [member function] + cls.add_method('GetHash', + 'uint32_t', + [], + is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeId::GetName() const [member function] cls.add_method('GetName', 'std::string', @@ -2250,6 +2469,16 @@ 'bool', [param('std::string', 'name'), param('ns3::TypeId::AttributeInformation *', 'info', transfer_ownership=False)], is_const=True) + ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByHash(uint32_t hash) [member function] + cls.add_method('LookupByHash', + 'ns3::TypeId', + [param('uint32_t', 'hash')], + is_static=True) + ## type-id.h (module 'core'): static bool ns3::TypeId::LookupByHashFailSafe(uint32_t hash, ns3::TypeId * tid) [member function] + cls.add_method('LookupByHashFailSafe', + 'bool', + [param('uint32_t', 'hash'), param('ns3::TypeId *', 'tid')], + is_static=True) ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByName(std::string name) [member function] cls.add_method('LookupByName', 'ns3::TypeId', @@ -2784,8 +3013,8 @@ 'ns3::TypeId', [], is_static=True) - ## object.h (module 'core'): void ns3::Object::Start() [member function] - cls.add_method('Start', + ## object.h (module 'core'): void ns3::Object::Initialize() [member function] + cls.add_method('Initialize', 'void', []) ## object.h (module 'core'): ns3::Object::Object(ns3::Object const & o) [copy constructor] @@ -2796,8 +3025,8 @@ 'void', [], visibility='protected', is_virtual=True) - ## object.h (module 'core'): void ns3::Object::DoStart() [member function] - cls.add_method('DoStart', + ## object.h (module 'core'): void ns3::Object::DoInitialize() [member function] + cls.add_method('DoInitialize', 'void', [], visibility='protected', is_virtual=True) @@ -2884,6 +3113,18 @@ is_static=True) return +def register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter< ns3::Hash::Implementation > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + def register_Ns3SimpleRefCount__Ns3Ipv4MulticastRoute_Ns3Empty_Ns3DefaultDeleter__lt__ns3Ipv4MulticastRoute__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] cls.add_constructor([]) @@ -3010,6 +3251,26 @@ 'ns3::Socket::SocketErrno', [], is_pure_virtual=True, is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpTos() const [member function] + cls.add_method('GetIpTos', + 'uint8_t', + [], + is_const=True) + ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpTtl() const [member function] + cls.add_method('GetIpTtl', + 'uint8_t', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpv6HopLimit() const [member function] + cls.add_method('GetIpv6HopLimit', + 'uint8_t', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpv6Tclass() const [member function] + cls.add_method('GetIpv6Tclass', + 'uint8_t', + [], + is_const=True) ## socket.h (module 'network'): ns3::Ptr ns3::Socket::GetNode() const [member function] cls.add_method('GetNode', 'ns3::Ptr< ns3::Node >', @@ -3040,6 +3301,26 @@ 'ns3::TypeId', [], is_static=True) + ## socket.h (module 'network'): bool ns3::Socket::IsIpRecvTos() const [member function] + cls.add_method('IsIpRecvTos', + 'bool', + [], + is_const=True) + ## socket.h (module 'network'): bool ns3::Socket::IsIpRecvTtl() const [member function] + cls.add_method('IsIpRecvTtl', + 'bool', + [], + is_const=True) + ## socket.h (module 'network'): bool ns3::Socket::IsIpv6RecvHopLimit() const [member function] + cls.add_method('IsIpv6RecvHopLimit', + 'bool', + [], + is_const=True) + ## socket.h (module 'network'): bool ns3::Socket::IsIpv6RecvTclass() const [member function] + cls.add_method('IsIpv6RecvTclass', + 'bool', + [], + is_const=True) ## socket.h (module 'network'): bool ns3::Socket::IsRecvPktInfo() const [member function] cls.add_method('IsRecvPktInfo', 'bool', @@ -3119,6 +3400,40 @@ cls.add_method('SetDataSentCallback', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'dataSent')]) + ## socket.h (module 'network'): void ns3::Socket::SetIpRecvTos(bool ipv4RecvTos) [member function] + cls.add_method('SetIpRecvTos', + 'void', + [param('bool', 'ipv4RecvTos')]) + ## socket.h (module 'network'): void ns3::Socket::SetIpRecvTtl(bool ipv4RecvTtl) [member function] + cls.add_method('SetIpRecvTtl', + 'void', + [param('bool', 'ipv4RecvTtl')]) + ## socket.h (module 'network'): void ns3::Socket::SetIpTos(uint8_t ipTos) [member function] + cls.add_method('SetIpTos', + 'void', + [param('uint8_t', 'ipTos')]) + ## socket.h (module 'network'): void ns3::Socket::SetIpTtl(uint8_t ipTtl) [member function] + cls.add_method('SetIpTtl', + 'void', + [param('uint8_t', 'ipTtl')], + is_virtual=True) + ## socket.h (module 'network'): void ns3::Socket::SetIpv6HopLimit(uint8_t ipHopLimit) [member function] + cls.add_method('SetIpv6HopLimit', + 'void', + [param('uint8_t', 'ipHopLimit')], + is_virtual=True) + ## socket.h (module 'network'): void ns3::Socket::SetIpv6RecvHopLimit(bool ipv6RecvHopLimit) [member function] + cls.add_method('SetIpv6RecvHopLimit', + 'void', + [param('bool', 'ipv6RecvHopLimit')]) + ## socket.h (module 'network'): void ns3::Socket::SetIpv6RecvTclass(bool ipv6RecvTclass) [member function] + cls.add_method('SetIpv6RecvTclass', + 'void', + [param('bool', 'ipv6RecvTclass')]) + ## socket.h (module 'network'): void ns3::Socket::SetIpv6Tclass(int ipTclass) [member function] + cls.add_method('SetIpv6Tclass', + 'void', + [param('int', 'ipTclass')]) ## socket.h (module 'network'): void ns3::Socket::SetRecvCallback(ns3::Callback, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> arg0) [member function] cls.add_method('SetRecvCallback', 'void', @@ -3146,6 +3461,26 @@ 'void', [], visibility='protected', is_virtual=True) + ## socket.h (module 'network'): bool ns3::Socket::IsManualIpTos() const [member function] + cls.add_method('IsManualIpTos', + 'bool', + [], + is_const=True, visibility='protected') + ## socket.h (module 'network'): bool ns3::Socket::IsManualIpTtl() const [member function] + cls.add_method('IsManualIpTtl', + 'bool', + [], + is_const=True, visibility='protected') + ## socket.h (module 'network'): bool ns3::Socket::IsManualIpv6HopLimit() const [member function] + cls.add_method('IsManualIpv6HopLimit', + 'bool', + [], + is_const=True, visibility='protected') + ## socket.h (module 'network'): bool ns3::Socket::IsManualIpv6Tclass() const [member function] + cls.add_method('IsManualIpv6Tclass', + 'bool', + [], + is_const=True, visibility='protected') ## socket.h (module 'network'): void ns3::Socket::NotifyConnectionFailed() [member function] cls.add_method('NotifyConnectionFailed', 'void', @@ -3239,6 +3574,52 @@ [param('ns3::Address', 'addr')]) return +def register_Ns3SocketIpTosTag_methods(root_module, cls): + ## socket.h (module 'network'): ns3::SocketIpTosTag::SocketIpTosTag(ns3::SocketIpTosTag const & arg0) [copy constructor] + cls.add_constructor([param('ns3::SocketIpTosTag const &', 'arg0')]) + ## socket.h (module 'network'): ns3::SocketIpTosTag::SocketIpTosTag() [constructor] + cls.add_constructor([]) + ## socket.h (module 'network'): void ns3::SocketIpTosTag::Deserialize(ns3::TagBuffer i) [member function] + cls.add_method('Deserialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_virtual=True) + ## socket.h (module 'network'): ns3::TypeId ns3::SocketIpTosTag::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint32_t ns3::SocketIpTosTag::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint8_t ns3::SocketIpTosTag::GetTos() const [member function] + cls.add_method('GetTos', + 'uint8_t', + [], + is_const=True) + ## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpTosTag::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## socket.h (module 'network'): void ns3::SocketIpTosTag::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketIpTosTag::Serialize(ns3::TagBuffer i) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketIpTosTag::SetTos(uint8_t tos) [member function] + cls.add_method('SetTos', + 'void', + [param('uint8_t', 'tos')]) + return + def register_Ns3SocketIpTtlTag_methods(root_module, cls): ## socket.h (module 'network'): ns3::SocketIpTtlTag::SocketIpTtlTag(ns3::SocketIpTtlTag const & arg0) [copy constructor] cls.add_constructor([param('ns3::SocketIpTtlTag const &', 'arg0')]) @@ -3285,6 +3666,98 @@ [param('uint8_t', 'ttl')]) return +def register_Ns3SocketIpv6HopLimitTag_methods(root_module, cls): + ## socket.h (module 'network'): ns3::SocketIpv6HopLimitTag::SocketIpv6HopLimitTag(ns3::SocketIpv6HopLimitTag const & arg0) [copy constructor] + cls.add_constructor([param('ns3::SocketIpv6HopLimitTag const &', 'arg0')]) + ## socket.h (module 'network'): ns3::SocketIpv6HopLimitTag::SocketIpv6HopLimitTag() [constructor] + cls.add_constructor([]) + ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::Deserialize(ns3::TagBuffer i) [member function] + cls.add_method('Deserialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_virtual=True) + ## socket.h (module 'network'): uint8_t ns3::SocketIpv6HopLimitTag::GetHopLimit() const [member function] + cls.add_method('GetHopLimit', + 'uint8_t', + [], + is_const=True) + ## socket.h (module 'network'): ns3::TypeId ns3::SocketIpv6HopLimitTag::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint32_t ns3::SocketIpv6HopLimitTag::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpv6HopLimitTag::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::Serialize(ns3::TagBuffer i) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::SetHopLimit(uint8_t hopLimit) [member function] + cls.add_method('SetHopLimit', + 'void', + [param('uint8_t', 'hopLimit')]) + return + +def register_Ns3SocketIpv6TclassTag_methods(root_module, cls): + ## socket.h (module 'network'): ns3::SocketIpv6TclassTag::SocketIpv6TclassTag(ns3::SocketIpv6TclassTag const & arg0) [copy constructor] + cls.add_constructor([param('ns3::SocketIpv6TclassTag const &', 'arg0')]) + ## socket.h (module 'network'): ns3::SocketIpv6TclassTag::SocketIpv6TclassTag() [constructor] + cls.add_constructor([]) + ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::Deserialize(ns3::TagBuffer i) [member function] + cls.add_method('Deserialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_virtual=True) + ## socket.h (module 'network'): ns3::TypeId ns3::SocketIpv6TclassTag::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint32_t ns3::SocketIpv6TclassTag::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint8_t ns3::SocketIpv6TclassTag::GetTclass() const [member function] + cls.add_method('GetTclass', + 'uint8_t', + [], + is_const=True) + ## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpv6TclassTag::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::Serialize(ns3::TagBuffer i) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::SetTclass(uint8_t tclass) [member function] + cls.add_method('SetTclass', + 'void', + [param('uint8_t', 'tclass')]) + return + def register_Ns3SocketSetDontFragmentTag_methods(root_module, cls): ## socket.h (module 'network'): ns3::SocketSetDontFragmentTag::SocketSetDontFragmentTag(ns3::SocketSetDontFragmentTag const & arg0) [copy constructor] cls.add_constructor([param('ns3::SocketSetDontFragmentTag const &', 'arg0')]) @@ -3469,11 +3942,26 @@ 'bool', [], is_const=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Max() [member function] + cls.add_method('Max', + 'ns3::Time', + [], + is_static=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Min() [member function] + cls.add_method('Min', + 'ns3::Time', + [], + is_static=True) ## nstime.h (module 'core'): static void ns3::Time::SetResolution(ns3::Time::Unit resolution) [member function] cls.add_method('SetResolution', 'void', [param('ns3::Time::Unit', 'resolution')], is_static=True) + ## nstime.h (module 'core'): static bool ns3::Time::StaticInit() [member function] + cls.add_method('StaticInit', + 'bool', + [], + is_static=True) ## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function] cls.add_method('To', 'ns3::int64x64_t', @@ -3765,10 +4253,10 @@ 'ns3::IpL4Protocol::RxStatus', [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::Ipv4Interface >', 'incomingInterface')], is_pure_virtual=True, is_virtual=True) - ## ip-l4-protocol.h (module 'internet'): ns3::IpL4Protocol::RxStatus ns3::IpL4Protocol::Receive(ns3::Ptr p, ns3::Ipv6Address & src, ns3::Ipv6Address & dst, ns3::Ptr incomingInterface) [member function] + ## ip-l4-protocol.h (module 'internet'): ns3::IpL4Protocol::RxStatus ns3::IpL4Protocol::Receive(ns3::Ptr p, ns3::Ipv6Header const & header, ns3::Ptr incomingInterface) [member function] cls.add_method('Receive', 'ns3::IpL4Protocol::RxStatus', - [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv6Address &', 'src'), param('ns3::Ipv6Address &', 'dst'), param('ns3::Ptr< ns3::Ipv6Interface >', 'incomingInterface')], + [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv6Header const &', 'header'), param('ns3::Ptr< ns3::Ipv6Interface >', 'incomingInterface')], is_pure_virtual=True, is_virtual=True) ## ip-l4-protocol.h (module 'internet'): void ns3::IpL4Protocol::ReceiveIcmp(ns3::Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo, ns3::Ipv4Address payloadSource, ns3::Ipv4Address payloadDestination, uint8_t const * payload) [member function] cls.add_method('ReceiveIcmp', @@ -3902,6 +4390,11 @@ 'bool', [param('uint32_t', 'interface'), param('uint32_t', 'addressIndex')], is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): bool ns3::Ipv4::RemoveAddress(uint32_t interface, ns3::Ipv4Address address) [member function] + cls.add_method('RemoveAddress', + 'bool', + [param('uint32_t', 'interface'), param('ns3::Ipv4Address', 'address')], + is_pure_virtual=True, is_virtual=True) ## ipv4.h (module 'internet'): ns3::Ipv4Address ns3::Ipv4::SelectSourceAddress(ns3::Ptr device, ns3::Ipv4Address dst, ns3::Ipv4InterfaceAddress::InterfaceAddressScope_e scope) [member function] cls.add_method('SelectSourceAddress', 'ns3::Ipv4Address', @@ -4064,6 +4557,10 @@ cls.add_method('RemoveAddress', 'ns3::Ipv4InterfaceAddress', [param('uint32_t', 'index')]) + ## ipv4-interface.h (module 'internet'): ns3::Ipv4InterfaceAddress ns3::Ipv4Interface::RemoveAddress(ns3::Ipv4Address address) [member function] + cls.add_method('RemoveAddress', + 'ns3::Ipv4InterfaceAddress', + [param('ns3::Ipv4Address', 'address')]) ## ipv4-interface.h (module 'internet'): void ns3::Ipv4Interface::Send(ns3::Ptr p, ns3::Ipv4Address dest) [member function] cls.add_method('Send', 'void', @@ -4420,6 +4917,10 @@ cls.add_method('RemoveAddress', 'ns3::Ipv6InterfaceAddress', [param('uint32_t', 'index')]) + ## ipv6-interface.h (module 'internet'): ns3::Ipv6InterfaceAddress ns3::Ipv6Interface::RemoveAddress(ns3::Ipv6Address address) [member function] + cls.add_method('RemoveAddress', + 'ns3::Ipv6InterfaceAddress', + [param('ns3::Ipv6Address', 'address')]) ## ipv6-interface.h (module 'internet'): void ns3::Ipv6Interface::Send(ns3::Ptr p, ns3::Ipv6Address dest) [member function] cls.add_method('Send', 'void', @@ -4918,6 +5419,10 @@ cls.add_method('RemoveTrailer', 'uint32_t', [param('ns3::Trailer &', 'trailer')]) + ## packet.h (module 'network'): bool ns3::Packet::ReplacePacketTag(ns3::Tag & tag) [member function] + cls.add_method('ReplacePacketTag', + 'bool', + [param('ns3::Tag &', 'tag')]) ## packet.h (module 'network'): uint32_t ns3::Packet::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function] cls.add_method('Serialize', 'uint32_t', @@ -4929,13 +5434,6 @@ [param('ns3::Ptr< ns3::NixVector >', 'arg0')]) return -def register_Ns3TimeChecker_methods(root_module, cls): - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker() [constructor] - cls.add_constructor([]) - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker(ns3::TimeChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TimeChecker const &', 'arg0')]) - return - def register_Ns3TimeValue_methods(root_module, cls): ## nstime.h (module 'core'): ns3::TimeValue::TimeValue() [constructor] cls.add_constructor([]) @@ -5056,14 +5554,127 @@ cls.add_constructor([param('ns3::Ipv4ClickRouting const &', 'arg0')]) return +def register_Ns3HashImplementation_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation(ns3::Hash::Implementation const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Implementation const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation() [constructor] + cls.add_constructor([]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Implementation::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_pure_virtual=True, is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Implementation::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Implementation::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + return + +def register_Ns3HashFunctionFnv1a_methods(root_module, cls): + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a(ns3::Hash::Function::Fnv1a const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Fnv1a const &', 'arg0')]) + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a() [constructor] + cls.add_constructor([]) + ## hash-fnv.h (module 'core'): uint32_t ns3::Hash::Function::Fnv1a::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): uint64_t ns3::Hash::Function::Fnv1a::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): void ns3::Hash::Function::Fnv1a::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash32_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Function::Hash32 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash32 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Hash32Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash32Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash32::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash32::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash64_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Function::Hash64 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash64 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Hash64Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash64Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash64::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Function::Hash64::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash64::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionMurmur3_methods(root_module, cls): + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3(ns3::Hash::Function::Murmur3 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Murmur3 const &', 'arg0')]) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3() [constructor] + cls.add_constructor([]) + ## hash-murmur3.h (module 'core'): uint32_t ns3::Hash::Function::Murmur3::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): uint64_t ns3::Hash::Function::Murmur3::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): void ns3::Hash::Function::Murmur3::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + def register_functions(root_module): module = root_module register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) + register_functions_ns3_Hash(module.get_submodule('Hash'), root_module) return def register_functions_ns3_FatalImpl(module, root_module): return +def register_functions_ns3_Hash(module, root_module): + register_functions_ns3_Hash_Function(module.get_submodule('Function'), root_module) + return + +def register_functions_ns3_Hash_Function(module, root_module): + return + def main(): out = FileCodeSink(sys.stdout) root_module = module_init() diff -Naur ns-3.17/src/click/bindings/modulegen__gcc_LP64.py ns-3.18/src/click/bindings/modulegen__gcc_LP64.py --- ns-3.17/src/click/bindings/modulegen__gcc_LP64.py 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/click/bindings/modulegen__gcc_LP64.py 2013-10-26 07:07:30.543364406 -0700 @@ -21,7 +21,7 @@ root_module = module.get_root() ## log.h (module 'core'): ns3::LogLevel [enumeration] - module.add_enum('LogLevel', ['LOG_NONE', 'LOG_ERROR', 'LOG_LEVEL_ERROR', 'LOG_WARN', 'LOG_LEVEL_WARN', 'LOG_DEBUG', 'LOG_LEVEL_DEBUG', 'LOG_INFO', 'LOG_LEVEL_INFO', 'LOG_FUNCTION', 'LOG_LEVEL_FUNCTION', 'LOG_LOGIC', 'LOG_LEVEL_LOGIC', 'LOG_ALL', 'LOG_LEVEL_ALL', 'LOG_PREFIX_FUNC', 'LOG_PREFIX_TIME', 'LOG_PREFIX_NODE'], import_from_module='ns.core') + module.add_enum('LogLevel', ['LOG_NONE', 'LOG_ERROR', 'LOG_LEVEL_ERROR', 'LOG_WARN', 'LOG_LEVEL_WARN', 'LOG_DEBUG', 'LOG_LEVEL_DEBUG', 'LOG_INFO', 'LOG_LEVEL_INFO', 'LOG_FUNCTION', 'LOG_LEVEL_FUNCTION', 'LOG_LOGIC', 'LOG_LEVEL_LOGIC', 'LOG_ALL', 'LOG_LEVEL_ALL', 'LOG_PREFIX_FUNC', 'LOG_PREFIX_TIME', 'LOG_PREFIX_NODE', 'LOG_PREFIX_LEVEL', 'LOG_PREFIX_ALL'], import_from_module='ns.core') ## address.h (module 'network'): ns3::Address [class] module.add_class('Address', import_from_module='ns.network') ## address.h (module 'network'): ns3::Address::MaxSize_e [enumeration] @@ -48,6 +48,16 @@ module.add_class('CallbackBase', import_from_module='ns.core') ## event-id.h (module 'core'): ns3::EventId [class] module.add_class('EventId', import_from_module='ns.core') + ## hash.h (module 'core'): ns3::Hasher [class] + module.add_class('Hasher', import_from_module='ns.core') + ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress [class] + module.add_class('Inet6SocketAddress', import_from_module='ns.network') + ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress [class] + root_module['ns3::Inet6SocketAddress'].implicitly_converts_to(root_module['ns3::Address']) + ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress [class] + module.add_class('InetSocketAddress', import_from_module='ns.network') + ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress [class] + root_module['ns3::InetSocketAddress'].implicitly_converts_to(root_module['ns3::Address']) ## int-to-type.h (module 'core'): ns3::IntToType<0> [struct] module.add_class('IntToType', import_from_module='ns.core', template_parameters=['0']) ## int-to-type.h (module 'core'): ns3::IntToType<0>::v_e [enumeration] @@ -122,6 +132,8 @@ module.add_class('PacketTagList', import_from_module='ns.network') ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData [struct] module.add_class('TagData', import_from_module='ns.network', outer_class=root_module['ns3::PacketTagList']) + ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData_e [enumeration] + module.add_enum('TagData_e', ['MAX_SIZE'], outer_class=root_module['ns3::PacketTagList::TagData'], import_from_module='ns.network') ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Object', 'ns3::ObjectBase', 'ns3::ObjectDeleter'], parent=root_module['ns3::ObjectBase'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simulator.h (module 'core'): ns3::Simulator [class] @@ -159,9 +171,9 @@ ## ipv4-header.h (module 'internet'): ns3::Ipv4Header [class] module.add_class('Ipv4Header', import_from_module='ns.internet', parent=root_module['ns3::Header']) ## ipv4-header.h (module 'internet'): ns3::Ipv4Header::DscpType [enumeration] - module.add_enum('DscpType', ['DscpDefault', 'CS1', 'AF11', 'AF12', 'AF13', 'CS2', 'AF21', 'AF22', 'AF23', 'CS3', 'AF31', 'AF32', 'AF33', 'CS4', 'AF41', 'AF42', 'AF43', 'CS5', 'EF', 'CS6', 'CS7'], outer_class=root_module['ns3::Ipv4Header'], import_from_module='ns.internet') + module.add_enum('DscpType', ['DscpDefault', 'DSCP_CS1', 'DSCP_AF11', 'DSCP_AF12', 'DSCP_AF13', 'DSCP_CS2', 'DSCP_AF21', 'DSCP_AF22', 'DSCP_AF23', 'DSCP_CS3', 'DSCP_AF31', 'DSCP_AF32', 'DSCP_AF33', 'DSCP_CS4', 'DSCP_AF41', 'DSCP_AF42', 'DSCP_AF43', 'DSCP_CS5', 'DSCP_EF', 'DSCP_CS6', 'DSCP_CS7'], outer_class=root_module['ns3::Ipv4Header'], import_from_module='ns.internet') ## ipv4-header.h (module 'internet'): ns3::Ipv4Header::EcnType [enumeration] - module.add_enum('EcnType', ['NotECT', 'ECT1', 'ECT0', 'CE'], outer_class=root_module['ns3::Ipv4Header'], import_from_module='ns.internet') + module.add_enum('EcnType', ['ECN_NotECT', 'ECN_ECT1', 'ECN_ECT0', 'ECN_CE'], outer_class=root_module['ns3::Ipv4Header'], import_from_module='ns.internet') ## ipv6-header.h (module 'internet'): ns3::Ipv6Header [class] module.add_class('Ipv6Header', import_from_module='ns.internet', parent=root_module['ns3::Header']) ## ipv6-header.h (module 'internet'): ns3::Ipv6Header::NextHeader_e [enumeration] @@ -180,6 +192,8 @@ module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::CallbackImplBase', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::EventImpl', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] + module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Hash::Implementation', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Ipv4MulticastRoute', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] @@ -200,8 +214,14 @@ module.add_enum('SocketType', ['NS3_SOCK_STREAM', 'NS3_SOCK_SEQPACKET', 'NS3_SOCK_DGRAM', 'NS3_SOCK_RAW'], outer_class=root_module['ns3::Socket'], import_from_module='ns.network') ## socket.h (module 'network'): ns3::SocketAddressTag [class] module.add_class('SocketAddressTag', import_from_module='ns.network', parent=root_module['ns3::Tag']) + ## socket.h (module 'network'): ns3::SocketIpTosTag [class] + module.add_class('SocketIpTosTag', import_from_module='ns.network', parent=root_module['ns3::Tag']) ## socket.h (module 'network'): ns3::SocketIpTtlTag [class] module.add_class('SocketIpTtlTag', import_from_module='ns.network', parent=root_module['ns3::Tag']) + ## socket.h (module 'network'): ns3::SocketIpv6HopLimitTag [class] + module.add_class('SocketIpv6HopLimitTag', import_from_module='ns.network', parent=root_module['ns3::Tag']) + ## socket.h (module 'network'): ns3::SocketIpv6TclassTag [class] + module.add_class('SocketIpv6TclassTag', import_from_module='ns.network', parent=root_module['ns3::Tag']) ## socket.h (module 'network'): ns3::SocketSetDontFragmentTag [class] module.add_class('SocketSetDontFragmentTag', import_from_module='ns.network', parent=root_module['ns3::Tag']) ## nstime.h (module 'core'): ns3::Time [class] @@ -278,8 +298,6 @@ module.add_class('OutputStreamWrapper', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter >']) ## packet.h (module 'network'): ns3::Packet [class] module.add_class('Packet', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter >']) - ## nstime.h (module 'core'): ns3::TimeChecker [class] - module.add_class('TimeChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) ## nstime.h (module 'core'): ns3::TimeValue [class] module.add_class('TimeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) ## type-id.h (module 'core'): ns3::TypeIdChecker [class] @@ -305,11 +323,47 @@ nested_module = module.add_cpp_namespace('FatalImpl') register_types_ns3_FatalImpl(nested_module) + + ## Register a nested module for the namespace Hash + + nested_module = module.add_cpp_namespace('Hash') + register_types_ns3_Hash(nested_module) + def register_types_ns3_FatalImpl(module): root_module = module.get_root() +def register_types_ns3_Hash(module): + root_module = module.get_root() + + ## hash-function.h (module 'core'): ns3::Hash::Implementation [class] + module.add_class('Implementation', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash32Function_ptr') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash32Function_ptr*') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash32Function_ptr&') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash64Function_ptr') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash64Function_ptr*') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash64Function_ptr&') + + ## Register a nested module for the namespace Function + + nested_module = module.add_cpp_namespace('Function') + register_types_ns3_Hash_Function(nested_module) + + +def register_types_ns3_Hash_Function(module): + root_module = module.get_root() + + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a [class] + module.add_class('Fnv1a', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32 [class] + module.add_class('Hash32', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64 [class] + module.add_class('Hash64', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3 [class] + module.add_class('Murmur3', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + def register_methods(root_module): register_Ns3Address_methods(root_module, root_module['ns3::Address']) register_Ns3AttributeConstructionList_methods(root_module, root_module['ns3::AttributeConstructionList']) @@ -323,6 +377,9 @@ register_Ns3ByteTagListIteratorItem_methods(root_module, root_module['ns3::ByteTagList::Iterator::Item']) register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase']) register_Ns3EventId_methods(root_module, root_module['ns3::EventId']) + register_Ns3Hasher_methods(root_module, root_module['ns3::Hasher']) + register_Ns3Inet6SocketAddress_methods(root_module, root_module['ns3::Inet6SocketAddress']) + register_Ns3InetSocketAddress_methods(root_module, root_module['ns3::InetSocketAddress']) register_Ns3IntToType__0_methods(root_module, root_module['ns3::IntToType< 0 >']) register_Ns3IntToType__1_methods(root_module, root_module['ns3::IntToType< 1 >']) register_Ns3IntToType__2_methods(root_module, root_module['ns3::IntToType< 2 >']) @@ -370,6 +427,7 @@ register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter >']) + register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3Ipv4MulticastRoute_Ns3Empty_Ns3DefaultDeleter__lt__ns3Ipv4MulticastRoute__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Ipv4MulticastRoute, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3Ipv4Route_Ns3Empty_Ns3DefaultDeleter__lt__ns3Ipv4Route__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Ipv4Route, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3NixVector_Ns3Empty_Ns3DefaultDeleter__lt__ns3NixVector__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter >']) @@ -378,7 +436,10 @@ register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter >']) register_Ns3Socket_methods(root_module, root_module['ns3::Socket']) register_Ns3SocketAddressTag_methods(root_module, root_module['ns3::SocketAddressTag']) + register_Ns3SocketIpTosTag_methods(root_module, root_module['ns3::SocketIpTosTag']) register_Ns3SocketIpTtlTag_methods(root_module, root_module['ns3::SocketIpTtlTag']) + register_Ns3SocketIpv6HopLimitTag_methods(root_module, root_module['ns3::SocketIpv6HopLimitTag']) + register_Ns3SocketIpv6TclassTag_methods(root_module, root_module['ns3::SocketIpv6TclassTag']) register_Ns3SocketSetDontFragmentTag_methods(root_module, root_module['ns3::SocketSetDontFragmentTag']) register_Ns3Time_methods(root_module, root_module['ns3::Time']) register_Ns3TraceSourceAccessor_methods(root_module, root_module['ns3::TraceSourceAccessor']) @@ -413,13 +474,17 @@ register_Ns3ObjectFactoryValue_methods(root_module, root_module['ns3::ObjectFactoryValue']) register_Ns3OutputStreamWrapper_methods(root_module, root_module['ns3::OutputStreamWrapper']) register_Ns3Packet_methods(root_module, root_module['ns3::Packet']) - register_Ns3TimeChecker_methods(root_module, root_module['ns3::TimeChecker']) register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue']) register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker']) register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue']) register_Ns3AddressChecker_methods(root_module, root_module['ns3::AddressChecker']) register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue']) register_Ns3Ipv4ClickRouting_methods(root_module, root_module['ns3::Ipv4ClickRouting']) + register_Ns3HashImplementation_methods(root_module, root_module['ns3::Hash::Implementation']) + register_Ns3HashFunctionFnv1a_methods(root_module, root_module['ns3::Hash::Function::Fnv1a']) + register_Ns3HashFunctionHash32_methods(root_module, root_module['ns3::Hash::Function::Hash32']) + register_Ns3HashFunctionHash64_methods(root_module, root_module['ns3::Hash::Function::Hash64']) + register_Ns3HashFunctionMurmur3_methods(root_module, root_module['ns3::Hash::Function::Murmur3']) return def register_Ns3Address_methods(root_module, cls): @@ -945,6 +1010,121 @@ is_const=True) return +def register_Ns3Hasher_methods(root_module, cls): + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Hasher const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hasher const &', 'arg0')]) + ## hash.h (module 'core'): ns3::Hasher::Hasher() [constructor] + cls.add_constructor([]) + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Ptr hp) [constructor] + cls.add_constructor([param('ns3::Ptr< ns3::Hash::Implementation >', 'hp')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(std::string const s) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(std::string const s) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): ns3::Hasher & ns3::Hasher::clear() [member function] + cls.add_method('clear', + 'ns3::Hasher &', + []) + return + +def register_Ns3Inet6SocketAddress_methods(root_module, cls): + ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(ns3::Inet6SocketAddress const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Inet6SocketAddress const &', 'arg0')]) + ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(ns3::Ipv6Address ipv6, uint16_t port) [constructor] + cls.add_constructor([param('ns3::Ipv6Address', 'ipv6'), param('uint16_t', 'port')]) + ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(ns3::Ipv6Address ipv6) [constructor] + cls.add_constructor([param('ns3::Ipv6Address', 'ipv6')]) + ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(uint16_t port) [constructor] + cls.add_constructor([param('uint16_t', 'port')]) + ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(char const * ipv6, uint16_t port) [constructor] + cls.add_constructor([param('char const *', 'ipv6'), param('uint16_t', 'port')]) + ## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress::Inet6SocketAddress(char const * ipv6) [constructor] + cls.add_constructor([param('char const *', 'ipv6')]) + ## inet6-socket-address.h (module 'network'): static ns3::Inet6SocketAddress ns3::Inet6SocketAddress::ConvertFrom(ns3::Address const & addr) [member function] + cls.add_method('ConvertFrom', + 'ns3::Inet6SocketAddress', + [param('ns3::Address const &', 'addr')], + is_static=True) + ## inet6-socket-address.h (module 'network'): ns3::Ipv6Address ns3::Inet6SocketAddress::GetIpv6() const [member function] + cls.add_method('GetIpv6', + 'ns3::Ipv6Address', + [], + is_const=True) + ## inet6-socket-address.h (module 'network'): uint16_t ns3::Inet6SocketAddress::GetPort() const [member function] + cls.add_method('GetPort', + 'uint16_t', + [], + is_const=True) + ## inet6-socket-address.h (module 'network'): static bool ns3::Inet6SocketAddress::IsMatchingType(ns3::Address const & addr) [member function] + cls.add_method('IsMatchingType', + 'bool', + [param('ns3::Address const &', 'addr')], + is_static=True) + ## inet6-socket-address.h (module 'network'): void ns3::Inet6SocketAddress::SetIpv6(ns3::Ipv6Address ipv6) [member function] + cls.add_method('SetIpv6', + 'void', + [param('ns3::Ipv6Address', 'ipv6')]) + ## inet6-socket-address.h (module 'network'): void ns3::Inet6SocketAddress::SetPort(uint16_t port) [member function] + cls.add_method('SetPort', + 'void', + [param('uint16_t', 'port')]) + return + +def register_Ns3InetSocketAddress_methods(root_module, cls): + ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(ns3::InetSocketAddress const & arg0) [copy constructor] + cls.add_constructor([param('ns3::InetSocketAddress const &', 'arg0')]) + ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(ns3::Ipv4Address ipv4, uint16_t port) [constructor] + cls.add_constructor([param('ns3::Ipv4Address', 'ipv4'), param('uint16_t', 'port')]) + ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(ns3::Ipv4Address ipv4) [constructor] + cls.add_constructor([param('ns3::Ipv4Address', 'ipv4')]) + ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(uint16_t port) [constructor] + cls.add_constructor([param('uint16_t', 'port')]) + ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(char const * ipv4, uint16_t port) [constructor] + cls.add_constructor([param('char const *', 'ipv4'), param('uint16_t', 'port')]) + ## inet-socket-address.h (module 'network'): ns3::InetSocketAddress::InetSocketAddress(char const * ipv4) [constructor] + cls.add_constructor([param('char const *', 'ipv4')]) + ## inet-socket-address.h (module 'network'): static ns3::InetSocketAddress ns3::InetSocketAddress::ConvertFrom(ns3::Address const & address) [member function] + cls.add_method('ConvertFrom', + 'ns3::InetSocketAddress', + [param('ns3::Address const &', 'address')], + is_static=True) + ## inet-socket-address.h (module 'network'): ns3::Ipv4Address ns3::InetSocketAddress::GetIpv4() const [member function] + cls.add_method('GetIpv4', + 'ns3::Ipv4Address', + [], + is_const=True) + ## inet-socket-address.h (module 'network'): uint16_t ns3::InetSocketAddress::GetPort() const [member function] + cls.add_method('GetPort', + 'uint16_t', + [], + is_const=True) + ## inet-socket-address.h (module 'network'): static bool ns3::InetSocketAddress::IsMatchingType(ns3::Address const & address) [member function] + cls.add_method('IsMatchingType', + 'bool', + [param('ns3::Address const &', 'address')], + is_static=True) + ## inet-socket-address.h (module 'network'): void ns3::InetSocketAddress::SetIpv4(ns3::Ipv4Address address) [member function] + cls.add_method('SetIpv4', + 'void', + [param('ns3::Ipv4Address', 'address')]) + ## inet-socket-address.h (module 'network'): void ns3::InetSocketAddress::SetPort(uint16_t port) [member function] + cls.add_method('SetPort', + 'void', + [param('uint16_t', 'port')]) + return + def register_Ns3IntToType__0_methods(root_module, cls): ## int-to-type.h (module 'core'): ns3::IntToType<0>::IntToType() [constructor] cls.add_constructor([]) @@ -1320,6 +1500,11 @@ 'bool', [], is_const=True) + ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsDocumentation() const [member function] + cls.add_method('IsDocumentation', + 'bool', + [], + is_const=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6Address::IsEqual(ns3::Ipv6Address const & other) const [member function] cls.add_method('IsEqual', 'bool', @@ -1359,16 +1544,36 @@ 'bool', [], is_const=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac16Address addr, ns3::Ipv6Address prefix) [member function] + cls.add_method('MakeAutoconfiguredAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac16Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac48Address addr, ns3::Ipv6Address prefix) [member function] cls.add_method('MakeAutoconfiguredAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress(ns3::Mac64Address addr, ns3::Ipv6Address prefix) [member function] + cls.add_method('MakeAutoconfiguredAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac64Address', 'addr'), param('ns3::Ipv6Address', 'prefix')], + is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac16Address mac) [member function] + cls.add_method('MakeAutoconfiguredLinkLocalAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac16Address', 'mac')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac48Address mac) [member function] cls.add_method('MakeAutoconfiguredLinkLocalAddress', 'ns3::Ipv6Address', [param('ns3::Mac48Address', 'mac')], is_static=True) + ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(ns3::Mac64Address mac) [member function] + cls.add_method('MakeAutoconfiguredLinkLocalAddress', + 'ns3::Ipv6Address', + [param('ns3::Mac64Address', 'mac')], + is_static=True) ## ipv6-address.h (module 'network'): static ns3::Ipv6Address ns3::Ipv6Address::MakeIpv4MappedAddress(ns3::Ipv4Address addr) [member function] cls.add_method('MakeIpv4MappedAddress', 'ns3::Ipv6Address', @@ -1529,6 +1734,11 @@ cls.add_method('EnvVarCheck', 'void', [param('char const *', 'name')]) + ## log.h (module 'core'): std::string ns3::LogComponent::GetLevelLabel(ns3::LogLevel const level) const [member function] + cls.add_method('GetLevelLabel', + 'std::string', + [param('ns3::LogLevel const', 'level')], + is_const=True) ## log.h (module 'core'): bool ns3::LogComponent::IsEnabled(ns3::LogLevel level) const [member function] cls.add_method('IsEnabled', 'bool', @@ -1825,6 +2035,10 @@ cls.add_method('RemoveAll', 'void', []) + ## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Replace(ns3::Tag & tag) [member function] + cls.add_method('Replace', + 'bool', + [param('ns3::Tag &', 'tag')]) return def register_Ns3PacketTagListTagData_methods(root_module, cls): @@ -2191,6 +2405,11 @@ 'std::string', [], is_const=True) + ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetHash() const [member function] + cls.add_method('GetHash', + 'uint32_t', + [], + is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeId::GetName() const [member function] cls.add_method('GetName', 'std::string', @@ -2250,6 +2469,16 @@ 'bool', [param('std::string', 'name'), param('ns3::TypeId::AttributeInformation *', 'info', transfer_ownership=False)], is_const=True) + ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByHash(uint32_t hash) [member function] + cls.add_method('LookupByHash', + 'ns3::TypeId', + [param('uint32_t', 'hash')], + is_static=True) + ## type-id.h (module 'core'): static bool ns3::TypeId::LookupByHashFailSafe(uint32_t hash, ns3::TypeId * tid) [member function] + cls.add_method('LookupByHashFailSafe', + 'bool', + [param('uint32_t', 'hash'), param('ns3::TypeId *', 'tid')], + is_static=True) ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByName(std::string name) [member function] cls.add_method('LookupByName', 'ns3::TypeId', @@ -2784,8 +3013,8 @@ 'ns3::TypeId', [], is_static=True) - ## object.h (module 'core'): void ns3::Object::Start() [member function] - cls.add_method('Start', + ## object.h (module 'core'): void ns3::Object::Initialize() [member function] + cls.add_method('Initialize', 'void', []) ## object.h (module 'core'): ns3::Object::Object(ns3::Object const & o) [copy constructor] @@ -2796,8 +3025,8 @@ 'void', [], visibility='protected', is_virtual=True) - ## object.h (module 'core'): void ns3::Object::DoStart() [member function] - cls.add_method('DoStart', + ## object.h (module 'core'): void ns3::Object::DoInitialize() [member function] + cls.add_method('DoInitialize', 'void', [], visibility='protected', is_virtual=True) @@ -2884,6 +3113,18 @@ is_static=True) return +def register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter< ns3::Hash::Implementation > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + def register_Ns3SimpleRefCount__Ns3Ipv4MulticastRoute_Ns3Empty_Ns3DefaultDeleter__lt__ns3Ipv4MulticastRoute__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] cls.add_constructor([]) @@ -3010,6 +3251,26 @@ 'ns3::Socket::SocketErrno', [], is_pure_virtual=True, is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpTos() const [member function] + cls.add_method('GetIpTos', + 'uint8_t', + [], + is_const=True) + ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpTtl() const [member function] + cls.add_method('GetIpTtl', + 'uint8_t', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpv6HopLimit() const [member function] + cls.add_method('GetIpv6HopLimit', + 'uint8_t', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpv6Tclass() const [member function] + cls.add_method('GetIpv6Tclass', + 'uint8_t', + [], + is_const=True) ## socket.h (module 'network'): ns3::Ptr ns3::Socket::GetNode() const [member function] cls.add_method('GetNode', 'ns3::Ptr< ns3::Node >', @@ -3040,6 +3301,26 @@ 'ns3::TypeId', [], is_static=True) + ## socket.h (module 'network'): bool ns3::Socket::IsIpRecvTos() const [member function] + cls.add_method('IsIpRecvTos', + 'bool', + [], + is_const=True) + ## socket.h (module 'network'): bool ns3::Socket::IsIpRecvTtl() const [member function] + cls.add_method('IsIpRecvTtl', + 'bool', + [], + is_const=True) + ## socket.h (module 'network'): bool ns3::Socket::IsIpv6RecvHopLimit() const [member function] + cls.add_method('IsIpv6RecvHopLimit', + 'bool', + [], + is_const=True) + ## socket.h (module 'network'): bool ns3::Socket::IsIpv6RecvTclass() const [member function] + cls.add_method('IsIpv6RecvTclass', + 'bool', + [], + is_const=True) ## socket.h (module 'network'): bool ns3::Socket::IsRecvPktInfo() const [member function] cls.add_method('IsRecvPktInfo', 'bool', @@ -3119,6 +3400,40 @@ cls.add_method('SetDataSentCallback', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'dataSent')]) + ## socket.h (module 'network'): void ns3::Socket::SetIpRecvTos(bool ipv4RecvTos) [member function] + cls.add_method('SetIpRecvTos', + 'void', + [param('bool', 'ipv4RecvTos')]) + ## socket.h (module 'network'): void ns3::Socket::SetIpRecvTtl(bool ipv4RecvTtl) [member function] + cls.add_method('SetIpRecvTtl', + 'void', + [param('bool', 'ipv4RecvTtl')]) + ## socket.h (module 'network'): void ns3::Socket::SetIpTos(uint8_t ipTos) [member function] + cls.add_method('SetIpTos', + 'void', + [param('uint8_t', 'ipTos')]) + ## socket.h (module 'network'): void ns3::Socket::SetIpTtl(uint8_t ipTtl) [member function] + cls.add_method('SetIpTtl', + 'void', + [param('uint8_t', 'ipTtl')], + is_virtual=True) + ## socket.h (module 'network'): void ns3::Socket::SetIpv6HopLimit(uint8_t ipHopLimit) [member function] + cls.add_method('SetIpv6HopLimit', + 'void', + [param('uint8_t', 'ipHopLimit')], + is_virtual=True) + ## socket.h (module 'network'): void ns3::Socket::SetIpv6RecvHopLimit(bool ipv6RecvHopLimit) [member function] + cls.add_method('SetIpv6RecvHopLimit', + 'void', + [param('bool', 'ipv6RecvHopLimit')]) + ## socket.h (module 'network'): void ns3::Socket::SetIpv6RecvTclass(bool ipv6RecvTclass) [member function] + cls.add_method('SetIpv6RecvTclass', + 'void', + [param('bool', 'ipv6RecvTclass')]) + ## socket.h (module 'network'): void ns3::Socket::SetIpv6Tclass(int ipTclass) [member function] + cls.add_method('SetIpv6Tclass', + 'void', + [param('int', 'ipTclass')]) ## socket.h (module 'network'): void ns3::Socket::SetRecvCallback(ns3::Callback, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> arg0) [member function] cls.add_method('SetRecvCallback', 'void', @@ -3146,6 +3461,26 @@ 'void', [], visibility='protected', is_virtual=True) + ## socket.h (module 'network'): bool ns3::Socket::IsManualIpTos() const [member function] + cls.add_method('IsManualIpTos', + 'bool', + [], + is_const=True, visibility='protected') + ## socket.h (module 'network'): bool ns3::Socket::IsManualIpTtl() const [member function] + cls.add_method('IsManualIpTtl', + 'bool', + [], + is_const=True, visibility='protected') + ## socket.h (module 'network'): bool ns3::Socket::IsManualIpv6HopLimit() const [member function] + cls.add_method('IsManualIpv6HopLimit', + 'bool', + [], + is_const=True, visibility='protected') + ## socket.h (module 'network'): bool ns3::Socket::IsManualIpv6Tclass() const [member function] + cls.add_method('IsManualIpv6Tclass', + 'bool', + [], + is_const=True, visibility='protected') ## socket.h (module 'network'): void ns3::Socket::NotifyConnectionFailed() [member function] cls.add_method('NotifyConnectionFailed', 'void', @@ -3239,6 +3574,52 @@ [param('ns3::Address', 'addr')]) return +def register_Ns3SocketIpTosTag_methods(root_module, cls): + ## socket.h (module 'network'): ns3::SocketIpTosTag::SocketIpTosTag(ns3::SocketIpTosTag const & arg0) [copy constructor] + cls.add_constructor([param('ns3::SocketIpTosTag const &', 'arg0')]) + ## socket.h (module 'network'): ns3::SocketIpTosTag::SocketIpTosTag() [constructor] + cls.add_constructor([]) + ## socket.h (module 'network'): void ns3::SocketIpTosTag::Deserialize(ns3::TagBuffer i) [member function] + cls.add_method('Deserialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_virtual=True) + ## socket.h (module 'network'): ns3::TypeId ns3::SocketIpTosTag::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint32_t ns3::SocketIpTosTag::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint8_t ns3::SocketIpTosTag::GetTos() const [member function] + cls.add_method('GetTos', + 'uint8_t', + [], + is_const=True) + ## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpTosTag::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## socket.h (module 'network'): void ns3::SocketIpTosTag::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketIpTosTag::Serialize(ns3::TagBuffer i) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketIpTosTag::SetTos(uint8_t tos) [member function] + cls.add_method('SetTos', + 'void', + [param('uint8_t', 'tos')]) + return + def register_Ns3SocketIpTtlTag_methods(root_module, cls): ## socket.h (module 'network'): ns3::SocketIpTtlTag::SocketIpTtlTag(ns3::SocketIpTtlTag const & arg0) [copy constructor] cls.add_constructor([param('ns3::SocketIpTtlTag const &', 'arg0')]) @@ -3285,6 +3666,98 @@ [param('uint8_t', 'ttl')]) return +def register_Ns3SocketIpv6HopLimitTag_methods(root_module, cls): + ## socket.h (module 'network'): ns3::SocketIpv6HopLimitTag::SocketIpv6HopLimitTag(ns3::SocketIpv6HopLimitTag const & arg0) [copy constructor] + cls.add_constructor([param('ns3::SocketIpv6HopLimitTag const &', 'arg0')]) + ## socket.h (module 'network'): ns3::SocketIpv6HopLimitTag::SocketIpv6HopLimitTag() [constructor] + cls.add_constructor([]) + ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::Deserialize(ns3::TagBuffer i) [member function] + cls.add_method('Deserialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_virtual=True) + ## socket.h (module 'network'): uint8_t ns3::SocketIpv6HopLimitTag::GetHopLimit() const [member function] + cls.add_method('GetHopLimit', + 'uint8_t', + [], + is_const=True) + ## socket.h (module 'network'): ns3::TypeId ns3::SocketIpv6HopLimitTag::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint32_t ns3::SocketIpv6HopLimitTag::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpv6HopLimitTag::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::Serialize(ns3::TagBuffer i) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::SetHopLimit(uint8_t hopLimit) [member function] + cls.add_method('SetHopLimit', + 'void', + [param('uint8_t', 'hopLimit')]) + return + +def register_Ns3SocketIpv6TclassTag_methods(root_module, cls): + ## socket.h (module 'network'): ns3::SocketIpv6TclassTag::SocketIpv6TclassTag(ns3::SocketIpv6TclassTag const & arg0) [copy constructor] + cls.add_constructor([param('ns3::SocketIpv6TclassTag const &', 'arg0')]) + ## socket.h (module 'network'): ns3::SocketIpv6TclassTag::SocketIpv6TclassTag() [constructor] + cls.add_constructor([]) + ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::Deserialize(ns3::TagBuffer i) [member function] + cls.add_method('Deserialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_virtual=True) + ## socket.h (module 'network'): ns3::TypeId ns3::SocketIpv6TclassTag::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint32_t ns3::SocketIpv6TclassTag::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint8_t ns3::SocketIpv6TclassTag::GetTclass() const [member function] + cls.add_method('GetTclass', + 'uint8_t', + [], + is_const=True) + ## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpv6TclassTag::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::Serialize(ns3::TagBuffer i) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::SetTclass(uint8_t tclass) [member function] + cls.add_method('SetTclass', + 'void', + [param('uint8_t', 'tclass')]) + return + def register_Ns3SocketSetDontFragmentTag_methods(root_module, cls): ## socket.h (module 'network'): ns3::SocketSetDontFragmentTag::SocketSetDontFragmentTag(ns3::SocketSetDontFragmentTag const & arg0) [copy constructor] cls.add_constructor([param('ns3::SocketSetDontFragmentTag const &', 'arg0')]) @@ -3469,11 +3942,26 @@ 'bool', [], is_const=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Max() [member function] + cls.add_method('Max', + 'ns3::Time', + [], + is_static=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Min() [member function] + cls.add_method('Min', + 'ns3::Time', + [], + is_static=True) ## nstime.h (module 'core'): static void ns3::Time::SetResolution(ns3::Time::Unit resolution) [member function] cls.add_method('SetResolution', 'void', [param('ns3::Time::Unit', 'resolution')], is_static=True) + ## nstime.h (module 'core'): static bool ns3::Time::StaticInit() [member function] + cls.add_method('StaticInit', + 'bool', + [], + is_static=True) ## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function] cls.add_method('To', 'ns3::int64x64_t', @@ -3765,10 +4253,10 @@ 'ns3::IpL4Protocol::RxStatus', [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::Ipv4Interface >', 'incomingInterface')], is_pure_virtual=True, is_virtual=True) - ## ip-l4-protocol.h (module 'internet'): ns3::IpL4Protocol::RxStatus ns3::IpL4Protocol::Receive(ns3::Ptr p, ns3::Ipv6Address & src, ns3::Ipv6Address & dst, ns3::Ptr incomingInterface) [member function] + ## ip-l4-protocol.h (module 'internet'): ns3::IpL4Protocol::RxStatus ns3::IpL4Protocol::Receive(ns3::Ptr p, ns3::Ipv6Header const & header, ns3::Ptr incomingInterface) [member function] cls.add_method('Receive', 'ns3::IpL4Protocol::RxStatus', - [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv6Address &', 'src'), param('ns3::Ipv6Address &', 'dst'), param('ns3::Ptr< ns3::Ipv6Interface >', 'incomingInterface')], + [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv6Header const &', 'header'), param('ns3::Ptr< ns3::Ipv6Interface >', 'incomingInterface')], is_pure_virtual=True, is_virtual=True) ## ip-l4-protocol.h (module 'internet'): void ns3::IpL4Protocol::ReceiveIcmp(ns3::Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo, ns3::Ipv4Address payloadSource, ns3::Ipv4Address payloadDestination, uint8_t const * payload) [member function] cls.add_method('ReceiveIcmp', @@ -3807,6 +4295,16 @@ 'uint32_t', [param('ns3::Ptr< ns3::NetDevice >', 'device')], is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): ns3::Ptr ns3::Ipv4::CreateRawSocket() [member function] + cls.add_method('CreateRawSocket', + 'ns3::Ptr< ns3::Socket >', + [], + is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): void ns3::Ipv4::DeleteRawSocket(ns3::Ptr socket) [member function] + cls.add_method('DeleteRawSocket', + 'void', + [param('ns3::Ptr< ns3::Socket >', 'socket')], + is_pure_virtual=True, is_virtual=True) ## ipv4.h (module 'internet'): ns3::Ipv4InterfaceAddress ns3::Ipv4::GetAddress(uint32_t interface, uint32_t addressIndex) const [member function] cls.add_method('GetAddress', 'ns3::Ipv4InterfaceAddress', @@ -3852,6 +4350,11 @@ 'ns3::Ptr< ns3::NetDevice >', [param('uint32_t', 'interface')], is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): ns3::Ptr ns3::Ipv4::GetProtocol(int protocolNumber) const [member function] + cls.add_method('GetProtocol', + 'ns3::Ptr< ns3::IpL4Protocol >', + [param('int', 'protocolNumber')], + is_pure_virtual=True, is_const=True, is_virtual=True) ## ipv4.h (module 'internet'): ns3::Ptr ns3::Ipv4::GetRoutingProtocol() const [member function] cls.add_method('GetRoutingProtocol', 'ns3::Ptr< ns3::Ipv4RoutingProtocol >', @@ -3887,6 +4390,11 @@ 'bool', [param('uint32_t', 'interface'), param('uint32_t', 'addressIndex')], is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): bool ns3::Ipv4::RemoveAddress(uint32_t interface, ns3::Ipv4Address address) [member function] + cls.add_method('RemoveAddress', + 'bool', + [param('uint32_t', 'interface'), param('ns3::Ipv4Address', 'address')], + is_pure_virtual=True, is_virtual=True) ## ipv4.h (module 'internet'): ns3::Ipv4Address ns3::Ipv4::SelectSourceAddress(ns3::Ptr device, ns3::Ipv4Address dst, ns3::Ipv4InterfaceAddress::InterfaceAddressScope_e scope) [member function] cls.add_method('SelectSourceAddress', 'ns3::Ipv4Address', @@ -3897,6 +4405,11 @@ 'void', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'destination'), param('uint8_t', 'protocol'), param('ns3::Ptr< ns3::Ipv4Route >', 'route')], is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): void ns3::Ipv4::SendWithHeader(ns3::Ptr packet, ns3::Ipv4Header ipHeader, ns3::Ptr route) [member function] + cls.add_method('SendWithHeader', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Ipv4Header', 'ipHeader'), param('ns3::Ptr< ns3::Ipv4Route >', 'route')], + is_pure_virtual=True, is_virtual=True) ## ipv4.h (module 'internet'): void ns3::Ipv4::SetDown(uint32_t interface) [member function] cls.add_method('SetDown', 'void', @@ -4044,6 +4557,10 @@ cls.add_method('RemoveAddress', 'ns3::Ipv4InterfaceAddress', [param('uint32_t', 'index')]) + ## ipv4-interface.h (module 'internet'): ns3::Ipv4InterfaceAddress ns3::Ipv4Interface::RemoveAddress(ns3::Ipv4Address address) [member function] + cls.add_method('RemoveAddress', + 'ns3::Ipv4InterfaceAddress', + [param('ns3::Ipv4Address', 'address')]) ## ipv4-interface.h (module 'internet'): void ns3::Ipv4Interface::Send(ns3::Ptr p, ns3::Ipv4Address dest) [member function] cls.add_method('Send', 'void', @@ -4400,6 +4917,10 @@ cls.add_method('RemoveAddress', 'ns3::Ipv6InterfaceAddress', [param('uint32_t', 'index')]) + ## ipv6-interface.h (module 'internet'): ns3::Ipv6InterfaceAddress ns3::Ipv6Interface::RemoveAddress(ns3::Ipv6Address address) [member function] + cls.add_method('RemoveAddress', + 'ns3::Ipv6InterfaceAddress', + [param('ns3::Ipv6Address', 'address')]) ## ipv6-interface.h (module 'internet'): void ns3::Ipv6Interface::Send(ns3::Ptr p, ns3::Ipv6Address dest) [member function] cls.add_method('Send', 'void', @@ -4898,6 +5419,10 @@ cls.add_method('RemoveTrailer', 'uint32_t', [param('ns3::Trailer &', 'trailer')]) + ## packet.h (module 'network'): bool ns3::Packet::ReplacePacketTag(ns3::Tag & tag) [member function] + cls.add_method('ReplacePacketTag', + 'bool', + [param('ns3::Tag &', 'tag')]) ## packet.h (module 'network'): uint32_t ns3::Packet::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function] cls.add_method('Serialize', 'uint32_t', @@ -4909,13 +5434,6 @@ [param('ns3::Ptr< ns3::NixVector >', 'arg0')]) return -def register_Ns3TimeChecker_methods(root_module, cls): - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker() [constructor] - cls.add_constructor([]) - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker(ns3::TimeChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TimeChecker const &', 'arg0')]) - return - def register_Ns3TimeValue_methods(root_module, cls): ## nstime.h (module 'core'): ns3::TimeValue::TimeValue() [constructor] cls.add_constructor([]) @@ -5036,14 +5554,127 @@ cls.add_constructor([param('ns3::Ipv4ClickRouting const &', 'arg0')]) return +def register_Ns3HashImplementation_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation(ns3::Hash::Implementation const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Implementation const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation() [constructor] + cls.add_constructor([]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Implementation::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_pure_virtual=True, is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Implementation::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Implementation::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + return + +def register_Ns3HashFunctionFnv1a_methods(root_module, cls): + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a(ns3::Hash::Function::Fnv1a const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Fnv1a const &', 'arg0')]) + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a() [constructor] + cls.add_constructor([]) + ## hash-fnv.h (module 'core'): uint32_t ns3::Hash::Function::Fnv1a::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): uint64_t ns3::Hash::Function::Fnv1a::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): void ns3::Hash::Function::Fnv1a::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash32_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Function::Hash32 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash32 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Hash32Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash32Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash32::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash32::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash64_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Function::Hash64 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash64 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Hash64Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash64Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash64::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Function::Hash64::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash64::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionMurmur3_methods(root_module, cls): + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3(ns3::Hash::Function::Murmur3 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Murmur3 const &', 'arg0')]) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3() [constructor] + cls.add_constructor([]) + ## hash-murmur3.h (module 'core'): uint32_t ns3::Hash::Function::Murmur3::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): uint64_t ns3::Hash::Function::Murmur3::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): void ns3::Hash::Function::Murmur3::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + def register_functions(root_module): module = root_module register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) + register_functions_ns3_Hash(module.get_submodule('Hash'), root_module) return def register_functions_ns3_FatalImpl(module, root_module): return +def register_functions_ns3_Hash(module, root_module): + register_functions_ns3_Hash_Function(module.get_submodule('Function'), root_module) + return + +def register_functions_ns3_Hash_Function(module, root_module): + return + def main(): out = FileCodeSink(sys.stdout) root_module = module_init() diff -Naur ns-3.17/src/click/model/ipv4-click-routing.cc ns-3.18/src/click/model/ipv4-click-routing.cc --- ns-3.17/src/click/model/ipv4-click-routing.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/click/model/ipv4-click-routing.cc 2013-10-26 07:07:30.539364406 -0700 @@ -506,6 +506,7 @@ } else { + /** \todo Implement IP aliasing and Click */ NS_FATAL_ERROR ("XXX Not implemented yet: IP aliasing and Click"); } rtentry->SetSource (ifAddr.GetLocal ()); diff -Naur ns-3.17/src/click/model/ipv4-l3-click-protocol.cc ns-3.18/src/click/model/ipv4-l3-click-protocol.cc --- ns-3.17/src/click/model/ipv4-l3-click-protocol.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/click/model/ipv4-l3-click-protocol.cc 2013-10-26 07:07:30.539364406 -0700 @@ -434,6 +434,29 @@ return false; } +bool +Ipv4L3ClickProtocol::RemoveAddress (uint32_t i, Ipv4Address address) +{ + NS_LOG_FUNCTION (this << i << address); + + if (address == Ipv4Address::GetLoopback()) + { + NS_LOG_WARN ("Cannot remove loopback address."); + return false; + } + Ptr interface = GetInterface (i); + Ipv4InterfaceAddress ifAddr = interface->RemoveAddress (address); + if (ifAddr != Ipv4InterfaceAddress ()) + { + if (m_routingProtocol != 0) + { + m_routingProtocol->NotifyRemoveAddress (i, ifAddr); + } + return true; + } + return false; +} + Ipv4Address Ipv4L3ClickProtocol::SelectSourceAddress (Ptr device, Ipv4Address dst, Ipv4InterfaceAddress::InterfaceAddressScope_e scope) @@ -609,9 +632,9 @@ return index; } -// XXX when should we set ip_id? check whether we are incrementing -// m_identification on packets that may later be dropped in this stack -// and whether that deviates from Linux +/// \todo when should we set ip_id? check whether we are incrementing +/// m_identification on packets that may later be dropped in this stack +/// and whether that deviates from Linux Ipv4Header Ipv4L3ClickProtocol::BuildHeader ( Ipv4Address source, diff -Naur ns-3.17/src/click/model/ipv4-l3-click-protocol.h ns-3.18/src/click/model/ipv4-l3-click-protocol.h --- ns-3.17/src/click/model/ipv4-l3-click-protocol.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/click/model/ipv4-l3-click-protocol.h 2013-10-26 07:07:30.539364406 -0700 @@ -215,6 +215,7 @@ Ipv4InterfaceAddress GetAddress (uint32_t interfaceIndex, uint32_t addressIndex) const; uint32_t GetNAddresses (uint32_t interface) const; bool RemoveAddress (uint32_t interfaceIndex, uint32_t addressIndex); + bool RemoveAddress (uint32_t interfaceIndex, Ipv4Address address); Ipv4Address SelectSourceAddress (Ptr device, Ipv4Address dst, Ipv4InterfaceAddress::InterfaceAddressScope_e scope); diff -Naur ns-3.17/src/config-store/bindings/modulegen__gcc_ILP32.py ns-3.18/src/config-store/bindings/modulegen__gcc_ILP32.py --- ns-3.17/src/config-store/bindings/modulegen__gcc_ILP32.py 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/config-store/bindings/modulegen__gcc_ILP32.py 2013-10-26 07:07:30.551364406 -0700 @@ -26,6 +26,8 @@ module.add_class('FileConfig', allow_subclassing=True) ## gtk-config-store.h (module 'config-store'): ns3::GtkConfigStore [class] module.add_class('GtkConfigStore') + ## hash.h (module 'core'): ns3::Hasher [class] + module.add_class('Hasher', import_from_module='ns.core') ## file-config.h (module 'config-store'): ns3::NoneFileConfig [class] module.add_class('NoneFileConfig', parent=root_module['ns3::FileConfig']) ## object-base.h (module 'core'): ns3::ObjectBase [class] @@ -54,6 +56,8 @@ module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeValue', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::CallbackImplBase', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] + module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Hash::Implementation', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::TraceSourceAccessor', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## trace-source-accessor.h (module 'core'): ns3::TraceSourceAccessor [class] @@ -82,15 +86,52 @@ nested_module = module.add_cpp_namespace('FatalImpl') register_types_ns3_FatalImpl(nested_module) + + ## Register a nested module for the namespace Hash + + nested_module = module.add_cpp_namespace('Hash') + register_types_ns3_Hash(nested_module) + def register_types_ns3_FatalImpl(module): root_module = module.get_root() +def register_types_ns3_Hash(module): + root_module = module.get_root() + + ## hash-function.h (module 'core'): ns3::Hash::Implementation [class] + module.add_class('Implementation', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash32Function_ptr') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash32Function_ptr*') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash32Function_ptr&') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash64Function_ptr') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash64Function_ptr*') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash64Function_ptr&') + + ## Register a nested module for the namespace Function + + nested_module = module.add_cpp_namespace('Function') + register_types_ns3_Hash_Function(nested_module) + + +def register_types_ns3_Hash_Function(module): + root_module = module.get_root() + + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a [class] + module.add_class('Fnv1a', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32 [class] + module.add_class('Hash32', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64 [class] + module.add_class('Hash64', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3 [class] + module.add_class('Murmur3', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + def register_methods(root_module): register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase']) register_Ns3FileConfig_methods(root_module, root_module['ns3::FileConfig']) register_Ns3GtkConfigStore_methods(root_module, root_module['ns3::GtkConfigStore']) + register_Ns3Hasher_methods(root_module, root_module['ns3::Hasher']) register_Ns3NoneFileConfig_methods(root_module, root_module['ns3::NoneFileConfig']) register_Ns3ObjectBase_methods(root_module, root_module['ns3::ObjectBase']) register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId']) @@ -102,6 +143,7 @@ register_Ns3SimpleRefCount__Ns3AttributeChecker_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeChecker__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter >']) + register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter >']) register_Ns3TraceSourceAccessor_methods(root_module, root_module['ns3::TraceSourceAccessor']) register_Ns3AttributeAccessor_methods(root_module, root_module['ns3::AttributeAccessor']) @@ -113,6 +155,11 @@ register_Ns3EmptyAttributeValue_methods(root_module, root_module['ns3::EmptyAttributeValue']) register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker']) register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue']) + register_Ns3HashImplementation_methods(root_module, root_module['ns3::Hash::Implementation']) + register_Ns3HashFunctionFnv1a_methods(root_module, root_module['ns3::Hash::Function::Fnv1a']) + register_Ns3HashFunctionHash32_methods(root_module, root_module['ns3::Hash::Function::Hash32']) + register_Ns3HashFunctionHash64_methods(root_module, root_module['ns3::Hash::Function::Hash64']) + register_Ns3HashFunctionMurmur3_methods(root_module, root_module['ns3::Hash::Function::Murmur3']) return def register_Ns3CallbackBase_methods(root_module, cls): @@ -177,6 +224,35 @@ []) return +def register_Ns3Hasher_methods(root_module, cls): + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Hasher const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hasher const &', 'arg0')]) + ## hash.h (module 'core'): ns3::Hasher::Hasher() [constructor] + cls.add_constructor([]) + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Ptr hp) [constructor] + cls.add_constructor([param('ns3::Ptr< ns3::Hash::Implementation >', 'hp')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(std::string const s) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(std::string const s) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): ns3::Hasher & ns3::Hasher::clear() [member function] + cls.add_method('clear', + 'ns3::Hasher &', + []) + return + def register_Ns3NoneFileConfig_methods(root_module, cls): ## file-config.h (module 'config-store'): ns3::NoneFileConfig::NoneFileConfig(ns3::NoneFileConfig const & arg0) [copy constructor] cls.add_constructor([param('ns3::NoneFileConfig const &', 'arg0')]) @@ -313,6 +389,11 @@ 'std::string', [], is_const=True) + ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetHash() const [member function] + cls.add_method('GetHash', + 'uint32_t', + [], + is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeId::GetName() const [member function] cls.add_method('GetName', 'std::string', @@ -372,6 +453,16 @@ 'bool', [param('std::string', 'name'), param('ns3::TypeId::AttributeInformation *', 'info', transfer_ownership=False)], is_const=True) + ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByHash(uint32_t hash) [member function] + cls.add_method('LookupByHash', + 'ns3::TypeId', + [param('uint32_t', 'hash')], + is_static=True) + ## type-id.h (module 'core'): static bool ns3::TypeId::LookupByHashFailSafe(uint32_t hash, ns3::TypeId * tid) [member function] + cls.add_method('LookupByHashFailSafe', + 'bool', + [param('uint32_t', 'hash'), param('ns3::TypeId *', 'tid')], + is_static=True) ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByName(std::string name) [member function] cls.add_method('LookupByName', 'ns3::TypeId', @@ -531,6 +622,18 @@ is_static=True) return +def register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter< ns3::Hash::Implementation > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + def register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] cls.add_constructor([]) @@ -770,14 +873,127 @@ [param('ns3::TypeId const &', 'value')]) return +def register_Ns3HashImplementation_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation(ns3::Hash::Implementation const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Implementation const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation() [constructor] + cls.add_constructor([]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Implementation::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_pure_virtual=True, is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Implementation::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Implementation::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + return + +def register_Ns3HashFunctionFnv1a_methods(root_module, cls): + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a(ns3::Hash::Function::Fnv1a const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Fnv1a const &', 'arg0')]) + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a() [constructor] + cls.add_constructor([]) + ## hash-fnv.h (module 'core'): uint32_t ns3::Hash::Function::Fnv1a::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): uint64_t ns3::Hash::Function::Fnv1a::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): void ns3::Hash::Function::Fnv1a::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash32_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Function::Hash32 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash32 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Hash32Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash32Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash32::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash32::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash64_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Function::Hash64 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash64 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Hash64Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash64Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash64::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Function::Hash64::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash64::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionMurmur3_methods(root_module, cls): + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3(ns3::Hash::Function::Murmur3 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Murmur3 const &', 'arg0')]) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3() [constructor] + cls.add_constructor([]) + ## hash-murmur3.h (module 'core'): uint32_t ns3::Hash::Function::Murmur3::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): uint64_t ns3::Hash::Function::Murmur3::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): void ns3::Hash::Function::Murmur3::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + def register_functions(root_module): module = root_module register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) + register_functions_ns3_Hash(module.get_submodule('Hash'), root_module) return def register_functions_ns3_FatalImpl(module, root_module): return +def register_functions_ns3_Hash(module, root_module): + register_functions_ns3_Hash_Function(module.get_submodule('Function'), root_module) + return + +def register_functions_ns3_Hash_Function(module, root_module): + return + def main(): out = FileCodeSink(sys.stdout) root_module = module_init() diff -Naur ns-3.17/src/config-store/bindings/modulegen__gcc_LP64.py ns-3.18/src/config-store/bindings/modulegen__gcc_LP64.py --- ns-3.17/src/config-store/bindings/modulegen__gcc_LP64.py 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/config-store/bindings/modulegen__gcc_LP64.py 2013-10-26 07:07:30.551364406 -0700 @@ -26,6 +26,8 @@ module.add_class('FileConfig', allow_subclassing=True) ## gtk-config-store.h (module 'config-store'): ns3::GtkConfigStore [class] module.add_class('GtkConfigStore') + ## hash.h (module 'core'): ns3::Hasher [class] + module.add_class('Hasher', import_from_module='ns.core') ## file-config.h (module 'config-store'): ns3::NoneFileConfig [class] module.add_class('NoneFileConfig', parent=root_module['ns3::FileConfig']) ## object-base.h (module 'core'): ns3::ObjectBase [class] @@ -54,6 +56,8 @@ module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeValue', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::CallbackImplBase', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] + module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Hash::Implementation', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::TraceSourceAccessor', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## trace-source-accessor.h (module 'core'): ns3::TraceSourceAccessor [class] @@ -82,15 +86,52 @@ nested_module = module.add_cpp_namespace('FatalImpl') register_types_ns3_FatalImpl(nested_module) + + ## Register a nested module for the namespace Hash + + nested_module = module.add_cpp_namespace('Hash') + register_types_ns3_Hash(nested_module) + def register_types_ns3_FatalImpl(module): root_module = module.get_root() +def register_types_ns3_Hash(module): + root_module = module.get_root() + + ## hash-function.h (module 'core'): ns3::Hash::Implementation [class] + module.add_class('Implementation', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash32Function_ptr') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash32Function_ptr*') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash32Function_ptr&') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash64Function_ptr') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash64Function_ptr*') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash64Function_ptr&') + + ## Register a nested module for the namespace Function + + nested_module = module.add_cpp_namespace('Function') + register_types_ns3_Hash_Function(nested_module) + + +def register_types_ns3_Hash_Function(module): + root_module = module.get_root() + + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a [class] + module.add_class('Fnv1a', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32 [class] + module.add_class('Hash32', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64 [class] + module.add_class('Hash64', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3 [class] + module.add_class('Murmur3', import_from_module='ns.core', parent=root_module['ns3::Hash::Implementation']) + def register_methods(root_module): register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase']) register_Ns3FileConfig_methods(root_module, root_module['ns3::FileConfig']) register_Ns3GtkConfigStore_methods(root_module, root_module['ns3::GtkConfigStore']) + register_Ns3Hasher_methods(root_module, root_module['ns3::Hasher']) register_Ns3NoneFileConfig_methods(root_module, root_module['ns3::NoneFileConfig']) register_Ns3ObjectBase_methods(root_module, root_module['ns3::ObjectBase']) register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId']) @@ -102,6 +143,7 @@ register_Ns3SimpleRefCount__Ns3AttributeChecker_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeChecker__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter >']) + register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter >']) register_Ns3TraceSourceAccessor_methods(root_module, root_module['ns3::TraceSourceAccessor']) register_Ns3AttributeAccessor_methods(root_module, root_module['ns3::AttributeAccessor']) @@ -113,6 +155,11 @@ register_Ns3EmptyAttributeValue_methods(root_module, root_module['ns3::EmptyAttributeValue']) register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker']) register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue']) + register_Ns3HashImplementation_methods(root_module, root_module['ns3::Hash::Implementation']) + register_Ns3HashFunctionFnv1a_methods(root_module, root_module['ns3::Hash::Function::Fnv1a']) + register_Ns3HashFunctionHash32_methods(root_module, root_module['ns3::Hash::Function::Hash32']) + register_Ns3HashFunctionHash64_methods(root_module, root_module['ns3::Hash::Function::Hash64']) + register_Ns3HashFunctionMurmur3_methods(root_module, root_module['ns3::Hash::Function::Murmur3']) return def register_Ns3CallbackBase_methods(root_module, cls): @@ -177,6 +224,35 @@ []) return +def register_Ns3Hasher_methods(root_module, cls): + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Hasher const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hasher const &', 'arg0')]) + ## hash.h (module 'core'): ns3::Hasher::Hasher() [constructor] + cls.add_constructor([]) + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Ptr hp) [constructor] + cls.add_constructor([param('ns3::Ptr< ns3::Hash::Implementation >', 'hp')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(std::string const s) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(std::string const s) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): ns3::Hasher & ns3::Hasher::clear() [member function] + cls.add_method('clear', + 'ns3::Hasher &', + []) + return + def register_Ns3NoneFileConfig_methods(root_module, cls): ## file-config.h (module 'config-store'): ns3::NoneFileConfig::NoneFileConfig(ns3::NoneFileConfig const & arg0) [copy constructor] cls.add_constructor([param('ns3::NoneFileConfig const &', 'arg0')]) @@ -313,6 +389,11 @@ 'std::string', [], is_const=True) + ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetHash() const [member function] + cls.add_method('GetHash', + 'uint32_t', + [], + is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeId::GetName() const [member function] cls.add_method('GetName', 'std::string', @@ -372,6 +453,16 @@ 'bool', [param('std::string', 'name'), param('ns3::TypeId::AttributeInformation *', 'info', transfer_ownership=False)], is_const=True) + ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByHash(uint32_t hash) [member function] + cls.add_method('LookupByHash', + 'ns3::TypeId', + [param('uint32_t', 'hash')], + is_static=True) + ## type-id.h (module 'core'): static bool ns3::TypeId::LookupByHashFailSafe(uint32_t hash, ns3::TypeId * tid) [member function] + cls.add_method('LookupByHashFailSafe', + 'bool', + [param('uint32_t', 'hash'), param('ns3::TypeId *', 'tid')], + is_static=True) ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByName(std::string name) [member function] cls.add_method('LookupByName', 'ns3::TypeId', @@ -531,6 +622,18 @@ is_static=True) return +def register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter< ns3::Hash::Implementation > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + def register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] cls.add_constructor([]) @@ -770,14 +873,127 @@ [param('ns3::TypeId const &', 'value')]) return +def register_Ns3HashImplementation_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation(ns3::Hash::Implementation const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Implementation const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation() [constructor] + cls.add_constructor([]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Implementation::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_pure_virtual=True, is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Implementation::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Implementation::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + return + +def register_Ns3HashFunctionFnv1a_methods(root_module, cls): + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a(ns3::Hash::Function::Fnv1a const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Fnv1a const &', 'arg0')]) + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a() [constructor] + cls.add_constructor([]) + ## hash-fnv.h (module 'core'): uint32_t ns3::Hash::Function::Fnv1a::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): uint64_t ns3::Hash::Function::Fnv1a::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): void ns3::Hash::Function::Fnv1a::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash32_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Function::Hash32 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash32 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Hash32Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash32Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash32::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash32::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash64_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Function::Hash64 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash64 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Hash64Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash64Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash64::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Function::Hash64::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash64::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionMurmur3_methods(root_module, cls): + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3(ns3::Hash::Function::Murmur3 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Murmur3 const &', 'arg0')]) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3() [constructor] + cls.add_constructor([]) + ## hash-murmur3.h (module 'core'): uint32_t ns3::Hash::Function::Murmur3::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): uint64_t ns3::Hash::Function::Murmur3::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): void ns3::Hash::Function::Murmur3::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + def register_functions(root_module): module = root_module register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) + register_functions_ns3_Hash(module.get_submodule('Hash'), root_module) return def register_functions_ns3_FatalImpl(module, root_module): return +def register_functions_ns3_Hash(module, root_module): + register_functions_ns3_Hash_Function(module.get_submodule('Function'), root_module) + return + +def register_functions_ns3_Hash_Function(module, root_module): + return + def main(): out = FileCodeSink(sys.stdout) root_module = module_init() diff -Naur ns-3.17/src/core/bindings/modulegen__gcc_ILP32.py ns-3.18/src/core/bindings/modulegen__gcc_ILP32.py --- ns-3.17/src/core/bindings/modulegen__gcc_ILP32.py 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/core/bindings/modulegen__gcc_ILP32.py 2013-10-26 07:07:30.055364394 -0700 @@ -32,10 +32,14 @@ module.add_class('CommandLine', allow_subclassing=True) ## system-mutex.h (module 'core'): ns3::CriticalSection [class] module.add_class('CriticalSection') + ## event-garbage-collector.h (module 'core'): ns3::EventGarbageCollector [class] + module.add_class('EventGarbageCollector') ## event-id.h (module 'core'): ns3::EventId [class] module.add_class('EventId') ## global-value.h (module 'core'): ns3::GlobalValue [class] module.add_class('GlobalValue') + ## hash.h (module 'core'): ns3::Hasher [class] + module.add_class('Hasher') ## int-to-type.h (module 'core'): ns3::IntToType<0> [struct] module.add_class('IntToType', template_parameters=['0']) ## int-to-type.h (module 'core'): ns3::IntToType<0>::v_e [enumeration] @@ -76,6 +80,8 @@ module.add_class('ObjectFactory') ## random-variable.h (module 'core'): ns3::RandomVariable [class] module.add_class('RandomVariable') + ## random-variable-stream-helper.h (module 'core'): ns3::RandomVariableStreamHelper [class] + module.add_class('RandomVariableStreamHelper') ## rng-seed-manager.h (module 'core'): ns3::RngSeedManager [class] module.add_class('RngSeedManager') ## rng-stream.h (module 'core'): ns3::RngStream [class] @@ -174,6 +180,8 @@ module.add_class('SimpleRefCount', automatic_type_narrowing=True, template_parameters=['ns3::EventImpl', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, template_parameters=['ns3::FdReader', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] + module.add_class('SimpleRefCount', automatic_type_narrowing=True, template_parameters=['ns3::Hash::Implementation', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, template_parameters=['ns3::RefCountBase', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] @@ -292,8 +300,6 @@ module.add_class('StringChecker', parent=root_module['ns3::AttributeChecker']) ## string.h (module 'core'): ns3::StringValue [class] module.add_class('StringValue', parent=root_module['ns3::AttributeValue']) - ## nstime.h (module 'core'): ns3::TimeChecker [class] - module.add_class('TimeChecker', parent=root_module['ns3::AttributeChecker']) ## nstime.h (module 'core'): ns3::TimeValue [class] module.add_class('TimeValue', parent=root_module['ns3::AttributeValue']) ## type-id.h (module 'core'): ns3::TypeIdChecker [class] @@ -310,6 +316,10 @@ module.add_class('Vector3DChecker', parent=root_module['ns3::AttributeChecker']) ## vector.h (module 'core'): ns3::Vector3DValue [class] module.add_class('Vector3DValue', parent=root_module['ns3::AttributeValue']) + typehandlers.add_type_alias('ns3::Vector3D', 'ns3::Vector') + typehandlers.add_type_alias('ns3::Vector3D*', 'ns3::Vector*') + typehandlers.add_type_alias('ns3::Vector3D&', 'ns3::Vector&') + module.add_typedef(root_module['ns3::Vector3D'], 'Vector') typehandlers.add_type_alias('ns3::ObjectPtrContainerValue', 'ns3::ObjectVectorValue') typehandlers.add_type_alias('ns3::ObjectPtrContainerValue*', 'ns3::ObjectVectorValue*') typehandlers.add_type_alias('ns3::ObjectPtrContainerValue&', 'ns3::ObjectVectorValue&') @@ -324,10 +334,6 @@ typehandlers.add_type_alias('void ( * ) ( std::ostream & ) *', 'ns3::LogNodePrinter') typehandlers.add_type_alias('void ( * ) ( std::ostream & ) **', 'ns3::LogNodePrinter*') typehandlers.add_type_alias('void ( * ) ( std::ostream & ) *&', 'ns3::LogNodePrinter&') - typehandlers.add_type_alias('ns3::Vector3D', 'ns3::Vector') - typehandlers.add_type_alias('ns3::Vector3D*', 'ns3::Vector*') - typehandlers.add_type_alias('ns3::Vector3D&', 'ns3::Vector&') - module.add_typedef(root_module['ns3::Vector3D'], 'Vector') typehandlers.add_type_alias('ns3::Vector3DValue', 'ns3::VectorValue') typehandlers.add_type_alias('ns3::Vector3DValue*', 'ns3::VectorValue*') typehandlers.add_type_alias('ns3::Vector3DValue&', 'ns3::VectorValue&') @@ -341,6 +347,12 @@ typehandlers.add_type_alias('ns3::Vector3DChecker&', 'ns3::VectorChecker&') module.add_typedef(root_module['ns3::Vector3DChecker'], 'VectorChecker') + ## Register a nested module for the namespace CommandLineHelper + + nested_module = module.add_cpp_namespace('CommandLineHelper') + register_types_ns3_CommandLineHelper(nested_module) + + ## Register a nested module for the namespace Config nested_module = module.add_cpp_namespace('Config') @@ -353,6 +365,12 @@ register_types_ns3_FatalImpl(nested_module) + ## Register a nested module for the namespace Hash + + nested_module = module.add_cpp_namespace('Hash') + register_types_ns3_Hash(nested_module) + + ## Register a nested module for the namespace SystemPath nested_module = module.add_cpp_namespace('SystemPath') @@ -365,6 +383,10 @@ register_types_ns3_internal(nested_module) +def register_types_ns3_CommandLineHelper(module): + root_module = module.get_root() + + def register_types_ns3_Config(module): root_module = module.get_root() @@ -377,6 +399,36 @@ root_module = module.get_root() +def register_types_ns3_Hash(module): + root_module = module.get_root() + + ## hash-function.h (module 'core'): ns3::Hash::Implementation [class] + module.add_class('Implementation', parent=root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash32Function_ptr') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash32Function_ptr*') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash32Function_ptr&') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash64Function_ptr') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash64Function_ptr*') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash64Function_ptr&') + + ## Register a nested module for the namespace Function + + nested_module = module.add_cpp_namespace('Function') + register_types_ns3_Hash_Function(nested_module) + + +def register_types_ns3_Hash_Function(module): + root_module = module.get_root() + + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a [class] + module.add_class('Fnv1a', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32 [class] + module.add_class('Hash32', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64 [class] + module.add_class('Hash64', parent=root_module['ns3::Hash::Implementation']) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3 [class] + module.add_class('Murmur3', parent=root_module['ns3::Hash::Implementation']) + def register_types_ns3_SystemPath(module): root_module = module.get_root() @@ -392,8 +444,10 @@ register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase']) register_Ns3CommandLine_methods(root_module, root_module['ns3::CommandLine']) register_Ns3CriticalSection_methods(root_module, root_module['ns3::CriticalSection']) + register_Ns3EventGarbageCollector_methods(root_module, root_module['ns3::EventGarbageCollector']) register_Ns3EventId_methods(root_module, root_module['ns3::EventId']) register_Ns3GlobalValue_methods(root_module, root_module['ns3::GlobalValue']) + register_Ns3Hasher_methods(root_module, root_module['ns3::Hasher']) register_Ns3IntToType__0_methods(root_module, root_module['ns3::IntToType< 0 >']) register_Ns3IntToType__1_methods(root_module, root_module['ns3::IntToType< 1 >']) register_Ns3IntToType__2_methods(root_module, root_module['ns3::IntToType< 2 >']) @@ -407,6 +461,7 @@ register_Ns3ObjectDeleter_methods(root_module, root_module['ns3::ObjectDeleter']) register_Ns3ObjectFactory_methods(root_module, root_module['ns3::ObjectFactory']) register_Ns3RandomVariable_methods(root_module, root_module['ns3::RandomVariable']) + register_Ns3RandomVariableStreamHelper_methods(root_module, root_module['ns3::RandomVariableStreamHelper']) register_Ns3RngSeedManager_methods(root_module, root_module['ns3::RngSeedManager']) register_Ns3RngStream_methods(root_module, root_module['ns3::RngStream']) register_Ns3SequentialVariable_methods(root_module, root_module['ns3::SequentialVariable']) @@ -453,6 +508,7 @@ register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3FdReader_Ns3Empty_Ns3DefaultDeleter__lt__ns3FdReader__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::FdReader, ns3::empty, ns3::DefaultDeleter >']) + register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3RefCountBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3RefCountBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::RefCountBase, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3SystemThread_Ns3Empty_Ns3DefaultDeleter__lt__ns3SystemThread__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::SystemThread, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter >']) @@ -509,7 +565,6 @@ register_Ns3RefCountBase_methods(root_module, root_module['ns3::RefCountBase']) register_Ns3StringChecker_methods(root_module, root_module['ns3::StringChecker']) register_Ns3StringValue_methods(root_module, root_module['ns3::StringValue']) - register_Ns3TimeChecker_methods(root_module, root_module['ns3::TimeChecker']) register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue']) register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker']) register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue']) @@ -519,6 +574,11 @@ register_Ns3Vector3DChecker_methods(root_module, root_module['ns3::Vector3DChecker']) register_Ns3Vector3DValue_methods(root_module, root_module['ns3::Vector3DValue']) register_Ns3ConfigMatchContainer_methods(root_module, root_module['ns3::Config::MatchContainer']) + register_Ns3HashImplementation_methods(root_module, root_module['ns3::Hash::Implementation']) + register_Ns3HashFunctionFnv1a_methods(root_module, root_module['ns3::Hash::Function::Fnv1a']) + register_Ns3HashFunctionHash32_methods(root_module, root_module['ns3::Hash::Function::Hash32']) + register_Ns3HashFunctionHash64_methods(root_module, root_module['ns3::Hash::Function::Hash64']) + register_Ns3HashFunctionMurmur3_methods(root_module, root_module['ns3::Hash::Function::Murmur3']) return def register_Ns3AttributeConstructionList_methods(root_module, cls): @@ -589,6 +649,24 @@ cls.add_method('AddValue', 'void', [param('std::string const &', 'name'), param('std::string const &', 'help'), param('ns3::Callback< bool, std::string, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) + ## command-line.h (module 'core'): std::string ns3::CommandLine::GetName() const [member function] + cls.add_method('GetName', + 'std::string', + [], + is_const=True) + ## command-line.h (module 'core'): void ns3::CommandLine::Parse(int argc, char * * argv) [member function] + cls.add_method('Parse', + 'void', + [param('int', 'argc'), param('char * *', 'argv')]) + ## command-line.h (module 'core'): void ns3::CommandLine::PrintHelp(std::ostream & os) const [member function] + cls.add_method('PrintHelp', + 'void', + [param('std::ostream &', 'os')], + is_const=True) + ## command-line.h (module 'core'): void ns3::CommandLine::Usage(std::string const usage) [member function] + cls.add_method('Usage', + 'void', + [param('std::string const', 'usage')]) return def register_Ns3CriticalSection_methods(root_module, cls): @@ -598,6 +676,17 @@ cls.add_constructor([param('ns3::SystemMutex &', 'mutex')]) return +def register_Ns3EventGarbageCollector_methods(root_module, cls): + ## event-garbage-collector.h (module 'core'): ns3::EventGarbageCollector::EventGarbageCollector(ns3::EventGarbageCollector const & arg0) [copy constructor] + cls.add_constructor([param('ns3::EventGarbageCollector const &', 'arg0')]) + ## event-garbage-collector.h (module 'core'): ns3::EventGarbageCollector::EventGarbageCollector() [constructor] + cls.add_constructor([]) + ## event-garbage-collector.h (module 'core'): void ns3::EventGarbageCollector::Track(ns3::EventId event) [member function] + cls.add_method('Track', + 'void', + [param('ns3::EventId', 'event')]) + return + def register_Ns3EventId_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_binary_comparison_operator('==') @@ -708,6 +797,35 @@ [param('ns3::AttributeValue const &', 'value')]) return +def register_Ns3Hasher_methods(root_module, cls): + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Hasher const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hasher const &', 'arg0')]) + ## hash.h (module 'core'): ns3::Hasher::Hasher() [constructor] + cls.add_constructor([]) + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Ptr hp) [constructor] + cls.add_constructor([param('ns3::Ptr< ns3::Hash::Implementation >', 'hp')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(std::string const s) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(std::string const s) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): ns3::Hasher & ns3::Hasher::clear() [member function] + cls.add_method('clear', + 'ns3::Hasher &', + []) + return + def register_Ns3IntToType__0_methods(root_module, cls): ## int-to-type.h (module 'core'): ns3::IntToType<0>::IntToType() [constructor] cls.add_constructor([]) @@ -975,6 +1093,18 @@ is_const=True) return +def register_Ns3RandomVariableStreamHelper_methods(root_module, cls): + ## random-variable-stream-helper.h (module 'core'): ns3::RandomVariableStreamHelper::RandomVariableStreamHelper() [constructor] + cls.add_constructor([]) + ## random-variable-stream-helper.h (module 'core'): ns3::RandomVariableStreamHelper::RandomVariableStreamHelper(ns3::RandomVariableStreamHelper const & arg0) [copy constructor] + cls.add_constructor([param('ns3::RandomVariableStreamHelper const &', 'arg0')]) + ## random-variable-stream-helper.h (module 'core'): static int64_t ns3::RandomVariableStreamHelper::AssignStreams(std::string path, int64_t stream) [member function] + cls.add_method('AssignStreams', + 'int64_t', + [param('std::string', 'path'), param('int64_t', 'stream')], + is_static=True) + return + def register_Ns3RngSeedManager_methods(root_module, cls): ## rng-seed-manager.h (module 'core'): ns3::RngSeedManager::RngSeedManager() [constructor] cls.add_constructor([]) @@ -1336,6 +1466,11 @@ 'std::string', [], is_const=True) + ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetHash() const [member function] + cls.add_method('GetHash', + 'uint32_t', + [], + is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeId::GetName() const [member function] cls.add_method('GetName', 'std::string', @@ -1395,6 +1530,16 @@ 'bool', [param('std::string', 'name'), param('ns3::TypeId::AttributeInformation *', 'info', transfer_ownership=False)], is_const=True) + ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByHash(uint32_t hash) [member function] + cls.add_method('LookupByHash', + 'ns3::TypeId', + [param('uint32_t', 'hash')], + is_static=True) + ## type-id.h (module 'core'): static bool ns3::TypeId::LookupByHashFailSafe(uint32_t hash, ns3::TypeId * tid) [member function] + cls.add_method('LookupByHashFailSafe', + 'bool', + [param('uint32_t', 'hash'), param('ns3::TypeId *', 'tid')], + is_static=True) ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByName(std::string name) [member function] cls.add_method('LookupByName', 'ns3::TypeId', @@ -2083,6 +2228,18 @@ is_static=True) return +def register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter< ns3::Hash::Implementation > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + def register_Ns3SimpleRefCount__Ns3RefCountBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3RefCountBase__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] cls.add_constructor([]) @@ -2477,11 +2634,26 @@ 'bool', [], is_const=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Max() [member function] + cls.add_method('Max', + 'ns3::Time', + [], + is_static=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Min() [member function] + cls.add_method('Min', + 'ns3::Time', + [], + is_static=True) ## nstime.h (module 'core'): static void ns3::Time::SetResolution(ns3::Time::Unit resolution) [member function] cls.add_method('SetResolution', 'void', [param('ns3::Time::Unit', 'resolution')], is_static=True) + ## nstime.h (module 'core'): static bool ns3::Time::StaticInit() [member function] + cls.add_method('StaticInit', + 'bool', + [], + is_static=True) ## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function] cls.add_method('To', 'ns3::int64x64_t', @@ -4203,13 +4375,6 @@ [param('std::string const &', 'value')]) return -def register_Ns3TimeChecker_methods(root_module, cls): - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker() [constructor] - cls.add_constructor([]) - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker(ns3::TimeChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TimeChecker const &', 'arg0')]) - return - def register_Ns3TimeValue_methods(root_module, cls): ## nstime.h (module 'core'): ns3::TimeValue::TimeValue() [constructor] cls.add_constructor([]) @@ -4455,6 +4620,111 @@ [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) return +def register_Ns3HashImplementation_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation(ns3::Hash::Implementation const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Implementation const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation() [constructor] + cls.add_constructor([]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Implementation::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_pure_virtual=True, is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Implementation::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Implementation::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + return + +def register_Ns3HashFunctionFnv1a_methods(root_module, cls): + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a(ns3::Hash::Function::Fnv1a const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Fnv1a const &', 'arg0')]) + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a() [constructor] + cls.add_constructor([]) + ## hash-fnv.h (module 'core'): uint32_t ns3::Hash::Function::Fnv1a::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): uint64_t ns3::Hash::Function::Fnv1a::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): void ns3::Hash::Function::Fnv1a::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash32_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Function::Hash32 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash32 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Hash32Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash32Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash32::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash32::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash64_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Function::Hash64 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash64 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Hash64Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash64Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash64::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Function::Hash64::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash64::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionMurmur3_methods(root_module, cls): + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3(ns3::Hash::Function::Murmur3 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Murmur3 const &', 'arg0')]) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3() [constructor] + cls.add_constructor([]) + ## hash-murmur3.h (module 'core'): uint32_t ns3::Hash::Function::Murmur3::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): uint64_t ns3::Hash::Function::Murmur3::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): void ns3::Hash::Function::Murmur3::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + def register_functions(root_module): module = root_module ## nstime.h (module 'core'): ns3::Time ns3::Abs(ns3::Time const & time) [free function] @@ -4495,6 +4765,22 @@ module.add_function('FemtoSeconds', 'ns3::Time', [param('uint64_t', 'fs')]) + ## hash.h (module 'core'): uint32_t ns3::Hash32(std::string const s) [free function] + module.add_function('Hash32', + 'uint32_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): uint32_t ns3::Hash32(char const * buffer, size_t const size) [free function] + module.add_function('Hash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint64_t ns3::Hash64(std::string const s) [free function] + module.add_function('Hash64', + 'uint64_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): uint64_t ns3::Hash64(char const * buffer, size_t const size) [free function] + module.add_function('Hash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) ## log.h (module 'core'): extern void ns3::LogComponentDisable(char const * name, ns3::LogLevel level) [free function] module.add_function('LogComponentDisable', 'void', @@ -4559,10 +4845,18 @@ module.add_function('MakeStringChecker', 'ns3::Ptr< ns3::AttributeChecker const >', []) - ## nstime.h (module 'core'): extern ns3::Ptr ns3::MakeTimeChecker() [free function] + ## nstime.h (module 'core'): ns3::Ptr ns3::MakeTimeChecker() [free function] module.add_function('MakeTimeChecker', 'ns3::Ptr< ns3::AttributeChecker const >', []) + ## nstime.h (module 'core'): ns3::Ptr ns3::MakeTimeChecker(ns3::Time const min) [free function] + module.add_function('MakeTimeChecker', + 'ns3::Ptr< ns3::AttributeChecker const >', + [param('ns3::Time const', 'min')]) + ## nstime.h (module 'core'): extern ns3::Ptr ns3::MakeTimeChecker(ns3::Time const min, ns3::Time const max) [free function] + module.add_function('MakeTimeChecker', + 'ns3::Ptr< ns3::AttributeChecker const >', + [param('ns3::Time const', 'min'), param('ns3::Time const', 'max')]) ## type-id.h (module 'core'): extern ns3::Ptr ns3::MakeTypeIdChecker() [free function] module.add_function('MakeTypeIdChecker', 'ns3::Ptr< ns3::AttributeChecker const >', @@ -4697,12 +4991,27 @@ 'std::string', [], template_parameters=['unsigned char']) + register_functions_ns3_CommandLineHelper(module.get_submodule('CommandLineHelper'), root_module) register_functions_ns3_Config(module.get_submodule('Config'), root_module) register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) + register_functions_ns3_Hash(module.get_submodule('Hash'), root_module) register_functions_ns3_SystemPath(module.get_submodule('SystemPath'), root_module) register_functions_ns3_internal(module.get_submodule('internal'), root_module) return +def register_functions_ns3_CommandLineHelper(module, root_module): + ## command-line.h (module 'core'): extern std::string ns3::CommandLineHelper::GetDefault(bool const & val) [free function] + module.add_function('GetDefault', + 'std::string', + [param('bool &', 'val')], + template_parameters=['bool']) + ## command-line.h (module 'core'): extern bool ns3::CommandLineHelper::UserItemParse(std::string const value, bool & val) [free function] + module.add_function('UserItemParse', + 'bool', + [param('std::string const', 'value'), param('bool &', 'val')], + template_parameters=['bool']) + return + def register_functions_ns3_Config(module, root_module): ## config.h (module 'core'): extern void ns3::Config::Connect(std::string path, ns3::CallbackBase const & cb) [free function] module.add_function('Connect', @@ -4781,6 +5090,13 @@ [param('std::ostream *', 'stream')]) return +def register_functions_ns3_Hash(module, root_module): + register_functions_ns3_Hash_Function(module.get_submodule('Function'), root_module) + return + +def register_functions_ns3_Hash_Function(module, root_module): + return + def register_functions_ns3_SystemPath(module, root_module): ## system-path.h (module 'core'): extern std::string ns3::SystemPath::Append(std::string left, std::string right) [free function] module.add_function('Append', diff -Naur ns-3.17/src/core/bindings/modulegen__gcc_LP64.py ns-3.18/src/core/bindings/modulegen__gcc_LP64.py --- ns-3.17/src/core/bindings/modulegen__gcc_LP64.py 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/core/bindings/modulegen__gcc_LP64.py 2013-10-26 07:07:30.051364394 -0700 @@ -32,10 +32,14 @@ module.add_class('CommandLine', allow_subclassing=True) ## system-mutex.h (module 'core'): ns3::CriticalSection [class] module.add_class('CriticalSection') + ## event-garbage-collector.h (module 'core'): ns3::EventGarbageCollector [class] + module.add_class('EventGarbageCollector') ## event-id.h (module 'core'): ns3::EventId [class] module.add_class('EventId') ## global-value.h (module 'core'): ns3::GlobalValue [class] module.add_class('GlobalValue') + ## hash.h (module 'core'): ns3::Hasher [class] + module.add_class('Hasher') ## int-to-type.h (module 'core'): ns3::IntToType<0> [struct] module.add_class('IntToType', template_parameters=['0']) ## int-to-type.h (module 'core'): ns3::IntToType<0>::v_e [enumeration] @@ -76,6 +80,8 @@ module.add_class('ObjectFactory') ## random-variable.h (module 'core'): ns3::RandomVariable [class] module.add_class('RandomVariable') + ## random-variable-stream-helper.h (module 'core'): ns3::RandomVariableStreamHelper [class] + module.add_class('RandomVariableStreamHelper') ## rng-seed-manager.h (module 'core'): ns3::RngSeedManager [class] module.add_class('RngSeedManager') ## rng-stream.h (module 'core'): ns3::RngStream [class] @@ -174,6 +180,8 @@ module.add_class('SimpleRefCount', automatic_type_narrowing=True, template_parameters=['ns3::EventImpl', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, template_parameters=['ns3::FdReader', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] + module.add_class('SimpleRefCount', automatic_type_narrowing=True, template_parameters=['ns3::Hash::Implementation', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] module.add_class('SimpleRefCount', automatic_type_narrowing=True, template_parameters=['ns3::RefCountBase', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] @@ -292,8 +300,6 @@ module.add_class('StringChecker', parent=root_module['ns3::AttributeChecker']) ## string.h (module 'core'): ns3::StringValue [class] module.add_class('StringValue', parent=root_module['ns3::AttributeValue']) - ## nstime.h (module 'core'): ns3::TimeChecker [class] - module.add_class('TimeChecker', parent=root_module['ns3::AttributeChecker']) ## nstime.h (module 'core'): ns3::TimeValue [class] module.add_class('TimeValue', parent=root_module['ns3::AttributeValue']) ## type-id.h (module 'core'): ns3::TypeIdChecker [class] @@ -310,6 +316,10 @@ module.add_class('Vector3DChecker', parent=root_module['ns3::AttributeChecker']) ## vector.h (module 'core'): ns3::Vector3DValue [class] module.add_class('Vector3DValue', parent=root_module['ns3::AttributeValue']) + typehandlers.add_type_alias('ns3::Vector3D', 'ns3::Vector') + typehandlers.add_type_alias('ns3::Vector3D*', 'ns3::Vector*') + typehandlers.add_type_alias('ns3::Vector3D&', 'ns3::Vector&') + module.add_typedef(root_module['ns3::Vector3D'], 'Vector') typehandlers.add_type_alias('ns3::ObjectPtrContainerValue', 'ns3::ObjectVectorValue') typehandlers.add_type_alias('ns3::ObjectPtrContainerValue*', 'ns3::ObjectVectorValue*') typehandlers.add_type_alias('ns3::ObjectPtrContainerValue&', 'ns3::ObjectVectorValue&') @@ -324,10 +334,6 @@ typehandlers.add_type_alias('void ( * ) ( std::ostream & ) *', 'ns3::LogNodePrinter') typehandlers.add_type_alias('void ( * ) ( std::ostream & ) **', 'ns3::LogNodePrinter*') typehandlers.add_type_alias('void ( * ) ( std::ostream & ) *&', 'ns3::LogNodePrinter&') - typehandlers.add_type_alias('ns3::Vector3D', 'ns3::Vector') - typehandlers.add_type_alias('ns3::Vector3D*', 'ns3::Vector*') - typehandlers.add_type_alias('ns3::Vector3D&', 'ns3::Vector&') - module.add_typedef(root_module['ns3::Vector3D'], 'Vector') typehandlers.add_type_alias('ns3::Vector3DValue', 'ns3::VectorValue') typehandlers.add_type_alias('ns3::Vector3DValue*', 'ns3::VectorValue*') typehandlers.add_type_alias('ns3::Vector3DValue&', 'ns3::VectorValue&') @@ -341,6 +347,12 @@ typehandlers.add_type_alias('ns3::Vector3DChecker&', 'ns3::VectorChecker&') module.add_typedef(root_module['ns3::Vector3DChecker'], 'VectorChecker') + ## Register a nested module for the namespace CommandLineHelper + + nested_module = module.add_cpp_namespace('CommandLineHelper') + register_types_ns3_CommandLineHelper(nested_module) + + ## Register a nested module for the namespace Config nested_module = module.add_cpp_namespace('Config') @@ -353,6 +365,12 @@ register_types_ns3_FatalImpl(nested_module) + ## Register a nested module for the namespace Hash + + nested_module = module.add_cpp_namespace('Hash') + register_types_ns3_Hash(nested_module) + + ## Register a nested module for the namespace SystemPath nested_module = module.add_cpp_namespace('SystemPath') @@ -365,6 +383,10 @@ register_types_ns3_internal(nested_module) +def register_types_ns3_CommandLineHelper(module): + root_module = module.get_root() + + def register_types_ns3_Config(module): root_module = module.get_root() @@ -377,6 +399,36 @@ root_module = module.get_root() +def register_types_ns3_Hash(module): + root_module = module.get_root() + + ## hash-function.h (module 'core'): ns3::Hash::Implementation [class] + module.add_class('Implementation', parent=root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash32Function_ptr') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash32Function_ptr*') + typehandlers.add_type_alias('uint32_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash32Function_ptr&') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *', 'ns3::Hash::Hash64Function_ptr') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) **', 'ns3::Hash::Hash64Function_ptr*') + typehandlers.add_type_alias('uint64_t ( * ) ( char const *, size_t ) *&', 'ns3::Hash::Hash64Function_ptr&') + + ## Register a nested module for the namespace Function + + nested_module = module.add_cpp_namespace('Function') + register_types_ns3_Hash_Function(nested_module) + + +def register_types_ns3_Hash_Function(module): + root_module = module.get_root() + + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a [class] + module.add_class('Fnv1a', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32 [class] + module.add_class('Hash32', parent=root_module['ns3::Hash::Implementation']) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64 [class] + module.add_class('Hash64', parent=root_module['ns3::Hash::Implementation']) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3 [class] + module.add_class('Murmur3', parent=root_module['ns3::Hash::Implementation']) + def register_types_ns3_SystemPath(module): root_module = module.get_root() @@ -392,8 +444,10 @@ register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase']) register_Ns3CommandLine_methods(root_module, root_module['ns3::CommandLine']) register_Ns3CriticalSection_methods(root_module, root_module['ns3::CriticalSection']) + register_Ns3EventGarbageCollector_methods(root_module, root_module['ns3::EventGarbageCollector']) register_Ns3EventId_methods(root_module, root_module['ns3::EventId']) register_Ns3GlobalValue_methods(root_module, root_module['ns3::GlobalValue']) + register_Ns3Hasher_methods(root_module, root_module['ns3::Hasher']) register_Ns3IntToType__0_methods(root_module, root_module['ns3::IntToType< 0 >']) register_Ns3IntToType__1_methods(root_module, root_module['ns3::IntToType< 1 >']) register_Ns3IntToType__2_methods(root_module, root_module['ns3::IntToType< 2 >']) @@ -407,6 +461,7 @@ register_Ns3ObjectDeleter_methods(root_module, root_module['ns3::ObjectDeleter']) register_Ns3ObjectFactory_methods(root_module, root_module['ns3::ObjectFactory']) register_Ns3RandomVariable_methods(root_module, root_module['ns3::RandomVariable']) + register_Ns3RandomVariableStreamHelper_methods(root_module, root_module['ns3::RandomVariableStreamHelper']) register_Ns3RngSeedManager_methods(root_module, root_module['ns3::RngSeedManager']) register_Ns3RngStream_methods(root_module, root_module['ns3::RngStream']) register_Ns3SequentialVariable_methods(root_module, root_module['ns3::SequentialVariable']) @@ -453,6 +508,7 @@ register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3FdReader_Ns3Empty_Ns3DefaultDeleter__lt__ns3FdReader__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::FdReader, ns3::empty, ns3::DefaultDeleter >']) + register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3RefCountBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3RefCountBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::RefCountBase, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3SystemThread_Ns3Empty_Ns3DefaultDeleter__lt__ns3SystemThread__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::SystemThread, ns3::empty, ns3::DefaultDeleter >']) register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter >']) @@ -509,7 +565,6 @@ register_Ns3RefCountBase_methods(root_module, root_module['ns3::RefCountBase']) register_Ns3StringChecker_methods(root_module, root_module['ns3::StringChecker']) register_Ns3StringValue_methods(root_module, root_module['ns3::StringValue']) - register_Ns3TimeChecker_methods(root_module, root_module['ns3::TimeChecker']) register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue']) register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker']) register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue']) @@ -519,6 +574,11 @@ register_Ns3Vector3DChecker_methods(root_module, root_module['ns3::Vector3DChecker']) register_Ns3Vector3DValue_methods(root_module, root_module['ns3::Vector3DValue']) register_Ns3ConfigMatchContainer_methods(root_module, root_module['ns3::Config::MatchContainer']) + register_Ns3HashImplementation_methods(root_module, root_module['ns3::Hash::Implementation']) + register_Ns3HashFunctionFnv1a_methods(root_module, root_module['ns3::Hash::Function::Fnv1a']) + register_Ns3HashFunctionHash32_methods(root_module, root_module['ns3::Hash::Function::Hash32']) + register_Ns3HashFunctionHash64_methods(root_module, root_module['ns3::Hash::Function::Hash64']) + register_Ns3HashFunctionMurmur3_methods(root_module, root_module['ns3::Hash::Function::Murmur3']) return def register_Ns3AttributeConstructionList_methods(root_module, cls): @@ -589,6 +649,24 @@ cls.add_method('AddValue', 'void', [param('std::string const &', 'name'), param('std::string const &', 'help'), param('ns3::Callback< bool, std::string, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) + ## command-line.h (module 'core'): std::string ns3::CommandLine::GetName() const [member function] + cls.add_method('GetName', + 'std::string', + [], + is_const=True) + ## command-line.h (module 'core'): void ns3::CommandLine::Parse(int argc, char * * argv) [member function] + cls.add_method('Parse', + 'void', + [param('int', 'argc'), param('char * *', 'argv')]) + ## command-line.h (module 'core'): void ns3::CommandLine::PrintHelp(std::ostream & os) const [member function] + cls.add_method('PrintHelp', + 'void', + [param('std::ostream &', 'os')], + is_const=True) + ## command-line.h (module 'core'): void ns3::CommandLine::Usage(std::string const usage) [member function] + cls.add_method('Usage', + 'void', + [param('std::string const', 'usage')]) return def register_Ns3CriticalSection_methods(root_module, cls): @@ -598,6 +676,17 @@ cls.add_constructor([param('ns3::SystemMutex &', 'mutex')]) return +def register_Ns3EventGarbageCollector_methods(root_module, cls): + ## event-garbage-collector.h (module 'core'): ns3::EventGarbageCollector::EventGarbageCollector(ns3::EventGarbageCollector const & arg0) [copy constructor] + cls.add_constructor([param('ns3::EventGarbageCollector const &', 'arg0')]) + ## event-garbage-collector.h (module 'core'): ns3::EventGarbageCollector::EventGarbageCollector() [constructor] + cls.add_constructor([]) + ## event-garbage-collector.h (module 'core'): void ns3::EventGarbageCollector::Track(ns3::EventId event) [member function] + cls.add_method('Track', + 'void', + [param('ns3::EventId', 'event')]) + return + def register_Ns3EventId_methods(root_module, cls): cls.add_binary_comparison_operator('!=') cls.add_binary_comparison_operator('==') @@ -708,6 +797,35 @@ [param('ns3::AttributeValue const &', 'value')]) return +def register_Ns3Hasher_methods(root_module, cls): + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Hasher const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hasher const &', 'arg0')]) + ## hash.h (module 'core'): ns3::Hasher::Hasher() [constructor] + cls.add_constructor([]) + ## hash.h (module 'core'): ns3::Hasher::Hasher(ns3::Ptr hp) [constructor] + cls.add_constructor([param('ns3::Ptr< ns3::Hash::Implementation >', 'hp')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint32_t ns3::Hasher::GetHash32(std::string const s) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint64_t ns3::Hasher::GetHash64(std::string const s) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): ns3::Hasher & ns3::Hasher::clear() [member function] + cls.add_method('clear', + 'ns3::Hasher &', + []) + return + def register_Ns3IntToType__0_methods(root_module, cls): ## int-to-type.h (module 'core'): ns3::IntToType<0>::IntToType() [constructor] cls.add_constructor([]) @@ -975,6 +1093,18 @@ is_const=True) return +def register_Ns3RandomVariableStreamHelper_methods(root_module, cls): + ## random-variable-stream-helper.h (module 'core'): ns3::RandomVariableStreamHelper::RandomVariableStreamHelper() [constructor] + cls.add_constructor([]) + ## random-variable-stream-helper.h (module 'core'): ns3::RandomVariableStreamHelper::RandomVariableStreamHelper(ns3::RandomVariableStreamHelper const & arg0) [copy constructor] + cls.add_constructor([param('ns3::RandomVariableStreamHelper const &', 'arg0')]) + ## random-variable-stream-helper.h (module 'core'): static int64_t ns3::RandomVariableStreamHelper::AssignStreams(std::string path, int64_t stream) [member function] + cls.add_method('AssignStreams', + 'int64_t', + [param('std::string', 'path'), param('int64_t', 'stream')], + is_static=True) + return + def register_Ns3RngSeedManager_methods(root_module, cls): ## rng-seed-manager.h (module 'core'): ns3::RngSeedManager::RngSeedManager() [constructor] cls.add_constructor([]) @@ -1336,6 +1466,11 @@ 'std::string', [], is_const=True) + ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetHash() const [member function] + cls.add_method('GetHash', + 'uint32_t', + [], + is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeId::GetName() const [member function] cls.add_method('GetName', 'std::string', @@ -1395,6 +1530,16 @@ 'bool', [param('std::string', 'name'), param('ns3::TypeId::AttributeInformation *', 'info', transfer_ownership=False)], is_const=True) + ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByHash(uint32_t hash) [member function] + cls.add_method('LookupByHash', + 'ns3::TypeId', + [param('uint32_t', 'hash')], + is_static=True) + ## type-id.h (module 'core'): static bool ns3::TypeId::LookupByHashFailSafe(uint32_t hash, ns3::TypeId * tid) [member function] + cls.add_method('LookupByHashFailSafe', + 'bool', + [param('uint32_t', 'hash'), param('ns3::TypeId *', 'tid')], + is_static=True) ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByName(std::string name) [member function] cls.add_method('LookupByName', 'ns3::TypeId', @@ -2083,6 +2228,18 @@ is_static=True) return +def register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter< ns3::Hash::Implementation > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + def register_Ns3SimpleRefCount__Ns3RefCountBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3RefCountBase__gt___methods(root_module, cls): ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] cls.add_constructor([]) @@ -2477,11 +2634,26 @@ 'bool', [], is_const=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Max() [member function] + cls.add_method('Max', + 'ns3::Time', + [], + is_static=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::Min() [member function] + cls.add_method('Min', + 'ns3::Time', + [], + is_static=True) ## nstime.h (module 'core'): static void ns3::Time::SetResolution(ns3::Time::Unit resolution) [member function] cls.add_method('SetResolution', 'void', [param('ns3::Time::Unit', 'resolution')], is_static=True) + ## nstime.h (module 'core'): static bool ns3::Time::StaticInit() [member function] + cls.add_method('StaticInit', + 'bool', + [], + is_static=True) ## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function] cls.add_method('To', 'ns3::int64x64_t', @@ -4203,13 +4375,6 @@ [param('std::string const &', 'value')]) return -def register_Ns3TimeChecker_methods(root_module, cls): - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker() [constructor] - cls.add_constructor([]) - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker(ns3::TimeChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TimeChecker const &', 'arg0')]) - return - def register_Ns3TimeValue_methods(root_module, cls): ## nstime.h (module 'core'): ns3::TimeValue::TimeValue() [constructor] cls.add_constructor([]) @@ -4455,6 +4620,111 @@ [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) return +def register_Ns3HashImplementation_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation(ns3::Hash::Implementation const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Implementation const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation() [constructor] + cls.add_constructor([]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Implementation::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_pure_virtual=True, is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Implementation::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Implementation::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + return + +def register_Ns3HashFunctionFnv1a_methods(root_module, cls): + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a(ns3::Hash::Function::Fnv1a const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Fnv1a const &', 'arg0')]) + ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a() [constructor] + cls.add_constructor([]) + ## hash-fnv.h (module 'core'): uint32_t ns3::Hash::Function::Fnv1a::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): uint64_t ns3::Hash::Function::Fnv1a::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-fnv.h (module 'core'): void ns3::Hash::Function::Fnv1a::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash32_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Function::Hash32 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash32 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Hash32Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash32Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash32::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash32::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionHash64_methods(root_module, cls): + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Function::Hash64 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Hash64 const &', 'arg0')]) + ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Hash64Function_ptr hp) [constructor] + cls.add_constructor([param('ns3::Hash::Hash64Function_ptr', 'hp')]) + ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash64::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): uint64_t ns3::Hash::Function::Hash64::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash64::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + +def register_Ns3HashFunctionMurmur3_methods(root_module, cls): + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3(ns3::Hash::Function::Murmur3 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Hash::Function::Murmur3 const &', 'arg0')]) + ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3() [constructor] + cls.add_constructor([]) + ## hash-murmur3.h (module 'core'): uint32_t ns3::Hash::Function::Murmur3::GetHash32(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): uint64_t ns3::Hash::Function::Murmur3::GetHash64(char const * buffer, size_t const size) [member function] + cls.add_method('GetHash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')], + is_virtual=True) + ## hash-murmur3.h (module 'core'): void ns3::Hash::Function::Murmur3::clear() [member function] + cls.add_method('clear', + 'void', + [], + is_virtual=True) + return + def register_functions(root_module): module = root_module ## nstime.h (module 'core'): ns3::Time ns3::Abs(ns3::Time const & time) [free function] @@ -4495,6 +4765,22 @@ module.add_function('FemtoSeconds', 'ns3::Time', [param('uint64_t', 'fs')]) + ## hash.h (module 'core'): uint32_t ns3::Hash32(std::string const s) [free function] + module.add_function('Hash32', + 'uint32_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): uint32_t ns3::Hash32(char const * buffer, size_t const size) [free function] + module.add_function('Hash32', + 'uint32_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) + ## hash.h (module 'core'): uint64_t ns3::Hash64(std::string const s) [free function] + module.add_function('Hash64', + 'uint64_t', + [param('std::string const', 's')]) + ## hash.h (module 'core'): uint64_t ns3::Hash64(char const * buffer, size_t const size) [free function] + module.add_function('Hash64', + 'uint64_t', + [param('char const *', 'buffer'), param('size_t const', 'size')]) ## log.h (module 'core'): extern void ns3::LogComponentDisable(char const * name, ns3::LogLevel level) [free function] module.add_function('LogComponentDisable', 'void', @@ -4559,10 +4845,18 @@ module.add_function('MakeStringChecker', 'ns3::Ptr< ns3::AttributeChecker const >', []) - ## nstime.h (module 'core'): extern ns3::Ptr ns3::MakeTimeChecker() [free function] + ## nstime.h (module 'core'): ns3::Ptr ns3::MakeTimeChecker() [free function] module.add_function('MakeTimeChecker', 'ns3::Ptr< ns3::AttributeChecker const >', []) + ## nstime.h (module 'core'): ns3::Ptr ns3::MakeTimeChecker(ns3::Time const min) [free function] + module.add_function('MakeTimeChecker', + 'ns3::Ptr< ns3::AttributeChecker const >', + [param('ns3::Time const', 'min')]) + ## nstime.h (module 'core'): extern ns3::Ptr ns3::MakeTimeChecker(ns3::Time const min, ns3::Time const max) [free function] + module.add_function('MakeTimeChecker', + 'ns3::Ptr< ns3::AttributeChecker const >', + [param('ns3::Time const', 'min'), param('ns3::Time const', 'max')]) ## type-id.h (module 'core'): extern ns3::Ptr ns3::MakeTypeIdChecker() [free function] module.add_function('MakeTypeIdChecker', 'ns3::Ptr< ns3::AttributeChecker const >', @@ -4697,12 +4991,27 @@ 'std::string', [], template_parameters=['unsigned char']) + register_functions_ns3_CommandLineHelper(module.get_submodule('CommandLineHelper'), root_module) register_functions_ns3_Config(module.get_submodule('Config'), root_module) register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) + register_functions_ns3_Hash(module.get_submodule('Hash'), root_module) register_functions_ns3_SystemPath(module.get_submodule('SystemPath'), root_module) register_functions_ns3_internal(module.get_submodule('internal'), root_module) return +def register_functions_ns3_CommandLineHelper(module, root_module): + ## command-line.h (module 'core'): extern std::string ns3::CommandLineHelper::GetDefault(bool const & val) [free function] + module.add_function('GetDefault', + 'std::string', + [param('bool &', 'val')], + template_parameters=['bool']) + ## command-line.h (module 'core'): extern bool ns3::CommandLineHelper::UserItemParse(std::string const value, bool & val) [free function] + module.add_function('UserItemParse', + 'bool', + [param('std::string const', 'value'), param('bool &', 'val')], + template_parameters=['bool']) + return + def register_functions_ns3_Config(module, root_module): ## config.h (module 'core'): extern void ns3::Config::Connect(std::string path, ns3::CallbackBase const & cb) [free function] module.add_function('Connect', @@ -4781,6 +5090,13 @@ [param('std::ostream *', 'stream')]) return +def register_functions_ns3_Hash(module, root_module): + register_functions_ns3_Hash_Function(module.get_submodule('Function'), root_module) + return + +def register_functions_ns3_Hash_Function(module, root_module): + return + def register_functions_ns3_SystemPath(module, root_module): ## system-path.h (module 'core'): extern std::string ns3::SystemPath::Append(std::string left, std::string right) [free function] module.add_function('Append', diff -Naur ns-3.17/src/core/examples/command-line-example.cc ns-3.18/src/core/examples/command-line-example.cc --- ns-3.17/src/core/examples/command-line-example.cc 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/src/core/examples/command-line-example.cc 2013-10-26 07:07:30.023364392 -0700 @@ -0,0 +1,67 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2013 Lawrence Livermore National Laboratory + * + * 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: Peter D. Barnes, Jr. + */ + +#include +#include +#include + +#include "ns3/core-module.h" + + +using namespace ns3; + + +std::string g_cbArg="cbArg default"; + +bool SetCbArg (std::string val) +{ + g_cbArg = val; + return true; +} + + +int main (int argc, char *argv[]) +{ + + int intArg = 1; + bool boolArg = false; + std::string strArg = "strArg default"; + + CommandLine cmd; + cmd.Usage ("CommandLine example program.\n" + "\n" + "This little program demonstrates how to use CommandLine."); + cmd.AddValue ("intArg", "an int argument", intArg); + cmd.AddValue ("boolArg", "a bool argument", boolArg); + cmd.AddValue ("strArg", "a string argument", strArg); + cmd.AddValue ("cbArg", "a string via callback", MakeCallback (SetCbArg)); + cmd.Parse (argc, argv); + + std::cout << std::left + << std::setw (10) << "intArg:" << intArg << std::endl; + std::cout << std::setw (10) << "boolArg:" + << std::boolalpha << boolArg + << std::noboolalpha << std::endl; + + std::cout << std::setw (10) << "strArg:" << "\"" << strArg << "\"" << std::endl; + std::cout << std::setw (10) << "cbArg:" << "\"" << g_cbArg << "\"" << std::endl; + + return 0; +} diff -Naur ns-3.17/src/core/examples/hash-example.cc ns-3.18/src/core/examples/hash-example.cc --- ns-3.17/src/core/examples/hash-example.cc 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/src/core/examples/hash-example.cc 2013-10-26 07:07:30.023364392 -0700 @@ -0,0 +1,564 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include // find +#include // CHAR_BIT +#include +#include +#include +#include +#include + +#include "ns3/core-module.h" +#include "ns3/hash.h" + +NS_LOG_COMPONENT_DEFINE ("Hasher"); + +namespace ns3 +{ +namespace Hash +{ + +/** + * \ingroup hash + * Namespace for hasher-example +*/ +namespace Example +{ + +/** + * Keep track of collisions + */ +class Collider { + +public: + std::string m_name; /**< Name of this hash */ + Hasher m_hash; /**< The hash */ + + enum Bits { + Bits32, /**< Use 32-bit hash function */ + Bits64 /**< Use 64-bit hash function */ + }; + + /** + * Constructor + * + * \param [in] name Hash function name + * \param [in] hash Hash function + * \param [in] bits Which hash length to use + */ + Collider (const std::string name, Hasher hash, const enum Bits bits) + : m_name (name), + m_hash (hash), + m_bits (bits) + { } + + /** + * Add a string to the Collider + * + * \param [in] phrase the string to add + * \return true if this was a new string + */ + bool Add (const std::string phrase) + { + uint64_t h = GetHash (phrase); + + // Check for collisions + if (m_dict.count (h) > 0) + { + // we've seen this hash before, why? + if (phrase == m_dict[h]) + { + // duplicate phrase + return false; + } + + // new phrase generating a real collision + // alphabetize + if ( m_dict[h] < phrase) + { + m_coll.push_back (std::make_pair (h, phrase)); + } + else + { + m_coll.push_back (std::make_pair (h, m_dict[h])); + m_dict[h] = phrase; + } + } + else + { + // Insert new hash + m_dict.insert (std::make_pair (h, phrase)); + } + return true; + } // Add () + + /** + * \return The hash name, including the length + */ + std::string GetName () const + { + std::string name = m_name; + + switch (m_bits) + { + case Bits32: name += " (32-bit version)"; break; + case Bits64: name += " (64-bit version)"; break; + default: name += " (unknown!?!)"; + } + return name; + } + + /** Print the collisions found */ + void Report () const + { + std::cout << std::endl; + + std::cout << GetName () << ": " << m_coll.size () << " collisions:" + << std::endl; + for (collision_t::const_iterator it = m_coll.begin (); + it != m_coll.end (); + ++it) + { + uint64_t h = it->first; + + std::cout << std::setfill ('0') << std::hex << std::setw(8) << h + << std::dec << std::setfill(' ') << " " + << std::setw(20) << std::left + << m_dict.find (h)->second + << it->second + << std::right + << std::endl; + } + } // Report () + + +private: + + /** + * Get the appropriate hash value + * + * \param [in] phrase the string to hash + * \return the hash value, using the number of bits set in the constructor + */ + uint64_t GetHash (const std::string phrase) + { + m_hash.clear (); + uint64_t h = 0; + + if (m_bits == Bits32) + { + h = m_hash.GetHash32 (phrase); + } + else + { + h = m_hash.GetHash64 (phrase); + } + return h; + } + + /** Hash function */ + enum Bits m_bits; + + /** Hashed dictionary of first instance of each hash */ + typedef std::map hashdict_t; + + /** The dictionary map, indexed by hash */ + hashdict_t m_dict; + + /** Collision map of subsequent instances */ + typedef std::vector < std::pair > collision_t; + + /** The list of collisions */ + collision_t m_coll; + +}; // class Collider + + +/** + * Word list and hashers to test + */ +class Dictionary { +public: + /** Constructor */ + Dictionary () + : m_nphrases (0) + { + m_words.reserve (320000); + } + + /** Add a Collider containing a hash function */ + void Add (Collider c) + { + m_hashes.push_back (c); + } + + /** + * Add a string to the dictionary + * + * \param [in] phrase the string to add + */ + void Add (const std::string phrase) + { + if (phrase.size () == 0) + { + return ; + } + + int newPhrases = 0; + for (std::vector ::iterator it = m_hashes.begin (); + it != m_hashes.end (); + ++it) + { + newPhrases += it->Add (phrase); + } + + if (newPhrases) + { + ++m_nphrases; + m_words.push_back (phrase); + } + } // Add () + + /** + * Report the expected number of collisions + * + * See, e.g., + * http://www.math.dartmouth.edu/archive/m19w03/public_html/Section6-5.pdf + * + * \f[ + * E(collisions) = n - k + k (1 - 1/k)^n + * \f] + * + * where n is the number of entries in the table, and + * k is the number of buckets. + * + * This form is numerically unstable for low collision rates. + * Expanding for large \f$ k \f$ we get + * + * \f{eqnarray*}{ + * E(c) &=& \frac{1}{k} {n \choose 2} + * - \frac{1}{{{k^2}}} {n \choose 3} + * + \frac{1}{{{k^3}}} {n \choose 4} + * - \ldots \\ + * &=& \frac{1}{k} {n \choose 2} + * \left[ {1 - \frac{{n - 2}}{{3k}} + * + \frac{{\left( {n - 2} \right) + * \left( {n - 3} \right)}}{{12{k^2}}} + * - \ldots } \right] \\ + * &=& \frac{1}{k} {n \choose 2} + * \left\{ {1 - \frac{{n - 2}}{{3k}} + * \left[ {1 + \frac{{n - 3}}{{4k}} + * - \ldots } + * \right]} + * \right\} + * \f} + * + * For simplicity, we'll use the first two terms + * of the second form. + */ + void ReportExpectedCollisions () const + { + // Expected number of collisions + // + // Number of buckets = k = 2^bits + long double k32 = 0xFFFFFFFF; + long double k64 = 0xFFFFFFFFFFFFFFFF; + + long double n = m_nphrases; + long double Ec32 = n * (n - 1) / ( 2 * k32) * (1 - (n - 2)/(3 * k32)); + long double Ec64 = n * (n - 1) / ( 2 * k64) * (1 - (n - 2)/(3 * k64)); + + // Output collisions + std::cout << "" << std::endl; + std::cout << "Number of words or phrases: " << n << std::endl; + std::cout << "Expected number of collisions: (32-bit table) " << Ec32 + << std::endl; + std::cout << "Expected number of collisions: (64-bit table) " << Ec64 + << std::endl; + } // ReportExpectedCollisions + + + /** Print the collisions for each Collider */ + void Report () const + { + ReportExpectedCollisions (); + + for (std::vector ::const_iterator it = m_hashes.begin (); + it != m_hashes.end (); + ++it) + { + it->Report (); + } + } // Report () + + /** + * Time and report the execution of one hash across the entire Dictionary + * + * \param [in] hindex index of the hash Collider to use + */ + void TimeOne (const int hindex) + { + // Hashing speed + uint32_t reps = 100; + Hasher h = m_hashes[hindex].m_hash; + int start = clock (); + for (std::vector::const_iterator w = m_words.begin (); + w != m_words.end(); + ++w) + { + for (uint32_t i = 0; i < reps; ++i) + { + h.clear ().GetHash32 (*w); + } + } + int stop = clock (); + double delta = stop - start; + double per = 1e9 * delta / (m_nphrases * reps * CLOCKS_PER_SEC); + + std::cout << std::left + << std::setw (32) << m_hashes[hindex].GetName () + << std::right + << std::setw (10) << m_nphrases + << std::setw (10) << reps + << std::setw (10) << stop - start + << std::setw (12) << per + << std::endl; + + } // TimeOne () + + /** Report the execution time of each hash across the entire Dictionary */ + void Time () + { + std::cout << "" << std::endl; + std::cout << std::left + << std::setw (32) << "Hash timing" + << std::right + << std::setw (10) << "Phrases" + << std::setw (10) << "Reps" + << std::setw (10) << "Ticks" + << std::setw (12) << "ns/hash" + << std::endl; + + for (unsigned int i = 0; i < m_hashes.size (); ++i) + { + TimeOne (i); + } + } // Time () + +private: + unsigned long m_nphrases; /**< Number of strings hashed */ + std::vector m_hashes; /**< List of hash Colliders */ + std::vector m_words; /**< List of unique words */ + +}; // class Dictionary + + +/** + * Source word list files + */ +class DictFiles +{ + +public: + + /** + * CommandLine callback function to add a file argument to the list + * + * \param [in] file the word file to add + * \return true if the file is new to the list + */ + bool Add (const std::string file) + { + if (std::find (m_files.begin (), m_files.end (), file) == m_files.end ()) + { + m_files.push_back (file); + } + + return true; + } + + /** + * Add phrases from the files into the dict + * + * \param [in,out] dict the Dictionary to add words to + */ + void ReadInto (Dictionary & dict) + { + if (m_files.size () == 0) + { + Add ("/usr/share/dict/web2"); + } + + std::cout << "Hashing the dictionar" + << (m_files.size () == 1 ? "y" : "ies") + << std::endl; + + for (std::vector ::const_iterator it = m_files.begin (); + it != m_files.end (); + ++it) + { + std::string dictFile = *it; + std::cout << "Dictionary file: " << dictFile << std::endl; + + // Find collisions + + // Open the file + std::ifstream dictStream; + dictStream.open (dictFile.c_str () ); + if (! dictStream.is_open () ) + { + std::cerr << "Failed to open dictionary file." + << "'" << dictFile << "'" + << std::endl; + continue; + } + + while (dictStream.good () ) + { + std::string phrase; + getline (dictStream, phrase); + dict.Add (phrase); + } // while + + dictStream.close (); + + } // for m_files + + } // ReadInto + +private: + std::vector m_files; /**< List of word files to use */ + +}; // class DictFiles + +} // namespace Example + +} // namespace Hash + +} // namespace ns3 + + +using namespace ns3; +using namespace ns3::Hash::Example; + +int +main (int argc, char *argv[]) +{ + std::cout << std::endl; + std::cout << "Hasher" << std::endl; + + bool timing = false; + DictFiles files; + + CommandLine cmd; + cmd.Usage ("Find hash collisions in the dictionary."); + cmd.AddValue ("dict", "Dictionary file to hash", + MakeCallback(&DictFiles::Add, + &files)); + cmd.AddValue ("time", "Run timing test", timing); + cmd.Parse (argc, argv); + + Dictionary dict; + dict.Add ( Collider ("FNV1a", + Hasher ( Create () ), + Collider::Bits32)); + dict.Add ( Collider ("FNV1a", + Hasher ( Create () ), + Collider::Bits64)); + + dict.Add ( Collider ("Murmur3", + Hasher ( Create () ), + Collider::Bits32)); + dict.Add ( Collider ("Murmur3", + Hasher ( Create () ), + Collider::Bits64)); + + files.ReadInto (dict); + + dict.Report (); + + if (timing) + { + dict.Time (); + } // if (timing) + + +} // main + + +/* Example Output: + +./waf --run="hasher-example --time \ + --dict=/usr/share/dict/web2 \ + --dict=/usr/share/dict/web2a \ + --dict=/usr/share/dict/propernames \ + --dict=/usr/share/dict/connectives" + +Waf: Entering directory `build' +Waf: Leaving directory `build' +'build' finished successfully (3.028s) + +Hasher +Hashing the dictionaries +Dictionary file: /usr/share/dict/web2 +Dictionary file: /usr/share/dict/web2a +Dictionary file: /usr/share/dict/propernames +Dictionary file: /usr/share/dict/connectives + +Number of words or phrases: 312094 +Expected number of collisions: (32-bit table) 11.3389 +Expected number of collisions: (64-bit table) 2.6401e-09 + +FNV1a (32-bit version): 13 collisions: +a75b0ae7 elephantlike interventralia +091c4808 diversionary propenseness +172be6ba bairnishness sora +e6cb5099 purifier spongoblastic +4a841078 ameliorable unsmotherable +6ed21de2 brand-newness peripherial +22acb19b Petrarchism dewy-pinioned +5723634a grain gold hyphenation +f58026c1 seven-channeled turritella +946fc6ec multiradiate sister block +88625851 brachtmema ule tree +dc28b5ea Un-lutheran gutturotetany +9255bf44 re-sorter working stress + +FNV1a (64-bit version): 0 collisions: + +Murmur3 (32-bit version): 11 collisions: +5ea83eee impalace metahewettite +e06fbdde constancy oligosynthetic +2a713795 hypermonosyllable presatisfaction +c8bf0ef9 Hadromerina starky +d9c04b3d Accipiter syllable +c0da8f81 seriation trigonon +17612b26 daemon unerring +c2349ad7 air spring iron +1d91386f nine-pounder semicrescentic +fe17b1a5 cone speaker oblong-wedgeshaped +faa12798 saw bearing wilting point + +Murmur3 (64-bit version): 0 collisions: + +Hash timing Phrases Reps Ticks ns/hash +FNV1a (32-bit version) 312094 100 3140531 100.628 +FNV1a (64-bit version) 312094 100 3145240 100.779 +Murmur3 (32-bit version) 312094 100 4152139 133.041 +Murmur3 (64-bit version) 312094 100 4191464 134.301 + +*/ diff -Naur ns-3.17/src/core/examples/main-random-variable-stream.cc ns-3.18/src/core/examples/main-random-variable-stream.cc --- ns-3.17/src/core/examples/main-random-variable-stream.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/core/examples/main-random-variable-stream.cc 2013-10-26 07:07:30.023364392 -0700 @@ -229,7 +229,7 @@ gnuplots.AddPlot (plot); } - // XXX Turn this plot back on once its distribution has been finished. + /// \todo Turn this plot back on once its distribution has been finished. /* { Gnuplot plot; @@ -249,10 +249,9 @@ gnuplots.AddPlot (plot); } - // XXX Turn the above plot back on once its distribution has been finished. */ - // XXX Turn this plot back on once its distribution has been finished. + /// \todo Turn this plot back on once its distribution has been finished. /* { Gnuplot plot; @@ -267,7 +266,6 @@ gnuplots.AddPlot (plot); } - // XXX Turn the above plot back on once its distribution has been finished. */ { diff -Naur ns-3.17/src/core/examples/wscript ns-3.18/src/core/examples/wscript --- ns-3.17/src/core/examples/wscript 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/core/examples/wscript 2013-10-26 07:07:30.019364393 -0700 @@ -15,10 +15,10 @@ obj = bld.create_ns3_program('main-ptr', ['core'] ) obj.source = 'main-ptr.cc' - obj = bld.create_ns3_program('main-random-variable', ['core', 'config-store', 'tools']) + obj = bld.create_ns3_program('main-random-variable', ['core', 'config-store','stats']) obj.source = 'main-random-variable.cc' - obj = bld.create_ns3_program('main-random-variable-stream', ['core', 'config-store', 'tools']) + obj = bld.create_ns3_program('main-random-variable-stream', ['core', 'config-store','stats']) obj.source = 'main-random-variable-stream.cc' obj = bld.create_ns3_program('sample-random-variable', @@ -29,6 +29,14 @@ ['core']) obj.source = 'sample-random-variable-stream.cc' + obj = bld.create_ns3_program('command-line-example', + ['core']) + obj.source = 'command-line-example.cc' + + obj = bld.create_ns3_program('hash-example', + ['core']) + obj.source = 'hash-example.cc' + if bld.env['ENABLE_THREADING'] and bld.env["ENABLE_REAL_TIME"]: obj = bld.create_ns3_program('main-test-sync', ['network']) obj.source = 'main-test-sync.cc' diff -Naur ns-3.17/src/core/helper/event-garbage-collector.cc ns-3.18/src/core/helper/event-garbage-collector.cc --- ns-3.17/src/core/helper/event-garbage-collector.cc 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/src/core/helper/event-garbage-collector.cc 2013-10-26 07:07:30.023364392 -0700 @@ -0,0 +1,90 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007 INESC Porto + * + * 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: Gustavo J. A. M. Carneiro + */ +#include "event-garbage-collector.h" + +#define CLEANUP_CHUNK_MIN_SIZE 8 +#define CLEANUP_CHUNK_MAX_SIZE 128 + + +namespace ns3 { + + +EventGarbageCollector::EventGarbageCollector () : + m_nextCleanupSize (CLEANUP_CHUNK_MIN_SIZE) +{ +} + +void +EventGarbageCollector::Track (EventId event) +{ + m_events.insert (event); + if (m_events.size () >= m_nextCleanupSize) + Cleanup (); +} + +void +EventGarbageCollector::Grow () +{ + m_nextCleanupSize += (m_nextCleanupSize < CLEANUP_CHUNK_MAX_SIZE ? + m_nextCleanupSize : CLEANUP_CHUNK_MAX_SIZE); +} + +void +EventGarbageCollector::Shrink () +{ + while (m_nextCleanupSize > m_events.size ()) + m_nextCleanupSize >>= 1; + Grow (); +} + +// Called when a new event was added and the cleanup limit was exceeded in consequence. +void +EventGarbageCollector::Cleanup () +{ + for (EventList::iterator iter = m_events.begin (); iter != m_events.end ();) + { + if ((*iter).IsExpired ()) + { + m_events.erase (iter++); + } + else + break; // EventIds are sorted by timestamp => further events are not expired for sure + } + + // If after cleanup we are still over the limit, increase the limit. + if (m_events.size () >= m_nextCleanupSize) + Grow (); + else + Shrink (); +} + + +EventGarbageCollector::~EventGarbageCollector () +{ + for (EventList::iterator event = m_events.begin (); + event != m_events.end (); event++) + { + Simulator::Cancel (*event); + } +} + +} // namespace ns3 + + diff -Naur ns-3.17/src/core/helper/event-garbage-collector.h ns-3.18/src/core/helper/event-garbage-collector.h --- ns-3.17/src/core/helper/event-garbage-collector.h 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/src/core/helper/event-garbage-collector.h 2013-10-26 07:07:30.023364392 -0700 @@ -0,0 +1,73 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007 INESC Porto + * + * 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: Gustavo J. A. M. Carneiro + */ +#ifndef EVENT_GARBAGE_COLLECTOR_H +#define EVENT_GARBAGE_COLLECTOR_H + +#include +#include "ns3/event-id.h" +#include "ns3/simulator.h" + +namespace ns3 { + +/** + * \ingroup tools + * + * \brief An object that tracks scheduled events and automatically + * cancels them when it is destroyed. It is useful in situations + * where multiple instances of the same type of event can + * simultaneously be scheduled, and when the events should be limited + * to the lifetime of a container object. + */ +class EventGarbageCollector +{ +public: + + EventGarbageCollector (); + + /** + * \brief Tracks a new event + */ + void Track (EventId event); + + ~EventGarbageCollector (); + +private: + + struct EventIdLessThanTs + { + bool operator () (const EventId &a, const EventId &b) const + { + return (a.GetTs () < b.GetTs ()); + } + }; + + typedef std::multiset EventList; + + EventList::size_type m_nextCleanupSize; + EventList m_events; + + void Cleanup (); + void Grow (); + void Shrink (); +}; + +} // namespace ns3 + +#endif /* EVENT_GARBAGE_COLLECTOR_H */ diff -Naur ns-3.17/src/core/helper/random-variable-stream-helper.cc ns-3.18/src/core/helper/random-variable-stream-helper.cc --- ns-3.17/src/core/helper/random-variable-stream-helper.cc 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/src/core/helper/random-variable-stream-helper.cc 2013-10-26 07:07:30.023364392 -0700 @@ -0,0 +1,46 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2012 University of Washington + * + * 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 + * + */ +#include "ns3/random-variable-stream.h" +#include "ns3/config.h" +#include "ns3/pointer.h" +#include "ns3/log.h" +#include "ns3/assert.h" +#include "random-variable-stream-helper.h" + +NS_LOG_COMPONENT_DEFINE ("RandomVariableStreamHelper"); + +namespace ns3 { + +int64_t RandomVariableStreamHelper::AssignStreams (std::string path, int64_t stream) +{ + NS_LOG_FUNCTION_NOARGS (); + NS_ASSERT (stream >= 0); + Config::MatchContainer mc = Config::LookupMatches (path); + int64_t i = 0; + for (Config::MatchContainer::Iterator mci = mc.Begin (); mci != mc.End (); ++mci, ++i) + { + PointerValue ptr = mc.Get (i); + Ptr rvs = ptr.Get (); + NS_LOG_DEBUG ("RandomVariableStream found: " << rvs << "; setting stream to " << (stream + i)); + rvs->SetStream (stream + i); + } + return i; +} + +} // namespace ns3 diff -Naur ns-3.17/src/core/helper/random-variable-stream-helper.h ns-3.18/src/core/helper/random-variable-stream-helper.h --- ns-3.17/src/core/helper/random-variable-stream-helper.h 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/src/core/helper/random-variable-stream-helper.h 2013-10-26 07:07:30.023364392 -0700 @@ -0,0 +1,65 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2012 University of Washington + * + * 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 + * + */ +#ifndef RANDOM_VARIABLE_STREAM_HELPER_H +#define RANDOM_VARIABLE_STREAM_HELPER_H + +#include + +namespace ns3 { + +/** + * \brief Helper class for static methods involving RandomVariableStream + */ +class RandomVariableStreamHelper +{ +public: + /** + * This helper method can be used to configure the stream number for + * one or more RNG streams. The path passed in should correspond to + * an attribute path in the configuration system. It may contain wildcards + * and may ultimately match zero, one, or more than one objects. + * + * The objects to match are of type PointerValue where the underlying + * type is of type Ptr. + * + * \code + * .AddAttribute ("Speed", + * "A random variable used to pick the speed of a random waypoint model.", + * StringValue("ns3::UniformRandomVariable[Min=0.3|Max=0.7]"), + * MakePointerAccessor (&RandomWaypointMobilityModel::m_speed), + * MakePointerChecker ()) + * + * \endcode + * + * Usage would look (for node 3) like this: + * \code + * std::string path ("/$ns3::NodeListPriv/NodeList/3/$ns3::Node/$ns3::RandomWaypointMobilityModel/Speed/$ns3::UniformRandomVariable"); + * int64_t retVal = RandomVariableStreamHelper::AssignStreams (path, 0); + * \endcode + * + * \return The number of streams set + * \param path (possibly wildcarded) path to a RandomVariableStream PointerValue + * \param stream stream number to set; must be non-negative + */ + static int64_t AssignStreams (std::string path, int64_t stream); +}; + +} // namespace ns3 + +#endif /* RANDOM_VARIABLE_STREAM_HELPER_H */ diff -Naur ns-3.17/src/core/model/assert.h ns-3.18/src/core/model/assert.h --- ns-3.17/src/core/model/assert.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/core/model/assert.h 2013-10-26 07:07:30.031364393 -0700 @@ -28,7 +28,7 @@ #include "fatal-error.h" /** - * \ingroup constructs + * \ingroup core * \defgroup debugging Debugging */ /** diff -Naur ns-3.17/src/core/model/attribute.h ns-3.18/src/core/model/attribute.h --- ns-3.17/src/core/model/attribute.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/core/model/attribute.h 2013-10-26 07:07:30.035364393 -0700 @@ -35,7 +35,12 @@ /** * * \ingroup core - * \defgroup attribute Attribute + * \defgroup attribute Attributes + * + * The \c ns-3 attribute system is the mechanism used in \c ns-3 to + * organize, document, and modify the *values* used by the various + * component models. Attributes also enable the tracing and statistics + * gathering in the simulator. */ /** @@ -152,6 +157,13 @@ AttributeChecker (); virtual ~AttributeChecker (); + /** + * Create a valid value from the argument value, + * or reinterpret the argument as a string. + * + * \param value the AttributeValue to check + * \return Ptr to a valid value + */ Ptr CreateValidValue (const AttributeValue &value) const; /** * \param value a pointer to the value to check @@ -190,7 +202,13 @@ * to calling Attribute::DeserializeFromString. */ virtual Ptr Create (void) const = 0; + /** + * Copy the source to the destination + * \param source source AttributeValue + * \param destination destination AttributeValue + * \return true if copy was successful + */ virtual bool Copy (const AttributeValue &source, AttributeValue &destination) const = 0; diff -Naur ns-3.17/src/core/model/attribute-helper.h ns-3.18/src/core/model/attribute-helper.h --- ns-3.17/src/core/model/attribute-helper.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/core/model/attribute-helper.h 2013-10-26 07:07:30.043364393 -0700 @@ -27,6 +27,34 @@ namespace ns3 { +/** + * \ingroup attribute + * \defgroup attributehelper Attribute Helper + * + * All these macros can be used to generate automatically the code + * for subclasses of AttributeValue, AttributeAccessor, and, AttributeChecker, + * which can be used to give attribute powers to a normal class. i.e., + * the user class can then effectively be made an attribute. + * + * There are two kinds of helper macros: + * 1) The simple macros. + * - ATTRIBUTE_HELPER_HEADER(type) + * - ATTRIBUTE_HELPER_CPP + * 2) The more complex macros. + * + * The simple macros are implemented in terms of the complex + * macros and should generally be preferred over the complex macros. + */ + +/** + * \ingroup attributehelper + * + * A simple string-based attribute checker + * + * \param name value type of the attribute + * \param underlying underlying type name + * \return Ptr to AttributeChecker + */ template Ptr MakeSimpleAttributeChecker (std::string name, std::string underlying) @@ -69,30 +97,11 @@ } /** - * \ingroup core - * \defgroup AttributeHelper Attribute Helper - * - * All these macros can be used to generate automatically the code - * for subclasses of AttributeValue, AttributeAccessor, and, AttributeChecker, - * which can be used to give attribute powers to a normal class. i.e., - * the user class can then effectively be made an attribute. - * - * There are two kinds of helper macros: - * 1) The simple macros. - * 2) The more complex macros. - * - * The simple macros are implemented in terms of the complex - * macros and should generally be preferred over the complex macros: - * - \ref ATTRIBUTE_HELPER_HEADER, and, - * - \ref ATTRIBUTE_HELPER_CPP, - */ - -/** - * \ingroup AttributeHelper + * \ingroup attributehelper * \param type the name of the class * * This macro defines and generates the code for the implementation - * of the MakeXXXAccessor template functions. This macro is typically + * of the \c MakeAccessor template functions. This macro is typically * invoked in a class header to allow users of this class to view and * use the template functions defined here. This macro is implemented * through the helper templates functions ns3::MakeAccessorHelper<>. @@ -109,6 +118,10 @@ return MakeAccessorHelper (a1, a2); \ } +/** + * \ingroup attributehelper + * \internal + */ #define ATTRIBUTE_VALUE_DEFINE_WITH_NAME(type,name) \ class name ## Value : public AttributeValue \ { \ @@ -131,39 +144,43 @@ /** - * \ingroup AttributeHelper + * \ingroup attributehelper * \param type the name of the class. * - * This macro defines the class XXXValue associated to class XXX. - * This macro is typically invoked in a class header. + * This macro defines the class \c typeValue associated to class \c type. + * This macro is typically invoked in the class header file. */ #define ATTRIBUTE_VALUE_DEFINE(type) \ ATTRIBUTE_VALUE_DEFINE_WITH_NAME (type,type) /** - * \ingroup AttributeHelper + * \ingroup attributehelper * \param type the name of the class * - * This macro defines the conversion operators for class XXX to and + * This macro defines the conversion operators for class \c type to and * from instances of type Attribute. - * Typically invoked from xxx.h. + * Typically invoked in the class header file. */ #define ATTRIBUTE_CONVERTER_DEFINE(type) /** - * \ingroup AttributeHelper + * \ingroup attributehelper * \param type the name of the class * - * This macro defines the XXXChecker class and the associated - * MakeXXXChecker function. - * Typically invoked from xxx.h. + * This macro defines the \c typeChecker class and the associated + * \c MakeChecker function. + * Typically invoked in the class header file.. */ #define ATTRIBUTE_CHECKER_DEFINE(type) \ class type ## Checker : public AttributeChecker {}; \ Ptr Make ## type ## Checker (void); \ +/** + * \ingroup attributehelper + * \internal + */ #define ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME(type,name) \ name ## Value::name ## Value () \ : m_value () {} \ @@ -194,24 +211,24 @@ } /** - * \ingroup AttributeHelper + * \ingroup attributehelper * \param type the name of the class. * - * This macro implements the XXXValue class (including the - * XXXValue::SerializeToString and XXXValue::DeserializeFromString + * This macro implements the \c typeValue class (including the + * \c typeValue::SerializeToString and \c typeValue::DeserializeFromString * methods). - * Typically invoked from xxx.cc. + * Typically invoked in the source file. */ #define ATTRIBUTE_VALUE_IMPLEMENT(type) \ ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME (type,type) /** - * \ingroup AttributeHelper + * \ingroup attributehelper * \param type the name of the class * - * This macro implements the MakeXXXChecker function. - * Typically invoked from xxx.cc. + * This macro implements the \c MakeChecker function. + * Typically invoked in the source file.. */ #define ATTRIBUTE_CHECKER_IMPLEMENT(type) \ Ptr Make ## type ## Checker (void) \ @@ -219,6 +236,10 @@ return MakeSimpleAttributeChecker (# type "Value", # type); \ } \ +/** + * \ingroup attributehelper + * \internal + */ #define ATTRIBUTE_CHECKER_IMPLEMENT_WITH_NAME(type,name) \ Ptr Make ## type ## Checker (void) \ { \ @@ -226,7 +247,7 @@ } \ /** - * \ingroup AttributeHelper + * \ingroup attributehelper * \param type the name of the class * * This macro should be invoked outside of the class @@ -238,7 +259,7 @@ ATTRIBUTE_CHECKER_DEFINE (type); /** - * \ingroup AttributeHelper + * \ingroup attributehelper * \param type the name of the class * * This macro should be invoked from the class implementation file. diff -Naur ns-3.17/src/core/model/breakpoint.h ns-3.18/src/core/model/breakpoint.h --- ns-3.17/src/core/model/breakpoint.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/core/model/breakpoint.h 2013-10-26 07:07:30.039364393 -0700 @@ -57,6 +57,8 @@ #endif /** + * \ingroup debugging + * * \brief fallback breakpoint function * * This function is used by the NS_BREAKPOINT() macro as a fallback diff -Naur ns-3.17/src/core/model/calendar-scheduler.cc ns-3.18/src/core/model/calendar-scheduler.cc --- ns-3.17/src/core/model/calendar-scheduler.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/core/model/calendar-scheduler.cc 2013-10-26 07:07:30.035364393 -0700 @@ -131,7 +131,11 @@ NS_ASSERT (!IsEmpty ()); uint32_t i = m_lastBucket; uint64_t bucketTop = m_bucketTop; - Scheduler::Event minEvent = { static_cast(0), { static_cast(~0), static_cast(~0)}}; + Scheduler::Event minEvent; + minEvent.impl = 0; + minEvent.key.m_ts = ~0; + minEvent.key.m_uid = ~0; + minEvent.key.m_context = 0; do { if (!m_buckets[i].empty ()) diff -Naur ns-3.17/src/core/model/callback.cc ns-3.18/src/core/model/callback.cc --- ns-3.17/src/core/model/callback.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/core/model/callback.cc 2013-10-26 07:07:30.023364392 -0700 @@ -46,6 +46,7 @@ return false; } +/** Attribute checker */ ATTRIBUTE_CHECKER_IMPLEMENT (Callback); } // namespace ns3 diff -Naur ns-3.17/src/core/model/callback.h ns-3.18/src/core/model/callback.h --- ns-3.17/src/core/model/callback.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/core/model/callback.h 2013-10-26 07:07:30.039364393 -0700 @@ -32,166 +32,277 @@ namespace ns3 { -/*** - * \internal - * This code was originally written based on the techniques - * described in http://www.codeproject.com/cpp/TTLFunction.asp - * It was subsequently rewritten to follow the architecture - * outlined in "Modern C++ Design" by Andrei Alexandrescu in - * chapter 5, "Generalized Functors". - * - * This code uses: - * - default template parameters to saves users from having to - * specify empty parameters when the number of parameters - * is smaller than the maximum supported number - * - the pimpl idiom: the Callback class is passed around by - * value and delegates the crux of the work to its pimpl - * pointer. - * - two pimpl implementations which derive from CallbackImpl - * FunctorCallbackImpl can be used with any functor-type - * while MemPtrCallbackImpl can be used with pointers to - * member functions. - * - a reference list implementation to implement the Callback's - * value semantics. - * - * This code most notably departs from the alexandrescu - * implementation in that it does not use type lists to specify - * and pass around the types of the callback arguments. - * Of course, it also does not use copy-destruction semantics - * and relies on a reference list rather than autoPtr to hold - * the pointer. +/** + * \ingroup core + * \defgroup callback Callbacks + */ +/** + * \ingroup callback + */ +/**@{*/ +/** + * Trait class to convert a pointer into a reference, + * used by MemPtrCallBackImpl */ template struct CallbackTraits; +/** + * Trait class to convert a pointer into a reference, + * used by MemPtrCallBackImpl + */ template struct CallbackTraits { + /** + * \param p object pointer + * \return a reference to the object pointed to by p + */ static T & GetReference (T * const p) { return *p; } }; +/**@}*/ +/** + * \ingroup callback + * \defgroup callbackimpl CallbackImpl + * CallbackImpl classes + */ +/** + * \ingroup callbackimpl + * Abstract base class for CallbackImpl + * Provides reference counting and equality test. + */ class CallbackImplBase : public SimpleRefCount { public: + /** Virtual destructor */ virtual ~CallbackImplBase () {} + /** + * Equality test + * + * \param other Callback Ptr + * \return true if we are equal + */ virtual bool IsEqual (Ptr other) const = 0; }; -// declare the CallbackImpl class +/** + * \ingroup callbackimpl + * The unqualified CallbackImpl class + */ template class CallbackImpl; -// define CallbackImpl for 0 params + +/** + * \ingroup callbackimpl + * CallbackImpl classes with varying numbers of argument types + */ +/**@{*/ +/** CallbackImpl class with no arguments. */ template class CallbackImpl : public CallbackImplBase { public: virtual ~CallbackImpl () {} - virtual R operator() (void) = 0; + virtual R operator() (void) = 0; //!< Abstract operator }; -// define CallbackImpl for 1 params +/** CallbackImpl class with one argument. */ template class CallbackImpl : public CallbackImplBase { public: virtual ~CallbackImpl () {} - virtual R operator() (T1) = 0; + virtual R operator() (T1) = 0; //!< Abstract operator }; -// define CallbackImpl for 2 params +/** CallbackImpl class with two arguments. */ template class CallbackImpl : public CallbackImplBase { public: virtual ~CallbackImpl () {} - virtual R operator() (T1, T2) = 0; + virtual R operator() (T1, T2) = 0; //!< Abstract operator }; -// define CallbackImpl for 3 params +/** CallbackImpl class with three arguments. */ template class CallbackImpl : public CallbackImplBase { public: virtual ~CallbackImpl () {} - virtual R operator() (T1, T2, T3) = 0; + virtual R operator() (T1, T2, T3) = 0; //!< Abstract operator }; -// define CallbackImpl for 4 params +/** CallbackImpl class with four arguments. */ template class CallbackImpl : public CallbackImplBase { public: virtual ~CallbackImpl () {} - virtual R operator() (T1, T2, T3, T4) = 0; + virtual R operator() (T1, T2, T3, T4) = 0; //!< Abstract operator }; -// define CallbackImpl for 5 params +/** CallbackImpl class with five arguments. */ template class CallbackImpl : public CallbackImplBase { public: virtual ~CallbackImpl () {} - virtual R operator() (T1, T2, T3, T4, T5) = 0; + virtual R operator() (T1, T2, T3, T4, T5) = 0; //!< Abstract operator }; -// define CallbackImpl for 6 params +/** CallbackImpl class with six arguments. */ template class CallbackImpl : public CallbackImplBase { public: virtual ~CallbackImpl () {} - virtual R operator() (T1, T2, T3, T4, T5, T6) = 0; + virtual R operator() (T1, T2, T3, T4, T5, T6) = 0; //!< Abstract operator }; -// define CallbackImpl for 7 params +/** CallbackImpl class with seven arguments. */ template class CallbackImpl : public CallbackImplBase { public: virtual ~CallbackImpl () {} - virtual R operator() (T1, T2, T3, T4, T5, T6, T7) = 0; + virtual R operator() (T1, T2, T3, T4, T5, T6, T7) = 0; //!< Abstract operator }; -// define CallbackImpl for 8 params +/** CallbackImpl class with eight arguments. */ template class CallbackImpl : public CallbackImplBase { public: virtual ~CallbackImpl () {} - virtual R operator() (T1, T2, T3, T4, T5, T6, T7, T8) = 0; + virtual R operator() (T1, T2, T3, T4, T5, T6, T7, T8) = 0; //!< Abstract operator }; -// define CallbackImpl for 9 params +/** CallbackImpl class with nine arguments. */ template class CallbackImpl : public CallbackImplBase { public: virtual ~CallbackImpl () {} - virtual R operator() (T1, T2, T3, T4, T5, T6, T7, T8, T9) = 0; + virtual R operator() (T1, T2, T3, T4, T5, T6, T7, T8, T9) = 0; //!< Abstract operator }; +/**@}*/ -// an impl for Functors: +/** + * \ingroup callback + * CallbackImpl with functors + */ template class FunctorCallbackImpl : public CallbackImpl { public: + /** + * Construct from a functor + * + * \param functor the functor + */ FunctorCallbackImpl (T const &functor) : m_functor (functor) {} virtual ~FunctorCallbackImpl () {} + /** + * Functor with varying numbers of arguments + * @{ + */ + /** \return Callback value */ R operator() (void) { return m_functor (); } + /** + * \param a1 first argument + * \return Callback value + */ R operator() (T1 a1) { return m_functor (a1); } + /** + * \param a1 first argument + * \param a2 second argument + * \return Callback value + */ R operator() (T1 a1,T2 a2) { return m_functor (a1,a2); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \return Callback value + */ R operator() (T1 a1,T2 a2,T3 a3) { return m_functor (a1,a2,a3); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \return Callback value + */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4) { return m_functor (a1,a2,a3,a4); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \return Callback value + */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5) { return m_functor (a1,a2,a3,a4,a5); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \param a6 sixth argument + * \return Callback value + */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6) { return m_functor (a1,a2,a3,a4,a5,a6); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \param a6 sixth argument + * \param a7 seventh argument + * \return Callback value + */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7) { return m_functor (a1,a2,a3,a4,a5,a6,a7); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \param a6 sixth argument + * \param a7 seventh argument + * \param a8 eighth argument + * \return Callback value + */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) { return m_functor (a1,a2,a3,a4,a5,a6,a7,a8); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \param a6 sixth argument + * \param a7 seventh argument + * \param a8 eighth argument + * \param a9 ninth argument + * \return Callback value + */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9) { return m_functor (a1,a2,a3,a4,a5,a6,a7,a8,a9); } + /**@}*/ + /** + * Equality test. + * + * \param other CallbackImpl Ptr + * \return true if this and other have the same functor + */ virtual bool IsEqual (Ptr other) const { FunctorCallbackImpl const *otherDerived = dynamic_cast const *> (PeekPointer (other)); @@ -206,46 +317,139 @@ return true; } private: - T m_functor; + T m_functor; //!< the functor }; -// an impl for pointer to member functions +/** + * \ingroup callback + * CallbackImpl for pointer to member functions + */ template class MemPtrCallbackImpl : public CallbackImpl { public: - MemPtrCallbackImpl (OBJ_PTR const&objPtr, MEM_PTR mem_ptr) - : m_objPtr (objPtr), m_memPtr (mem_ptr) {} + /** + * Construct from an object pointer and member function pointer + * + * \param objPtr the object pointer + * \param memPtr the object class member function + */ + MemPtrCallbackImpl (OBJ_PTR const&objPtr, MEM_PTR memPtr) + : m_objPtr (objPtr), m_memPtr (memPtr) {} virtual ~MemPtrCallbackImpl () {} + /** + * Functor with varying numbers of arguments + * @{ + */ + /** \return Callback value */ R operator() (void) { return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(); } + /** + * \param a1 first argument + * \return Callback value + */ R operator() (T1 a1) { return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1); } + /** + * \param a1 first argument + * \param a2 second argument + * \return Callback value + */ R operator() (T1 a1,T2 a2) { return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \return Callback value + */ R operator() (T1 a1,T2 a2,T3 a3) { return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \return Callback value + */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4) { return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \return Callback value + */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5) { return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4, a5); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \param a6 sixth argument + * \return Callback value + */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6) { return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4, a5, a6); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \param a6 sixth argument + * \param a7 seventh argument + * \return Callback value + */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7) { return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4, a5, a6, a7); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \param a6 sixth argument + * \param a7 seventh argument + * \param a8 eighth argument + * \return Callback value + */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) { return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4, a5, a6, a7, a8); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \param a6 sixth argument + * \param a7 seventh argument + * \param a8 eighth argument + * \param a9 ninth argument + * \return Callback value + */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, T9 a9) { return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4, a5, a6, a7, a8, a9); } + /**@}*/ + /** + * Equality test. + * + * \param other Callback Ptr + * \return true if we have the same object and member function + */ virtual bool IsEqual (Ptr other) const { MemPtrCallbackImpl const *otherDerived = dynamic_cast const *> (PeekPointer (other)); @@ -261,45 +465,125 @@ return true; } private: - OBJ_PTR const m_objPtr; - MEM_PTR m_memPtr; + OBJ_PTR const m_objPtr; //!< the object pointer + MEM_PTR m_memPtr; //!< the member function pointer }; -// an impl for Bound Functors: +/** + * \ingroup callback + * CallbackImpl for functors with first argument bound at construction + */ template class BoundFunctorCallbackImpl : public CallbackImpl { public: + /** + * Construct from functor and a bound argument + * \param functor the functor + * \param a the argument to bind + */ template BoundFunctorCallbackImpl (FUNCTOR functor, ARG a) : m_functor (functor), m_a (a) {} virtual ~BoundFunctorCallbackImpl () {} + /** + * Functor with varying numbers of arguments + * @{ + */ + /** \return Callback value */ R operator() (void) { return m_functor (m_a); } + /** + * \param a1 first argument + * \return Callback value + */ R operator() (T1 a1) { return m_functor (m_a,a1); } + /** + * \param a1 first argument + * \param a2 second argument + * \return Callback value + */ R operator() (T1 a1,T2 a2) { return m_functor (m_a,a1,a2); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \return Callback value + */ R operator() (T1 a1,T2 a2,T3 a3) { return m_functor (m_a,a1,a2,a3); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \return Callback value + */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4) { return m_functor (m_a,a1,a2,a3,a4); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \return Callback value + */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5) { return m_functor (m_a,a1,a2,a3,a4,a5); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \param a6 sixth argument + * \return Callback value + */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6) { return m_functor (m_a,a1,a2,a3,a4,a5,a6); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \param a6 sixth argument + * \param a7 seventh argument + * \return Callback value + */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7) { return m_functor (m_a,a1,a2,a3,a4,a5,a6,a7); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \param a6 sixth argument + * \param a7 seventh argument + * \param a8 eighth argument + * \return Callback value + */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) { return m_functor (m_a,a1,a2,a3,a4,a5,a6,a7,a8); } + /**@}*/ + /** + * Equality test. + * + * \param other Callback Ptr + * \return true if we have the same functor and bound arguments + */ virtual bool IsEqual (Ptr other) const { BoundFunctorCallbackImpl const *otherDerived = dynamic_cast const *> (PeekPointer (other)); @@ -315,39 +599,279 @@ return true; } private: - T m_functor; - typename TypeTraits::ReferencedType m_a; + T m_functor; //!< The functor + typename TypeTraits::ReferencedType m_a; //!< the bound argument }; +/** + * \ingroup callback + * CallbackImpl for functors with first two arguments bound at construction + */ +template +class TwoBoundFunctorCallbackImpl : public CallbackImpl { +public: + /** + * Construct from functor and two arguments + * \param functor the functor + * \param arg1 the first argument to bind + * \param arg2 the second argument to bind + */ + template + TwoBoundFunctorCallbackImpl (FUNCTOR functor, ARG1 arg1, ARG2 arg2) + : m_functor (functor), m_a1 (arg1), m_a2 (arg2) {} + virtual ~TwoBoundFunctorCallbackImpl () {} + /** + * Functor with varying numbers of arguments + * @{ + */ + /** \return Callback value */ + R operator() (void) { + return m_functor (m_a1,m_a2); + } + /** + * \param a1 first argument + * \return Callback value + */ + R operator() (T1 a1) { + return m_functor (m_a1,m_a2,a1); + } + /** + * \param a1 first argument + * \param a2 second argument + * \return Callback value + */ + R operator() (T1 a1,T2 a2) { + return m_functor (m_a1,m_a2,a1,a2); + } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \return Callback value + */ + R operator() (T1 a1,T2 a2,T3 a3) { + return m_functor (m_a1,m_a2,a1,a2,a3); + } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \return Callback value + */ + R operator() (T1 a1,T2 a2,T3 a3,T4 a4) { + return m_functor (m_a1,m_a2,a1,a2,a3,a4); + } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \return Callback value + */ + R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5) { + return m_functor (m_a1,m_a2,a1,a2,a3,a4,a5); + } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \param a6 sixth argument + * \return Callback value + */ + R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6) { + return m_functor (m_a1,m_a2,a1,a2,a3,a4,a5,a6); + } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \param a6 sixth argument + * \param a7 seventh argument + * \return Callback value + */ + R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7) { + return m_functor (m_a1,m_a2,a1,a2,a3,a4,a5,a6,a7); + } + /**@}*/ + /** + * Equality test. + * + * \param other Callback Ptr + * \return true if we have the same functor and bound arguments + */ + virtual bool IsEqual (Ptr other) const { + TwoBoundFunctorCallbackImpl const *otherDerived = + dynamic_cast const *> (PeekPointer (other)); + if (otherDerived == 0) + { + return false; + } + else if (otherDerived->m_functor != m_functor || + otherDerived->m_a1 != m_a1 || otherDerived->m_a2 != m_a2) + { + return false; + } + return true; + } +private: + T m_functor; //!< The functor + typename TypeTraits::ReferencedType m_a1; //!< first bound argument + typename TypeTraits::ReferencedType m_a2; //!< second bound argument +}; + +/** + * \ingroup callback + * CallbackImpl for functors with first three arguments bound at construction + */ +template +class ThreeBoundFunctorCallbackImpl : public CallbackImpl { +public: + /** + * Construct from functor and three arguments + * \param functor the functor + * \param arg1 the first argument to bind + * \param arg2 the second argument to bind + * \param arg3 the third argument to bind + */ + template + ThreeBoundFunctorCallbackImpl (FUNCTOR functor, ARG1 arg1, ARG2 arg2, ARG3 arg3) + : m_functor (functor), m_a1 (arg1), m_a2 (arg2), m_a3 (arg3) {} + virtual ~ThreeBoundFunctorCallbackImpl () {} + /** + * Functor with varying numbers of arguments + * @{ + */ + /** \return Callback value */ + R operator() (void) { + return m_functor (m_a1,m_a2,m_a3); + } + /** + * \param a1 first argument + * \return Callback value + */ + R operator() (T1 a1) { + return m_functor (m_a1,m_a2,m_a3,a1); + } + /** + * \param a1 first argument + * \param a2 second argument + * \return Callback value + */ + R operator() (T1 a1,T2 a2) { + return m_functor (m_a1,m_a2,m_a3,a1,a2); + } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \return Callback value + */ + R operator() (T1 a1,T2 a2,T3 a3) { + return m_functor (m_a1,m_a2,m_a3,a1,a2,a3); + } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \return Callback value + */ + R operator() (T1 a1,T2 a2,T3 a3,T4 a4) { + return m_functor (m_a1,m_a2,m_a3,a1,a2,a3,a4); + } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \return Callback value + */ + R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5) { + return m_functor (m_a1,m_a2,m_a3,a1,a2,a3,a4,a5); + } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \param a6 sixth argument + * \return Callback value + */ + R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6) { + return m_functor (m_a1,m_a2,m_a3,a1,a2,a3,a4,a5,a6); + } + /**@}*/ + /** + * Equality test. + * + * \param other Callback Ptr + * \return true if we have the same functor and bound arguments + */ + virtual bool IsEqual (Ptr other) const { + ThreeBoundFunctorCallbackImpl const *otherDerived = + dynamic_cast const *> (PeekPointer (other)); + if (otherDerived == 0) + { + return false; + } + else if (otherDerived->m_functor != m_functor || + otherDerived->m_a1 != m_a1 || otherDerived->m_a2 != m_a2 || otherDerived->m_a3 != m_a3) + { + return false; + } + return true; + } +private: + T m_functor; //!< The functor + typename TypeTraits::ReferencedType m_a1; //!< first bound argument + typename TypeTraits::ReferencedType m_a2; //!< second bound argument + typename TypeTraits::ReferencedType m_a3; //!< third bound argument +}; +/** + * \ingroup callback + * Base class for Callback class. + * Provides pimpl abstraction. + */ class CallbackBase { public: CallbackBase () : m_impl () {} + /** \return the impl pointer */ Ptr GetImpl (void) const { return m_impl; } protected: + /** + * Construct from a pimpl + * \param impl the CallbackImplBase Ptr + */ CallbackBase (Ptr impl) : m_impl (impl) {} - Ptr m_impl; + Ptr m_impl; //!< the pimpl + /** + * \param mangled the mangled string + * \return the demangled form of mangled + */ static std::string Demangle (const std::string& mangled); }; /** + * \ingroup callback * \brief Callback template class * * This class template implements the Functor Design Pattern. * It is used to declare the type of a Callback: * - the first non-optional template argument represents * the return type of the callback. - * - the second optional template argument represents - * the type of the first argument to the callback. - * - the third optional template argument represents - * the type of the second argument to the callback. - * - the fourth optional template argument represents - * the type of the third argument to the callback. - * - the fifth optional template argument represents - * the type of the fourth argument to the callback. - * - the sixth optional template argument represents - * the type of the fifth argument to the callback. + * - the remaining (optional) template arguments represent + * the type of the subsequent arguments to the callback. + * - up to nine arguments are supported. * * Callback instances are built with the \ref MakeCallback * template functions. Callback instances have POD semantics: @@ -358,8 +882,35 @@ * Sample code which shows how to use this class template * as well as the function templates \ref MakeCallback : * \include src/core/examples/main-callback.cc + * + * \internal + * This code was originally written based on the techniques + * described in http://www.codeproject.com/cpp/TTLFunction.asp + * It was subsequently rewritten to follow the architecture + * outlined in "Modern C++ Design" by Andrei Alexandrescu in + * chapter 5, "Generalized Functors". + * + * This code uses: + * - default template parameters to saves users from having to + * specify empty parameters when the number of parameters + * is smaller than the maximum supported number + * - the pimpl idiom: the Callback class is passed around by + * value and delegates the crux of the work to its pimpl + * pointer. + * - two pimpl implementations which derive from CallbackImpl + * FunctorCallbackImpl can be used with any functor-type + * while MemPtrCallbackImpl can be used with pointers to + * member functions. + * - a reference list implementation to implement the Callback's + * value semantics. + * + * This code most notably departs from the alexandrescu + * implementation in that it does not use type lists to specify + * and pass around the types of the callback arguments. + * Of course, it also does not use copy-destruction semantics + * and relies on a reference list rather than autoPtr to hold + * the pointer. */ - template Callback (FUNCTOR const &functor, bool, bool) : CallbackBase (Create > (functor)) {} + /** + * Construct a member function pointer call back. + * + * \param objPtr pointer to the object + * \param memPtr pointer to the member function + */ template - Callback (OBJ_PTR const &objPtr, MEM_PTR mem_ptr) - : CallbackBase (Create > (objPtr, mem_ptr)) + Callback (OBJ_PTR const &objPtr, MEM_PTR memPtr) + : CallbackBase (Create > (objPtr, memPtr)) {} + /** + * Construct from a CallbackImpl pointer + * + * \param impl the CallbackImpl Ptr + */ Callback (Ptr > const &impl) : CallbackBase (impl) {} + /** + * Bind the first arguments + * + * \param a argument to bind + * \return the bound callback + */ template Callback Bind (T a) { Ptr > impl = @@ -396,58 +971,201 @@ return Callback (impl); } + /** + * Bind the first two arguments + * + * \param a1 first argument to bind + * \param a2 second argument to bind + * \return the bound callback + */ + template + Callback TwoBind (TX1 a1, TX2 a2) { + Ptr > impl = + Ptr > ( + new TwoBoundFunctorCallbackImpl< + Callback, + R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (*this, a1, a2), false); + return Callback (impl); + } + + /** + * Bind the first three arguments + * + * \param a1 first argument to bind + * \param a2 second argument to bind + * \param a3 third argument to bind + * \return the bound callback + */ + template + Callback ThreeBind (TX1 a1, TX2 a2, TX3 a3) { + Ptr > impl = + Ptr > ( + new ThreeBoundFunctorCallbackImpl< + Callback, + R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (*this, a1, a2, a3), false); + return Callback (impl); + } + + /** + * Check for null implementation + * + * \return true if I don't have an implementation + */ bool IsNull (void) const { return (DoPeekImpl () == 0) ? true : false; } + /** Discard the implementation, set it to null */ void Nullify (void) { m_impl = 0; } + /** + * Functor with varying numbers of arguments + * @{ + */ + /** \return Callback value */ R operator() (void) const { return (*(DoPeekImpl ()))(); } + /** + * \param a1 first argument + * \return Callback value + */ R operator() (T1 a1) const { return (*(DoPeekImpl ()))(a1); } + /** + * \param a1 first argument + * \param a2 second argument + * \return Callback value + */ R operator() (T1 a1, T2 a2) const { return (*(DoPeekImpl ()))(a1,a2); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \return Callback value + */ R operator() (T1 a1, T2 a2, T3 a3) const { return (*(DoPeekImpl ()))(a1,a2,a3); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \return Callback value + */ R operator() (T1 a1, T2 a2, T3 a3, T4 a4) const { return (*(DoPeekImpl ()))(a1,a2,a3,a4); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \return Callback value + */ R operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5) const { return (*(DoPeekImpl ()))(a1,a2,a3,a4,a5); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \param a6 sixth argument + * \return Callback value + */ R operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5,T6 a6) const { return (*(DoPeekImpl ()))(a1,a2,a3,a4,a5,a6); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \param a6 sixth argument + * \param a7 seventh argument + * \return Callback value + */ R operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5,T6 a6,T7 a7) const { return (*(DoPeekImpl ()))(a1,a2,a3,a4,a5,a6,a7); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \param a6 sixth argument + * \param a7 seventh argument + * \param a8 seventh argument + * \return Callback value + */ R operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) const { return (*(DoPeekImpl ()))(a1,a2,a3,a4,a5,a6,a7,a8); } + /** + * \param a1 first argument + * \param a2 second argument + * \param a3 third argument + * \param a4 fourth argument + * \param a5 fifth argument + * \param a6 sixth argument + * \param a7 seventh argument + * \param a8 eighth argument + * \param a9 ninth argument + * \return Callback value + */ R operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, T9 a9) const { return (*(DoPeekImpl ()))(a1,a2,a3,a4,a5,a6,a7,a8,a9); } + /**@}*/ + /** + * Equality test. + * + * \param other Callback + * \return true if we are equal + */ bool IsEqual (const CallbackBase &other) const { return m_impl->IsEqual (other.GetImpl ()); } + /** + * Check for compatible types + * + * \param other Callback Ptr + * \return true if other can be dynamic_cast to my type + */ bool CheckType (const CallbackBase & other) const { return DoCheckType (other.GetImpl ()); } + /** + * Adopt the other's implementation, if type compatible + * + * \param other Callback + */ void Assign (const CallbackBase &other) { DoAssign (other.GetImpl ()); } private: + /** \return the pimpl pointer */ CallbackImpl *DoPeekImpl (void) const { return static_cast *> (PeekPointer (m_impl)); } + /** + * Check for compatible types + * + * \param other Callback Ptr + * \return true if other can be dynamic_cast to my type + */ bool DoCheckType (Ptr other) const { if (other != 0 && dynamic_cast *> (PeekPointer (other)) != 0) { @@ -462,6 +1180,11 @@ return false; } } + /** + * Adopt the other's implementation, if type compatible + * + * \param other Callback Ptr to adopt from + */ void DoAssign (Ptr other) { if (!DoCheckType (other)) { @@ -474,6 +1197,14 @@ }; +/** + * Inequality test. + * + * \param a Callback + * \param b Callback + * + * \return true if the Callbacks are not equal + */ template Callback MakeCallback (R (T::*memPtr)(void), OBJ objPtr) { return Callback (objPtr, memPtr); } template -Callback MakeCallback (R (T::*mem_ptr)() const, OBJ objPtr) { - return Callback (objPtr, mem_ptr); +Callback MakeCallback (R (T::*memPtr)() const, OBJ objPtr) { + return Callback (objPtr, memPtr); } -/** - * \ingroup MakeCallback - * \param mem_ptr class method member pointer - * \param objPtr class instance - * \return a wrapper Callback - * Build Callbacks for class method members which takes one argument - * and potentially return a value. - */ template -Callback MakeCallback (R (T::*mem_ptr)(T1), OBJ objPtr) { - return Callback (objPtr, mem_ptr); +Callback MakeCallback (R (T::*memPtr)(T1), OBJ objPtr) { + return Callback (objPtr, memPtr); } template -Callback MakeCallback (R (T::*mem_ptr)(T1) const, OBJ objPtr) { - return Callback (objPtr, mem_ptr); +Callback MakeCallback (R (T::*memPtr)(T1) const, OBJ objPtr) { + return Callback (objPtr, memPtr); } -/** - * \ingroup MakeCallback - * \param mem_ptr class method member pointer - * \param objPtr class instance - * \return a wrapper Callback - * Build Callbacks for class method members which takes two arguments - * and potentially return a value. - */ template -Callback MakeCallback (R (T::*mem_ptr)(T1,T2), OBJ objPtr) { - return Callback (objPtr, mem_ptr); +Callback MakeCallback (R (T::*memPtr)(T1,T2), OBJ objPtr) { + return Callback (objPtr, memPtr); } template -Callback MakeCallback (R (T::*mem_ptr)(T1,T2) const, OBJ objPtr) { - return Callback (objPtr, mem_ptr); +Callback MakeCallback (R (T::*memPtr)(T1,T2) const, OBJ objPtr) { + return Callback (objPtr, memPtr); } -/** - * \ingroup MakeCallback - * \param mem_ptr class method member pointer - * \param objPtr class instance - * \return a wrapper Callback - * Build Callbacks for class method members which takes three arguments - * and potentially return a value. - */ template -Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3), OBJ objPtr) { - return Callback (objPtr, mem_ptr); +Callback MakeCallback (R (T::*memPtr)(T1,T2,T3), OBJ objPtr) { + return Callback (objPtr, memPtr); } template -Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3) const, OBJ objPtr) { - return Callback (objPtr, mem_ptr); +Callback MakeCallback (R (T::*memPtr)(T1,T2,T3) const, OBJ objPtr) { + return Callback (objPtr, memPtr); } -/** - * \ingroup MakeCallback - * \param mem_ptr class method member pointer - * \param objPtr class instance - * \return a wrapper Callback - * Build Callbacks for class method members which takes four arguments - * and potentially return a value. - */ template -Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4), OBJ objPtr) { - return Callback (objPtr, mem_ptr); +Callback MakeCallback (R (T::*memPtr)(T1,T2,T3,T4), OBJ objPtr) { + return Callback (objPtr, memPtr); } template -Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4) const, OBJ objPtr) { - return Callback (objPtr, mem_ptr); +Callback MakeCallback (R (T::*memPtr)(T1,T2,T3,T4) const, OBJ objPtr) { + return Callback (objPtr, memPtr); } -/** - * \ingroup MakeCallback - * \param mem_ptr class method member pointer - * \param objPtr class instance - * \return a wrapper Callback - * Build Callbacks for class method members which takes five arguments - * and potentially return a value. - */ template -Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5), OBJ objPtr) { - return Callback (objPtr, mem_ptr); +Callback MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5), OBJ objPtr) { + return Callback (objPtr, memPtr); } template -Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5) const, OBJ objPtr) { - return Callback (objPtr, mem_ptr); +Callback MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5) const, OBJ objPtr) { + return Callback (objPtr, memPtr); } -/** - * \ingroup MakeCallback - * \param mem_ptr class method member pointer - * \param objPtr class instance - * \return a wrapper Callback - * Build Callbacks for class method members which takes six arguments - * and potentially return a value. - */ template -Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6), OBJ objPtr) { - return Callback (objPtr, mem_ptr); +Callback MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6), OBJ objPtr) { + return Callback (objPtr, memPtr); } template -Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6) const, OBJ objPtr) { - return Callback (objPtr, mem_ptr); +Callback MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6) const, OBJ objPtr) { + return Callback (objPtr, memPtr); } - -/** - * \ingroup MakeCallback - * \param mem_ptr class method member pointer - * \param objPtr class instance - * \return a wrapper Callback - * Build Callbacks for class method members which takes seven arguments - * and potentially return a value. - */ template -Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6,T7), OBJ objPtr) { - return Callback (objPtr, mem_ptr); +Callback MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6,T7), OBJ objPtr) { + return Callback (objPtr, memPtr); } template -Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6,T7) const, OBJ objPtr) { - return Callback (objPtr, mem_ptr); +Callback MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6,T7) const, OBJ objPtr) { + return Callback (objPtr, memPtr); } - - -/** - * \ingroup MakeCallback - * \param mem_ptr class method member pointer - * \param objPtr class instance - * \return a wrapper Callback - * Build Callbacks for class method members which takes eight arguments - * and potentially return a value. - */ template -Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6,T7,T8), OBJ objPtr) { - return Callback (objPtr, mem_ptr); +Callback MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6,T7,T8), OBJ objPtr) { + return Callback (objPtr, memPtr); } template -Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6,T7,T8) const, OBJ objPtr) { - return Callback (objPtr, mem_ptr); +Callback MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6,T7,T8) const, OBJ objPtr) { + return Callback (objPtr, memPtr); } - -/** - * \ingroup MakeCallback - * \param mem_ptr class method member pointer - * \param objPtr class instance - * \return a wrapper Callback - * Build Callbacks for class method members which takes nine arguments - * and potentially return a value. - */ template -Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6,T7,T8,T9), OBJ objPtr) { - return Callback (objPtr, mem_ptr); +Callback MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6,T7,T8,T9), OBJ objPtr) { + return Callback (objPtr, memPtr); } template -Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6,T7,T8,T9) const, OBJ objPtr) { - return Callback (objPtr, mem_ptr); +Callback MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6,T7,T8,T9) const, OBJ objPtr) { + return Callback (objPtr, memPtr); } +/**@}*/ /** - * \ingroup MakeCallback + * \ingroup callback + * \defgroup makecallbackfnptr MakeCallback from function pointers + * + * Build Callbacks for functions which take varying numbers of arguments + * and potentially returning a value. + */ +/** + * \ingroup makecallbackfnptr + * @{ + */ +/** * \param fnPtr function pointer * \return a wrapper Callback - * Build Callbacks for functions which takes no arguments - * and potentially return a value. + * + * Build Callbacks for functions which take varying numbers of arguments + * and potentially returning a value. */ template Callback MakeCallback (R (*fnPtr)()) { return Callback (fnPtr, true, true); } -/** - * \ingroup MakeCallback - * \param fnPtr function pointer - * \return a wrapper Callback - * Build Callbacks for functions which takes one argument - * and potentially return a value. - */ template Callback MakeCallback (R (*fnPtr)(T1)) { return Callback (fnPtr, true, true); } -/** - * \ingroup MakeCallback - * \param fnPtr function pointer - * \return a wrapper Callback - * Build Callbacks for functions which takes two arguments - * and potentially return a value. - */ template Callback MakeCallback (R (*fnPtr)(T1,T2)) { return Callback (fnPtr, true, true); } -/** - * \ingroup MakeCallback - * \param fnPtr function pointer - * \return a wrapper Callback - * Build Callbacks for functions which takes three arguments - * and potentially return a value. - */ template Callback MakeCallback (R (*fnPtr)(T1,T2,T3)) { return Callback (fnPtr, true, true); } -/** - * \ingroup MakeCallback - * \param fnPtr function pointer - * \return a wrapper Callback - * Build Callbacks for functions which takes four arguments - * and potentially return a value. - */ template Callback MakeCallback (R (*fnPtr)(T1,T2,T3,T4)) { return Callback (fnPtr, true, true); } -/** - * \ingroup MakeCallback - * \param fnPtr function pointer - * \return a wrapper Callback - * Build Callbacks for functions which takes five arguments - * and potentially return a value. - */ template Callback MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5)) { return Callback (fnPtr, true, true); } -/** - * \ingroup MakeCallback - * \param fnPtr function pointer - * \return a wrapper Callback - * Build Callbacks for functions which takes six arguments - * and potentially return a value. - */ template Callback MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5,T6)) { return Callback (fnPtr, true, true); } - -/** - * \ingroup MakeCallback - * \param fnPtr function pointer - * \return a wrapper Callback - * Build Callbacks for functions which takes seven arguments - * and potentially return a value. - */ template Callback MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5,T6,T7)) { return Callback (fnPtr, true, true); } - -/** - * \ingroup MakeCallback - * \param fnPtr function pointer - * \return a wrapper Callback - * Build Callbacks for functions which takes eight arguments - * and potentially return a value. - */ template Callback MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5,T6,T7,T8)) { return Callback (fnPtr, true, true); } - -/** - * \ingroup MakeCallback - * \param fnPtr function pointer - * \return a wrapper Callback - * Build Callbacks for functions which takes nine arguments - * and potentially return a value. - */ template Callback MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5,T6,T7,T8,T9)) { return Callback (fnPtr, true, true); } - - +/**@}*/ /** - * \ingroup MakeCallback - * \return a wrapper Callback - * Build a null callback which takes no arguments - * and potentially return a value. + * \ingroup callback + * \defgroup makenullcallback MakeCallbacks with no arguments */ +/** + * \ingroup makenullcallback + * @{ + */ +/** + * \return a wrapper Callback + * + * Build null Callbacks which take no arguments, + * for varying number of template arguments, + * and potentially returning a value. + */ template Callback MakeNullCallback (void) { return Callback (); } -/** - * \ingroup MakeCallback - * \overload Callback MakeNullCallback (void) - * \return a wrapper Callback - * Build a null callback which takes one argument - * and potentially return a value. - */ template Callback MakeNullCallback (void) { return Callback (); } -/** - * \ingroup MakeCallback - * \overload Callback MakeNullCallback (void) - * \return a wrapper Callback - * Build a null callback which takes two arguments - * and potentially return a value. - */ template Callback MakeNullCallback (void) { return Callback (); } -/** - * \ingroup MakeCallback - * \overload Callback MakeNullCallback (void) - * \return a wrapper Callback - * Build a null callback which takes three arguments - * and potentially return a value. - */ template Callback MakeNullCallback (void) { return Callback (); } -/** - * \ingroup MakeCallback - * \overload Callback MakeNullCallback (void) - * \return a wrapper Callback - * Build a null callback which takes four arguments - * and potentially return a value. - */ template Callback MakeNullCallback (void) { return Callback (); } -/** - * \ingroup MakeCallback - * \overload Callback MakeNullCallback (void) - * \return a wrapper Callback - * Build a null callback which takes five arguments - * and potentially return a value. - */ template Callback MakeNullCallback (void) { return Callback (); } -/** - * \ingroup MakeCallback - * \overload Callback MakeNullCallback (void) - * \return a wrapper Callback - * Build a null callback which takes six arguments - * and potentially return a value. - */ template Callback MakeNullCallback (void) { return Callback (); } - -/** - * \ingroup MakeCallback - * \overload Callback MakeNullCallback (void) - * \return a wrapper Callback - * Build a null callback which takes seven arguments - * and potentially return a value. - */ template Callback MakeNullCallback (void) { return Callback (); } - -/** - * \ingroup MakeCallback - * \overload Callback MakeNullCallback (void) - * \return a wrapper Callback - * Build a null callback which takes eight arguments - * and potentially return a value. - */ template Callback MakeNullCallback (void) { return Callback (); } - -/** - * \ingroup MakeCallback - * \overload Callback MakeNullCallback (void) - * \return a wrapper Callback - * Build a null callback which takes nine arguments - * and potentially return a value. - */ template Callback MakeNullCallback (void) { return Callback (); } +/**@}*/ -/* +/** + * \ingroup callback + * \defgroup makeboundcallback MakeBoundCallback from functions bound with up to three arguments. + */ + +/** + * \ingroup makeboundcallback + * + * Build bound Callbacks which take varying numbers of arguments, + * and potentially returning a value. + * + * \internal + * * The following is experimental code. It works but we have * not yet determined whether or not it is really useful and whether * or not we really want to use it. + * + * @{ */ - +/** + * @{ + * \param fnPtr function pointer + * \param a1 first bound argument + * \return a bound Callback + */ template -Callback MakeBoundCallback (R (*fnPtr)(TX), ARG a) { +Callback MakeBoundCallback (R (*fnPtr)(TX), ARG a1) { Ptr > impl = - Create >(fnPtr, a); + Create >(fnPtr, a1); return Callback (impl); } - template -Callback MakeBoundCallback (R (*fnPtr)(TX,T1), ARG a) { +Callback MakeBoundCallback (R (*fnPtr)(TX,T1), ARG a1) { Ptr > impl = - Create > (fnPtr, a); + Create > (fnPtr, a1); return Callback (impl); } template -Callback MakeBoundCallback (R (*fnPtr)(TX,T1,T2), ARG a) { +Callback MakeBoundCallback (R (*fnPtr)(TX,T1,T2), ARG a1) { Ptr > impl = - Create > (fnPtr, a); + Create > (fnPtr, a1); return Callback (impl); } template -Callback MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3), ARG a) { +Callback MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3), ARG a1) { Ptr > impl = - Create > (fnPtr, a); + Create > (fnPtr, a1); return Callback (impl); } template -Callback MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4), ARG a) { +Callback MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4), ARG a1) { Ptr > impl = - Create > (fnPtr, a); + Create > (fnPtr, a1); return Callback (impl); } template -Callback MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5), ARG a) { +Callback MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5), ARG a1) { Ptr > impl = - Create > (fnPtr, a); + Create > (fnPtr, a1); return Callback (impl); } template -Callback MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5,T6), ARG a) { +Callback MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5,T6), ARG a1) { Ptr > impl = - Create > (fnPtr, a); + Create > (fnPtr, a1); return Callback (impl); } template -Callback MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5,T6,T7), ARG a) { +Callback MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5,T6,T7), ARG a1) { Ptr > impl = - Create > (fnPtr, a); + Create > (fnPtr, a1); return Callback (impl); } template -Callback MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5,T6,T7,T8), ARG a) { +Callback MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5,T6,T7,T8), ARG a1) { Ptr > impl = - Create > (fnPtr, a); + Create > (fnPtr, a1); return Callback (impl); } +/**@}*/ + +/** + * \param fnPtr function pointer + * \param a1 first bound argument + * \param a2 second bound argument + * \return a bound Callback + * @{ + */ +template +Callback MakeBoundCallback (R (*fnPtr)(TX1,TX2), ARG1 a1, ARG2 a2) { + Ptr > impl = + Create >(fnPtr, a1, a2); + return Callback (impl); +} +template +Callback MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1), ARG1 a1, ARG2 a2) { + Ptr > impl = + Create > (fnPtr, a1, a2); + return Callback (impl); +} +template +Callback MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1,T2), ARG1 a1, ARG2 a2) { + Ptr > impl = + Create > (fnPtr, a1, a2); + return Callback (impl); +} +template +Callback MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1,T2,T3), ARG1 a1, ARG2 a2) { + Ptr > impl = + Create > (fnPtr, a1, a2); + return Callback (impl); +} +template +Callback MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1,T2,T3,T4), ARG1 a1, ARG2 a2) { + Ptr > impl = + Create > (fnPtr, a1, a2); + return Callback (impl); +} +template +Callback MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1,T2,T3,T4,T5), ARG1 a1, ARG2 a2) { + Ptr > impl = + Create > (fnPtr, a1, a2); + return Callback (impl); +} +template +Callback MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1,T2,T3,T4,T5,T6), ARG1 a1, ARG2 a2) { + Ptr > impl = + Create > (fnPtr, a1, a2); + return Callback (impl); +} +template +Callback MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1,T2,T3,T4,T5,T6,T7), ARG1 a1, ARG2 a2) { + Ptr > impl = + Create > (fnPtr, a1, a2); + return Callback (impl); +} +/**@}*/ + +/** + * \param a1 first bound argument + * \param a2 second bound argument + * \param a3 third bound argument + * \param fnPtr function pointer + * \return a bound Callback + * @{ + */ +template +Callback MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3), ARG1 a1, ARG2 a2, ARG3 a3) { + Ptr > impl = + Create >(fnPtr, a1, a2, a3); + return Callback (impl); +} +template +Callback MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3,T1), ARG1 a1, ARG2 a2, ARG3 a3) { + Ptr > impl = + Create > (fnPtr, a1, a2, a3); + return Callback (impl); +} +template +Callback MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3,T1,T2), ARG1 a1, ARG2 a2, ARG3 a3) { + Ptr > impl = + Create > (fnPtr, a1, a2, a3); + return Callback (impl); +} +template +Callback MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3,T1,T2,T3), ARG1 a1, ARG2 a2, ARG3 a3) { + Ptr > impl = + Create > (fnPtr, a1, a2, a3); + return Callback (impl); +} +template +Callback MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3,T1,T2,T3,T4), ARG1 a1, ARG2 a2, ARG3 a3) { + Ptr > impl = + Create > (fnPtr, a1, a2, a3); + return Callback (impl); +} +template +Callback MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3,T1,T2,T3,T4,T5), ARG1 a1, ARG2 a2, ARG3 a3) { + Ptr > impl = + Create > (fnPtr, a1, a2, a3); + return Callback (impl); +} +template +Callback MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3,T1,T2,T3,T4,T5,T6), ARG1 a1, ARG2 a2, ARG3 a3) { + Ptr > impl = + Create > (fnPtr, a1, a2, a3); + return Callback (impl); +} +/**@}*/ + +/**@}*/ + } // namespace ns3 namespace ns3 { +/** + * \ingroup callback + * AttributeValue form of a Callback + */ class CallbackValue : public AttributeValue { public: CallbackValue (); - CallbackValue (const CallbackBase &base); + /** + * Copy constructor + * \param base Callback to copy + */ + CallbackValue (const CallbackBase &base); virtual ~CallbackValue (); + /** \param base the Callbackbase to use */ void Set (CallbackBase base); + /** + * Give value my callback, if type compatible + * + * \param value destination callback + * \returns true if successful + */ template bool GetAccessor (T &value) const; + /** \return a copy of this CallBack */ virtual Ptr Copy (void) const; + /** + * Serialize to string + * \param checker the checker to validate with + * \return serialize this pimpl + */ virtual std::string SerializeToString (Ptr checker) const; + /** + * Deserialize from string (not implemented) + * + * \param value source string + * \param checker checker to validate with + * \return true if successful + */ virtual bool DeserializeFromString (std::string value, Ptr checker); private: - CallbackBase m_value; + CallbackBase m_value; //!< the CallbackBase }; +/** Attribute helpers @{ */ ATTRIBUTE_ACCESSOR_DEFINE (Callback); ATTRIBUTE_CHECKER_DEFINE (Callback); +/**@}*/ } // namespace ns3 diff -Naur ns-3.17/src/core/model/command-line.cc ns-3.18/src/core/model/command-line.cc --- ns-3.17/src/core/model/command-line.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/core/model/command-line.cc 2013-10-26 07:07:30.035364393 -0700 @@ -18,12 +18,16 @@ * Authors: Mathieu Lacage */ -#include // for exit +#include // for transform +#include // for tolower +#include // for exit +#include // for setw, boolalpha #include "command-line.h" #include "log.h" #include "config.h" #include "global-value.h" +#include "system-path.h" #include "type-id.h" #include "string.h" @@ -62,6 +66,8 @@ { m_items.push_back (*i); } + m_usage = cmd.m_usage; + m_name = cmd.m_name; } void CommandLine::Clear (void) @@ -73,6 +79,20 @@ delete *i; } m_items.clear (); + m_usage = ""; + m_name = ""; +} + +void +CommandLine::Usage (const std::string usage) +{ + m_usage = usage; +} + +std::string +CommandLine::GetName () const +{ + return m_name; } CommandLine::Item::~Item () @@ -81,10 +101,12 @@ } void -CommandLine::Parse (int iargc, char *argv[]) const +CommandLine::Parse (int iargc, char *argv[]) { NS_LOG_FUNCTION (this << iargc << argv); + m_name = SystemPath::Split (argv[0]).back (); + int argc = iargc; for (argc--, argv++; argc > 0; argc--, argv++) { @@ -125,91 +147,132 @@ } void -CommandLine::PrintHelp (void) const +CommandLine::PrintHelp (std::ostream &os) const { NS_LOG_FUNCTION (this); - std::cout << "--PrintHelp: Print this help message." << std::endl; - std::cout << "--PrintGroups: Print the list of groups." << std::endl; - std::cout << "--PrintTypeIds: Print all TypeIds." << std::endl; - std::cout << "--PrintGroup=[group]: Print all TypeIds of group." << std::endl; - std::cout << "--PrintAttributes=[typeid]: Print all attributes of typeid." << std::endl; - std::cout << "--PrintGlobals: Print the list of globals." << std::endl; + os << m_name << " [Program Arguments] [General Arguments]" + << std::endl; + + if (m_usage.length ()) + { + os << std::endl; + os << m_usage << std::endl; + } + if (!m_items.empty ()) { - std::cout << "User Arguments:" << std::endl; + size_t width = 0; + for (Items::const_iterator i = m_items.begin (); i != m_items.end (); ++i) + { + width = std::max (width, (*i)->m_name.size ()); + } + width += 3; + + os << std::endl; + os << "Program Arguments:" << std::endl; for (Items::const_iterator i = m_items.begin (); i != m_items.end (); ++i) { - std::cout << " --" << (*i)->m_name << ": " << (*i)->m_help << std::endl; + os << " --" + << std::left << std::setw (width) << ( (*i)->m_name + ":") + << std::right + << (*i)->m_help; + + if ( (*i)->HasDefault ()) + { + os << " [" << (*i)->GetDefault () << "]"; + } + os << std::endl; } } + + os << std::endl; + os + << "General Arguments:\n" + << " --PrintGlobals: Print the list of globals.\n" + << " --PrintGroups: Print the list of groups.\n" + << " --PrintGroup=[group]: Print all TypeIds of group.\n" + << " --PrintTypeIds: Print all TypeIds.\n" + << " --PrintAttributes=[typeid]: Print all attributes of typeid.\n" + << " --PrintHelp: Print this help message.\n" + << std::endl; } void -CommandLine::PrintGlobals (void) const +CommandLine::PrintGlobals (std::ostream &os) const { NS_LOG_FUNCTION (this); - for (GlobalValue::Iterator i = GlobalValue::Begin (); i != GlobalValue::End (); ++i) + os << "Global values:" << std::endl; + + for (GlobalValue::Iterator i = GlobalValue::Begin (); + i != GlobalValue::End (); + ++i) { - std::cout << " --" << (*i)->GetName () << "=["; + os << " --" << (*i)->GetName () << "=["; Ptr checker = (*i)->GetChecker (); StringValue v; (*i)->GetValue (v); - std::cout << v.Get () << "]: " - << (*i)->GetHelp () << std::endl; + os << v.Get () << "]" << std::endl; + os << " " << (*i)->GetHelp () << std::endl; } } void -CommandLine::PrintAttributes (std::string type) const +CommandLine::PrintAttributes (std::ostream &os, const std::string &type) const { NS_LOG_FUNCTION (this); TypeId tid; if (!TypeId::LookupByNameFailSafe (type, &tid)) { - NS_FATAL_ERROR ("Unknown type="<SerializeToString (info.checker) << "]: " - << info.help << std::endl; + os << info.initialValue->SerializeToString (info.checker) << "]" + << std::endl; + os << " " << info.help << std::endl; } } void -CommandLine::PrintGroup (std::string group) const +CommandLine::PrintGroup (std::ostream &os, const std::string &group) const { NS_LOG_FUNCTION (this); + os << "TypeIds in group " << group << ":" << std::endl; + for (uint32_t i = 0; i < TypeId::GetRegisteredN (); ++i) { TypeId tid = TypeId::GetRegistered (i); if (tid.GetGroupName () == group) { - std::cout << " --PrintAttributes=" <::const_iterator j = groups.begin (); j != groups.end (); ++j) + for (std::list::const_iterator j = groups.begin (); + j != groups.end (); + ++j) { if (*j == group) { @@ -236,52 +301,57 @@ groups.push_back (group); } } - for (std::list::const_iterator k = groups.begin (); k != groups.end (); ++k) + + os << "Registered TypeId groups:" << std::endl; + + for (std::list::const_iterator k = groups.begin (); + k != groups.end (); + ++k) { - std::cout << " --PrintGroup="<<*k<Parse (value)) { - std::cerr << "Invalid argument value: "< +std::string +CommandLineHelper::GetDefault (const bool & val) +{ + std::ostringstream oss; + oss << std::boolalpha << val; + return oss.str (); +} + +template <> +bool +CommandLineHelper::UserItemParse (const std::string value, bool & val) +{ + std::string src = value; + std::transform(src.begin(), src.end(), src.begin(), ::tolower); + + if (src.length () == 0) + { + val = ! val; + return true; + } + else if ( (src == "true") || (src == "t") ) + { + val = true; + return true; + } + else if ( (src == "false") || (src == "f")) + { + val = false; + return true; + } + else + { + std::istringstream iss; + iss.str (src); + iss >> val; + return !iss.bad () && !iss.fail (); + } +} + } // namespace ns3 diff -Naur ns-3.17/src/core/model/command-line.h ns-3.18/src/core/model/command-line.h --- ns-3.17/src/core/model/command-line.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/core/model/command-line.h 2013-10-26 07:07:30.023364392 -0700 @@ -29,35 +29,159 @@ namespace ns3 { /** - * \brief parse command-line arguments * \ingroup core + * \defgroup commandline Command Line Parsing + * + * A uniform way to specify program documentation, + * allowed command line arguments and help strings, + * and set any attribute or global value, all from + * the command line directly. + * + * The main entry point is CommandLine + */ +/** + * \ingroup commandline + * \brief Parse command-line arguments * * Instances of this class can be used to parse command-line - * arguments: users can register new arguments with - * CommandLine::AddValue but the most important functionality - * provided by this class is that it can be used to set the - * 'initial value' of every attribute in the system with the - * \verbatim - * --TypeIdName::AttributeName=value - * \endverbatim - * syntax and it can be used to set the value of every GlobalValue - * in the system with the - * \verbatim - * --GlobalValueName=value - * \endverbatim - * syntax. + * arguments. Programs can register a general usage message with + * CommandLine::Usage, and arguments with CommandLine::AddValue. + * POD argument variables will be set directly; more general arguments + * can be processed via a Callback. + * + * CommandLine also provides handlers for these standard arguments: + * \code + * --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. + * \endcode + * + * The more common \c --help is a synonym for \c --PrintHelp; an example + * is given below. + * + * Finally, CommandLine processes Attribute and GlobalValue arguments. + * + * In use, arguments are given in the form + * \code + * --arg=value --toggle + * \endcode + * Most arguments expect a value, as in the first form, \c --arg=value. + * Toggles, corresponding to boolean arguments, can be given in any of + * the forms + * \code + * --toggle1 --toggle2=1 --toggle3=t --toggle4=true + * \endcode + * The first form changes the state of toggle1 from its default; + * all the rest set the corresponding boolean variable to true. + * \c 0, \c f and \c false are accepted to set the variable to false. + * + * CommandLine can set the initial value of every attribute in the system + * with the + * \c --TypeIdName::AttributeName=value syntax, for example + * \code + * --Application::StartTime=3s + * \endcode + * + * CommandLine can also set the value of every GlobalValue + * in the system with the \c --GlobalValueName=value syntax, for example + * \code + * --SchedulerType=HeapScheduler + * \endcode + * + * A simple example is in \c src/core/example/command-line-example.cc + * The heart of that example is this code: + * + * \code + * int intArg = 1; + * bool boolArg = false; + * std::string strArg = "strArg default"; + * + * CommandLine cmd; + * cmd.Usage ("CommandLine example program.\n" + * "\n" + * "This little program demonstrates how to use CommandLine."); + * cmd.AddValue ("intArg", "an int argument", intArg); + * cmd.AddValue ("boolArg", "a bool argument", boolArg); + * cmd.AddValue ("strArg", "a string argument", strArg); + * cmd.AddValue ("cbArg", "a string via callback", MakeCallback (SetCbArg)); + * cmd.Parse (argc, argv); + * \endcode + * after which it prints the values of each variable. (The \c SetCbArg function + * is not shown.) + * + * Here is the output from a few runs of that program: + * + * \code + * $ ./waf --run="command-line-example" + * intArg: 1 + * boolArg: false + * strArg: "strArg default" + * cbArg: "cbArg default" + * + * $ ./waf --run="command-line-example --intArg=2 --boolArg --strArg=Hello --cbArg=World" + * intArg: 2 + * boolArg: true + * strArg: "Hello" + * cbArg: "World" + * + * $ ./waf --run="command-line-example --help" + * ns3-dev-command-line-example-debug [Program Arguments] [General Arguments] + * + * CommandLine example program. + * + * This little program demonstrates how to use CommandLine. + * + * Program Arguments: + * --intArg: an int argument [1] + * --boolArg: a bool argument [false] + * --strArg: a string argument [strArg default] + * --cbArg: a string via callback + * + * 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. + * \endcode */ class CommandLine { public: + /** Constructor */ CommandLine (); + /** + * Copy constructor + * + * \param cmd the CommandLine to copy from + */ CommandLine (const CommandLine &cmd); + /** + * Assignment + * + * \param cmd the CommandLine to assign from + * \return the CommandLine + */ CommandLine &operator = (const CommandLine &cmd); + /** Destructor */ ~CommandLine (); /** - * \param name the name of the user-supplied argument - * \param help some help text used by --PrintHelp + * Supply the program usage and documentation. + * + * \param usage Program usage message to write with \c --help. + */ + void Usage (const std::string usage); + + /** + * Add a program argument, assigning to POD + * + * \param name the name of the program-supplied argument + * \param help the help text used by \c \-\-PrintHelp * \param value a reference to the variable where the * value parsed will be stored (if no value * is parsed, this variable is not modified). @@ -69,16 +193,23 @@ /** - * \param name the name of the user-supplied argument - * \param help some help text used by --PrintHelp - * \param callback a callback function that will be invoked to parse - * and collect the value. This normally used by language bindings. + * Add a program argument, using a Callback to parse the value + * + * \param name the name of the program-supplied argument + * \param help the help text used by \c --help + * \param callback a Callback function that will be invoked to parse and + * store the value. + * + * The callback should have the signature + * bool callback (const std::string value) */ void AddValue (const std::string &name, const std::string &help, Callback callback); /** + * Parse the program arguments + * * \param argc the 'argc' variable: number of arguments (including the * main program name as first element). * \param argv the 'argv' variable: a null-terminated array of strings, @@ -86,45 +217,188 @@ * * Obviously, this method will parse the input command-line arguments and * will attempt to handle them all. + * + * As a side effect, this method saves the program basename, which + * can be retrieved by GetName(). */ - void Parse (int argc, char *argv[]) const; + void Parse (int argc, char *argv[]); + + /** + * Get the program name + * + * \return the program name. Only valid after calling Parse() + */ + std::string GetName () const; + + /** + * \brief Print program usage to the desired output stream + * + * Handler for \c \-\-PrintHelp and \c \-\-help: print Usage(), argument names, and help strings + * + * Alternatively, an overloaded operator << can be used: + * @code + * CommandLine cmd; + * cmd.Parse (argc, argv); + * ... + * + * std::cerr << cmd; + * @endcode + */ + void PrintHelp (std::ostream &os) const; + private: + + /** + * \ingroup commandline + * \brief The argument base class + */ class Item { -public: - std::string m_name; - std::string m_help; - virtual ~Item (); - virtual bool Parse (std::string value) = 0; + public: + std::string m_name; /**< Argument label: \c \-\--m_name=... */ + std::string m_help; /**< Argument help string */ + virtual ~Item (); /**< Destructor */ + /** + * Parse from a string. + * + * \param value the string representation + * \return true if parsing the value succeeded + */ + virtual bool Parse (const std::string value) = 0; + /** + * \return true if this item have a default value? + */ + virtual bool HasDefault () const; + /** + * \return the default value + */ + virtual std::string GetDefault () const; }; + + /** + * \ingroup commandline + *\brief An argument Item assigning to POD + */ template class UserItem : public Item { -public: - virtual bool Parse (std::string value); - T *m_valuePtr; + public: + /** + * Parse from a string. + * + * \param value the string representation + * \return true if parsing the value succeeded + */ + virtual bool Parse (const std::string value); + + bool HasDefault () const; + std::string GetDefault () const; + + T *m_valuePtr; /**< Pointer to the POD location */ + std::string m_default; /**< String representation of default value */ }; + + /** + * \ingroup commandline + * \brief An argument Item using a Callback to parse the input + */ class CallbackItem : public Item { -public: - virtual bool Parse (std::string value); - Callback m_callback; + public: + /** + * Parse from a string. + * + * \param value the string representation + * \return true if parsing the value succeeded + */ + virtual bool Parse (const std::string value); + Callback m_callback; /**< The Callback */ }; - void HandleArgument (std::string name, std::string value) const; - void PrintHelp (void) const; - void PrintGlobals (void) const; - void PrintAttributes (std::string type) const; - void PrintGroup (std::string group) const; - void PrintTypeIds (void) const; - void PrintGroups (void) const; + /** + * Match name against the program or general arguments, + * and dispatch to the appropriate handler. + * + * \param name the argument name + * \param value the command line value + */ + void HandleArgument (const std::string &name, const std::string &value) const; + /** Handler for \c \-\-PrintGlobals: print all global variables and values */ + void PrintGlobals (std::ostream &os) const; + /** + * Handler for \c \-\-PrintAttributes: print the attributes for a given type. + * + * \param type the TypeId whose Attributes should be displayed + */ + void PrintAttributes (std::ostream &os, const std::string &type) const; + /** + * Handler for \c \-\-PrintGroup: print all types belonging to a given group. + * + * \param group the name of the TypeId group to display + */ + void PrintGroup (std::ostream &os, const std::string &group) const; + /** Handler for \c \-\-PrintTypeIds: print all TypeId names. */ + void PrintTypeIds (std::ostream &os) const; + /** Handler for \c \-\-PrintGroups: print all TypeId group names */ + void PrintGroups (std::ostream &os) const; + /** + * Copy constructor + * + * \param cmd CommandLine to copy + */ void Copy (const CommandLine &cmd); + /** Remove all arguments, Usage(), name */ void Clear (void); - typedef std::list Items; - Items m_items; -}; + typedef std::list Items; /**< Argument list container */ + Items m_items; /**< The list of arguments */ + std::string m_usage; /**< The Usage string */ + std::string m_name; /**< The program name */ +}; // class CommandLine + +/** \ingroup commandline + * \defgroup commandlinehelper Helpers to specialize on bool + */ +/** + * \ingroup commandlinehelper + * \brief Helpers for CommandLine to specialize on bool + */ +namespace CommandLineHelper { + + /** + * \ingroup commandlinehelper + * \brief Helper to specialize UserItem::Parse on bool + * + * \param value the argument name + * \param val the argument location + * \return true if parsing was successful + * @{ + */ + template + bool UserItemParse (const std::string value, T & val); + template <> + bool UserItemParse (const std::string value, bool & val); + /**@}*/ + + /** + * \ingroup commandlinehelper + * \brief Helper to specialize UserItem::GetDefault on bool + * + * \param val the argument value + * \return the string representation of value + * @{ + */ + template + std::string GetDefault (const T & val); + template <> + std::string GetDefault (const bool & val); + /**@}*/ + +} // namespace CommandLineHelper + + + } // namespace ns3 namespace ns3 { @@ -139,16 +413,53 @@ item->m_name = name; item->m_help = help; item->m_valuePtr = &value; + + std::stringstream ss; + ss << value; + ss >> item->m_default; + m_items.push_back (item); } + +template +bool +CommandLine::UserItem::HasDefault () const +{ + return true; +} + +template +std::string +CommandLine::UserItem::GetDefault () const +{ + return CommandLineHelper::GetDefault (*m_valuePtr); +} + +template +std::string +CommandLineHelper::GetDefault (const T & val) +{ + std::ostringstream oss; + oss << val; + return oss.str (); +} + + +template +bool +CommandLine::UserItem::Parse (const std::string value) +{ + return CommandLineHelper::UserItemParse (value, *m_valuePtr); +} + template -bool -CommandLine::UserItem::Parse (std::string value) +bool +CommandLineHelper::UserItemParse (const std::string value, T & val) { std::istringstream iss; iss.str (value); - iss >> (*m_valuePtr); + iss >> val; return !iss.bad () && !iss.fail (); } diff -Naur ns-3.17/src/core/model/default-simulator-impl.cc ns-3.18/src/core/model/default-simulator-impl.cc --- ns-3.17/src/core/model/default-simulator-impl.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/core/model/default-simulator-impl.cc 2013-10-26 07:07:30.039364393 -0700 @@ -393,8 +393,8 @@ Time DefaultSimulatorImpl::GetMaximumSimulationTime (void) const { - // XXX: I am fairly certain other compilers use other non-standard - // post-fixes to indicate 64 bit constants. + /// \todo I am fairly certain other compilers use other non-standard + /// post-fixes to indicate 64 bit constants. return TimeStep (0x7fffffffffffffffLL); } diff -Naur ns-3.17/src/core/model/default-simulator-impl.h ns-3.18/src/core/model/default-simulator-impl.h --- ns-3.17/src/core/model/default-simulator-impl.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/core/model/default-simulator-impl.h 2013-10-26 07:07:30.035364393 -0700 @@ -33,6 +33,9 @@ namespace ns3 { +/** + * \ingroup simulator + */ class DefaultSimulatorImpl : public SimulatorImpl { public: diff -Naur ns-3.17/src/core/model/event-id.h ns-3.18/src/core/model/event-id.h --- ns-3.17/src/core/model/event-id.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/core/model/event-id.h 2013-10-26 07:07:30.027364392 -0700 @@ -29,7 +29,7 @@ class EventImpl; /** - * \ingroup core + * \ingroup events * \brief an identifier for simulation events. * * Each EventId identifies a unique event scheduled with one diff -Naur ns-3.17/src/core/model/event-impl.h ns-3.18/src/core/model/event-impl.h --- ns-3.17/src/core/model/event-impl.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/core/model/event-impl.h 2013-10-26 07:07:30.031364393 -0700 @@ -26,7 +26,7 @@ namespace ns3 { /** - * \ingroup core + * \ingroup events * \brief a simulation event * * Each subclass of this base class represents a simulation event. The diff -Naur ns-3.17/src/core/model/hash.cc ns-3.18/src/core/model/hash.cc --- ns-3.17/src/core/model/hash.cc 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/src/core/model/hash.cc 2013-10-26 07:07:30.047364393 -0700 @@ -0,0 +1,48 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2012 Lawrence Livermore National Laboratory + * + * 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: Peter D. Barnes, Jr. + */ + +#include "log.h" +#include "hash.h" + + +namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("Hash"); + +Hasher::Hasher () +{ + m_impl = Create (); + NS_ASSERT (m_impl != 0); +} + +Hasher::Hasher (Ptr hp) + : m_impl (hp) +{ + NS_ASSERT (m_impl != 0); +} + +Hasher & +Hasher::clear (void) +{ + m_impl->clear (); + return *this; +} + +} // namespace ns3 diff -Naur ns-3.17/src/core/model/hash-fnv.cc ns-3.18/src/core/model/hash-fnv.cc --- ns-3.17/src/core/model/hash-fnv.cc 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/src/core/model/hash-fnv.cc 2013-10-26 07:07:30.043364393 -0700 @@ -0,0 +1,764 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2012 Lawrence Livermore National Laboratory + * + * 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: Peter D. Barnes, Jr. + * + * This copyright notice applies strictly to the wrapper material. + * + * The FNV source code itself is in the public domain. The FNV source + * code sections are marked by + * // Begin ----> + * and + * // End ----> + * comments. + * + * Changes from the FNV distribution are marked with `//PDB' + */ + +#include +#include + +#include "log.h" +#include "hash-fnv.h" + + +namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("Hash-Fnv"); + +namespace Hash { + +namespace Function { + +namespace Fnv1aImplementation { + +/************************************************* + ** class FnvHashImplementation + ************************************************/ + +extern "C" { + +// Changes from FNV distribution are marked with `//PDB' +// + +// Begin fnv.h -----------------------------------> + +/* + * fnv - Fowler/Noll/Vo- hash code + * + * @(#) $Revision: 5.4 $ + * @(#) $Id: fnv.h,v 5.4 2009/07/30 22:49:13 chongo Exp $ + * @(#) $Source: /usr/local/src/cmd/fnv/RCS/fnv.h,v $ + * + *** + * + * Fowler/Noll/Vo- hash + * + * The basis of this hash algorithm was taken from an idea sent + * as reviewer comments to the IEEE POSIX P1003.2 committee by: + * + * Phong Vo (http://www.research.att.com/info/kpv/) + * Glenn Fowler (http://www.research.att.com/~gsf/) + * + * In a subsequent ballot round: + * + * Landon Curt Noll (http://www.isthe.com/chongo/) + * + * improved on their algorithm. Some people tried this hash + * and found that it worked rather well. In an EMail message + * to Landon, they named it the ``Fowler/Noll/Vo'' or FNV hash. + * + * FNV hashes are designed to be fast while maintaining a low + * collision rate. The FNV speed allows one to quickly hash lots + * of data while maintaining a reasonable collision rate. See: + * + * http://www.isthe.com/chongo/tech/comp/fnv/index.html + * + * for more details as well as other forms of the FNV hash. + * + *** + * + * NOTE: The FNV-0 historic hash is not recommended. One should use + * the FNV-1 hash instead. + * + * To use the 32 bit FNV-0 historic hash, pass FNV0_32_INIT as the + * Fnv32_t hashval argument to fnv_32_buf() or fnv_32_str(). + * + * To use the 64 bit FNV-0 historic hash, pass FNV0_64_INIT as the + * Fnv64_t hashval argument to fnv_64_buf() or fnv_64_str(). + * + * To use the recommended 32 bit FNV-1 hash, pass FNV1_32_INIT as the + * Fnv32_t hashval argument to fnv_32_buf() or fnv_32_str(). + * + * To use the recommended 64 bit FNV-1 hash, pass FNV1_64_INIT as the + * Fnv64_t hashval argument to fnv_64_buf() or fnv_64_str(). + * + * To use the recommended 32 bit FNV-1a hash, pass FNV1_32A_INIT as the + * Fnv32_t hashval argument to fnv_32a_buf() or fnv_32a_str(). + * + * To use the recommended 64 bit FNV-1a hash, pass FNV1A_64_INIT as the + * Fnv64_t hashval argument to fnv_64a_buf() or fnv_64a_str(). + * + *** + * + * Please do not copyright this code. This code is in the public domain. + * + * LANDON CURT NOLL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO + * EVENT SHALL LANDON CURT NOLL BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF + * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + * + * By: + * chongo /\oo/\ + * http://www.isthe.com/chongo/ + * + * Share and Enjoy! :-) + */ + +#if !defined(__FNV_H__) +#define __FNV_H__ + + +//#include //PDB + +#define FNV_VERSION "5.0.2" /* @(#) FNV Version */ + + +/* + * 32 bit FNV-0 hash type + */ +typedef u_int32_t Fnv32_t; + + +/* + * 32 bit FNV-0 zero initial basis + * + * This historic hash is not recommended. One should use + * the FNV-1 hash and initial basis instead. + * + * Use fully qualified type so this define works outside this scope //PDB + */ +#define FNV0_32_INIT ((Fnv1aImplementation::Fnv32_t)0) + + +/* + * 32 bit FNV-1 and FNV-1a non-zero initial basis + * + * The FNV-1 initial basis is the FNV-0 hash of the following 32 octets: + * + * chongo /\../\ + * + * NOTE: The \'s above are not back-slashing escape characters. + * They are literal ASCII backslash 0x5c characters. + * + * NOTE: The FNV-1a initial basis is the same value as FNV-1 by definition. + * + * Use fully qualified type so this define works outside this scope //PDB + */ +#define FNV1_32_INIT ((Fnv1aImplementation::Fnv32_t)0x811c9dc5) +#define FNV1_32A_INIT FNV1_32_INIT + + +/* + * determine how 64 bit unsigned values are represented + */ +//#include "longlong.h" //PDB - assume `unsigned long long' is 64 bit +#define HAVE_64BIT_LONG_LONG + + + +/* + * 64 bit FNV-0 hash + */ +#if defined(HAVE_64BIT_LONG_LONG) +typedef u_int64_t Fnv64_t; +#else /* HAVE_64BIT_LONG_LONG */ +typedef struct { + u_int32_t w32[2]; /* w32[0] is low order, w32[1] is high order word */ +} Fnv64_t; +#endif /* HAVE_64BIT_LONG_LONG */ + + +/* + * 64 bit FNV-0 zero initial basis + * + * This historic hash is not recommended. One should use + * the FNV-1 hash and initial basis instead. + * + * Use fully qualified type so this define works outside this scope //PDB + */ +#if defined(HAVE_64BIT_LONG_LONG) +#define FNV0_64_INIT ((Fnv1aImplementation::Fnv64_t)0) +#else /* HAVE_64BIT_LONG_LONG */ +extern const Fnv64_t fnv0_64_init; +#define FNV0_64_INIT (Fnv1aImplementation::fnv0_64_init) +#endif /* HAVE_64BIT_LONG_LONG */ + + +/* + * 64 bit FNV-1 non-zero initial basis + * + * The FNV-1 initial basis is the FNV-0 hash of the following 32 octets: + * + * chongo /\../\ + * + * NOTE: The \'s above are not back-slashing escape characters. + * They are literal ASCII backslash 0x5c characters. + * + * NOTE: The FNV-1a initial basis is the same value as FNV-1 by definition. + */ +#if defined(HAVE_64BIT_LONG_LONG) +#define FNV1_64_INIT ((Fnv1aImplementation::Fnv64_t)0xcbf29ce484222325ULL) +#define FNV1A_64_INIT FNV1_64_INIT +#else /* HAVE_64BIT_LONG_LONG */ +extern const fnv1_64_init; +extern const Fnv64_t fnv1a_64_init; +#define FNV1_64_INIT (fnv1_64_init) +#define FNV1A_64_INIT (fnv1a_64_init) +#endif /* HAVE_64BIT_LONG_LONG */ + + +/* + * hash types + */ +enum fnv_type { + FNV_NONE = 0, /* invalid FNV hash type */ + FNV0_32 = 1, /* FNV-0 32 bit hash */ + FNV1_32 = 2, /* FNV-1 32 bit hash */ + FNV1a_32 = 3, /* FNV-1a 32 bit hash */ + FNV0_64 = 4, /* FNV-0 64 bit hash */ + FNV1_64 = 5, /* FNV-1 64 bit hash */ + FNV1a_64 = 6, /* FNV-1a 64 bit hash */ +}; + +//PDB test vector declarations deleted + +/* + * external functions //PDB converted to forward declarations + */ +/* hash_32.c */ +/* extern */ Fnv32_t fnv_32_buf(void *buf, size_t len, Fnv32_t hashval); +/* extern */ Fnv32_t fnv_32_str(char *buf, Fnv32_t hashval); + +/* hash_32a.c */ +/* extern */ Fnv32_t fnv_32a_buf(void *buf, size_t len, Fnv32_t hashval); +/* extern */ Fnv32_t fnv_32a_str(char *buf, Fnv32_t hashval); + +/* hash_64.c */ +/* extern */ Fnv64_t fnv_64_buf(void *buf, size_t len, Fnv64_t hashval); +/* extern */ Fnv64_t fnv_64_str(char *buf, Fnv64_t hashval); + +/* hash_64a.c */ +/* extern */ Fnv64_t fnv_64a_buf(void *buf, size_t len, Fnv64_t hashval); +/* extern */ Fnv64_t fnv_64a_str(char *buf, Fnv64_t hashval); + +//PDB test vector declarations deleted + + +#endif /* __FNV_H__ */ + +// End fnv.h -------------------------------> + +// Begin hash_32a.c ------------------------------> + +/* + * hash_32 - 32 bit Fowler/Noll/Vo FNV-1a hash code + * + * @(#) $Revision: 5.1 $ + * @(#) $Id: hash_32a.c,v 5.1 2009/06/30 09:13:32 chongo Exp $ + * @(#) $Source: /usr/local/src/cmd/fnv/RCS/hash_32a.c,v $ + * + *** + * + * Fowler/Noll/Vo hash + * + * The basis of this hash algorithm was taken from an idea sent + * as reviewer comments to the IEEE POSIX P1003.2 committee by: + * + * Phong Vo (http://www.research.att.com/info/kpv/) + * Glenn Fowler (http://www.research.att.com/~gsf/) + * + * In a subsequent ballot round: + * + * Landon Curt Noll (http://www.isthe.com/chongo/) + * + * improved on their algorithm. Some people tried this hash + * and found that it worked rather well. In an EMail message + * to Landon, they named it the ``Fowler/Noll/Vo'' or FNV hash. + * + * FNV hashes are designed to be fast while maintaining a low + * collision rate. The FNV speed allows one to quickly hash lots + * of data while maintaining a reasonable collision rate. See: + * + * http://www.isthe.com/chongo/tech/comp/fnv/index.html + * + * for more details as well as other forms of the FNV hash. + *** + * + * To use the recommended 32 bit FNV-1a hash, pass FNV1_32A_INIT as the + * Fnv32_t hashval argument to fnv_32a_buf() or fnv_32a_str(). + * + *** + * + * Please do not copyright this code. This code is in the public domain. + * + * LANDON CURT NOLL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO + * EVENT SHALL LANDON CURT NOLL BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF + * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + * + * By: + * chongo /\oo/\ + * http://www.isthe.com/chongo/ + * + * Share and Enjoy! :-) + */ + +//#include //PDB +//#include "fnv.h" //PDB + + +/* + * 32 bit magic FNV-1a prime + */ +#define FNV_32_PRIME ((Fnv1aImplementation::Fnv32_t)0x01000193) + + +/* + * fnv_32a_buf - perform a 32 bit Fowler/Noll/Vo FNV-1a hash on a buffer + * + * input: + * buf - start of buffer to hash + * len - length of buffer in octets + * hval - previous hash value or 0 if first call + * + * returns: + * 32 bit hash as a static hash type + * + * NOTE: To use the recommended 32 bit FNV-1a hash, use FNV1_32A_INIT as the + * hval arg on the first call to either fnv_32a_buf() or fnv_32a_str(). + */ +Fnv32_t +fnv_32a_buf(void *buf, size_t len, Fnv32_t hval) +{ + unsigned char *bp = (unsigned char *)buf; /* start of buffer */ + unsigned char *be = bp + len; /* beyond end of buffer */ + + /* + * FNV-1a hash each octet in the buffer + */ + while (bp < be) { + + /* xor the bottom with the current octet */ + hval ^= (Fnv32_t)*bp++; + + /* multiply by the 32 bit FNV magic prime mod 2^32 */ +#if defined(NO_FNV_GCC_OPTIMIZATION) + hval *= FNV_32_PRIME; +#else + hval += (hval<<1) + (hval<<4) + (hval<<7) + (hval<<8) + (hval<<24); +#endif + } + + /* return our new hash value */ + return hval; +} + + +/* + * fnv_32a_str - perform a 32 bit Fowler/Noll/Vo FNV-1a hash on a string + * + * input: + * str - string to hash + * hval - previous hash value or 0 if first call + * + * returns: + * 32 bit hash as a static hash type + * + * NOTE: To use the recommended 32 bit FNV-1a hash, use FNV1_32A_INIT as the + * hval arg on the first call to either fnv_32a_buf() or fnv_32a_str(). + */ +Fnv32_t +fnv_32a_str(char *str, Fnv32_t hval) +{ + unsigned char *s = (unsigned char *)str; /* unsigned string */ + + /* + * FNV-1a hash each octet in the buffer + */ + while (*s) { + + /* xor the bottom with the current octet */ + hval ^= (Fnv32_t)*s++; + + /* multiply by the 32 bit FNV magic prime mod 2^32 */ +#if defined(NO_FNV_GCC_OPTIMIZATION) + hval *= FNV_32_PRIME; +#else + hval += (hval<<1) + (hval<<4) + (hval<<7) + (hval<<8) + (hval<<24); +#endif + } + + /* return our new hash value */ + return hval; +} + +// End hash_32a.c --------------------------> + +// Begin hash_64a.c-------------------------------> + +/* + * hash_64 - 64 bit Fowler/Noll/Vo-0 FNV-1a hash code + * + * @(#) $Revision: 5.1 $ + * @(#) $Id: hash_64a.c,v 5.1 2009/06/30 09:01:38 chongo Exp $ + * @(#) $Source: /usr/local/src/cmd/fnv/RCS/hash_64a.c,v $ + * + *** + * + * Fowler/Noll/Vo hash + * + * The basis of this hash algorithm was taken from an idea sent + * as reviewer comments to the IEEE POSIX P1003.2 committee by: + * + * Phong Vo (http://www.research.att.com/info/kpv/) + * Glenn Fowler (http://www.research.att.com/~gsf/) + * + * In a subsequent ballot round: + * + * Landon Curt Noll (http://www.isthe.com/chongo/) + * + * improved on their algorithm. Some people tried this hash + * and found that it worked rather well. In an EMail message + * to Landon, they named it the ``Fowler/Noll/Vo'' or FNV hash. + * + * FNV hashes are designed to be fast while maintaining a low + * collision rate. The FNV speed allows one to quickly hash lots + * of data while maintaining a reasonable collision rate. See: + * + * http://www.isthe.com/chongo/tech/comp/fnv/index.html + * + * for more details as well as other forms of the FNV hash. + * + *** + * + * To use the recommended 64 bit FNV-1a hash, pass FNV1A_64_INIT as the + * Fnv64_t hashval argument to fnv_64a_buf() or fnv_64a_str(). + * + *** + * + * Please do not copyright this code. This code is in the public domain. + * + * LANDON CURT NOLL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO + * EVENT SHALL LANDON CURT NOLL BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF + * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + * + * By: + * chongo /\oo/\ + * http://www.isthe.com/chongo/ + * + * Share and Enjoy! :-) + */ + +//#include //PDB +//#include "fnv.h" //PDB + + +/* + * FNV-1a defines the initial basis to be non-zero + */ +#if !defined(HAVE_64BIT_LONG_LONG) +const Fnv64_t fnv1a_64_init = { 0x84222325, 0xcbf29ce4 }; +#endif /* ! HAVE_64BIT_LONG_LONG */ + + +/* + * 64 bit magic FNV-1a prime + */ +#if defined(HAVE_64BIT_LONG_LONG) +#define FNV_64_PRIME ((Fnv1aImplementation::Fnv64_t)0x100000001b3ULL) +#else /* HAVE_64BIT_LONG_LONG */ +#define FNV_64_PRIME_LOW ((unsigned long)0x1b3) /* lower bits of FNV prime */ +#define FNV_64_PRIME_SHIFT (8) /* top FNV prime shift above 2^32 */ +#endif /* HAVE_64BIT_LONG_LONG */ + + +/* + * fnv_64a_buf - perform a 64 bit Fowler/Noll/Vo FNV-1a hash on a buffer + * + * input: + * buf - start of buffer to hash + * len - length of buffer in octets + * hval - previous hash value or 0 if first call + * + * returns: + * 64 bit hash as a static hash type + * + * NOTE: To use the recommended 64 bit FNV-1a hash, use FNV1A_64_INIT as the + * hval arg on the first call to either fnv_64a_buf() or fnv_64a_str(). + */ +Fnv64_t +fnv_64a_buf(void *buf, size_t len, Fnv64_t hval) +{ + unsigned char *bp = (unsigned char *)buf; /* start of buffer */ + unsigned char *be = bp + len; /* beyond end of buffer */ + +#if defined(HAVE_64BIT_LONG_LONG) + /* + * FNV-1a hash each octet of the buffer + */ + while (bp < be) { + + /* xor the bottom with the current octet */ + hval ^= (Fnv64_t)*bp++; + + /* multiply by the 64 bit FNV magic prime mod 2^64 */ +#if defined(NO_FNV_GCC_OPTIMIZATION) + hval *= FNV_64_PRIME; +#else /* NO_FNV_GCC_OPTIMIZATION */ + hval += (hval << 1) + (hval << 4) + (hval << 5) + + (hval << 7) + (hval << 8) + (hval << 40); +#endif /* NO_FNV_GCC_OPTIMIZATION */ + } + +#else /* HAVE_64BIT_LONG_LONG */ + + unsigned long val[4]; /* hash value in base 2^16 */ + unsigned long tmp[4]; /* tmp 64 bit value */ + + /* + * Convert Fnv64_t hval into a base 2^16 array + */ + val[0] = hval.w32[0]; + val[1] = (val[0] >> 16); + val[0] &= 0xffff; + val[2] = hval.w32[1]; + val[3] = (val[2] >> 16); + val[2] &= 0xffff; + + /* + * FNV-1a hash each octet of the buffer + */ + while (bp < be) { + + /* xor the bottom with the current octet */ + val[0] ^= (unsigned long)*bp++; + + /* + * multiply by the 64 bit FNV magic prime mod 2^64 + * + * Using 0x100000001b3 we have the following digits base 2^16: + * + * 0x0 0x100 0x0 0x1b3 + * + * which is the same as: + * + * 0x0 1<> 16); + val[0] = tmp[0] & 0xffff; + tmp[2] += (tmp[1] >> 16); + val[1] = tmp[1] & 0xffff; + val[3] = tmp[3] + (tmp[2] >> 16); + val[2] = tmp[2] & 0xffff; + /* + * Doing a val[3] &= 0xffff; is not really needed since it simply + * removes multiples of 2^64. We can discard these excess bits + * outside of the loop when we convert to Fnv64_t. + */ + } + + /* + * Convert base 2^16 array back into an Fnv64_t + */ + hval.w32[1] = ((val[3]<<16) | val[2]); + hval.w32[0] = ((val[1]<<16) | val[0]); + +#endif /* HAVE_64BIT_LONG_LONG */ + + /* return our new hash value */ + return hval; +} + + +/* + * fnv_64a_str - perform a 64 bit Fowler/Noll/Vo FNV-1a hash on a buffer + * + * input: + * buf - start of buffer to hash + * hval - previous hash value or 0 if first call + * + * returns: + * 64 bit hash as a static hash type + * + * NOTE: To use the recommended 64 bit FNV-1a hash, use FNV1A_64_INIT as the + * hval arg on the first call to either fnv_64a_buf() or fnv_64a_str(). + */ +Fnv64_t +fnv_64a_str(char *str, Fnv64_t hval) +{ + unsigned char *s = (unsigned char *)str; /* unsigned string */ + +#if defined(HAVE_64BIT_LONG_LONG) + + /* + * FNV-1a hash each octet of the string + */ + while (*s) { + + /* xor the bottom with the current octet */ + hval ^= (Fnv64_t)*s++; + + /* multiply by the 64 bit FNV magic prime mod 2^64 */ +#if defined(NO_FNV_GCC_OPTIMIZATION) + hval *= FNV_64_PRIME; +#else /* NO_FNV_GCC_OPTIMIZATION */ + hval += (hval << 1) + (hval << 4) + (hval << 5) + + (hval << 7) + (hval << 8) + (hval << 40); +#endif /* NO_FNV_GCC_OPTIMIZATION */ + } + +#else /* !HAVE_64BIT_LONG_LONG */ + + unsigned long val[4]; /* hash value in base 2^16 */ + unsigned long tmp[4]; /* tmp 64 bit value */ + + /* + * Convert Fnv64_t hval into a base 2^16 array + */ + val[0] = hval.w32[0]; + val[1] = (val[0] >> 16); + val[0] &= 0xffff; + val[2] = hval.w32[1]; + val[3] = (val[2] >> 16); + val[2] &= 0xffff; + + /* + * FNV-1a hash each octet of the string + */ + while (*s) { + + /* xor the bottom with the current octet */ + + /* + * multiply by the 64 bit FNV magic prime mod 2^64 + * + * Using 1099511628211, we have the following digits base 2^16: + * + * 0x0 0x100 0x0 0x1b3 + * + * which is the same as: + * + * 0x0 1<> 16); + val[0] = tmp[0] & 0xffff; + tmp[2] += (tmp[1] >> 16); + val[1] = tmp[1] & 0xffff; + val[3] = tmp[3] + (tmp[2] >> 16); + val[2] = tmp[2] & 0xffff; + /* + * Doing a val[3] &= 0xffff; is not really needed since it simply + * removes multiples of 2^64. We can discard these excess bits + * outside of the loop when we convert to Fnv64_t. + */ + val[0] ^= (unsigned long)(*s++); + } + + /* + * Convert base 2^16 array back into an Fnv64_t + */ + hval.w32[1] = ((val[3]<<16) | val[2]); + hval.w32[0] = ((val[1]<<16) | val[0]); + +#endif /* !HAVE_64BIT_LONG_LONG */ + + /* return our new hash value */ + return hval; +} + +// End hash_64a.c---------------------------> + +} /* extern "C" */ + +//----------------------------------------------------------------------------- + + +} // namespace Fnv1aImplementation + + +Fnv1a::Fnv1a () +{ + clear (); +} + +uint32_t +Fnv1a::GetHash32 (const char * buffer, const size_t size) +{ + m_hash32 = + Fnv1aImplementation::fnv_32a_buf ((void *)buffer, size, m_hash32); + return m_hash32; +} + +uint64_t +Fnv1a::GetHash64 (const char * buffer, const size_t size) +{ + m_hash64 = + Fnv1aImplementation::fnv_64a_buf ((void *)buffer, size, m_hash64); + return m_hash64; +} + +void +Fnv1a::clear (void) +{ + m_hash32 = FNV1_32A_INIT; + m_hash64 = FNV1A_64_INIT; +} + +} // namespace Function + +} // namespace Hash + +} // namespace ns3 diff -Naur ns-3.17/src/core/model/hash-fnv.h ns-3.18/src/core/model/hash-fnv.h --- ns-3.17/src/core/model/hash-fnv.h 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/src/core/model/hash-fnv.h 2013-10-26 07:07:30.031364393 -0700 @@ -0,0 +1,113 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2012 Lawrence Livermore National Laboratory + * + * 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: Peter D. Barnes, Jr. + */ + +#ifndef HASH_FNV_H +#define HASH_FNV_H + +#include "hash-function.h" + +namespace ns3 { + +namespace Hash { + +namespace Function { + +/** + * \ingroup hash + * + * \brief Fnv1a hash function implementation + * + * This is the venerable Fowler-Noll-Vo hash, version 1A. (See the + * FNV page.) + * + * The implementation here is taken directly from the published FNV + * + * reference code, + * with minor modifications to wrap into this class. See the + * hash-fnv.cc file for details. + * + */ +class Fnv1a : public Implementation +{ +public: + /** + * Constructor + */ + Fnv1a (); + /** + * Compute 32-bit hash of a byte buffer + * + * Call clear () between calls to GetHash32() to reset the + * internal state and hash each buffer separately. + * + * If you don't call clear() between calls to GetHash32, + * you can hash successive buffers. The final return value + * will be the cumulative hash across all calls. + * + * \param [in] buffer pointer to the beginning of the buffer + * \param [in] size length of the buffer, in bytes + * \return 32-bit hash of the buffer + */ + uint32_t GetHash32 (const char * buffer, const size_t size); + /** + * Compute 64-bit hash of a byte buffer. + * + * Call clear () between calls to GetHash64() to reset the + * internal state and hash each buffer separately. + * + * If you don't call clear() between calls to GetHash64, + * you can hash successive buffers. The final return value + * will be the cumulative hash across all calls. + * + * \param [in] buffer pointer to the beginning of the buffer + * \param [in] size length of the buffer, in bytes + * \return 64-bit hash of the buffer + */ + uint64_t GetHash64 (const char * buffer, const size_t size); + /** + * Restore initial state + */ + virtual void clear (void); + +private: + /** + * Seed value + */ + enum seed + { + SEED = 0x8BADF00D // Ate bad food + }; + //@{ + /** + * Cache last hash value, for incremental hashing. + */ + uint32_t m_hash32; + uint64_t m_hash64; + //@} + +}; // class Fnv1a + +} // namespace Function + +} // namespace Hash + +} // namespace ns3 + +#endif /* HASH_FNV_H */ diff -Naur ns-3.17/src/core/model/hash-function.cc ns-3.18/src/core/model/hash-function.cc --- ns-3.17/src/core/model/hash-function.cc 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/src/core/model/hash-function.cc 2013-10-26 07:07:30.043364393 -0700 @@ -0,0 +1,40 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2012 Lawrence Livermore National Laboratory + * + * 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: Peter D. Barnes, Jr. + */ + +#include "log.h" +#include "hash-function.h" + + +namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("HashFunction"); + +namespace Hash { + +uint64_t +Implementation::GetHash64 (const char * buffer, const size_t size) +{ + NS_LOG_WARN ("64-bit hash requested, only 32-bit implementation available"); + return GetHash32 (buffer, size); +} + +} // namespace Hash + +} // namespace ns3 diff -Naur ns-3.17/src/core/model/hash-function.h ns-3.18/src/core/model/hash-function.h --- ns-3.17/src/core/model/hash-function.h 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/src/core/model/hash-function.h 2013-10-26 07:07:30.031364393 -0700 @@ -0,0 +1,166 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2012 Lawrence Livermore National Laboratory + * + * 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: Peter D. Barnes, Jr. + */ + +#ifndef HASHFUNCTION_H +#define HASHFUNCTION_H + +#include // memcpy +#include "simple-ref-count.h" + +namespace ns3 { + +/** + * \ingroup hash + * Hash function implementations + */ +namespace Hash { + +/** + * \ingroup hash + * + * \brief Hash function implementation base class + */ +class Implementation : public SimpleRefCount +{ +public: + /** + * Compute 32-bit hash of a byte buffer + * + * Call clear () between calls to GetHash32() to reset the + * internal state and hash each buffer separately. + * + * If you don't call clear() between calls to GetHash32, + * you can hash successive buffers. The final return value + * will be the cumulative hash across all calls. + * + * \param [in] buffer pointer to the beginning of the buffer + * \param [in] size length of the buffer, in bytes + * \return 32-bit hash of the buffer + */ + virtual uint32_t GetHash32 (const char * buffer, const size_t size) = 0; + /** + * Compute 64-bit hash of a byte buffer. + * + * Default implementation returns 32-bit hash, with a warning. + * + * Call clear () between calls to GetHash64() to reset the + * internal state and hash each buffer separately. + * + * If you don't call clear() between calls to GetHash64, + * you can hash successive buffers. The final return value + * will be the cumulative hash across all calls. + * + * \param [in] buffer pointer to the beginning of the buffer + * \param [in] size length of the buffer, in bytes + * \return 64-bit hash of the buffer + */ + virtual uint64_t GetHash64 (const char * buffer, const size_t size); + /** + * Restore initial state + */ + virtual void clear (void) = 0; + /** + * Constructor + */ + Implementation () { }; + /** + * Destructor + */ + virtual ~Implementation () { }; +}; // Hashfunction + + +/*-------------------------------------- + * Hash function implementation + * by function pointers and templates + */ + +/** + * + * \ingroup hash + * + * \brief Basic hash function typedefs. + * + * See Hash32Implementation<> or Hash64Implementation<> + * @{ + */ +typedef uint32_t (*Hash32Function_ptr) (const char *, const size_t); +typedef uint64_t (*Hash64Function_ptr) (const char *, const size_t); +/**@}*/ + +/** + * \ingroup hash + * Hash functions + */ +namespace Function { + +/** + * \ingroup hash + * + * \brief Template for Hashfunctions from 32-bit hash functions + */ +class Hash32 : public Implementation +{ +public: + Hash32 (Hash32Function_ptr hp) : m_fp (hp) { }; + uint32_t GetHash32 (const char * buffer, const size_t size) + { + return (*m_fp) (buffer, size); + } + void clear () { }; +private: + Hash32Function_ptr m_fp; +}; // Hash32 + +/** + * \ingroup hash + * + * \brief Template for Hashfunctions from 64-bit hash functions + */ +class Hash64 : public Implementation +{ +public: + Hash64 (Hash64Function_ptr hp) : m_fp (hp) { }; + uint64_t GetHash64 (const char * buffer, const size_t size) + { + return (*m_fp) (buffer, size); + } + uint32_t GetHash32 (const char * buffer, const size_t size) + { + uint32_t hash32; + uint64_t hash64 = GetHash64 (buffer, size); + + memcpy (&hash32, &hash64, sizeof (hash32)); + return hash32; + } + void clear () { }; +private: + Hash64Function_ptr m_fp; +}; // Hash64 + + +} // namespace Function + +} // namespace Hash + +} // namespace ns3 + +#endif /* HASHFUNCTION_H */ + diff -Naur ns-3.17/src/core/model/hash.h ns-3.18/src/core/model/hash.h --- ns-3.17/src/core/model/hash.h 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/src/core/model/hash.h 2013-10-26 07:07:30.035364393 -0700 @@ -0,0 +1,285 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2012 Lawrence Livermore National Laboratory + * + * 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: Peter D. Barnes, Jr. + */ + +#ifndef HASH_H +#define HASH_H + +#include + +#include "assert.h" +#include "ptr.h" + +#include "hash-function.h" +#include "hash-murmur3.h" +#include "hash-fnv.h" + +namespace ns3 { + +/** + * \ingroup core + * \defgroup hash Hash Functions + */ +/** + * \ingroup hash + * + * \brief Generic Hash function interface + * + * This class provides a generic interface for computing hashes + * of buffers. Various getters return hashes of different lengths. + * + * Call clear() between calls to the getter to reset the + * internal state and hash each buffer separately. + * + * If you don't call clear() between calls to the getter + * you can hash successive buffers. The final return value + * will be the cumulative hash across all calls. + * + * The choice of hash function can be made at construction by + * \code + * Hasher hasher = Hasher ( Create () ); + * uint32_t hash = Hasher.GetHash32 (data); + * \endcode + * + * The available implementations are documented in group hash. + * The default implementation is Murmur3. FNV1a is also available. + * + * In addition to this class interface, global functions are + * defined which use the default hash implementation. + * + * \internal + * + * Would be nice to offer longer hashes. \c uint128_t looks doable, + * except that our fallback \c int64x64_t implementation doesn't + * offer \c unsigned. + * + * Longer hashes require returning a byte buffer of some sort, + * but our \ref buffer class seems a bit overkill for this case. + * + */ +class Hasher +{ +public: + /** + * Constructor using the default implementation + */ + Hasher (); + /** + * Constructor using the supplied implementation + * + * \param [in] hp Ptr to the desired implementation + */ + Hasher (Ptr hp); + /** + * Compute 32-bit hash of a byte buffer. + * + * Call clear () between calls to GetHash32() to reset the + * internal state and hash each buffer separately. + * + * If you don't call clear() between calls to GetHash32, + * you can hash successive buffers. The final return value + * will be the cumulative hash across all calls. + * + * \param [in] buffer pointer to the beginning of the buffer + * \param [in] size length of the buffer, in bytes + * \return 32-bit hash of the buffer + */ + uint32_t GetHash32 (const char * buffer, const size_t size); + /** + * Compute 64-bit hash of a byte buffer + * + * Call clear () between calls to GetHash64() to reset the + * internal state and hash each buffer separately. + * + * If you don't call clear() between calls to GetHash64, + * you can hash successive buffers. The final return value + * will be the cumulative hash across all calls. + * + * \param [in] buffer pointer to the beginning of the buffer + * \param [in] size length of the buffer, in bytes + * \return 64-bit hash of the buffer + */ + uint64_t GetHash64 (const char * buffer, const size_t size); + + /** + * Compute 32-bit hash of a string + * + * Call clear () between calls to GetHash32() to reset the + * internal state and hash each string separately. + * + * If you don't call clear() between calls to GetHash32, + * you can hash successive strings. The final return value + * will be the cumulative hash across all calls. + * + * \param [in] s string to hash + * \return 32-bit hash of the string + */ + uint32_t GetHash32 (const std::string s); + /** + * Compute 64-bit hash of a string + * + * Call clear () between calls to GetHash64() to reset the + * internal state and hash each string separately. + * + * If you don't call clear() between calls to GetHash64, + * you can hash successive strings. The final return value + * will be the cumulative hash across all calls. + * + * \param [in] s string to hash + * \return 64-bit hash of the string + */ + uint64_t GetHash64 (const std::string s); + /** + * Restore initial state + * + * \return this + */ + Hasher & clear (void); + +private: + Ptr m_impl; /** Hash implementation */ +}; // Hasher + + +/************************************************* + ** Global functions declarations + ************************************************/ + +/** + * \ingroup hash + * + * Compute 32-bit hash of a byte buffer, using the default hash function + * + * \param [in] buffer pointer to the beginning of the buffer + * \param [in] size length of the buffer, in bytes + * \return 32-bit hash of the buffer + */ +uint32_t Hash32 (const char * buffer, const size_t size); +/** + * \ingroup hash + * + * Compute 64-bit hash of a byte buffer, using the default hash function + * + * \param [in] buffer pointer to the beginning of the buffer + * \param [in] size length of the buffer, in bytes + * \return 64-bit hash of the buffer + */ +uint64_t Hash64 (const char * buffer, const size_t size); + +/** + * \ingroup hash + * + * Compute 32-bit hash of a string, using the default hash function + * + * \param [in] s string to hash + * \return 32-bit hash of the string + */ +uint32_t Hash32 (const std::string s); +/** + * \ingroup hash + * + * Compute 64-bit hash of a string, using the default hash function + * + * \param [in] s string to hash + * \return 64-bit hash of the string + */ +uint64_t Hash64 (const std::string s); + +} // namespace ns3 + + +/************************************************* + ** Inline implementations for rvo + ************************************************/ + +namespace ns3 { + +/************************************************* + class Hasher implementation, inlined for rvo +*/ + +inline +uint32_t +Hasher::GetHash32 (const char * buffer, const size_t size) +{ + NS_ASSERT (m_impl != 0); + return m_impl->GetHash32 (buffer, size); +} + +inline +uint64_t +Hasher::GetHash64 (const char * buffer, const size_t size) +{ + NS_ASSERT (m_impl != 0); + return m_impl->GetHash64 (buffer, size); +} + +inline +uint32_t +Hasher::GetHash32 (const std::string s) +{ + NS_ASSERT (m_impl != 0); + return m_impl->GetHash32 (s.c_str (), s.size ()); +} + +inline +uint64_t +Hasher::GetHash64 (const std::string s) +{ + NS_ASSERT (m_impl != 0); + return m_impl->GetHash64 (s.c_str (), s.size ()); +} + + +/************************************************* + Global hash functions, inlined for rvo +*/ + +inline +uint32_t +Hash32 (const char * buffer, const size_t size) +{ + return Hasher ().GetHash32 (buffer, size); +} + +inline +uint64_t +Hash64 (const char * buffer, const size_t size) +{ + return Hasher ().GetHash64 (buffer, size); +} + +inline +uint32_t +Hash32 (const std::string s) +{ + return Hasher ().GetHash32 (s); +} + +inline +uint64_t +Hash64 (const std::string s) +{ + return Hasher ().GetHash64 (s); +} + + +} // namespace ns3 + +#endif /* HASH_H */ diff -Naur ns-3.17/src/core/model/hash-murmur3.cc ns-3.18/src/core/model/hash-murmur3.cc --- ns-3.17/src/core/model/hash-murmur3.cc 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/src/core/model/hash-murmur3.cc 2013-10-26 07:07:30.035364393 -0700 @@ -0,0 +1,504 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2012 Lawrence Livermore National Laboratory + * + * 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: Peter D. Barnes, Jr. + * + * This copyright notice applies strictly to the wrapper material. + * + * The murmur3 source code itself is in the public domain. The murmur3 source + * code sections are marked by + * // Begin ----> + * and + * // End ----> + * comments. + * + * Changes from the murmur3 distribution are marked with `//PDB' + */ + +#include "log.h" +#include "hash-murmur3.h" + +#include + +/* + * \brief Silence erroneous strict alias warning from a gcc 4.4 bug + * + * Casting \c (void*) triggers a strict alias warning bug + * in gcc 4.4 (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39390). + * + * In the murmur3 code, data is returned by + * \code + * void Function (... , void * out) + * { + * ... + * *(uint32_t *)out = ... + * } + * \endcode + * + * which triggers the erroneous warning. + * + * We suppress strict-alias warnings in this compilation unit. + * (gcc 4.4 doesn't support the diagnostic push/pop pragmas, + * so we can't narrow down the suppression any further.) + */ +// Test for gcc 4.4.x +#define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) +#if (GCC_VERSION == 404) +# pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif + +namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("Hash-Murmur3"); + +namespace Hash { + +namespace Function { + +namespace Murmur3Implementation { + +// Changes from Murmur3 distribution are marked with `//PDB' +// + +/************************************************* + ** class Murmur3HashImplementation + ************************************************/ + +// Adapted from http://code.google.com/p/smhasher/ + +// Begin Murmur3.cpp -----------------------------> + +// +//----------------------------------------------------------------------------- +// MurmurHash3 was written by Austin Appleby, and is placed in the public +// domain. The author hereby disclaims copyright to this source code. + +// Note - The x86 and x64 versions do _not_ produce the same results, as the +// algorithms are optimized for their respective platforms. You can still +// compile and run any of them on any platform, but your performance with the +// non-native version will be less than optimal. + + +inline uint32_t rotl32 ( uint32_t x, int8_t r ) +{ + return (x << r) | (x >> (32 - r)); +} + +inline uint64_t rotl64 ( uint64_t x, int8_t r ) +{ + return (x << r) | (x >> (64 - r)); +} + +#define BIG_CONSTANT(x) (x##LLU) + +//----------------------------------------------------------------------------- +// Block read - if your platform needs to do endian-swapping or can only +// handle aligned reads, do the conversion here + +inline uint32_t getblock ( const uint32_t * p, int i ) +{ + return p[i]; +} + +inline uint64_t getblock ( const uint64_t * p, int i ) +{ + return p[i]; +} + +//----------------------------------------------------------------------------- +// Finalization mix - force all bits of a hash block to avalanche + +inline uint32_t fmix ( uint32_t h ) +{ + h ^= h >> 16; + h *= 0x85ebca6b; + h ^= h >> 13; + h *= 0xc2b2ae35; + h ^= h >> 16; + + return h; +} + +//---------- + +inline uint64_t fmix ( uint64_t k ) +{ + k ^= k >> 33; + k *= BIG_CONSTANT(0xff51afd7ed558ccd); + k ^= k >> 33; + k *= BIG_CONSTANT(0xc4ceb9fe1a85ec53); + k ^= k >> 33; + + return k; +} + +//----------------------------------------------------------------------------- + +//PDB forward +void MurmurHash3_x86_32_incr ( const void * key, int len, + uint32_t seed, void * out ); +void MurmurHash3_x86_32_fin ( int len, + uint32_t seed, void * out ); + +//PDB - incremental hashing +void MurmurHash3_x86_32 ( const void * key, int len, + uint32_t seed, void * out ) +{ + uint32_t h1; + MurmurHash3_x86_32_incr (key, len, seed, &h1); + MurmurHash3_x86_32_fin (len, h1, out); +} + +void MurmurHash3_x86_32_incr ( const void * key, int len, + uint32_t seed, void * out ) +{ + const uint8_t * data = (const uint8_t*)key; + const int nblocks = len / 4; + + uint32_t h1 = seed; + + uint32_t c1 = 0xcc9e2d51; + uint32_t c2 = 0x1b873593; + + //---------- + // body + + const uint32_t * blocks = (const uint32_t *)(data + nblocks*4); + + for(int i = -nblocks; i; i++) + { + uint32_t k1 = getblock(blocks,i); + + k1 *= c1; + k1 = rotl32(k1,15); + k1 *= c2; + + h1 ^= k1; + h1 = rotl32(h1,13); + h1 = h1*5+0xe6546b64; + } + + //---------- + // tail + + const uint8_t * tail = (const uint8_t*)(data + nblocks*4); + + uint32_t k1 = 0; + + switch(len & 3) + { + case 3: k1 ^= tail[2] << 16; + case 2: k1 ^= tail[1] << 8; + case 1: k1 ^= tail[0]; + k1 *= c1; k1 = rotl32(k1,15); k1 *= c2; h1 ^= k1; + }; + + *(uint32_t *)out = h1; +} + +//PDB - incremental hashing - finalization +void MurmurHash3_x86_32_fin ( int len, + uint32_t seed, void * out ) +{ + uint32_t h1 = seed; + + //---------- + // finalization + + h1 ^= len; + + h1 = fmix(h1); + + *(uint32_t *)out = h1; +} + +//----------------------------------------------------------------------------- + +//PDB forward +void MurmurHash3_x86_128_incr ( const void * key, const int len, + uint32_t * seeds, void * out ); +void MurmurHash3_x86_128_fin ( const int len, + uint32_t * seeds, void * out ); + +//PDB - incremental hashing +void MurmurHash3_x86_128 ( const void * key, const int len, + uint32_t seed, void * out ) +{ + uint32_t seeds[4]; + uint32_t h[4]; + seeds[0] = seeds[1] = seeds[2] = seeds[3] = seed; + MurmurHash3_x86_128_incr (key, len, seeds, h); + MurmurHash3_x86_128_fin (len, h, out); +} + +void MurmurHash3_x86_128_incr ( const void * key, const int len, + uint32_t * seeds, void * out ) +{ + const uint8_t * data = (const uint8_t*)key; + const int nblocks = len / 16; + + uint32_t h1 = seeds[0]; + uint32_t h2 = seeds[1]; + uint32_t h3 = seeds[2]; + uint32_t h4 = seeds[3]; + + uint32_t c1 = 0x239b961b; + uint32_t c2 = 0xab0e9789; + uint32_t c3 = 0x38b34ae5; + uint32_t c4 = 0xa1e38b93; + + //---------- + // body + + const uint32_t * blocks = (const uint32_t *)(data + nblocks*16); + + for(int i = -nblocks; i; i++) + { + uint32_t k1 = getblock(blocks,i*4+0); + uint32_t k2 = getblock(blocks,i*4+1); + uint32_t k3 = getblock(blocks,i*4+2); + uint32_t k4 = getblock(blocks,i*4+3); + + k1 *= c1; k1 = rotl32(k1,15); k1 *= c2; h1 ^= k1; + + h1 = rotl32(h1,19); h1 += h2; h1 = h1*5+0x561ccd1b; + + k2 *= c2; k2 = rotl32(k2,16); k2 *= c3; h2 ^= k2; + + h2 = rotl32(h2,17); h2 += h3; h2 = h2*5+0x0bcaa747; + + k3 *= c3; k3 = rotl32(k3,17); k3 *= c4; h3 ^= k3; + + h3 = rotl32(h3,15); h3 += h4; h3 = h3*5+0x96cd1c35; + + k4 *= c4; k4 = rotl32(k4,18); k4 *= c1; h4 ^= k4; + + h4 = rotl32(h4,13); h4 += h1; h4 = h4*5+0x32ac3b17; + } + + //---------- + // tail + + const uint8_t * tail = (const uint8_t*)(data + nblocks*16); + + uint32_t k1 = 0; + uint32_t k2 = 0; + uint32_t k3 = 0; + uint32_t k4 = 0; + + switch(len & 15) + { + case 15: k4 ^= tail[14] << 16; + case 14: k4 ^= tail[13] << 8; + case 13: k4 ^= tail[12] << 0; + k4 *= c4; k4 = rotl32(k4,18); k4 *= c1; h4 ^= k4; + + case 12: k3 ^= tail[11] << 24; + case 11: k3 ^= tail[10] << 16; + case 10: k3 ^= tail[ 9] << 8; + case 9: k3 ^= tail[ 8] << 0; + k3 *= c3; k3 = rotl32(k3,17); k3 *= c4; h3 ^= k3; + + case 8: k2 ^= tail[ 7] << 24; + case 7: k2 ^= tail[ 6] << 16; + case 6: k2 ^= tail[ 5] << 8; + case 5: k2 ^= tail[ 4] << 0; + k2 *= c2; k2 = rotl32(k2,16); k2 *= c3; h2 ^= k2; + + case 4: k1 ^= tail[ 3] << 24; + case 3: k1 ^= tail[ 2] << 16; + case 2: k1 ^= tail[ 1] << 8; + case 1: k1 ^= tail[ 0] << 0; + k1 *= c1; k1 = rotl32(k1,15); k1 *= c2; h1 ^= k1; + }; + + ((uint32_t *)out)[0] = h1; + ((uint32_t *)out)[1] = h2; + ((uint32_t *)out)[2] = h3; + ((uint32_t *)out)[3] = h4; +} + +//PDB - incremental hashing - finalization +void MurmurHash3_x86_128_fin ( const int len, + uint32_t * seeds, void * out ) +{ + //---------- + // finalization + + uint32_t h1 = seeds[0]; + uint32_t h2 = seeds[1]; + uint32_t h3 = seeds[2]; + uint32_t h4 = seeds[3]; + + h1 ^= len; h2 ^= len; h3 ^= len; h4 ^= len; + + h1 += h2; h1 += h3; h1 += h4; + h2 += h1; h3 += h1; h4 += h1; + + h1 = fmix(h1); + h2 = fmix(h2); + h3 = fmix(h3); + h4 = fmix(h4); + + h1 += h2; h1 += h3; h1 += h4; + h2 += h1; h3 += h1; h4 += h1; + + ((uint32_t *)out)[0] = h1; + ((uint32_t *)out)[1] = h2; + ((uint32_t *)out)[2] = h3; + ((uint32_t *)out)[3] = h4; +} + +//----------------------------------------------------------------------------- + +void MurmurHash3_x64_128 ( const void * key, const int len, + const uint32_t seed, void * out ) +{ + const uint8_t * data = (const uint8_t*)key; + const int nblocks = len / 16; + + uint64_t h1 = seed; + uint64_t h2 = seed; + + uint64_t c1 = BIG_CONSTANT(0x87c37b91114253d5); + uint64_t c2 = BIG_CONSTANT(0x4cf5ad432745937f); + + //---------- + // body + + const uint64_t * blocks = (const uint64_t *)(data); + + for(int i = 0; i < nblocks; i++) + { + uint64_t k1 = getblock(blocks,i*2+0); + uint64_t k2 = getblock(blocks,i*2+1); + + k1 *= c1; k1 = rotl64(k1,31); k1 *= c2; h1 ^= k1; + + h1 = rotl64(h1,27); h1 += h2; h1 = h1*5+0x52dce729; + + k2 *= c2; k2 = rotl64(k2,33); k2 *= c1; h2 ^= k2; + + h2 = rotl64(h2,31); h2 += h1; h2 = h2*5+0x38495ab5; + } + + //---------- + // tail + + const uint8_t * tail = (const uint8_t*)(data + nblocks*16); + + uint64_t k1 = 0; + uint64_t k2 = 0; + + switch(len & 15) + { + case 15: k2 ^= uint64_t(tail[14]) << 48; + case 14: k2 ^= uint64_t(tail[13]) << 40; + case 13: k2 ^= uint64_t(tail[12]) << 32; + case 12: k2 ^= uint64_t(tail[11]) << 24; + case 11: k2 ^= uint64_t(tail[10]) << 16; + case 10: k2 ^= uint64_t(tail[ 9]) << 8; + case 9: k2 ^= uint64_t(tail[ 8]) << 0; + k2 *= c2; k2 = rotl64(k2,33); k2 *= c1; h2 ^= k2; + + case 8: k1 ^= uint64_t(tail[ 7]) << 56; + case 7: k1 ^= uint64_t(tail[ 6]) << 48; + case 6: k1 ^= uint64_t(tail[ 5]) << 40; + case 5: k1 ^= uint64_t(tail[ 4]) << 32; + case 4: k1 ^= uint64_t(tail[ 3]) << 24; + case 3: k1 ^= uint64_t(tail[ 2]) << 16; + case 2: k1 ^= uint64_t(tail[ 1]) << 8; + case 1: k1 ^= uint64_t(tail[ 0]) << 0; + k1 *= c1; k1 = rotl64(k1,31); k1 *= c2; h1 ^= k1; + }; + + //---------- + // finalization + + h1 ^= len; h2 ^= len; + + h1 += h2; + h2 += h1; + + h1 = fmix(h1); + h2 = fmix(h2); + + h1 += h2; + h2 += h1; + + ((uint32_t *)out)[0] = h1; + ((uint32_t *)out)[1] = h2; +} + + +// End Murmur3.cpp -----------------------------> + +#undef BIG_CONSTANT + + +//----------------------------------------------------------------------------- + + +} // namespace Murmur3Implementation + + +Murmur3::Murmur3 () +{ + clear (); +} + +uint32_t +Murmur3::GetHash32 (const char * buffer, const size_t size) +{ + using namespace Murmur3Implementation; + + MurmurHash3_x86_32_incr (buffer, size, m_hash32, (void *) & m_hash32); + m_size32 += size; + uint32_t hash; + MurmurHash3_x86_32_fin (m_size32, m_hash32, (void *) & hash); + + return hash; +} + +uint64_t +Murmur3::GetHash64 (const char * buffer, const size_t size) +{ + using namespace Murmur3Implementation; + MurmurHash3_x86_128_incr (buffer, size, + (uint32_t *)(void *)m_hash64, (void *)(m_hash64)); + m_size64 += size; + uint64_t hash[2]; + MurmurHash3_x86_128_fin (m_size64, + (uint32_t*)(void *)m_hash64, (void *)hash); + return hash[0]; +} + +void +Murmur3::clear (void) +{ + m_hash32 = (uint32_t)SEED; + m_size32 = 0; + m_hash64[0] = ((uint64_t)(SEED) << 32) + (uint64_t)SEED; + m_hash64[1] = ((uint64_t)(SEED) << 32) + (uint64_t)SEED; + m_size64 = 0; +} + +} // namespace Function + +} // namespace Hash + +} // namespace ns3 diff -Naur ns-3.17/src/core/model/hash-murmur3.h ns-3.18/src/core/model/hash-murmur3.h --- ns-3.17/src/core/model/hash-murmur3.h 1969-12-31 16:00:00.000000000 -0800 +++ ns-3.18/src/core/model/hash-murmur3.h 2013-10-26 07:07:30.027364392 -0700 @@ -0,0 +1,120 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2012 Lawrence Livermore National Laboratory + * + * 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: Peter D. Barnes, Jr. + */ + +#ifndef HASH_MURMUR3_H +#define HASH_MURMUR3_H + +#include "hash-function.h" + +namespace ns3 { + +namespace Hash { + +namespace Function { + +/** + * \ingroup hash + * + * \brief Murmur3 hash function implementation + * + * Adapted from http://code.google.com/p/smhasher/ + * + * MurmurHash3 was written by Austin Appleby, and is placed in the public + * domain. The author hereby disclaims copyright to this source code. + + * Note - The x86 and x64 versions do _not_ produce the same results, as the + * algorithms are optimized for their respective platforms. You can still + * compile and run any of them on any platform, but your performance with the + * non-native version will be less than optimal. + */ +class Murmur3 : public Implementation +{ +public: + /** + * Constructor, clears internal state + */ + Murmur3 (); + /** + * Compute 32-bit hash of a byte buffer + * + * Call clear () between calls to GetHash32() to reset the + * internal state and hash each buffer separately. + * + * If you don't call clear() between calls to GetHash32, + * you can hash successive buffers. The final return value + * will be the cumulative hash across all calls. + * + * \param [in] buffer pointer to the beginning of the buffer + * \param [in] size length of the buffer, in bytes + * \return 32-bit hash of the buffer + */ + uint32_t GetHash32 (const char * buffer, const size_t size); + /** + * Compute 64-bit hash of a byte buffer. + * + * Call clear () between calls to GetHash64() to reset the + * internal state and hash each buffer separately. + * + * If you don't call clear() between calls to GetHash64, + * you can hash successive buffers. The final return value + * will be the cumulative hash across all calls. + * + * \param [in] buffer pointer to the beginning of the buffer + * \param [in] size length of the buffer, in bytes + * \return 64-bit hash of the buffer + */ + uint64_t GetHash64 (const char * buffer, const size_t size); + /** + * Restore initial state + */ + virtual void clear (void); + +private: + /** + * Seed value + * + * This has to be a constant for all MPI ranks to generate + * the same hash from the same string. + */ + enum seed + { + SEED = 0x8BADF00D // Ate bad food + }; + //@{ + /** + * Cache last hash value, and total bytes hashed (needed to finalize), + * for incremental hashing + */ + uint32_t m_hash32; + uint32_t m_size32; + /** murmur3 produces 128-bit hash and state; we use just the first 64-bits. */ + uint64_t m_hash64[2]; + uint64_t m_size64; + //@} + +}; // class Murmur3 + +} // namespace Function + +} // namespace Hash + +} // namespace ns3 + +#endif /* HASH_MURMUR3_H */ diff -Naur ns-3.17/src/core/model/int64x64.cc ns-3.18/src/core/model/int64x64.cc --- ns-3.17/src/core/model/int64x64.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/core/model/int64x64.cc 2013-10-26 07:07:30.039364393 -0700 @@ -1,6 +1,7 @@ #include "int64x64.h" #include #include +#include // showpos #include #include "assert.h" #include "log.h" @@ -38,7 +39,25 @@ std::ostream &operator << (std::ostream &os, const int64x64_t &value) { int64_t hi = value.GetHigh (); - os << ((hi<0) ? "-" : "+") << ((hi<0) ? -hi : hi) << "."; + + // Save stream format flags + std::ios_base::fmtflags ff = os.flags (); + + { /// \internal + /// See \bugid{1737}: gcc libstc++ 4.2 bug + if (hi == 0) + { + os << '+'; + } + else + { + os << std::showpos; + } + } + + os << hi << "."; + os.flags (ff); // Restore stream flags + uint64_t low = value.GetLow (); uint8_t msd = MostSignificantDigit (~((uint64_t)0)); do diff -Naur ns-3.17/src/core/model/int64x64-double.h ns-3.18/src/core/model/int64x64-double.h --- ns-3.17/src/core/model/int64x64-double.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/core/model/int64x64-double.h 2013-10-26 07:07:30.047364393 -0700 @@ -27,7 +27,7 @@ inline int64x64_t (unsigned long long int v) : _v (v) {} inline int64x64_t (int64_t hi, uint64_t lo) - : _v (hi) { /* XXX */} + : _v (hi) { /** \todo add in lo? */} inline int64x64_t (const int64x64_t &o) : _v (o._v) {} @@ -47,7 +47,7 @@ } inline uint64_t GetLow (void) const { - // XXX + /// \todo Generate lo? return 0; } diff -Naur ns-3.17/src/core/model/log.cc ns-3.18/src/core/model/log.cc --- ns-3.17/src/core/model/log.cc 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/core/model/log.cc 2013-10-26 07:07:30.023364392 -0700 @@ -558,8 +558,10 @@ void LogSetTimePrinter (LogTimePrinter printer) { g_logTimePrinter = printer; - // This is the only place where we are more or less sure that all log variables - // are registered. See bug 1082 for details. + /** \internal + * This is the only place where we are more or less sure that all log variables + * are registered. See \bugid{1082} for details. + */ CheckEnvironmentVariables(); } LogTimePrinter LogGetTimePrinter (void) diff -Naur ns-3.17/src/core/model/nstime.h ns-3.18/src/core/model/nstime.h --- ns-3.17/src/core/model/nstime.h 2013-05-12 09:50:15.000000000 -0700 +++ ns-3.18/src/core/model/nstime.h 2013-10-26 07:07:30.027364392 -0700 @@ -24,9 +24,12 @@ #include "attribute.h" #include "attribute-helper.h" #include "int64x64.h" +#include "unused.h" #include +#include #include #include +#include namespace ns3 { @@ -36,61 +39,12 @@ */ /** * \ingroup time - * \brief keep track of time unit. - * - * This template class is used to keep track of the value - * of a specific time unit: the type TimeUnit<1> is used to - * keep track of seconds, the type TimeUnit<2> is used to keep - * track of seconds squared, the type TimeUnit<-1> is used to - * keep track of 1/seconds, etc. - * - * This base class defines all the functionality shared by all - * these time unit objects: it defines all the classic arithmetic - * operators +, -, *, /, and all the classic comparison operators: - * ==, !=, <, >, <=, >=. It is thus easy to add, substract, or - * multiply multiple TimeUnit objects. The return type of any such - * arithmetic expression is always a TimeUnit object. - * - * The ns3::uint64_t, ns3::Time, ns3::TimeSquare, and ns3::TimeInvert classes - * are aliases for the TimeUnit<0>, TimeUnit<1>, TimeUnit<2> and TimeUnit<-1> - * types respectively. - * - * For example: - * \code - * Time<1> t1 = Seconds (10.0); - * Time<1> t2 = Seconds (10.0); - * Time<2> t3 = t1 * t2; - * Time<0> t4 = t1 / t2; - * Time<3> t5 = t3 * t1; - * Time<-2> t6 = t1 / t5; - * TimeSquare t7 = t3; - * uint64_t s = t4; - * \endcode - * - * If you try to assign the result of an expression which does not - * match the type of the variable it is assigned to, you will get a - * compiler error. For example, the following will not compile: - * \code - * Time<1> = Seconds (10.0) * Seconds (1.5); - * \endcode - * - * You can also use the following non-member functions to manipulate - * any of these ns3::TimeUnit object: - * - \ref ns3-Time-Abs ns3::Abs - * - \ref ns3-Time-Max ns3::Max - * - \ref ns3-Time-Min ns3::Min - */ -/** - * \ingroup time * \brief keep track of time values and allow control of global simulation resolution * * This class defines all the classic C++ arithmetic * operators +, -, *, /, and all the classic comparison operators: * ==, !=, <, >, <=, >=. It is thus easy to add, substract, or - * multiply multiple Time objects. - * - * The ns3::uint64_t, ns3::TimeSquare, and ns3::TimeInvert classes - * are backward-compatibility aliases for ns3::Time. + * multiply Time objects. * * For example: * \code @@ -115,17 +69,17 @@ * 1. It is possible to either increase or decrease the resolution and the * code tries really hard to make this easy. * - * If your resolution is X (say, nanoseconds) and if you create Time objects - * with a lower resolution (say, picoseconds), don't expect that this - * code will return 1: PicoSeconds (1).GetPicoSeconds (). It will most - * likely return 0 because the Time object has only 64 bits of fractional + * If your resolution is X (say, nanoseconds) and if you create Time objects + * with a lower resolution (say, picoseconds), don't expect that this + * code will return 1: PicoSeconds (1).GetPicoSeconds (). It will most + * likely return 0 because the Time object has only 64 bits of fractional * precision which means that PicoSeconds (1) is stored as a 64-bit aproximation - * of 1/1000 in the Time object. If you later multiply it again by the exact + * of 1/1000 in the Time object. If you later multiply it again by the exact * value 1000, the result is unlikely to be 1 exactly. It will be close to * 1 but not exactly 1. - * + * * In general, it is thus a really bad idea to try to use time objects of a - * resolution higher than the global resolution controlled through + * resolution higher than the global resolution controlled through * Time::SetResolution. If you do need to use picoseconds, it's thus best * to switch the global resolution to picoseconds to avoid nasty surprises. * @@ -133,7 +87,7 @@ * global resolution, you also implicitely decrease the range of your simulation. * i.e., the global simulation time is stored in a 64 bit integer whose interpretation * will depend on the global resolution so, 2^64 picoseconds which is the maximum - * duration of your simulation if the global resolution is picoseconds + * duration of your simulation if the global resolution is picoseconds * is smaller than 2^64 nanoseconds which is the maximum duration of your simulation * if the global resolution is nanoseconds. * @@ -154,12 +108,12 @@ */ enum Unit { - S = 0, - MS = 1, - US = 2, - NS = 3, - PS = 4, - FS = 5, + S = 0, //!< second + MS = 1, //!< millisecond + US = 2, //!< microsecond + NS = 3, //!< nanosecond + PS = 4, //!< picosecond + FS = 5, //!< femtosecond LAST = 6 }; @@ -170,42 +124,86 @@ } inline Time () : m_data () - {} + { + if (g_markingTimes) + { + Mark (this); + } + } inline Time(const Time &o) : m_data (o.m_data) - {} + { + if (g_markingTimes) + { + Mark (this); + } + } explicit inline Time (double v) : m_data (lround (v)) - {} + { + if (g_markingTimes) + { + Mark (this); + } + } explicit inline Time (int v) : m_data (v) - {} + { + if (g_markingTimes) + { + Mark (this); + } + } explicit inline Time (long int v) : m_data (v) - {} + { + if (g_markingTimes) + { + Mark (this); + } + } explicit inline Time (long long int v) : m_data (v) - {} + { + if (g_markingTimes) + { + Mark (this); + } + } explicit inline Time (unsigned int v) : m_data (v) - {} + { + if (g_markingTimes) + { + Mark (this); + } + } explicit inline Time (unsigned long int v) : m_data (v) - {} + { + if (g_markingTimes) + { + Mark (this); + } + } explicit inline Time (unsigned long long int v) : m_data (v) - {} - + { + if (g_markingTimes) + { + Mark (this); + } + } /** - * \brief String constructor - * Construct Time object from common time expressions like " - * 1ms" or "10s". Supported units include: - * - s (seconds) - * - ms (milliseconds) - * - us (microseconds) - * - ns (nanoseconds) - * - ps (picoseconds) - * - fs (femtoseconds) + * \brief Construct Time object from common time expressions like "1ms" + * + * Supported units include: + * - `s` (seconds) + * - `ms` (milliseconds) + * - `us` (microseconds) + * - `ns` (nanoseconds) + * - `ps` (picoseconds) + * - `fs` (femtoseconds) * * There can be no white space between the numerical portion * and the units. Any otherwise malformed string causes a fatal error to @@ -215,6 +213,32 @@ explicit Time (const std::string & s); /** + * \brief Minimum representable Time + */ + static Time Min () + { + return Time (std::numeric_limits::min ()); + } + /** + * \brief Maximum representable Time + */ + static Time Max () + { + return Time (std::numeric_limits::max ()); + } + + /** + * Destructor + */ + ~Time () + { + if (g_markingTimes) + { + Clear (this); + } + } + + /** * \return true if the time is zero, false otherwise. */ inline bool IsZero (void) const @@ -249,7 +273,9 @@ { return m_data > 0; } - + /** + * \return -1,0,+1 if `this < o`, `this == o`, or `this > o` + */ inline int Compare (const Time &o) const { return (m_data < o.m_data) ? -1 : (m_data == o.m_data) ? 0 : 1; @@ -305,8 +331,7 @@ return ToInteger (Time::FS); } /** - * \returns an approximation of the time stored in this - * instance in the units specified in m_tsPrecision. + * \returns the raw time value, in the current units */ inline int64_t GetTimeStep (void) const { @@ -325,7 +350,7 @@ /** * \param resolution the new resolution to use * - * Change the global resolution used to convert all + * Change the global resolution used to convert all * user-provided time values in Time objects and Time objects * in user-expected time units. */ @@ -374,7 +399,7 @@ } else { - v /= info->factor; + v /= info->factor; } return v; } @@ -405,7 +430,7 @@ struct Information *info = PeekInformation (timeUnit); // DO NOT REMOVE this temporary variable. It's here // to work around a compiler bug in gcc 3.4 - int64x64_t retval = from; + int64x64_t retval = from; if (info->fromMul) { retval *= info->timeFrom; @@ -436,30 +461,41 @@ } explicit inline Time (const int64x64_t &value) : m_data (value.GetHigh ()) - {} + { + if (g_markingTimes) + { + Mark (this); + } + } inline static Time From (const int64x64_t &value) { return Time (value); } private: + /** + * How to convert between other units and the current unit + */ struct Information { - bool toMul; - bool fromMul; - uint64_t factor; - int64x64_t timeTo; - int64x64_t timeFrom; + bool toMul; //!< Multiply when converting To, otherwise divide + bool fromMul; //!< Multiple when converting From, otherwise divide + int64_t factor; //!< Ratio of this unit / current unit + int64x64_t timeTo; //!< Multiplier to convert to this unit + int64x64_t timeFrom; //!< Multiplier to convert from this unit }; + /** + * Current time unit, and conversion info. + */ struct Resolution { - struct Information info[LAST]; - enum Time::Unit unit; + struct Information info[LAST]; //!< Conversion info from current unit + enum Time::Unit unit; //!< Current time unit }; static inline struct Resolution *PeekResolution (void) { - static struct Time::Resolution resolution = GetNsResolution (); + static struct Time::Resolution resolution = SetDefaultNsResolution (); return &resolution; } static inline struct Information *PeekInformation (enum Unit timeUnit) @@ -467,8 +503,75 @@ return &(PeekResolution ()->info[timeUnit]); } - static struct Resolution GetNsResolution (void); - static void SetResolution (enum Unit unit, struct Resolution *resolution); + static struct Resolution SetDefaultNsResolution (void); + static void SetResolution (enum Unit unit, struct Resolution *resolution, + const bool convert = true); + + /** + * Record all instances of Time, so we can rescale them when + * the resolution changes. + * + * \intern + * + * We use a std::set so we can remove the record easily when + * ~Time() is called. + * + * We don't use Ptr