--- a/.hgignore Wed Jul 24 13:19:54 2013 +0200
+++ b/.hgignore Wed Jul 24 13:20:24 2013 +0200
@@ -24,6 +24,7 @@
^doc/doxygen.warnings.log$
^doc/(manual|models|tutorial|tutorial-pt-br)/build
^doc/(manual|models|tutorial|tutorial-pt-br)/figures/.*\.(eps|pdf|png)$
+^doc/manual/source-temp
^doc/models/source-temp
^doc/ns3_html_theme/static/ns3_version.js$
^src/.*/doc/build
@@ -38,4 +39,4 @@
\#[^\#/]+\#$
^coverity
syntax: glob
-TAGS
\ No newline at end of file
+TAGS
--- a/CHANGES.html Wed Jul 24 13:19:54 2013 +0200
+++ b/CHANGES.html Wed Jul 24 13:20:24 2013 +0200
@@ -55,10 +55,34 @@
<h2>New API:</h2>
<ul>
+ <li>Time attributes can now be bounded. See attribute-test-suite.cc
+ for an example.</li>
+ <li>New generic hash function interface. Two hash functions are provided:
+ murmur3 (default), and the venerable FNV1a. See the Hash Functions
+ section in the Manual.</li>
+ <li>New Mac16Address has been added. It can be used with IPv6 to make
+ an Autoconfigured address.</li>
+ <li>Mac64Address support has been extended. It can now be used with
+ IPv6 to make an Autoconfigured address.</li>
</ul>
<h2>Changes to existing API:</h2>
<ul>
+ <li> The documentation's IPv6 addresses (2001:db8::/32, RFC 3849) are now
+ dropped by routers.
+ </li>
+ <li> The 'src/tools' module has been removed, and most files migrated to
+ 'src/stats'. For users of these programs (the statistics-processing
+ in average.h, or the gnuplot support), the main change is likely to be
+ replacing the inclusion of "tools-module.h" with "stats-module.h".
+ Users of the event garbage collector, previously in tools, will now
+ include it from the core module.
+ </li>
+ <li> The Ipv6 UnicastForwardCallback and MulticastForwardCallback
+ have a new parmater, the NetDevice the packet has been received from.
+ Existing Ipv6RoutingProtocols should update their RouteInput function
+ accordingly. E.g., from ucb (rtentry, p, header); to ucb (idev, rtentry, p, header);
+ </li>
</ul>
<h2>Changes to build system:</h2>
--- a/RELEASE_NOTES Wed Jul 24 13:19:54 2013 +0200
+++ b/RELEASE_NOTES Wed Jul 24 13:20:24 2013 +0200
@@ -21,15 +21,40 @@
New user-visible features
-------------------------
+- Time attributes can now be bounded. See attribute-test-suite.cc for an
+ example.
+- IPv6 addrss 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.
Bugs fixed
----------
+- Bug 760 - IP address removal can be painful
+- Bug 1296 - Enhancement in Ipv[4,6]RoutingHelper
+- Bug 1390 - ICMPv6 Redirect are handled correctly only for /64 networks
- 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 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 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 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 1727 - Ping6 should use a proper source address
+- Bug 1731 - lte-phy-error-model passes unexpectedly
Known issues
------------
--- a/doc/doxygen.conf Wed Jul 24 13:19:54 2013 +0200
+++ b/doc/doxygen.conf Wed Jul 24 13:20:24 2013 +0200
@@ -196,7 +196,7 @@
ALIASES =
# Set off \internal docs
-ALIASES += intern="\internal \par \b Internal:"
+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 ... */
@@ -290,7 +290,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
@@ -754,8 +754,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 \
--- a/doc/doxygen.warnings.report.sh Wed Jul 24 13:19:54 2013 +0200
+++ b/doc/doxygen.warnings.report.sh Wed Jul 24 13:20:24 2013 +0200
@@ -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
+
+
--- a/doc/main.h Wed Jul 24 13:19:54 2013 +0200
+++ b/doc/main.h Wed Jul 24 13:20:24 2013 +0200
@@ -57,7 +57,6 @@
* - stats
* - tap-bridge
* - test
- * - tools
* - topology-read
* - uan
* - virtual-net-device
--- a/doc/manual/Makefile Wed Jul 24 13:19:54 2013 +0200
+++ b/doc/manual/Makefile Wed Jul 24 13:20:24 2013 +0200
@@ -2,38 +2,79 @@
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 \
+
+# 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 \
+
+# specify figures from which .png and .pdf figures need to be
+# generated (all dia and eps figures)
IMAGES_EPS = \
$(FIGURES)/software-organization.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 +86,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 +111,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 +167,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 +176,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."
--- a/doc/manual/rescale-pdf.sh Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -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}}
--- a/doc/manual/source/attributes.rst Wed Jul 24 13:19:54 2013 +0200
+++ b/doc/manual/source/attributes.rst Wed Jul 24 13:20:24 2013 +0200
@@ -426,7 +426,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),
--- a/doc/manual/source/callbacks.rst Wed Jul 24 13:19:54 2013 +0200
+++ b/doc/manual/source/callbacks.rst Wed Jul 24 13:20:24 2013 +0200
@@ -537,6 +537,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> a, Ptr<B> 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> a, Ptr<B> 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*
--- a/doc/manual/source/gnuplot.rst Wed Jul 24 13:19:54 2013 +0200
+++ b/doc/manual/source/gnuplot.rst Wed Jul 24 13:20:24 2013 +0200
@@ -27,12 +27,12 @@
An example program that uses |ns3|'s Gnuplot class can be found here: ::
- src/tools/examples/gnuplot-example.cc
+ src/stats/examples/gnuplot-example.cc
In order to run this example, do the following: ::
./waf shell
- cd build/debug/src/tools/examples
+ cd build/debug/src/stats/examples
./gnuplot-example
This should produce the following gnuplot control files in the directory where the example is located: ::
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/manual/source/hash-functions.rst Wed Jul 24 13:20:24 2013 +0200
@@ -0,0 +1,117 @@
+.. include:: replace.txt
+
+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 (<every buffer>)
+ {
+ 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<Hash::Function::Fnv1a> () );
+
+
+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<Hash::Function::Foo> ())``
+
+
+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<Hash::Function::Hash32> (&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
--- a/doc/manual/source/index.rst Wed Jul 24 13:19:54 2013 +0200
+++ b/doc/manual/source/index.rst Wed Jul 24 13:20:24 2013 +0200
@@ -18,6 +18,7 @@
organization
random-variables
+ hash-functions
events
callbacks
object-model
--- a/doc/manual/source/python.rst Wed Jul 24 13:19:54 2013 +0200
+++ b/doc/manual/source/python.rst Wed Jul 24 13:20:24 2013 +0200
@@ -77,20 +77,20 @@
::
./waf --shell
- python examples/mixed-wireless.py
+ python examples/wireless/mixed-wireless.py
and the other is to use the --pyrun option to waf:
::
- ./waf --pyrun examples/mixed-wireless.py
+ ./waf --pyrun examples/wireless/mixed-wireless.py
To run a python script under the C debugger:
::
./waf --shell
- gdb --args python examples/mixed-wireless.py
+ 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:
--- a/doc/models/Makefile Wed Jul 24 13:19:54 2013 +0200
+++ b/doc/models/Makefile Wed Jul 24 13:20:24 2013 +0200
@@ -295,12 +295,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 =
--- a/doc/models/rescale-pdf.sh Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -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}}
--- a/doc/ns3_html_theme/get_version.sh Wed Jul 24 13:19:54 2013 +0200
+++ b/doc/ns3_html_theme/get_version.sh Wed Jul 24 13:20:24 2013 +0200
@@ -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
--- a/doc/release_steps.txt Wed Jul 24 13:19:54 2013 +0200
+++ b/doc/release_steps.txt Wed Jul 24 13:20:24 2013 +0200
@@ -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
---------------
--- a/examples/ipv6/icmpv6-redirect.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/examples/ipv6/icmpv6-redirect.cc Wed Jul 24 13:20:24 2013 +0200
@@ -155,7 +155,7 @@
Ipv6InterfaceContainer iic2 = ipv6.Assign (ndc2);
iic2.SetRouter (0, true);
- stackHelper.AddHostRouteTo (r1, iic2.GetAddress (1, 1), iic1.GetAddress (2, 1), iic1.GetInterfaceIndex (1));
+ stackHelper.AddHostRouteTo (r1, iic2.GetAddress (1, 1), iic1.GetAddress (2, 0), iic1.GetInterfaceIndex (1));
Simulator::Schedule (Seconds (0.0), &StackHelper::PrintRoutingTable, &stackHelper, r1);
Simulator::Schedule (Seconds (3.0), &StackHelper::PrintRoutingTable, &stackHelper, sta1);
--- a/examples/wireless/multirate.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/examples/wireless/multirate.cc Wed Jul 24 13:20:24 2013 +0200
@@ -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);
--- a/examples/wireless/wifi-adhoc.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/examples/wireless/wifi-adhoc.cc Wed Jul 24 13:20:24 2013 +0200
@@ -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 <iostream>
--- a/examples/wireless/wifi-clear-channel-cmu.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/examples/wireless/wifi-clear-channel-cmu.cc Wed Jul 24 13:20:24 2013 +0200
@@ -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"
--- a/examples/wireless/wifi-hidden-terminal.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/examples/wireless/wifi-hidden-terminal.cc Wed Jul 24 13:20:24 2013 +0200
@@ -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";
}
}
--- a/examples/wireless/wscript Wed Jul 24 13:19:54 2013 +0200
+++ b/examples/wireless/wscript Wed Jul 24 13:20:24 2013 +0200
@@ -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,25 +25,25 @@
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'])
--- a/src/antenna/doc/Makefile Wed Jul 24 13:19:54 2013 +0200
+++ b/src/antenna/doc/Makefile Wed Jul 24 13:20:24 2013 +0200
@@ -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 =
--- a/src/antenna/doc/rescale-pdf.sh Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -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}}
--- a/src/aodv/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/aodv/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -136,6 +136,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<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [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]
@@ -352,8 +354,6 @@
module.add_class('Packet', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >'])
## 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]
@@ -555,7 +555,6 @@
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'])
@@ -2205,6 +2204,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):
@@ -4159,6 +4162,16 @@
'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',
@@ -7054,6 +7067,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 +7125,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([])
--- a/src/aodv/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/aodv/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -136,6 +136,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<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [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]
@@ -352,8 +354,6 @@
module.add_class('Packet', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >'])
## 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]
@@ -555,7 +555,6 @@
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'])
@@ -2205,6 +2204,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):
@@ -4159,6 +4162,16 @@
'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',
@@ -7054,6 +7067,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 +7125,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([])
--- a/src/aodv/helper/aodv-helper.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/aodv/helper/aodv-helper.h Wed Jul 24 13:20:24 2013 +0200
@@ -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<Ipv4RoutingProtocol> Create (Ptr<Node> node) const;
/**
--- a/src/aodv/test/aodv-regression.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/aodv/test/aodv-regression.h Wed Jul 24 13:20:24 2013 +0200
@@ -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
--- a/src/aodv/test/bug-772.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/aodv/test/bug-772.h Wed Jul 24 13:20:24 2013 +0200
@@ -33,7 +33,7 @@
*
* \brief AODV deferred route lookup test case (see bug 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
--- a/src/applications/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/applications/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -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<double> [class]
- module.add_class('Average', import_from_module='ns.tools', template_parameters=['double'])
+ ## average.h (module 'stats'): ns3::Average<double> [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]
@@ -136,6 +136,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]
@@ -440,8 +442,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]
@@ -473,6 +473,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 +491,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&')
@@ -703,7 +703,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'])
@@ -1031,64 +1030,64 @@
return
def register_Ns3Average__Double_methods(root_module, cls):
- ## average.h (module 'tools'): ns3::Average<double>::Average(ns3::Average<double> const & arg0) [copy constructor]
+ ## average.h (module 'stats'): ns3::Average<double>::Average(ns3::Average<double> const & arg0) [copy constructor]
cls.add_constructor([param('ns3::Average< double > const &', 'arg0')])
- ## average.h (module 'tools'): ns3::Average<double>::Average() [constructor]
- cls.add_constructor([])
- ## average.h (module 'tools'): double ns3::Average<double>::Avg() const [member function]
+ ## average.h (module 'stats'): ns3::Average<double>::Average() [constructor]
+ cls.add_constructor([])
+ ## average.h (module 'stats'): double ns3::Average<double>::Avg() const [member function]
cls.add_method('Avg',
'double',
[],
is_const=True)
- ## average.h (module 'tools'): uint32_t ns3::Average<double>::Count() const [member function]
+ ## average.h (module 'stats'): uint32_t ns3::Average<double>::Count() const [member function]
cls.add_method('Count',
'uint32_t',
[],
is_const=True)
- ## average.h (module 'tools'): double ns3::Average<double>::Error90() const [member function]
+ ## average.h (module 'stats'): double ns3::Average<double>::Error90() const [member function]
cls.add_method('Error90',
'double',
[],
is_const=True)
- ## average.h (module 'tools'): double ns3::Average<double>::Error95() const [member function]
+ ## average.h (module 'stats'): double ns3::Average<double>::Error95() const [member function]
cls.add_method('Error95',
'double',
[],
is_const=True)
- ## average.h (module 'tools'): double ns3::Average<double>::Error99() const [member function]
+ ## average.h (module 'stats'): double ns3::Average<double>::Error99() const [member function]
cls.add_method('Error99',
'double',
[],
is_const=True)
- ## average.h (module 'tools'): double ns3::Average<double>::Max() const [member function]
+ ## average.h (module 'stats'): double ns3::Average<double>::Max() const [member function]
cls.add_method('Max',
'double',
[],
is_const=True)
- ## average.h (module 'tools'): double ns3::Average<double>::Mean() const [member function]
+ ## average.h (module 'stats'): double ns3::Average<double>::Mean() const [member function]
cls.add_method('Mean',
'double',
[],
is_const=True)
- ## average.h (module 'tools'): double ns3::Average<double>::Min() const [member function]
+ ## average.h (module 'stats'): double ns3::Average<double>::Min() const [member function]
cls.add_method('Min',
'double',
[],
is_const=True)
- ## average.h (module 'tools'): void ns3::Average<double>::Reset() [member function]
+ ## average.h (module 'stats'): void ns3::Average<double>::Reset() [member function]
cls.add_method('Reset',
'void',
[])
- ## average.h (module 'tools'): double ns3::Average<double>::Stddev() const [member function]
+ ## average.h (module 'stats'): double ns3::Average<double>::Stddev() const [member function]
cls.add_method('Stddev',
'double',
[],
is_const=True)
- ## average.h (module 'tools'): void ns3::Average<double>::Update(double const & x) [member function]
+ ## average.h (module 'stats'): void ns3::Average<double>::Update(double const & x) [member function]
cls.add_method('Update',
'void',
[param('double const &', 'x')])
- ## average.h (module 'tools'): double ns3::Average<double>::Var() const [member function]
+ ## average.h (module 'stats'): double ns3::Average<double>::Var() const [member function]
cls.add_method('Var',
'double',
[],
@@ -2808,6 +2807,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):
@@ -5689,6 +5692,16 @@
'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',
@@ -7759,6 +7772,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',
@@ -9595,13 +9612,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([])
--- a/src/applications/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/applications/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -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<double> [class]
- module.add_class('Average', import_from_module='ns.tools', template_parameters=['double'])
+ ## average.h (module 'stats'): ns3::Average<double> [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]
@@ -136,6 +136,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]
@@ -440,8 +442,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]
@@ -473,6 +473,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 +491,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&')
@@ -703,7 +703,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'])
@@ -1031,64 +1030,64 @@
return
def register_Ns3Average__Double_methods(root_module, cls):
- ## average.h (module 'tools'): ns3::Average<double>::Average(ns3::Average<double> const & arg0) [copy constructor]
+ ## average.h (module 'stats'): ns3::Average<double>::Average(ns3::Average<double> const & arg0) [copy constructor]
cls.add_constructor([param('ns3::Average< double > const &', 'arg0')])
- ## average.h (module 'tools'): ns3::Average<double>::Average() [constructor]
- cls.add_constructor([])
- ## average.h (module 'tools'): double ns3::Average<double>::Avg() const [member function]
+ ## average.h (module 'stats'): ns3::Average<double>::Average() [constructor]
+ cls.add_constructor([])
+ ## average.h (module 'stats'): double ns3::Average<double>::Avg() const [member function]
cls.add_method('Avg',
'double',
[],
is_const=True)
- ## average.h (module 'tools'): uint32_t ns3::Average<double>::Count() const [member function]
+ ## average.h (module 'stats'): uint32_t ns3::Average<double>::Count() const [member function]
cls.add_method('Count',
'uint32_t',
[],
is_const=True)
- ## average.h (module 'tools'): double ns3::Average<double>::Error90() const [member function]
+ ## average.h (module 'stats'): double ns3::Average<double>::Error90() const [member function]
cls.add_method('Error90',
'double',
[],
is_const=True)
- ## average.h (module 'tools'): double ns3::Average<double>::Error95() const [member function]
+ ## average.h (module 'stats'): double ns3::Average<double>::Error95() const [member function]
cls.add_method('Error95',
'double',
[],
is_const=True)
- ## average.h (module 'tools'): double ns3::Average<double>::Error99() const [member function]
+ ## average.h (module 'stats'): double ns3::Average<double>::Error99() const [member function]
cls.add_method('Error99',
'double',
[],
is_const=True)
- ## average.h (module 'tools'): double ns3::Average<double>::Max() const [member function]
+ ## average.h (module 'stats'): double ns3::Average<double>::Max() const [member function]
cls.add_method('Max',
'double',
[],
is_const=True)
- ## average.h (module 'tools'): double ns3::Average<double>::Mean() const [member function]
+ ## average.h (module 'stats'): double ns3::Average<double>::Mean() const [member function]
cls.add_method('Mean',
'double',
[],
is_const=True)
- ## average.h (module 'tools'): double ns3::Average<double>::Min() const [member function]
+ ## average.h (module 'stats'): double ns3::Average<double>::Min() const [member function]
cls.add_method('Min',
'double',
[],
is_const=True)
- ## average.h (module 'tools'): void ns3::Average<double>::Reset() [member function]
+ ## average.h (module 'stats'): void ns3::Average<double>::Reset() [member function]
cls.add_method('Reset',
'void',
[])
- ## average.h (module 'tools'): double ns3::Average<double>::Stddev() const [member function]
+ ## average.h (module 'stats'): double ns3::Average<double>::Stddev() const [member function]
cls.add_method('Stddev',
'double',
[],
is_const=True)
- ## average.h (module 'tools'): void ns3::Average<double>::Update(double const & x) [member function]
+ ## average.h (module 'stats'): void ns3::Average<double>::Update(double const & x) [member function]
cls.add_method('Update',
'void',
[param('double const &', 'x')])
- ## average.h (module 'tools'): double ns3::Average<double>::Var() const [member function]
+ ## average.h (module 'stats'): double ns3::Average<double>::Var() const [member function]
cls.add_method('Var',
'double',
[],
@@ -2808,6 +2807,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):
@@ -5689,6 +5692,16 @@
'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',
@@ -7759,6 +7772,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',
@@ -9595,13 +9612,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([])
--- a/src/applications/model/ping6.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/applications/model/ping6.cc Wed Jul 24 13:20:24 2013 +0200
@@ -171,8 +171,17 @@
/* hack to have ifIndex in Ipv6RawSocketImpl
* maybe add a SetIfIndex in Ipv6RawSocketImpl directly
*/
- src = GetNode ()->GetObject<Ipv6> ()->GetAddress (m_ifIndex, 0).GetAddress ();
- }
+ Ipv6InterfaceAddress dstIa (m_peerAddress);
+ for (uint32_t i = 0; i < GetNode ()->GetObject<Ipv6> ()->GetNAddresses (m_ifIndex); i++)
+ {
+ src = GetNode ()->GetObject<Ipv6> ()->GetAddress (m_ifIndex, i).GetAddress ();
+ Ipv6InterfaceAddress srcIa (src);
+ if ( srcIa.GetScope() == dstIa.GetScope() )
+ {
+ break;
+ }
+ }
+ }
else
{
src = m_localAddress;
--- a/src/applications/wscript Wed Jul 24 13:19:54 2013 +0200
+++ b/src/applications/wscript Wed Jul 24 13:20:24 2013 +0200
@@ -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',
--- a/src/bridge/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/bridge/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -138,8 +138,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]
@@ -217,7 +215,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'])
@@ -1626,6 +1623,16 @@
'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',
@@ -2234,13 +2241,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([])
--- a/src/bridge/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/bridge/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -138,8 +138,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]
@@ -217,7 +215,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'])
@@ -1626,6 +1623,16 @@
'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',
@@ -2234,13 +2241,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([])
--- a/src/buildings/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/buildings/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -244,8 +244,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]
@@ -389,7 +387,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'])
@@ -2321,6 +2318,16 @@
'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',
@@ -2421,14 +2428,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',
+ ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetFrequency(double frequency) [member function]
+ cls.add_method('SetFrequency',
'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',
- '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 +2445,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)
@@ -3201,14 +3204,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',
+ ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetFrequency(double frequency) [member function]
+ cls.add_method('SetFrequency',
'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',
- '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 +3221,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)
@@ -4163,13 +4162,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([])
--- a/src/buildings/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/buildings/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -244,8 +244,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]
@@ -389,7 +387,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'])
@@ -2321,6 +2318,16 @@
'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',
@@ -2421,14 +2428,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',
+ ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetFrequency(double frequency) [member function]
+ cls.add_method('SetFrequency',
'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',
- '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 +2445,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)
@@ -3201,14 +3204,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',
+ ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetFrequency(double frequency) [member function]
+ cls.add_method('SetFrequency',
'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',
- '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 +3221,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)
@@ -4163,13 +4162,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([])
--- a/src/buildings/doc/Makefile Wed Jul 24 13:19:54 2013 +0200
+++ b/src/buildings/doc/Makefile Wed Jul 24 13:20:24 2013 +0200
@@ -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 =
--- a/src/buildings/doc/rescale-pdf.sh Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -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}}
--- a/src/click/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/click/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -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,14 @@
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')
+ ## 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 +130,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<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [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]
@@ -200,8 +210,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 +294,6 @@
module.add_class('OutputStreamWrapper', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >'])
## 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<ns3::Packet> >'])
- ## 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]
@@ -293,12 +307,12 @@
## ipv4-click-routing.h (module 'click'): ns3::Ipv4ClickRouting [class]
module.add_class('Ipv4ClickRouting', parent=root_module['ns3::Ipv4RoutingProtocol'])
module.add_container('std::map< unsigned int, unsigned int >', ('unsigned int', 'unsigned int'), container_type='map')
+ 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('void ( * ) ( std::ostream & ) *', 'ns3::LogTimePrinter')
typehandlers.add_type_alias('void ( * ) ( std::ostream & ) **', 'ns3::LogTimePrinter*')
typehandlers.add_type_alias('void ( * ) ( std::ostream & ) *&', 'ns3::LogTimePrinter&')
- 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&')
## Register a nested module for the namespace FatalImpl
@@ -323,6 +337,8 @@
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_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 >'])
@@ -378,7 +394,10 @@
register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> >'])
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,7 +432,6 @@
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'])
@@ -945,6 +963,92 @@
is_const=True)
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([])
@@ -1529,6 +1633,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 +1934,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):
@@ -2784,8 +2897,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 +2909,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)
@@ -3010,6 +3123,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::Node> ns3::Socket::GetNode() const [member function]
cls.add_method('GetNode',
'ns3::Ptr< ns3::Node >',
@@ -3040,6 +3173,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 +3272,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<void, ns3::Ptr<ns3::Socket>, 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 +3333,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 +3446,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 +3538,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,6 +3814,16 @@
'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',
@@ -3765,10 +4120,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<ns3::Packet> p, ns3::Ipv6Address & src, ns3::Ipv6Address & dst, ns3::Ptr<ns3::Ipv6Interface> incomingInterface) [member function]
+ ## ip-l4-protocol.h (module 'internet'): ns3::IpL4Protocol::RxStatus ns3::IpL4Protocol::Receive(ns3::Ptr<ns3::Packet> p, ns3::Ipv6Header const & header, ns3::Ptr<ns3::Ipv6Interface> 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',
@@ -4918,6 +5273,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 +5288,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([])
--- a/src/click/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/click/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -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,14 @@
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')
+ ## 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 +130,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<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [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]
@@ -200,8 +210,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 +294,6 @@
module.add_class('OutputStreamWrapper', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >'])
## 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<ns3::Packet> >'])
- ## 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]
@@ -293,12 +307,12 @@
## ipv4-click-routing.h (module 'click'): ns3::Ipv4ClickRouting [class]
module.add_class('Ipv4ClickRouting', parent=root_module['ns3::Ipv4RoutingProtocol'])
module.add_container('std::map< unsigned int, unsigned int >', ('unsigned int', 'unsigned int'), container_type='map')
+ 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('void ( * ) ( std::ostream & ) *', 'ns3::LogTimePrinter')
typehandlers.add_type_alias('void ( * ) ( std::ostream & ) **', 'ns3::LogTimePrinter*')
typehandlers.add_type_alias('void ( * ) ( std::ostream & ) *&', 'ns3::LogTimePrinter&')
- 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&')
## Register a nested module for the namespace FatalImpl
@@ -323,6 +337,8 @@
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_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 >'])
@@ -378,7 +394,10 @@
register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> >'])
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,7 +432,6 @@
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'])
@@ -945,6 +963,92 @@
is_const=True)
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([])
@@ -1529,6 +1633,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 +1934,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):
@@ -2784,8 +2897,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 +2909,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)
@@ -3010,6 +3123,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::Node> ns3::Socket::GetNode() const [member function]
cls.add_method('GetNode',
'ns3::Ptr< ns3::Node >',
@@ -3040,6 +3173,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 +3272,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<void, ns3::Ptr<ns3::Socket>, 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 +3333,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 +3446,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 +3538,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,6 +3814,16 @@
'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',
@@ -3765,10 +4120,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<ns3::Packet> p, ns3::Ipv6Address & src, ns3::Ipv6Address & dst, ns3::Ptr<ns3::Ipv6Interface> incomingInterface) [member function]
+ ## ip-l4-protocol.h (module 'internet'): ns3::IpL4Protocol::RxStatus ns3::IpL4Protocol::Receive(ns3::Ptr<ns3::Packet> p, ns3::Ipv6Header const & header, ns3::Ptr<ns3::Ipv6Interface> 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 +4162,16 @@
'uint32_t',
[param('ns3::Ptr< ns3::NetDevice >', 'device')],
is_pure_virtual=True, is_virtual=True)
+ ## ipv4.h (module 'internet'): ns3::Ptr<ns3::Socket> 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<ns3::Socket> 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 +4217,11 @@
'ns3::Ptr< ns3::NetDevice >',
[param('uint32_t', 'interface')],
is_pure_virtual=True, is_virtual=True)
+ ## ipv4.h (module 'internet'): ns3::Ptr<ns3::IpL4Protocol> 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::Ipv4RoutingProtocol> ns3::Ipv4::GetRoutingProtocol() const [member function]
cls.add_method('GetRoutingProtocol',
'ns3::Ptr< ns3::Ipv4RoutingProtocol >',
@@ -3897,6 +4267,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<ns3::Packet> packet, ns3::Ipv4Header ipHeader, ns3::Ptr<ns3::Ipv4Route> 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',
@@ -4898,6 +5273,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 +5288,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([])
--- a/src/click/model/ipv4-click-routing.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/click/model/ipv4-click-routing.cc Wed Jul 24 13:20:24 2013 +0200
@@ -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 ());
--- a/src/click/model/ipv4-l3-click-protocol.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/click/model/ipv4-l3-click-protocol.cc Wed Jul 24 13:20:24 2013 +0200
@@ -609,9 +609,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,
--- a/src/core/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -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<ns3::EventImpl>'], 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<ns3::FdReader, ns3::empty, ns3::DefaultDeleter<ns3::FdReader> > [class]
module.add_class('SimpleRefCount', automatic_type_narrowing=True, template_parameters=['ns3::FdReader', 'ns3::empty', 'ns3::DefaultDeleter<ns3::FdReader>'], 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<ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> > [class]
+ module.add_class('SimpleRefCount', automatic_type_narrowing=True, template_parameters=['ns3::Hash::Implementation', 'ns3::empty', 'ns3::DefaultDeleter<ns3::Hash::Implementation>'], 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<ns3::RefCountBase, ns3::empty, ns3::DefaultDeleter<ns3::RefCountBase> > [class]
module.add_class('SimpleRefCount', automatic_type_narrowing=True, template_parameters=['ns3::RefCountBase', 'ns3::empty', 'ns3::DefaultDeleter<ns3::RefCountBase>'], 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<ns3::SystemThread, ns3::empty, ns3::DefaultDeleter<ns3::SystemThread> > [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<ns3::Hash::Implementation> >'])
+ 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<ns3::CallbackImplBase> >'])
register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> >'])
register_Ns3SimpleRefCount__Ns3FdReader_Ns3Empty_Ns3DefaultDeleter__lt__ns3FdReader__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::FdReader, ns3::empty, ns3::DefaultDeleter<ns3::FdReader> >'])
+ register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> >'])
register_Ns3SimpleRefCount__Ns3RefCountBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3RefCountBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::RefCountBase, ns3::empty, ns3::DefaultDeleter<ns3::RefCountBase> >'])
register_Ns3SimpleRefCount__Ns3SystemThread_Ns3Empty_Ns3DefaultDeleter__lt__ns3SystemThread__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::SystemThread, ns3::empty, ns3::DefaultDeleter<ns3::SystemThread> >'])
register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> >'])
@@ -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,19 @@
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::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 +671,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 +792,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<ns3::Hash::Implementation> 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 +1088,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([])
@@ -2083,6 +2208,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<ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> >::SimpleRefCount() [constructor]
+ cls.add_constructor([])
+ ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> >::SimpleRefCount(ns3::SimpleRefCount<ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> > 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<ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> >::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<ns3::RefCountBase, ns3::empty, ns3::DefaultDeleter<ns3::RefCountBase> >::SimpleRefCount() [constructor]
cls.add_constructor([])
@@ -2477,6 +2614,16 @@
'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',
@@ -4203,13 +4350,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 +4595,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 +4740,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 +4820,18 @@
module.add_function('MakeStringChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
[])
- ## nstime.h (module 'core'): extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeTimeChecker() [free function]
+ ## nstime.h (module 'core'): ns3::Ptr<ns3::AttributeChecker const> ns3::MakeTimeChecker() [free function]
module.add_function('MakeTimeChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
[])
+ ## nstime.h (module 'core'): ns3::Ptr<ns3::AttributeChecker const> 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::AttributeChecker const> 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::AttributeChecker const> ns3::MakeTypeIdChecker() [free function]
module.add_function('MakeTypeIdChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
@@ -4697,12 +4966,22 @@
'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 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 +5060,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',
--- a/src/core/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -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<ns3::EventImpl>'], 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<ns3::FdReader, ns3::empty, ns3::DefaultDeleter<ns3::FdReader> > [class]
module.add_class('SimpleRefCount', automatic_type_narrowing=True, template_parameters=['ns3::FdReader', 'ns3::empty', 'ns3::DefaultDeleter<ns3::FdReader>'], 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<ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> > [class]
+ module.add_class('SimpleRefCount', automatic_type_narrowing=True, template_parameters=['ns3::Hash::Implementation', 'ns3::empty', 'ns3::DefaultDeleter<ns3::Hash::Implementation>'], 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<ns3::RefCountBase, ns3::empty, ns3::DefaultDeleter<ns3::RefCountBase> > [class]
module.add_class('SimpleRefCount', automatic_type_narrowing=True, template_parameters=['ns3::RefCountBase', 'ns3::empty', 'ns3::DefaultDeleter<ns3::RefCountBase>'], 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<ns3::SystemThread, ns3::empty, ns3::DefaultDeleter<ns3::SystemThread> > [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<ns3::Hash::Implementation> >'])
+ 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<ns3::CallbackImplBase> >'])
register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> >'])
register_Ns3SimpleRefCount__Ns3FdReader_Ns3Empty_Ns3DefaultDeleter__lt__ns3FdReader__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::FdReader, ns3::empty, ns3::DefaultDeleter<ns3::FdReader> >'])
+ register_Ns3SimpleRefCount__Ns3HashImplementation_Ns3Empty_Ns3DefaultDeleter__lt__ns3HashImplementation__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> >'])
register_Ns3SimpleRefCount__Ns3RefCountBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3RefCountBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::RefCountBase, ns3::empty, ns3::DefaultDeleter<ns3::RefCountBase> >'])
register_Ns3SimpleRefCount__Ns3SystemThread_Ns3Empty_Ns3DefaultDeleter__lt__ns3SystemThread__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::SystemThread, ns3::empty, ns3::DefaultDeleter<ns3::SystemThread> >'])
register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> >'])
@@ -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,19 @@
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::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 +671,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 +792,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<ns3::Hash::Implementation> 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 +1088,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([])
@@ -2083,6 +2208,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<ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> >::SimpleRefCount() [constructor]
+ cls.add_constructor([])
+ ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> >::SimpleRefCount(ns3::SimpleRefCount<ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> > 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<ns3::Hash::Implementation, ns3::empty, ns3::DefaultDeleter<ns3::Hash::Implementation> >::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<ns3::RefCountBase, ns3::empty, ns3::DefaultDeleter<ns3::RefCountBase> >::SimpleRefCount() [constructor]
cls.add_constructor([])
@@ -2477,6 +2614,16 @@
'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',
@@ -4203,13 +4350,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 +4595,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 +4740,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 +4820,18 @@
module.add_function('MakeStringChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
[])
- ## nstime.h (module 'core'): extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeTimeChecker() [free function]
+ ## nstime.h (module 'core'): ns3::Ptr<ns3::AttributeChecker const> ns3::MakeTimeChecker() [free function]
module.add_function('MakeTimeChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
[])
+ ## nstime.h (module 'core'): ns3::Ptr<ns3::AttributeChecker const> 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::AttributeChecker const> 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::AttributeChecker const> ns3::MakeTypeIdChecker() [free function]
module.add_function('MakeTypeIdChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
@@ -4697,12 +4966,22 @@
'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 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 +5060,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',
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/examples/command-line-example.cc Wed Jul 24 13:20:24 2013 +0200
@@ -0,0 +1,63 @@
+/* -*- 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. <pdbarnes@llnl.gov>
+ */
+
+#include <iostream> // boolalpha
+#include <string>
+
+#include "ns3/core-module.h"
+
+
+using namespace ns3;
+
+
+std::string g_val4="val4 default";
+
+bool SetVal4 (std::string val)
+{
+ g_val4 = val;
+ return true;
+}
+
+
+int main (int argc, char *argv[])
+{
+
+ int val1 = 1;
+ bool val2 = false;
+ std::string val3 = "val3 default";
+
+ CommandLine cmd;
+ cmd.Usage ("CommandLine example program.\n"
+ "\n"
+ "This little program demonstrates how to use CommandLine.");
+ cmd.AddValue ("val1", "an int argument", val1);
+ cmd.AddValue ("val2", "a bool argument", val2);
+ cmd.AddValue ("val3", "a string argument", val3);
+ cmd.AddValue ("val4", "a string via callback", MakeCallback (SetVal4));
+ cmd.Parse (argc, argv);
+
+ std::cout << "val1:\t" << val1 << std::endl;
+ std::cout << "val2:\t" << std::boolalpha << val2
+ << std::noboolalpha << std::endl;
+ std::cout << "val3:\t\"" << val3 << "\"" << std::endl;
+ std::cout << "val4:\t\"" << g_val4 << "\"" << std::endl;
+
+ return 0;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/examples/hash-example.cc Wed Jul 24 13:20:24 2013 +0200
@@ -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 <algorithm> // find
+#include <climits> // CHAR_BIT
+#include <fstream>
+#include <iostream>
+#include <iomanip>
+#include <map>
+#include <vector>
+
+#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 <uint64_t, std::string> hashdict_t;
+
+ /** The dictionary map, indexed by hash */
+ hashdict_t m_dict;
+
+ /** Collision map of subsequent instances */
+ typedef std::vector < std::pair<uint64_t, std::string> > 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 <Collider>::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 <i>n</i> is the number of entries in the table, and
+ * <i>k</i> 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 <Collider>::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<std::string>::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 <Collider> m_hashes; /**< List of hash Colliders */
+ std::vector <std::string> 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 <std::string>::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 <std::string> 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<Hash::Function::Fnv1a> () ),
+ Collider::Bits32));
+ dict.Add ( Collider ("FNV1a",
+ Hasher ( Create<Hash::Function::Fnv1a> () ),
+ Collider::Bits64));
+
+ dict.Add ( Collider ("Murmur3",
+ Hasher ( Create<Hash::Function::Murmur3> () ),
+ Collider::Bits32));
+ dict.Add ( Collider ("Murmur3",
+ Hasher ( Create<Hash::Function::Murmur3> () ),
+ 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
+
+*/
--- a/src/core/examples/main-random-variable-stream.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/examples/main-random-variable-stream.cc Wed Jul 24 13:20:24 2013 +0200
@@ -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.
*/
{
--- a/src/core/examples/wscript Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/examples/wscript Wed Jul 24 13:20:24 2013 +0200
@@ -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'
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/helper/event-garbage-collector.cc Wed Jul 24 13:20:24 2013 +0200
@@ -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 <gjc@inescporto.pt>
+ */
+#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
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/helper/event-garbage-collector.h Wed Jul 24 13:20:24 2013 +0200
@@ -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 <gjc@inescporto.pt>
+ */
+#ifndef EVENT_GARBAGE_COLLECTOR_H
+#define EVENT_GARBAGE_COLLECTOR_H
+
+#include <set>
+#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<EventId, EventIdLessThanTs> EventList;
+
+ EventList::size_type m_nextCleanupSize;
+ EventList m_events;
+
+ void Cleanup ();
+ void Grow ();
+ void Shrink ();
+};
+
+} // namespace ns3
+
+#endif /* EVENT_GARBAGE_COLLECTOR_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/helper/random-variable-stream-helper.cc Wed Jul 24 13:20:24 2013 +0200
@@ -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<RandomVariableStream> rvs = ptr.Get<RandomVariableStream> ();
+ NS_LOG_DEBUG ("RandomVariableStream found: " << rvs << "; setting stream to " << (stream + i));
+ rvs->SetStream (stream + i);
+ }
+ return i;
+}
+
+} // namespace ns3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/helper/random-variable-stream-helper.h Wed Jul 24 13:20:24 2013 +0200
@@ -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 <string>
+
+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<RandomVariableStream>.
+ *
+ * \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<RandomVariableStream> ())
+ *
+ * \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 */
--- a/src/core/model/attribute-helper.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/attribute-helper.h Wed Jul 24 13:20:24 2013 +0200
@@ -92,7 +92,7 @@
* \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 Make<type>Accessor 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<>.
@@ -134,8 +134,8 @@
* \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)
@@ -145,9 +145,9 @@
* \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)
@@ -155,9 +155,9 @@
* \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 Make<type>Checker function.
+ * Typically invoked in the class header file..
*/
#define ATTRIBUTE_CHECKER_DEFINE(type) \
class type ## Checker : public AttributeChecker {}; \
@@ -197,10 +197,10 @@
* \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)
@@ -210,8 +210,8 @@
* \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 Make<type>Checker function.
+ * Typically invoked in the source file..
*/
#define ATTRIBUTE_CHECKER_IMPLEMENT(type) \
Ptr<const AttributeChecker> Make ## type ## Checker (void) \
--- a/src/core/model/calendar-scheduler.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/calendar-scheduler.cc Wed Jul 24 13:20:24 2013 +0200
@@ -131,7 +131,11 @@
NS_ASSERT (!IsEmpty ());
uint32_t i = m_lastBucket;
uint64_t bucketTop = m_bucketTop;
- Scheduler::Event minEvent = { static_cast<uint64_t>(0), { static_cast<uint32_t>(~0), static_cast<uint32_t>(~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 ())
--- a/src/core/model/callback.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/callback.cc Wed Jul 24 13:20:24 2013 +0200
@@ -46,6 +46,7 @@
return false;
}
+/** Attribute checker */
ATTRIBUTE_CHECKER_IMPLEMENT (Callback);
} // namespace ns3
--- a/src/core/model/callback.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/callback.h Wed Jul 24 13:20:24 2013 +0200
@@ -32,8 +32,858 @@
namespace ns3 {
-/***
- * \internal
+/**
+ * \ingroup core
+ * \defgroup callback Callbacks
+ */
+/**
+ * \ingroup callback
+ */
+/**@{*/
+/**
+ * Trait class to convert a pointer into a reference,
+ * used by MemPtrCallBackImpl
+ */
+template <typename T>
+struct CallbackTraits;
+
+/**
+ * Trait class to convert a pointer into a reference,
+ * used by MemPtrCallBackImpl
+ */
+template <typename T>
+struct CallbackTraits<T *>
+{
+ /**
+ * \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<CallbackImplBase>
+{
+public:
+ /** Virtual destructor */
+ virtual ~CallbackImplBase () {}
+ /**
+ * Equality test
+ *
+ * \param other Callback Ptr
+ * \return true if we are equal
+ */
+ virtual bool IsEqual (Ptr<const CallbackImplBase> other) const = 0;
+};
+
+/**
+ * \ingroup callbackimpl
+ * The unqualified CallbackImpl class
+ */
+template <typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
+class CallbackImpl;
+
+/**
+ * \ingroup callbackimpl
+ * CallbackImpl classes with varying numbers of argument types
+ */
+/**@{*/
+/** CallbackImpl class with no arguments. */
+template <typename R>
+class CallbackImpl<R,empty,empty,empty,empty,empty,empty,empty,empty,empty> : public CallbackImplBase {
+public:
+ virtual ~CallbackImpl () {}
+ virtual R operator() (void) = 0; //!< Abstract operator
+};
+/** CallbackImpl class with one argument. */
+template <typename R, typename T1>
+class CallbackImpl<R,T1,empty,empty,empty,empty,empty,empty,empty,empty> : public CallbackImplBase {
+public:
+ virtual ~CallbackImpl () {}
+ virtual R operator() (T1) = 0; //!< Abstract operator
+};
+/** CallbackImpl class with two arguments. */
+template <typename R, typename T1, typename T2>
+class CallbackImpl<R,T1,T2,empty,empty,empty,empty,empty,empty,empty> : public CallbackImplBase {
+public:
+ virtual ~CallbackImpl () {}
+ virtual R operator() (T1, T2) = 0; //!< Abstract operator
+};
+/** CallbackImpl class with three arguments. */
+template <typename R, typename T1, typename T2, typename T3>
+class CallbackImpl<R,T1,T2,T3,empty,empty,empty,empty,empty,empty> : public CallbackImplBase {
+public:
+ virtual ~CallbackImpl () {}
+ virtual R operator() (T1, T2, T3) = 0; //!< Abstract operator
+};
+/** CallbackImpl class with four arguments. */
+template <typename R, typename T1, typename T2, typename T3, typename T4>
+class CallbackImpl<R,T1,T2,T3,T4,empty,empty,empty,empty,empty> : public CallbackImplBase {
+public:
+ virtual ~CallbackImpl () {}
+ virtual R operator() (T1, T2, T3, T4) = 0; //!< Abstract operator
+};
+/** CallbackImpl class with five arguments. */
+template <typename R, typename T1, typename T2, typename T3, typename T4, typename T5>
+class CallbackImpl<R,T1,T2,T3,T4,T5,empty,empty,empty,empty> : public CallbackImplBase {
+public:
+ virtual ~CallbackImpl () {}
+ virtual R operator() (T1, T2, T3, T4, T5) = 0; //!< Abstract operator
+};
+/** CallbackImpl class with six arguments. */
+template <typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
+class CallbackImpl<R,T1,T2,T3,T4,T5,T6,empty,empty,empty> : public CallbackImplBase {
+public:
+ virtual ~CallbackImpl () {}
+ virtual R operator() (T1, T2, T3, T4, T5, T6) = 0; //!< Abstract operator
+};
+/** CallbackImpl class with seven arguments. */
+template <typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
+class CallbackImpl<R,T1,T2,T3,T4,T5,T6,T7,empty,empty> : public CallbackImplBase {
+public:
+ virtual ~CallbackImpl () {}
+ virtual R operator() (T1, T2, T3, T4, T5, T6, T7) = 0; //!< Abstract operator
+};
+/** CallbackImpl class with eight arguments. */
+template <typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
+class CallbackImpl<R,T1,T2,T3,T4,T5,T6,T7,T8,empty> : public CallbackImplBase {
+public:
+ virtual ~CallbackImpl () {}
+ virtual R operator() (T1, T2, T3, T4, T5, T6, T7, T8) = 0; //!< Abstract operator
+};
+/** CallbackImpl class with nine arguments. */
+template <typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
+class CallbackImpl : public CallbackImplBase {
+public:
+ virtual ~CallbackImpl () {}
+ virtual R operator() (T1, T2, T3, T4, T5, T6, T7, T8, T9) = 0; //!< Abstract operator
+};
+/**@}*/
+
+
+/**
+ * \ingroup callback
+ * CallbackImpl with functors
+ */
+template <typename T, typename R, typename T1, typename T2, typename T3, typename T4,typename T5, typename T6, typename T7, typename T8, typename T9>
+class FunctorCallbackImpl : public CallbackImpl<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> {
+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<const CallbackImplBase> other) const {
+ FunctorCallbackImpl<T,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> const *otherDerived =
+ dynamic_cast<FunctorCallbackImpl<T,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> const *> (PeekPointer (other));
+ if (otherDerived == 0)
+ {
+ return false;
+ }
+ else if (otherDerived->m_functor != m_functor)
+ {
+ return false;
+ }
+ return true;
+ }
+private:
+ T m_functor; //!< the functor
+};
+
+/**
+ * \ingroup callback
+ * CallbackImpl for pointer to member functions
+ */
+template <typename OBJ_PTR, typename MEM_PTR, typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
+class MemPtrCallbackImpl : public CallbackImpl<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> {
+public:
+ /**
+ * 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<OBJ_PTR>::GetReference (m_objPtr)).*m_memPtr)();
+ }
+ /**
+ * \param a1 first argument
+ * \return Callback value
+ */
+ R operator() (T1 a1) {
+ return ((CallbackTraits<OBJ_PTR>::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<OBJ_PTR>::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<OBJ_PTR>::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<OBJ_PTR>::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<OBJ_PTR>::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<OBJ_PTR>::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<OBJ_PTR>::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<OBJ_PTR>::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<OBJ_PTR>::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<const CallbackImplBase> other) const {
+ MemPtrCallbackImpl<OBJ_PTR,MEM_PTR,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> const *otherDerived =
+ dynamic_cast<MemPtrCallbackImpl<OBJ_PTR,MEM_PTR,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> const *> (PeekPointer (other));
+ if (otherDerived == 0)
+ {
+ return false;
+ }
+ else if (otherDerived->m_objPtr != m_objPtr ||
+ otherDerived->m_memPtr != m_memPtr)
+ {
+ return false;
+ }
+ return true;
+ }
+private:
+ OBJ_PTR const m_objPtr; //!< the object pointer
+ MEM_PTR m_memPtr; //!< the member function pointer
+};
+
+/**
+ * \ingroup callback
+ * CallbackImpl for functors with first argument bound at construction
+ */
+template <typename T, typename R, typename TX, typename T1, typename T2, typename T3, typename T4,typename T5, typename T6, typename T7, typename T8>
+class BoundFunctorCallbackImpl : public CallbackImpl<R,T1,T2,T3,T4,T5,T6,T7,T8,empty> {
+public:
+ /**
+ * Construct from functor and a bound argument
+ * \param functor the functor
+ * \param a the argument to bind
+ */
+ template <typename FUNCTOR, typename ARG>
+ 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<const CallbackImplBase> other) const {
+ BoundFunctorCallbackImpl<T,R,TX,T1,T2,T3,T4,T5,T6,T7,T8> const *otherDerived =
+ dynamic_cast<BoundFunctorCallbackImpl<T,R,TX,T1,T2,T3,T4,T5,T6,T7,T8> const *> (PeekPointer (other));
+ if (otherDerived == 0)
+ {
+ return false;
+ }
+ else if (otherDerived->m_functor != m_functor ||
+ otherDerived->m_a != m_a)
+ {
+ return false;
+ }
+ return true;
+ }
+private:
+ T m_functor; //!< The functor
+ typename TypeTraits<TX>::ReferencedType m_a; //!< the bound argument
+};
+
+/**
+ * \ingroup callback
+ * CallbackImpl for functors with first two arguments bound at construction
+ */
+template <typename T, typename R, typename TX1, typename TX2, typename T1, typename T2, typename T3, typename T4,typename T5, typename T6, typename T7>
+class TwoBoundFunctorCallbackImpl : public CallbackImpl<R,T1,T2,T3,T4,T5,T6,T7,empty,empty> {
+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 <typename FUNCTOR, typename ARG1, typename ARG2>
+ 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<const CallbackImplBase> other) const {
+ TwoBoundFunctorCallbackImpl<T,R,TX1,TX2,T1,T2,T3,T4,T5,T6,T7> const *otherDerived =
+ dynamic_cast<TwoBoundFunctorCallbackImpl<T,R,TX1,TX2,T1,T2,T3,T4,T5,T6,T7> 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<TX1>::ReferencedType m_a1; //!< first bound argument
+ typename TypeTraits<TX2>::ReferencedType m_a2; //!< second bound argument
+};
+
+/**
+ * \ingroup callback
+ * CallbackImpl for functors with first three arguments bound at construction
+ */
+template <typename T, typename R, typename TX1, typename TX2, typename TX3, typename T1, typename T2, typename T3, typename T4,typename T5, typename T6>
+class ThreeBoundFunctorCallbackImpl : public CallbackImpl<R,T1,T2,T3,T4,T5,T6,empty,empty,empty> {
+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 <typename FUNCTOR, typename ARG1, typename ARG2, typename ARG3>
+ 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<const CallbackImplBase> other) const {
+ ThreeBoundFunctorCallbackImpl<T,R,TX1,TX2,TX3,T1,T2,T3,T4,T5,T6> const *otherDerived =
+ dynamic_cast<ThreeBoundFunctorCallbackImpl<T,R,TX1,TX2,TX3,T1,T2,T3,T4,T5,T6> 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<TX1>::ReferencedType m_a1; //!< first bound argument
+ typename TypeTraits<TX2>::ReferencedType m_a2; //!< second bound argument
+ typename TypeTraits<TX3>::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<CallbackImplBase> GetImpl (void) const { return m_impl; }
+protected:
+ /**
+ * Construct from a pimpl
+ * \param impl the CallbackImplBase Ptr
+ */
+ CallbackBase (Ptr<CallbackImplBase> impl) : m_impl (impl) {}
+ Ptr<CallbackImplBase> 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 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:
+ * the memory they allocate is managed automatically, without
+ * user intervention which allows you to pass around Callback
+ * instances by value.
+ *
+ * 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
+ *
+ * \intern
* 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
@@ -61,404 +911,6 @@
* and relies on a reference list rather than autoPtr to hold
* the pointer.
*/
-template <typename T>
-struct CallbackTraits;
-
-template <typename T>
-struct CallbackTraits<T *>
-{
- static T & GetReference (T * const p)
- {
- return *p;
- }
-};
-
-class CallbackImplBase : public SimpleRefCount<CallbackImplBase>
-{
-public:
- virtual ~CallbackImplBase () {}
- virtual bool IsEqual (Ptr<const CallbackImplBase> other) const = 0;
-};
-
-// declare the CallbackImpl class
-template <typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
-class CallbackImpl;
-// define CallbackImpl for 0 params
-template <typename R>
-class CallbackImpl<R,empty,empty,empty,empty,empty,empty,empty,empty,empty> : public CallbackImplBase {
-public:
- virtual ~CallbackImpl () {}
- virtual R operator() (void) = 0;
-};
-// define CallbackImpl for 1 params
-template <typename R, typename T1>
-class CallbackImpl<R,T1,empty,empty,empty,empty,empty,empty,empty,empty> : public CallbackImplBase {
-public:
- virtual ~CallbackImpl () {}
- virtual R operator() (T1) = 0;
-};
-// define CallbackImpl for 2 params
-template <typename R, typename T1, typename T2>
-class CallbackImpl<R,T1,T2,empty,empty,empty,empty,empty,empty,empty> : public CallbackImplBase {
-public:
- virtual ~CallbackImpl () {}
- virtual R operator() (T1, T2) = 0;
-};
-// define CallbackImpl for 3 params
-template <typename R, typename T1, typename T2, typename T3>
-class CallbackImpl<R,T1,T2,T3,empty,empty,empty,empty,empty,empty> : public CallbackImplBase {
-public:
- virtual ~CallbackImpl () {}
- virtual R operator() (T1, T2, T3) = 0;
-};
-// define CallbackImpl for 4 params
-template <typename R, typename T1, typename T2, typename T3, typename T4>
-class CallbackImpl<R,T1,T2,T3,T4,empty,empty,empty,empty,empty> : public CallbackImplBase {
-public:
- virtual ~CallbackImpl () {}
- virtual R operator() (T1, T2, T3, T4) = 0;
-};
-// define CallbackImpl for 5 params
-template <typename R, typename T1, typename T2, typename T3, typename T4, typename T5>
-class CallbackImpl<R,T1,T2,T3,T4,T5,empty,empty,empty,empty> : public CallbackImplBase {
-public:
- virtual ~CallbackImpl () {}
- virtual R operator() (T1, T2, T3, T4, T5) = 0;
-};
-// define CallbackImpl for 6 params
-template <typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
-class CallbackImpl<R,T1,T2,T3,T4,T5,T6,empty,empty,empty> : public CallbackImplBase {
-public:
- virtual ~CallbackImpl () {}
- virtual R operator() (T1, T2, T3, T4, T5, T6) = 0;
-};
-// define CallbackImpl for 7 params
-template <typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
-class CallbackImpl<R,T1,T2,T3,T4,T5,T6,T7,empty,empty> : public CallbackImplBase {
-public:
- virtual ~CallbackImpl () {}
- virtual R operator() (T1, T2, T3, T4, T5, T6, T7) = 0;
-};
-// define CallbackImpl for 8 params
-template <typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
-class CallbackImpl<R,T1,T2,T3,T4,T5,T6,T7,T8,empty> : public CallbackImplBase {
-public:
- virtual ~CallbackImpl () {}
- virtual R operator() (T1, T2, T3, T4, T5, T6, T7, T8) = 0;
-};
-// define CallbackImpl for 9 params
-template <typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
-class CallbackImpl : public CallbackImplBase {
-public:
- virtual ~CallbackImpl () {}
- virtual R operator() (T1, T2, T3, T4, T5, T6, T7, T8, T9) = 0;
-};
-
-
-// an impl for Functors:
-template <typename T, typename R, typename T1, typename T2, typename T3, typename T4,typename T5, typename T6, typename T7, typename T8, typename T9>
-class FunctorCallbackImpl : public CallbackImpl<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> {
-public:
- FunctorCallbackImpl (T const &functor)
- : m_functor (functor) {}
- virtual ~FunctorCallbackImpl () {}
- R operator() (void) {
- return m_functor ();
- }
- R operator() (T1 a1) {
- return m_functor (a1);
- }
- R operator() (T1 a1,T2 a2) {
- return m_functor (a1,a2);
- }
- R operator() (T1 a1,T2 a2,T3 a3) {
- return m_functor (a1,a2,a3);
- }
- R operator() (T1 a1,T2 a2,T3 a3,T4 a4) {
- return m_functor (a1,a2,a3,a4);
- }
- R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5) {
- return m_functor (a1,a2,a3,a4,a5);
- }
- R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6) {
- return m_functor (a1,a2,a3,a4,a5,a6);
- }
- 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);
- }
- 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);
- }
- 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);
- }
- virtual bool IsEqual (Ptr<const CallbackImplBase> other) const {
- FunctorCallbackImpl<T,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> const *otherDerived =
- dynamic_cast<FunctorCallbackImpl<T,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> const *> (PeekPointer (other));
- if (otherDerived == 0)
- {
- return false;
- }
- else if (otherDerived->m_functor != m_functor)
- {
- return false;
- }
- return true;
- }
-private:
- T m_functor;
-};
-
-// an impl for pointer to member functions
-template <typename OBJ_PTR, typename MEM_PTR, typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
-class MemPtrCallbackImpl : public CallbackImpl<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> {
-public:
- MemPtrCallbackImpl (OBJ_PTR const&objPtr, MEM_PTR mem_ptr)
- : m_objPtr (objPtr), m_memPtr (mem_ptr) {}
- virtual ~MemPtrCallbackImpl () {}
- R operator() (void) {
- return ((CallbackTraits<OBJ_PTR>::GetReference (m_objPtr)).*m_memPtr)();
- }
- R operator() (T1 a1) {
- return ((CallbackTraits<OBJ_PTR>::GetReference (m_objPtr)).*m_memPtr)(a1);
- }
- R operator() (T1 a1,T2 a2) {
- return ((CallbackTraits<OBJ_PTR>::GetReference (m_objPtr)).*m_memPtr)(a1, a2);
- }
- R operator() (T1 a1,T2 a2,T3 a3) {
- return ((CallbackTraits<OBJ_PTR>::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3);
- }
- R operator() (T1 a1,T2 a2,T3 a3,T4 a4) {
- return ((CallbackTraits<OBJ_PTR>::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4);
- }
- R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5) {
- return ((CallbackTraits<OBJ_PTR>::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4, a5);
- }
- R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6) {
- return ((CallbackTraits<OBJ_PTR>::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4, a5, a6);
- }
- R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7) {
- return ((CallbackTraits<OBJ_PTR>::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4, a5, a6, a7);
- }
- R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) {
- return ((CallbackTraits<OBJ_PTR>::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4, a5, a6, a7, a8);
- }
- R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, T9 a9) {
- return ((CallbackTraits<OBJ_PTR>::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4, a5, a6, a7, a8, a9);
- }
- virtual bool IsEqual (Ptr<const CallbackImplBase> other) const {
- MemPtrCallbackImpl<OBJ_PTR,MEM_PTR,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> const *otherDerived =
- dynamic_cast<MemPtrCallbackImpl<OBJ_PTR,MEM_PTR,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> const *> (PeekPointer (other));
- if (otherDerived == 0)
- {
- return false;
- }
- else if (otherDerived->m_objPtr != m_objPtr ||
- otherDerived->m_memPtr != m_memPtr)
- {
- return false;
- }
- return true;
- }
-private:
- OBJ_PTR const m_objPtr;
- MEM_PTR m_memPtr;
-};
-
-// an impl for Bound Functors:
-template <typename T, typename R, typename TX, typename T1, typename T2, typename T3, typename T4,typename T5, typename T6, typename T7, typename T8>
-class BoundFunctorCallbackImpl : public CallbackImpl<R,T1,T2,T3,T4,T5,T6,T7,T8,empty> {
-public:
- template <typename FUNCTOR, typename ARG>
- BoundFunctorCallbackImpl (FUNCTOR functor, ARG a)
- : m_functor (functor), m_a (a) {}
- virtual ~BoundFunctorCallbackImpl () {}
- R operator() (void) {
- return m_functor (m_a);
- }
- R operator() (T1 a1) {
- return m_functor (m_a,a1);
- }
- R operator() (T1 a1,T2 a2) {
- return m_functor (m_a,a1,a2);
- }
- R operator() (T1 a1,T2 a2,T3 a3) {
- return m_functor (m_a,a1,a2,a3);
- }
- R operator() (T1 a1,T2 a2,T3 a3,T4 a4) {
- return m_functor (m_a,a1,a2,a3,a4);
- }
- R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5) {
- return m_functor (m_a,a1,a2,a3,a4,a5);
- }
- 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);
- }
- 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);
- }
- 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);
- }
- virtual bool IsEqual (Ptr<const CallbackImplBase> other) const {
- BoundFunctorCallbackImpl<T,R,TX,T1,T2,T3,T4,T5,T6,T7,T8> const *otherDerived =
- dynamic_cast<BoundFunctorCallbackImpl<T,R,TX,T1,T2,T3,T4,T5,T6,T7,T8> const *> (PeekPointer (other));
- if (otherDerived == 0)
- {
- return false;
- }
- else if (otherDerived->m_functor != m_functor ||
- otherDerived->m_a != m_a)
- {
- return false;
- }
- return true;
- }
-private:
- T m_functor;
- typename TypeTraits<TX>::ReferencedType m_a;
-};
-
-template <typename T, typename R, typename TX1, typename TX2, typename T1, typename T2, typename T3, typename T4,typename T5, typename T6, typename T7>
-class TwoBoundFunctorCallbackImpl : public CallbackImpl<R,T1,T2,T3,T4,T5,T6,T7,empty,empty> {
-public:
- template <typename FUNCTOR, typename ARG1, typename ARG2>
- TwoBoundFunctorCallbackImpl (FUNCTOR functor, ARG1 arg1, ARG2 arg2)
- : m_functor (functor), m_a1 (arg1), m_a2 (arg2) {}
- virtual ~TwoBoundFunctorCallbackImpl () {}
- R operator() (void) {
- return m_functor (m_a1,m_a2);
- }
- R operator() (T1 a1) {
- return m_functor (m_a1,m_a2,a1);
- }
- R operator() (T1 a1,T2 a2) {
- return m_functor (m_a1,m_a2,a1,a2);
- }
- R operator() (T1 a1,T2 a2,T3 a3) {
- return m_functor (m_a1,m_a2,a1,a2,a3);
- }
- R operator() (T1 a1,T2 a2,T3 a3,T4 a4) {
- return m_functor (m_a1,m_a2,a1,a2,a3,a4);
- }
- R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5) {
- return m_functor (m_a1,m_a2,a1,a2,a3,a4,a5);
- }
- 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);
- }
- 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);
- }
- virtual bool IsEqual (Ptr<const CallbackImplBase> other) const {
- TwoBoundFunctorCallbackImpl<T,R,TX1,TX2,T1,T2,T3,T4,T5,T6,T7> const *otherDerived =
- dynamic_cast<TwoBoundFunctorCallbackImpl<T,R,TX1,TX2,T1,T2,T3,T4,T5,T6,T7> 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;
- typename TypeTraits<TX1>::ReferencedType m_a1;
- typename TypeTraits<TX2>::ReferencedType m_a2;
-};
-
-template <typename T, typename R, typename TX1, typename TX2, typename TX3, typename T1, typename T2, typename T3, typename T4,typename T5, typename T6>
-class ThreeBoundFunctorCallbackImpl : public CallbackImpl<R,T1,T2,T3,T4,T5,T6,empty,empty,empty> {
-public:
- template <typename FUNCTOR, typename ARG1, typename ARG2, typename ARG3>
- ThreeBoundFunctorCallbackImpl (FUNCTOR functor, ARG1 arg1, ARG2 arg2, ARG3 arg3)
- : m_functor (functor), m_a1 (arg1), m_a2 (arg2), m_a3 (arg3) {}
- virtual ~ThreeBoundFunctorCallbackImpl () {}
- R operator() (void) {
- return m_functor (m_a1,m_a2,m_a3);
- }
- R operator() (T1 a1) {
- return m_functor (m_a1,m_a2,m_a3,a1);
- }
- R operator() (T1 a1,T2 a2) {
- return m_functor (m_a1,m_a2,m_a3,a1,a2);
- }
- R operator() (T1 a1,T2 a2,T3 a3) {
- return m_functor (m_a1,m_a2,m_a3,a1,a2,a3);
- }
- R operator() (T1 a1,T2 a2,T3 a3,T4 a4) {
- return m_functor (m_a1,m_a2,m_a3,a1,a2,a3,a4);
- }
- 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);
- }
- 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);
- }
- virtual bool IsEqual (Ptr<const CallbackImplBase> other) const {
- ThreeBoundFunctorCallbackImpl<T,R,TX1,TX2,TX3,T1,T2,T3,T4,T5,T6> const *otherDerived =
- dynamic_cast<ThreeBoundFunctorCallbackImpl<T,R,TX1,TX2,TX3,T1,T2,T3,T4,T5,T6> 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;
- typename TypeTraits<TX1>::ReferencedType m_a1;
- typename TypeTraits<TX2>::ReferencedType m_a2;
- typename TypeTraits<TX3>::ReferencedType m_a3;
-};
-
-class CallbackBase {
-public:
- CallbackBase () : m_impl () {}
- Ptr<CallbackImplBase> GetImpl (void) const { return m_impl; }
-protected:
- CallbackBase (Ptr<CallbackImplBase> impl) : m_impl (impl) {}
- Ptr<CallbackImplBase> m_impl;
-
- static std::string Demangle (const std::string& mangled);
-};
-
-/**
- * \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.
- *
- * Callback instances are built with the \ref MakeCallback
- * template functions. Callback instances have POD semantics:
- * the memory they allocate is managed automatically, without
- * user intervention which allows you to pass around Callback
- * instances by value.
- *
- * 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
- */
-
template<typename R,
typename T1 = empty, typename T2 = empty,
typename T3 = empty, typename T4 = empty,
@@ -469,22 +921,46 @@
public:
Callback () {}
- // There are two dummy args below to ensure that this constructor is
- // always properly disambiguated by the c++ compiler
+ /**
+ * Construct a functor call back, supporting operator() calls
+ *
+ * \param functor the functor to run on this callback
+ *
+ * \intern
+ * There are two dummy args below to ensure that this constructor is
+ * always properly disambiguated by the c++ compiler.
+ */
template <typename FUNCTOR>
Callback (FUNCTOR const &functor, bool, bool)
: CallbackBase (Create<FunctorCallbackImpl<FUNCTOR,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> > (functor))
{}
+ /**
+ * Construct a member function pointer call back.
+ *
+ * \param objPtr pointer to the object
+ * \param memPtr pointer to the member function
+ */
template <typename OBJ_PTR, typename MEM_PTR>
- Callback (OBJ_PTR const &objPtr, MEM_PTR mem_ptr)
- : CallbackBase (Create<MemPtrCallbackImpl<OBJ_PTR,MEM_PTR,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> > (objPtr, mem_ptr))
+ Callback (OBJ_PTR const &objPtr, MEM_PTR memPtr)
+ : CallbackBase (Create<MemPtrCallbackImpl<OBJ_PTR,MEM_PTR,R,T1,T2,T3,T4,T5,T6,T7,T8,T9> > (objPtr, memPtr))
{}
+ /**
+ * Construct from a CallbackImpl pointer
+ *
+ * \param impl the CallbackImpl Ptr
+ */
Callback (Ptr<CallbackImpl<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> > const &impl)
: CallbackBase (impl)
{}
+ /**
+ * Bind the first arguments
+ *
+ * \param a argument to bind
+ * \return the bound callback
+ */
template <typename T>
Callback<R,T2,T3,T4,T5,T6,T7,T8,T9> Bind (T a) {
Ptr<CallbackImpl<R,T2,T3,T4,T5,T6,T7,T8,T9,empty> > impl =
@@ -495,6 +971,13 @@
return Callback<R,T2,T3,T4,T5,T6,T7,T8,T9> (impl);
}
+ /**
+ * Bind the first two arguments
+ *
+ * \param a1 first argument to bind
+ * \param a2 second argument to bind
+ * \return the bound callback
+ */
template <typename TX1, typename TX2>
Callback<R,T3,T4,T5,T6,T7,T8,T9> TwoBind (TX1 a1, TX2 a2) {
Ptr<CallbackImpl<R,T3,T4,T5,T6,T7,T8,T9,empty,empty> > impl =
@@ -505,6 +988,14 @@
return Callback<R,T3,T4,T5,T6,T7,T8,T9> (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 <typename TX1, typename TX2, typename TX3>
Callback<R,T4,T5,T6,T7,T8,T9> ThreeBind (TX1 a1, TX2 a2, TX3 a3) {
Ptr<CallbackImpl<R,T4,T5,T6,T7,T8,T9,empty,empty,empty> > impl =
@@ -515,58 +1006,166 @@
return Callback<R,T4,T5,T6,T7,T8,T9> (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<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> *DoPeekImpl (void) const {
return static_cast<CallbackImpl<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> *> (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<const CallbackImplBase> other) const {
if (other != 0 && dynamic_cast<const CallbackImpl<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> *> (PeekPointer (other)) != 0)
{
@@ -581,6 +1180,11 @@
return false;
}
}
+ /**
+ * Adopt the other's implementation, if type compatible
+ *
+ * \param other Callback Ptr to adopt from
+ */
void DoAssign (Ptr<const CallbackImplBase> other) {
if (!DoCheckType (other))
{
@@ -593,6 +1197,14 @@
};
+/**
+ * Inequality test.
+ *
+ * \param a Callback
+ * \param b Callback
+ *
+ * \return true if the Callbacks are not equal
+ */
template <typename R, typename T1, typename T2,
typename T3, typename T4,
typename T5, typename T6,
@@ -604,483 +1216,326 @@
}
/**
- * \ingroup core
- * \defgroup MakeCallback MakeCallback
+ * \ingroup callback
+ * \defgroup makecallbackmemptr MakeCallback from member function pointer
*
+ * Build Callbacks for class method members which take varying numbers of arguments
+ * and potentially returning a value.
*/
-
/**
- * \ingroup MakeCallback
+ * \ingroup makecallbackmemptr
+ * @{
+ */
+/**
* \param memPtr class method member pointer
* \param objPtr class instance
* \return a wrapper Callback
- * Build Callbacks for class method members which takes no arguments
- * and potentially return a value.
- */
+ *
+ * Build Callbacks for class method members which take varying numbers of arguments
+ * and potentially returning a value.
+ */
template <typename T, typename OBJ, typename R>
Callback<R> MakeCallback (R (T::*memPtr)(void), OBJ objPtr) {
return Callback<R> (objPtr, memPtr);
}
template <typename T, typename OBJ, typename R>
-Callback<R> MakeCallback (R (T::*mem_ptr)() const, OBJ objPtr) {
- return Callback<R> (objPtr, mem_ptr);
+Callback<R> MakeCallback (R (T::*memPtr)() const, OBJ objPtr) {
+ return Callback<R> (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 <typename T, typename OBJ, typename R, typename T1>
-Callback<R,T1> MakeCallback (R (T::*mem_ptr)(T1), OBJ objPtr) {
- return Callback<R,T1> (objPtr, mem_ptr);
+Callback<R,T1> MakeCallback (R (T::*memPtr)(T1), OBJ objPtr) {
+ return Callback<R,T1> (objPtr, memPtr);
}
template <typename T, typename OBJ, typename R, typename T1>
-Callback<R,T1> MakeCallback (R (T::*mem_ptr)(T1) const, OBJ objPtr) {
- return Callback<R,T1> (objPtr, mem_ptr);
+Callback<R,T1> MakeCallback (R (T::*memPtr)(T1) const, OBJ objPtr) {
+ return Callback<R,T1> (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 <typename T, typename OBJ, typename R, typename T1, typename T2>
-Callback<R,T1,T2> MakeCallback (R (T::*mem_ptr)(T1,T2), OBJ objPtr) {
- return Callback<R,T1,T2> (objPtr, mem_ptr);
+Callback<R,T1,T2> MakeCallback (R (T::*memPtr)(T1,T2), OBJ objPtr) {
+ return Callback<R,T1,T2> (objPtr, memPtr);
}
template <typename T, typename OBJ, typename R, typename T1, typename T2>
-Callback<R,T1,T2> MakeCallback (R (T::*mem_ptr)(T1,T2) const, OBJ objPtr) {
- return Callback<R,T1,T2> (objPtr, mem_ptr);
-}
-/**
- * \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 <typename T, typename OBJ, typename R, typename T1,typename T2, typename T3>
-Callback<R,T1,T2,T3> MakeCallback (R (T::*mem_ptr)(T1,T2,T3), OBJ objPtr) {
- return Callback<R,T1,T2,T3> (objPtr, mem_ptr);
+Callback<R,T1,T2> MakeCallback (R (T::*memPtr)(T1,T2) const, OBJ objPtr) {
+ return Callback<R,T1,T2> (objPtr, memPtr);
}
template <typename T, typename OBJ, typename R, typename T1,typename T2, typename T3>
-Callback<R,T1,T2,T3> MakeCallback (R (T::*mem_ptr)(T1,T2,T3) const, OBJ objPtr) {
- return Callback<R,T1,T2,T3> (objPtr, mem_ptr);
+Callback<R,T1,T2,T3> MakeCallback (R (T::*memPtr)(T1,T2,T3), OBJ objPtr) {
+ return Callback<R,T1,T2,T3> (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 <typename T, typename OBJ, typename R, typename T1,typename T2, typename T3>
+Callback<R,T1,T2,T3> MakeCallback (R (T::*memPtr)(T1,T2,T3) const, OBJ objPtr) {
+ return Callback<R,T1,T2,T3> (objPtr, memPtr);
+}
template <typename T, typename OBJ, typename R, typename T1, typename T2, typename T3, typename T4>
-Callback<R,T1,T2,T3,T4> MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4), OBJ objPtr) {
- return Callback<R,T1,T2,T3,T4> (objPtr, mem_ptr);
+Callback<R,T1,T2,T3,T4> MakeCallback (R (T::*memPtr)(T1,T2,T3,T4), OBJ objPtr) {
+ return Callback<R,T1,T2,T3,T4> (objPtr, memPtr);
}
template <typename T, typename OBJ, typename R, typename T1, typename T2, typename T3, typename T4>
-Callback<R,T1,T2,T3,T4> MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4) const, OBJ objPtr) {
- return Callback<R,T1,T2,T3,T4> (objPtr, mem_ptr);
+Callback<R,T1,T2,T3,T4> MakeCallback (R (T::*memPtr)(T1,T2,T3,T4) const, OBJ objPtr) {
+ return Callback<R,T1,T2,T3,T4> (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 <typename T, typename OBJ, typename R, typename T1, typename T2, typename T3, typename T4,typename T5>
-Callback<R,T1,T2,T3,T4,T5> MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5), OBJ objPtr) {
- return Callback<R,T1,T2,T3,T4,T5> (objPtr, mem_ptr);
+Callback<R,T1,T2,T3,T4,T5> MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5), OBJ objPtr) {
+ return Callback<R,T1,T2,T3,T4,T5> (objPtr, memPtr);
}
template <typename T, typename OBJ, typename R, typename T1, typename T2, typename T3, typename T4,typename T5>
-Callback<R,T1,T2,T3,T4,T5> MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5) const, OBJ objPtr) {
- return Callback<R,T1,T2,T3,T4,T5> (objPtr, mem_ptr);
+Callback<R,T1,T2,T3,T4,T5> MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5) const, OBJ objPtr) {
+ return Callback<R,T1,T2,T3,T4,T5> (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 <typename T, typename OBJ, typename R, typename T1, typename T2, typename T3, typename T4,typename T5,typename T6>
-Callback<R,T1,T2,T3,T4,T5,T6> MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6), OBJ objPtr) {
- return Callback<R,T1,T2,T3,T4,T5,T6> (objPtr, mem_ptr);
+Callback<R,T1,T2,T3,T4,T5,T6> MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6), OBJ objPtr) {
+ return Callback<R,T1,T2,T3,T4,T5,T6> (objPtr, memPtr);
}
template <typename T, typename OBJ, typename R, typename T1, typename T2, typename T3, typename T4,typename T5, typename T6>
-Callback<R,T1,T2,T3,T4,T5,T6> MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6) const, OBJ objPtr) {
- return Callback<R,T1,T2,T3,T4,T5,T6> (objPtr, mem_ptr);
+Callback<R,T1,T2,T3,T4,T5,T6> MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6) const, OBJ objPtr) {
+ return Callback<R,T1,T2,T3,T4,T5,T6> (objPtr, memPtr);
+}
+template <typename T, typename OBJ, typename R, typename T1, typename T2, typename T3, typename T4,typename T5,typename T6, typename T7>
+Callback<R,T1,T2,T3,T4,T5,T6,T7> MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6,T7), OBJ objPtr) {
+ return Callback<R,T1,T2,T3,T4,T5,T6,T7> (objPtr, memPtr);
+}
+template <typename T, typename OBJ, typename R, typename T1, typename T2, typename T3, typename T4,typename T5, typename T6, typename T7>
+Callback<R,T1,T2,T3,T4,T5,T6,T7> MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6,T7) const, OBJ objPtr) {
+ return Callback<R,T1,T2,T3,T4,T5,T6,T7> (objPtr, memPtr);
}
+template <typename T, typename OBJ, typename R, typename T1, typename T2, typename T3, typename T4,typename T5,typename T6, typename T7, typename T8>
+Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6,T7,T8), OBJ objPtr) {
+ return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> (objPtr, memPtr);
+}
+template <typename T, typename OBJ, typename R, typename T1, typename T2, typename T3, typename T4,typename T5, typename T6, typename T7, typename T8>
+Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6,T7,T8) const, OBJ objPtr) {
+ return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> (objPtr, memPtr);
+}
+template <typename T, typename OBJ, typename R, typename T1, typename T2, typename T3, typename T4,typename T5,typename T6, typename T7, typename T8, typename T9>
+Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6,T7,T8,T9), OBJ objPtr) {
+ return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (objPtr, memPtr);
+}
+template <typename T, typename OBJ, typename R, typename T1, typename T2, typename T3, typename T4,typename T5, typename T6, typename T7, typename T8, typename T9>
+Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,T5,T6,T7,T8,T9) const, OBJ objPtr) {
+ return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (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 <typename T, typename OBJ, typename R, typename T1, typename T2, typename T3, typename T4,typename T5,typename T6, typename T7>
-Callback<R,T1,T2,T3,T4,T5,T6,T7> MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6,T7), OBJ objPtr) {
- return Callback<R,T1,T2,T3,T4,T5,T6,T7> (objPtr, mem_ptr);
-}
-template <typename T, typename OBJ, typename R, typename T1, typename T2, typename T3, typename T4,typename T5, typename T6, typename T7>
-Callback<R,T1,T2,T3,T4,T5,T6,T7> MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6,T7) const, OBJ objPtr) {
- return Callback<R,T1,T2,T3,T4,T5,T6,T7> (objPtr, mem_ptr);
-}
-
-
-/**
- * \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.
+ * \ingroup callback
+ * \defgroup makecallbackfnptr MakeCallback from function pointers
+ *
+ * Build Callbacks for functions which take varying numbers of arguments
+ * and potentially returning a value.
*/
-template <typename T, typename OBJ, typename R, typename T1, typename T2, typename T3, typename T4,typename T5,typename T6, typename T7, typename T8>
-Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6,T7,T8), OBJ objPtr) {
- return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> (objPtr, mem_ptr);
-}
-template <typename T, typename OBJ, typename R, typename T1, typename T2, typename T3, typename T4,typename T5, typename T6, typename T7, typename T8>
-Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6,T7,T8) const, OBJ objPtr) {
- return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> (objPtr, mem_ptr);
-}
-
/**
- * \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.
+ * \ingroup makecallbackfnptr
+ * @{
*/
-template <typename T, typename OBJ, typename R, typename T1, typename T2, typename T3, typename T4,typename T5,typename T6, typename T7, typename T8, typename T9>
-Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6,T7,T8,T9), OBJ objPtr) {
- return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (objPtr, mem_ptr);
-}
-template <typename T, typename OBJ, typename R, typename T1, typename T2, typename T3, typename T4,typename T5, typename T6, typename T7, typename T8, typename T9>
-Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6,T7,T8,T9) const, OBJ objPtr) {
- return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (objPtr, mem_ptr);
-}
-
/**
- * \ingroup MakeCallback
* \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 <typename R>
Callback<R> MakeCallback (R (*fnPtr)()) {
return Callback<R> (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 <typename R, typename T1>
Callback<R,T1> MakeCallback (R (*fnPtr)(T1)) {
return Callback<R,T1> (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 <typename R, typename T1, typename T2>
Callback<R,T1,T2> MakeCallback (R (*fnPtr)(T1,T2)) {
return Callback<R,T1,T2> (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 <typename R, typename T1, typename T2,typename T3>
Callback<R,T1,T2,T3> MakeCallback (R (*fnPtr)(T1,T2,T3)) {
return Callback<R,T1,T2,T3> (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 <typename R, typename T1, typename T2,typename T3,typename T4>
Callback<R,T1,T2,T3,T4> MakeCallback (R (*fnPtr)(T1,T2,T3,T4)) {
return Callback<R,T1,T2,T3,T4> (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 <typename R, typename T1, typename T2,typename T3,typename T4,typename T5>
Callback<R,T1,T2,T3,T4,T5> MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5)) {
return Callback<R,T1,T2,T3,T4,T5> (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 <typename R, typename T1, typename T2,typename T3,typename T4,typename T5,typename T6>
Callback<R,T1,T2,T3,T4,T5,T6> MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5,T6)) {
return Callback<R,T1,T2,T3,T4,T5,T6> (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 <typename R, typename T1, typename T2,typename T3,typename T4,typename T5,typename T6, typename T7>
Callback<R,T1,T2,T3,T4,T5,T6,T7> MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5,T6,T7)) {
return Callback<R,T1,T2,T3,T4,T5,T6,T7> (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 <typename R, typename T1, typename T2,typename T3,typename T4,typename T5,typename T6, typename T7, typename T8>
Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5,T6,T7,T8)) {
return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> (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 <typename R, typename T1, typename T2,typename T3,typename T4,typename T5,typename T6, typename T7, typename T8, typename T9>
Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5,T6,T7,T8,T9)) {
return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (fnPtr, true, true);
}
-
-
+/**@}*/
/**
- * \ingroup MakeCallback
+ * \ingroup callback
+ * \defgroup makenullcallback MakeCallbacks with no arguments
+ */
+/**
+ * \ingroup makenullcallback
+ * @{
+ */
+/**
* \return a wrapper Callback
- * Build a null callback which takes no arguments
- * and potentially return a value.
- */
+ *
+ * Build null Callbacks which take no arguments,
+ * for varying number of template arguments,
+ * and potentially returning a value.
+ */
template <typename R>
Callback<R> MakeNullCallback (void) {
return Callback<R> ();
}
-/**
- * \ingroup MakeCallback
- * \overload Callback<R> MakeNullCallback (void)
- * \return a wrapper Callback
- * Build a null callback which takes one argument
- * and potentially return a value.
- */
template <typename R, typename T1>
Callback<R,T1> MakeNullCallback (void) {
return Callback<R,T1> ();
}
-/**
- * \ingroup MakeCallback
- * \overload Callback<R> MakeNullCallback (void)
- * \return a wrapper Callback
- * Build a null callback which takes two arguments
- * and potentially return a value.
- */
template <typename R, typename T1, typename T2>
Callback<R,T1,T2> MakeNullCallback (void) {
return Callback<R,T1,T2> ();
}
-/**
- * \ingroup MakeCallback
- * \overload Callback<R> MakeNullCallback (void)
- * \return a wrapper Callback
- * Build a null callback which takes three arguments
- * and potentially return a value.
- */
template <typename R, typename T1, typename T2,typename T3>
Callback<R,T1,T2,T3> MakeNullCallback (void) {
return Callback<R,T1,T2,T3> ();
}
-/**
- * \ingroup MakeCallback
- * \overload Callback<R> MakeNullCallback (void)
- * \return a wrapper Callback
- * Build a null callback which takes four arguments
- * and potentially return a value.
- */
template <typename R, typename T1, typename T2,typename T3,typename T4>
Callback<R,T1,T2,T3,T4> MakeNullCallback (void) {
return Callback<R,T1,T2,T3,T4> ();
}
-/**
- * \ingroup MakeCallback
- * \overload Callback<R> MakeNullCallback (void)
- * \return a wrapper Callback
- * Build a null callback which takes five arguments
- * and potentially return a value.
- */
template <typename R, typename T1, typename T2,typename T3,typename T4,typename T5>
Callback<R,T1,T2,T3,T4,T5> MakeNullCallback (void) {
return Callback<R,T1,T2,T3,T4,T5> ();
}
-/**
- * \ingroup MakeCallback
- * \overload Callback<R> MakeNullCallback (void)
- * \return a wrapper Callback
- * Build a null callback which takes six arguments
- * and potentially return a value.
- */
template <typename R, typename T1, typename T2,typename T3,typename T4,typename T5,typename T6>
Callback<R,T1,T2,T3,T4,T5,T6> MakeNullCallback (void) {
return Callback<R,T1,T2,T3,T4,T5,T6> ();
}
-
-/**
- * \ingroup MakeCallback
- * \overload Callback<R> MakeNullCallback (void)
- * \return a wrapper Callback
- * Build a null callback which takes seven arguments
- * and potentially return a value.
- */
template <typename R, typename T1, typename T2,typename T3,typename T4,typename T5,typename T6, typename T7>
Callback<R,T1,T2,T3,T4,T5,T6,T7> MakeNullCallback (void) {
return Callback<R,T1,T2,T3,T4,T5,T6,T7> ();
}
-
-/**
- * \ingroup MakeCallback
- * \overload Callback<R> MakeNullCallback (void)
- * \return a wrapper Callback
- * Build a null callback which takes eight arguments
- * and potentially return a value.
- */
template <typename R, typename T1, typename T2,typename T3,typename T4,typename T5,typename T6, typename T7, typename T8>
Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> MakeNullCallback (void) {
return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> ();
}
-
-/**
- * \ingroup MakeCallback
- * \overload Callback<R> MakeNullCallback (void)
- * \return a wrapper Callback
- * Build a null callback which takes nine arguments
- * and potentially return a value.
- */
template <typename R, typename T1, typename T2,typename T3,typename T4,typename T5,typename T6, typename T7, typename T8, typename T9>
Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> MakeNullCallback (void) {
return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> ();
}
+/**@}*/
-/*
+/**
+ * \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.
+ *
+ * \intern
+ *
* 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 <typename R, typename TX, typename ARG>
-Callback<R> MakeBoundCallback (R (*fnPtr)(TX), ARG a) {
+Callback<R> MakeBoundCallback (R (*fnPtr)(TX), ARG a1) {
Ptr<CallbackImpl<R,empty,empty,empty,empty,empty,empty,empty,empty,empty> > impl =
- Create<BoundFunctorCallbackImpl<R (*)(TX),R,TX,empty,empty,empty,empty,empty,empty,empty,empty> >(fnPtr, a);
+ Create<BoundFunctorCallbackImpl<R (*)(TX),R,TX,empty,empty,empty,empty,empty,empty,empty,empty> >(fnPtr, a1);
return Callback<R> (impl);
}
-
template <typename R, typename TX, typename ARG,
typename T1>
-Callback<R,T1> MakeBoundCallback (R (*fnPtr)(TX,T1), ARG a) {
+Callback<R,T1> MakeBoundCallback (R (*fnPtr)(TX,T1), ARG a1) {
Ptr<CallbackImpl<R,T1,empty,empty,empty,empty,empty,empty,empty,empty> > impl =
- Create<BoundFunctorCallbackImpl<R (*)(TX,T1),R,TX,T1,empty,empty,empty,empty,empty,empty,empty> > (fnPtr, a);
+ Create<BoundFunctorCallbackImpl<R (*)(TX,T1),R,TX,T1,empty,empty,empty,empty,empty,empty,empty> > (fnPtr, a1);
return Callback<R,T1> (impl);
}
template <typename R, typename TX, typename ARG,
typename T1, typename T2>
-Callback<R,T1,T2> MakeBoundCallback (R (*fnPtr)(TX,T1,T2), ARG a) {
+Callback<R,T1,T2> MakeBoundCallback (R (*fnPtr)(TX,T1,T2), ARG a1) {
Ptr<CallbackImpl<R,T1,T2,empty,empty,empty,empty,empty,empty,empty> > impl =
- Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2),R,TX,T1,T2,empty,empty,empty,empty,empty,empty> > (fnPtr, a);
+ Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2),R,TX,T1,T2,empty,empty,empty,empty,empty,empty> > (fnPtr, a1);
return Callback<R,T1,T2> (impl);
}
template <typename R, typename TX, typename ARG,
typename T1, typename T2,typename T3>
-Callback<R,T1,T2,T3> MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3), ARG a) {
+Callback<R,T1,T2,T3> MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3), ARG a1) {
Ptr<CallbackImpl<R,T1,T2,T3,empty,empty,empty,empty,empty,empty> > impl =
- Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3),R,TX,T1,T2,T3,empty,empty,empty,empty,empty> > (fnPtr, a);
+ Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3),R,TX,T1,T2,T3,empty,empty,empty,empty,empty> > (fnPtr, a1);
return Callback<R,T1,T2,T3> (impl);
}
template <typename R, typename TX, typename ARG,
typename T1, typename T2,typename T3,typename T4>
-Callback<R,T1,T2,T3,T4> MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4), ARG a) {
+Callback<R,T1,T2,T3,T4> MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4), ARG a1) {
Ptr<CallbackImpl<R,T1,T2,T3,T4,empty,empty,empty,empty,empty> > impl =
- Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3,T4),R,TX,T1,T2,T3,T4,empty,empty,empty,empty> > (fnPtr, a);
+ Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3,T4),R,TX,T1,T2,T3,T4,empty,empty,empty,empty> > (fnPtr, a1);
return Callback<R,T1,T2,T3,T4> (impl);
}
template <typename R, typename TX, typename ARG,
typename T1, typename T2,typename T3,typename T4,typename T5>
-Callback<R,T1,T2,T3,T4,T5> MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5), ARG a) {
+Callback<R,T1,T2,T3,T4,T5> MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5), ARG a1) {
Ptr<CallbackImpl<R,T1,T2,T3,T4,T5,empty,empty,empty,empty> > impl =
- Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3,T4,T5),R,TX,T1,T2,T3,T4,T5,empty,empty,empty> > (fnPtr, a);
+ Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3,T4,T5),R,TX,T1,T2,T3,T4,T5,empty,empty,empty> > (fnPtr, a1);
return Callback<R,T1,T2,T3,T4,T5> (impl);
}
template <typename R, typename TX, typename ARG,
typename T1, typename T2,typename T3,typename T4,typename T5, typename T6>
-Callback<R,T1,T2,T3,T4,T5,T6> MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5,T6), ARG a) {
+Callback<R,T1,T2,T3,T4,T5,T6> MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5,T6), ARG a1) {
Ptr<CallbackImpl<R,T1,T2,T3,T4,T5,T6,empty,empty,empty> > impl =
- Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3,T4,T5,T6),R,TX,T1,T2,T3,T4,T5,T6,empty,empty> > (fnPtr, a);
+ Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3,T4,T5,T6),R,TX,T1,T2,T3,T4,T5,T6,empty,empty> > (fnPtr, a1);
return Callback<R,T1,T2,T3,T4,T5,T6> (impl);
}
template <typename R, typename TX, typename ARG,
typename T1, typename T2,typename T3,typename T4,typename T5, typename T6, typename T7>
-Callback<R,T1,T2,T3,T4,T5,T6,T7> MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5,T6,T7), ARG a) {
+Callback<R,T1,T2,T3,T4,T5,T6,T7> MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5,T6,T7), ARG a1) {
Ptr<CallbackImpl<R,T1,T2,T3,T4,T5,T6,T7,empty,empty> > impl =
- Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3,T4,T5,T6,T7),R,TX,T1,T2,T3,T4,T5,T6,T7,empty> > (fnPtr, a);
+ Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3,T4,T5,T6,T7),R,TX,T1,T2,T3,T4,T5,T6,T7,empty> > (fnPtr, a1);
return Callback<R,T1,T2,T3,T4,T5,T6,T7> (impl);
}
template <typename R, typename TX, typename ARG,
typename T1, typename T2,typename T3,typename T4,typename T5, typename T6, typename T7, typename T8>
-Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5,T6,T7,T8), ARG a) {
+Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5,T6,T7,T8), ARG a1) {
Ptr<CallbackImpl<R,T1,T2,T3,T4,T5,T6,T7,T8,empty> > impl =
- Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3,T4,T5,T6,T7,T8),R,TX,T1,T2,T3,T4,T5,T6,T7,T8> > (fnPtr, a);
+ Create<BoundFunctorCallbackImpl<R (*)(TX,T1,T2,T3,T4,T5,T6,T7,T8),R,TX,T1,T2,T3,T4,T5,T6,T7,T8> > (fnPtr, a1);
return Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> (impl);
}
+/**@}*/
+/**
+ * \param fnPtr function pointer
+ * \param a1 first bound argument
+ * \param a2 second bound argument
+ * \return a bound Callback
+ * @{
+ */
template <typename R, typename TX1, typename TX2, typename ARG1, typename ARG2>
Callback<R> MakeBoundCallback (R (*fnPtr)(TX1,TX2), ARG1 a1, ARG2 a2) {
Ptr<CallbackImpl<R,empty,empty,empty,empty,empty,empty,empty,empty,empty> > impl =
Create<TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2),R,TX1,TX2,empty,empty,empty,empty,empty,empty,empty> >(fnPtr, a1, a2);
return Callback<R> (impl);
}
-
template <typename R, typename TX1, typename TX2, typename ARG1, typename ARG2,
typename T1>
Callback<R,T1> MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1), ARG1 a1, ARG2 a2) {
@@ -1130,14 +1585,22 @@
Create<TwoBoundFunctorCallbackImpl<R (*)(TX1,TX2,T1,T2,T3,T4,T5,T6,T7),R,TX1,TX2,T1,T2,T3,T4,T5,T6,T7> > (fnPtr, a1, a2);
return Callback<R,T1,T2,T3,T4,T5,T6,T7> (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 <typename R, typename TX1, typename TX2, typename TX3, typename ARG1, typename ARG2, typename ARG3>
Callback<R> MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3), ARG1 a1, ARG2 a2, ARG3 a3) {
Ptr<CallbackImpl<R,empty,empty,empty,empty,empty,empty,empty,empty,empty> > impl =
Create<ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3),R,TX1,TX2,TX3,empty,empty,empty,empty,empty,empty> >(fnPtr, a1, a2, a3);
return Callback<R> (impl);
}
-
template <typename R, typename TX1, typename TX2, typename TX3, typename ARG1, typename ARG2, typename ARG3,
typename T1>
Callback<R,T1> MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3,T1), ARG1 a1, ARG2 a2, ARG3 a3) {
@@ -1180,29 +1643,62 @@
Create<ThreeBoundFunctorCallbackImpl<R (*)(TX1,TX2,TX3,T1,T2,T3,T4,T5,T6),R,TX1,TX2,TX3,T1,T2,T3,T4,T5,T6> > (fnPtr, a1, a2, a3);
return Callback<R,T1,T2,T3,T4,T5,T6> (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 <typename T>
bool GetAccessor (T &value) const;
+ /** \return a copy of this CallBack */
virtual Ptr<AttributeValue> Copy (void) const;
+ /**
+ * Serialize to string
+ * \param checker the checker to validate with
+ * \return serialize this pimpl
+ */
virtual std::string SerializeToString (Ptr<const AttributeChecker> 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<const AttributeChecker> checker);
private:
- CallbackBase m_value;
+ CallbackBase m_value; //!< the CallbackBase
};
+/** Attribute helpers @{ */
ATTRIBUTE_ACCESSOR_DEFINE (Callback);
ATTRIBUTE_CHECKER_DEFINE (Callback);
+/**@}*/
} // namespace ns3
--- a/src/core/model/command-line.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/command-line.cc Wed Jul 24 13:20:24 2013 +0200
@@ -18,12 +18,16 @@
* Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
*/
-#include <cstdlib> // for exit
+#include <algorithm> // for transform
+#include <cctype> // for tolower
+#include <cstdlib> // for exit
+#include <iomanip> // for setw
#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++)
{
@@ -129,20 +151,51 @@
{
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;
+ std::cout << m_name << " [Program Arguments] [General Arguments]"
+ << std::endl;
+
+ if (m_usage.length ())
+ {
+ std::cout << std::endl;
+ std::cout << 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;
+
+ std::cout << std::endl;
+ std::cout << "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;
+ std::cout << " --"
+ << std::left << std::setw (width) << ( (*i)->m_name + ":")
+ << std::right
+ << (*i)->m_help;
+
+ if ( (*i)->HasDefault ())
+ {
+ std::cout << " [" << (*i)->GetDefault () << "]";
+ }
+ std::cout << std::endl;
}
}
+
+ std::cout << std::endl;
+ std::cout
+ << "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
@@ -150,14 +203,18 @@
{
NS_LOG_FUNCTION (this);
- for (GlobalValue::Iterator i = GlobalValue::Begin (); i != GlobalValue::End (); ++i)
+ std::cout << "Global values:" << std::endl;
+
+ for (GlobalValue::Iterator i = GlobalValue::Begin ();
+ i != GlobalValue::End ();
+ ++i)
{
std::cout << " --" << (*i)->GetName () << "=[";
Ptr<const AttributeChecker> checker = (*i)->GetChecker ();
StringValue v;
(*i)->GetValue (v);
- std::cout << v.Get () << "]: "
- << (*i)->GetHelp () << std::endl;
+ std::cout << v.Get () << "]" << std::endl;
+ std::cout << " " << (*i)->GetHelp () << std::endl;
}
}
@@ -169,14 +226,18 @@
TypeId tid;
if (!TypeId::LookupByNameFailSafe (type, &tid))
{
- NS_FATAL_ERROR ("Unknown type="<<type<<" in --PrintAttributes");
+ NS_FATAL_ERROR ("Unknown type=" << type << " in --PrintAttributes");
}
+
+ std::cout << "Attributes for TypeId " << tid.GetName () << std::endl;
+
for (uint32_t i = 0; i < tid.GetAttributeN (); ++i)
{
- std::cout << " --"<<tid.GetAttributeFullName (i)<<"=[";
+ std::cout << " --" << tid.GetAttributeFullName (i) << "=[";
struct TypeId::AttributeInformation info = tid.GetAttribute (i);
- std::cout << info.initialValue->SerializeToString (info.checker) << "]: "
- << info.help << std::endl;
+ std::cout << info.initialValue->SerializeToString (info.checker) << "]"
+ << std::endl;
+ std::cout << " " << info.help << std::endl;
}
}
@@ -186,12 +247,14 @@
{
NS_LOG_FUNCTION (this);
+ std::cout << "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=" <<tid.GetName ()<<std::endl;
+ std::cout << " " <<tid.GetName () << std::endl;
}
}
}
@@ -200,11 +263,11 @@
CommandLine::PrintTypeIds (void) const
{
NS_LOG_FUNCTION (this);
-
+ std::cout << "Registered TypeIds:" << std::endl;
for (uint32_t i = 0; i < TypeId::GetRegisteredN (); ++i)
{
TypeId tid = TypeId::GetRegistered (i);
- std::cout << " --PrintAttributes=" <<tid.GetName ()<<std::endl;
+ std::cout << " " << tid.GetName () << std::endl;
}
}
@@ -223,7 +286,9 @@
continue;
}
bool found = false;
- for (std::list<std::string>::const_iterator j = groups.begin (); j != groups.end (); ++j)
+ for (std::list<std::string>::const_iterator j = groups.begin ();
+ j != groups.end ();
+ ++j)
{
if (*j == group)
{
@@ -236,9 +301,14 @@
groups.push_back (group);
}
}
- for (std::list<std::string>::const_iterator k = groups.begin (); k != groups.end (); ++k)
+
+ std::cout << "Registered TypeId groups:" << std::endl;
+
+ for (std::list<std::string>::const_iterator k = groups.begin ();
+ k != groups.end ();
+ ++k)
{
- std::cout << " --PrintGroup="<<*k<<std::endl;
+ std::cout << " " << *k << std::endl;
}
}
@@ -247,8 +317,8 @@
{
NS_LOG_FUNCTION (this << name << value);
- NS_LOG_DEBUG ("Handle arg name="<<name<<" value="<<value);
- if (name == "PrintHelp")
+ NS_LOG_DEBUG ("Handle arg name=" << name << " value=" << value);
+ if (name == "PrintHelp" || name == "help")
{
// method below never returns.
PrintHelp ();
@@ -292,7 +362,8 @@
{
if (!(*i)->Parse (value))
{
- std::cerr << "Invalid argument value: "<<name<<"="<<value << std::endl;
+ std::cerr << "Invalid argument value: "
+ << name << "=" << value << std::endl;
std::exit (1);
}
else
@@ -305,7 +376,8 @@
if (!Config::SetGlobalFailSafe (name, StringValue (value))
&& !Config::SetDefaultFailSafe (name, StringValue (value)))
{
- std::cerr << "Invalid command-line arguments: --"<<name<<"="<<value<<std::endl;
+ std::cerr << "Invalid command-line arguments: --"
+ << name << "=" << value << std::endl;
PrintHelp ();
std::exit (1);
}
@@ -332,4 +404,43 @@
m_items.push_back (item);
}
+
+bool
+CommandLine::Item::HasDefault () const
+{
+ return false;
+}
+
+std::string
+CommandLine::Item::GetDefault () const
+{
+ return "";
+}
+
+template <>
+bool
+CommandLineHelper::UserItemParse<bool> (const std::string value, bool & val)
+{
+ std::string src = value;
+ std::transform(src.begin(), src.end(), src.begin(), ::tolower);
+
+ if ( (src.length () == 0) || (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
--- a/src/core/model/command-line.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/command-line.h Wed Jul 24 13:20:24 2013 +0200
@@ -29,35 +29,125 @@
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
+ * arguments: programs can register new arguments with
+ * CommandLine::AddValue.
+ *
+ * In addition, this class can be used to set the
* 'initial value' of every attribute in the system with the
- * \verbatim
+ * \code
* --TypeIdName::AttributeName=value
- * \endverbatim
- * syntax and it can be used to set the value of every GlobalValue
+ * \endcode
+ * syntax, and it can be used to set the value of every GlobalValue
* in the system with the
- * \verbatim
+ * \code
* --GlobalValueName=value
- * \endverbatim
+ * \endcode
* syntax.
+ *
+ * A simple example is in \c src/core/example/command-line-example.cc
+ * The heart of that example is this code:
+ *
+ * \code
+ * int val1 = 1;
+ * bool val2 = false;
+ * std::string val3 = "";
+ *
+ * CommandLine cmd;
+ * cmd.Usage ("CommandLine example program.\n"
+ * "\n"
+ * "This little program demonstrates how to use CommandLine.");
+ * cmd.AddValue ("val1", "an int argument", val1);
+ * cmd.AddValue ("val2", "a bool argument", val2);
+ * cmd.AddValue ("val3", "a string argument", val3);
+ * cmd.AddValue ("val4", "a string via callback", MakeCallback (SetVal4));
+ * cmd.Parse (argc, argv);
+ * \endcode
+ *
+ * Here is the output from a few runs of that program:
+ *
+ * \code
+ * $ ./waf --run="command-line-example"
+ * val1: 1
+ * val2: 0
+ * val3: "val3 default"
+ * val4: "val4 default"
+ *
+ * $ ./waf --run="command-line-example --val1=2 --val2 --val3=Hello --val4=World"
+ * val1: 2
+ * val2: 1
+ * val3: "Hello"
+ * val4: "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:
+ * --val1: an int argument
+ * --val2: a bool argument
+ * --val3: a string argument
+ * --val4: 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 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 +159,20 @@
/**
- * \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 \-\-PrintHelp
+ * \param callback a Callback function that will be invoked to parse
+ * and collect the value. This is normally used by language bindings.
*/
void AddValue (const std::string &name,
const std::string &help,
Callback<bool, std::string> 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 +180,158 @@
*
* 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;
+
private:
+
+ /**
+ * \ingroup commandline
+ * \brief The argument base class
+ */
class Item
{
-public:
- std::string m_name;
- std::string m_help;
- virtual ~Item ();
+ 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 (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 <typename T>
class UserItem : public Item
{
-public:
+ public:
+ /**
+ * Parse from a string.
+ *
+ * \param value the string representation
+ * \return true if parsing the value succeeded
+ */
virtual bool Parse (std::string value);
- T *m_valuePtr;
+
+ 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:
+ public:
+ /**
+ * Parse from a string.
+ *
+ * \param value the string representation
+ * \return true if parsing the value succeeded
+ */
virtual bool Parse (std::string value);
- Callback<bool, std::string> m_callback;
+ Callback<bool, std::string> m_callback; /**< The Callback */
};
+ /**
+ * 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 (std::string name, std::string value) const;
+ /**
+ * Handler for \c \-\-PrintHelp and \c \-\-help: print Usage(), argument names, and help strings
+ */
void PrintHelp (void) const;
+ /** Handler for \c \-\-PrintGlobals: print all global variables and values */
void PrintGlobals (void) const;
+ /**
+ * Handler for \c \-\-PrintAttributes: print the attributes for a given type.
+ *
+ * \param type the TypeId whose Attributes should be displayed
+ */
void PrintAttributes (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::string group) const;
+ /** Handler for \c \-\-PrintTypeIds: print all TypeId names. */
void PrintTypeIds (void) const;
+ /** Handler for \c \-\-PrintGroups: print all TypeId group names */
void PrintGroups (void) const;
+ /**
+ * Copy constructor
+ *
+ * \param cmd CommandLine to copy
+ */
void Copy (const CommandLine &cmd);
+ /** Remove all arguments, Usage(), name */
void Clear (void);
- typedef std::list<Item *> Items;
- Items m_items;
-};
+ typedef std::list<Item *> 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
+ * Helpers for CommandLine
+ */
+namespace CommandLineHelper {
+ /**
+ * \ingroup commandline
+ * \brief Helper to specialize UserItem on bool
+ *
+ * \param value the argument name
+ * \param val the argument location
+ * \return true if parsing was successful
+ * @{
+ */
+ template <typename T>
+ bool UserItemParse (const std::string value, T & val);
+ template <>
+ bool UserItemParse<bool> (const std::string value, bool & val);
+ /**@}*/
+
+} // namespace CommandLineHelper
+
+
+
} // namespace ns3
namespace ns3 {
@@ -139,16 +346,46 @@
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 <typename T>
+bool
+CommandLine::UserItem<T>::HasDefault () const
+{
+ return true;
+}
+
template <typename T>
-bool
+std::string
+CommandLine::UserItem<T>::GetDefault () const
+{
+ std::ostringstream oss;
+ oss << *m_valuePtr;
+ return oss.str ();
+}
+
+
+template <typename T>
+bool
CommandLine::UserItem<T>::Parse (std::string value)
{
+ return CommandLineHelper::UserItemParse<T> (value, *m_valuePtr);
+}
+
+template <typename T>
+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 ();
}
--- a/src/core/model/default-simulator-impl.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/default-simulator-impl.cc Wed Jul 24 13:20:24 2013 +0200
@@ -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);
}
--- a/src/core/model/default-simulator-impl.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/default-simulator-impl.h Wed Jul 24 13:20:24 2013 +0200
@@ -33,6 +33,9 @@
namespace ns3 {
+/**
+ * \ingroup simulator
+ */
class DefaultSimulatorImpl : public SimulatorImpl
{
public:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/model/hash-fnv.cc Wed Jul 24 13:20:24 2013 +0200
@@ -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. <pdbarnes@llnl.gov>
+ *
+ * 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 <fnv-file> ---->
+ * and
+ * // End <fnv-file> ---->
+ * comments.
+ *
+ * Changes from the FNV distribution are marked with `//PDB'
+ */
+
+#include <sys/types.h>
+#include <stdlib.h>
+
+#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 <Landon Curt Noll> /\oo/\
+ * http://www.isthe.com/chongo/
+ *
+ * Share and Enjoy! :-)
+ */
+
+#if !defined(__FNV_H__)
+#define __FNV_H__
+
+
+//#include <sys/types.h> //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 <Landon Curt Noll> /\../\
+ *
+ * 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 <Landon Curt Noll> /\../\
+ *
+ * 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 <Landon Curt Noll> /\oo/\
+ * http://www.isthe.com/chongo/
+ *
+ * Share and Enjoy! :-)
+ */
+
+//#include <stdlib.h> //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 <Landon Curt Noll> /\oo/\
+ * http://www.isthe.com/chongo/
+ *
+ * Share and Enjoy! :-)
+ */
+
+//#include <stdlib.h> //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<<FNV_64_PRIME_SHIFT 0x0 FNV_64_PRIME_LOW
+ */
+ /* multiply by the lowest order digit base 2^16 */
+ tmp[0] = val[0] * FNV_64_PRIME_LOW;
+ tmp[1] = val[1] * FNV_64_PRIME_LOW;
+ tmp[2] = val[2] * FNV_64_PRIME_LOW;
+ tmp[3] = val[3] * FNV_64_PRIME_LOW;
+ /* multiply by the other non-zero digit */
+ tmp[2] += val[0] << FNV_64_PRIME_SHIFT; /* tmp[2] += val[0] * 0x100 */
+ tmp[3] += val[1] << FNV_64_PRIME_SHIFT; /* tmp[3] += val[1] * 0x100 */
+ /* propagate carries */
+ tmp[1] += (tmp[0] >> 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<<FNV_64_PRIME_SHIFT 0x0 FNV_64_PRIME_LOW
+ */
+ /* multiply by the lowest order digit base 2^16 */
+ tmp[0] = val[0] * FNV_64_PRIME_LOW;
+ tmp[1] = val[1] * FNV_64_PRIME_LOW;
+ tmp[2] = val[2] * FNV_64_PRIME_LOW;
+ tmp[3] = val[3] * FNV_64_PRIME_LOW;
+ /* multiply by the other non-zero digit */
+ tmp[2] += val[0] << FNV_64_PRIME_SHIFT; /* tmp[2] += val[0] * 0x100 */
+ tmp[3] += val[1] << FNV_64_PRIME_SHIFT; /* tmp[3] += val[1] * 0x100 */
+ /* propagate carries */
+ tmp[1] += (tmp[0] >> 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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/model/hash-fnv.h Wed Jul 24 13:20:24 2013 +0200
@@ -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. <pdbarnes@llnl.gov>
+ */
+
+#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
+ * <a href="http://isthe.com/chongo/tech/comp/fnv/">FNV page</a>.)
+ *
+ * The implementation here is taken directly from the published FNV
+ * <a href="http://isthe.com/chongo/tech/comp/fnv/#FNV-reference-source">
+ * reference code</a>,
+ * 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 */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/model/hash-function.cc Wed Jul 24 13:20:24 2013 +0200
@@ -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. <pdbarnes@llnl.gov>
+ */
+
+#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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/model/hash-function.h Wed Jul 24 13:20:24 2013 +0200
@@ -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. <pdbarnes@llnl.gov>
+ */
+
+#ifndef HASHFUNCTION_H
+#define HASHFUNCTION_H
+
+#include <cstring> // 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<Implementation>
+{
+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<Hash64Function_ptr>
+
+
+} // namespace Function
+
+} // namespace Hash
+
+} // namespace ns3
+
+#endif /* HASHFUNCTION_H */
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/model/hash-murmur3.cc Wed Jul 24 13:20:24 2013 +0200
@@ -0,0 +1,473 @@
+/* -*- 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. <pdbarnes@llnl.gov>
+ *
+ * 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 <murmur3-file> ---->
+ * and
+ * // End <murmur3-file> ---->
+ * comments.
+ *
+ * Changes from the murmur3 distribution are marked with `//PDB'
+ */
+
+#include "log.h"
+#include "hash-murmur3.h"
+
+#include <iomanip>
+
+namespace ns3 {
+
+NS_LOG_COMPONENT_DEFINE ("Hash-Murmur3");
+
+namespace Hash {
+
+namespace Function {
+
+namespace Murmur3Implementation {
+
+/*************************************************
+ ** 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;
+
+ ((uint64_t*)out)[0] = h1;
+ ((uint64_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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/model/hash-murmur3.h Wed Jul 24 13:20:24 2013 +0200
@@ -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. <pdbarnes@llnl.gov>
+ */
+
+#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 */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/model/hash.cc Wed Jul 24 13:20:24 2013 +0200
@@ -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. <pdbarnes@llnl.gov>
+ */
+
+#include "log.h"
+#include "hash.h"
+
+
+namespace ns3 {
+
+NS_LOG_COMPONENT_DEFINE ("Hash");
+
+Hasher::Hasher ()
+{
+ m_impl = Create <Hash::Function::Murmur3> ();
+ NS_ASSERT (m_impl != 0);
+}
+
+Hasher::Hasher (Ptr<Hash::Implementation> hp)
+ : m_impl (hp)
+{
+ NS_ASSERT (m_impl != 0);
+}
+
+Hasher &
+Hasher::clear (void)
+{
+ m_impl->clear ();
+ return *this;
+}
+
+} // namespace ns3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/model/hash.h Wed Jul 24 13:20:24 2013 +0200
@@ -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. <pdbarnes@llnl.gov>
+ */
+
+#ifndef HASH_H
+#define HASH_H
+
+#include <string>
+
+#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<Hash::Function::Fnv1a> () );
+ * 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<Hash::Implementation> to the desired implementation
+ */
+ Hasher (Ptr<Hash::Implementation> 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<Hash::Implementation> 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 */
--- a/src/core/model/int64x64-double.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/int64x64-double.h Wed Jul 24 13:20:24 2013 +0200
@@ -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;
}
--- a/src/core/model/nstime.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/nstime.h Wed Jul 24 13:20:24 2013 +0200
@@ -25,6 +25,7 @@
#include "attribute-helper.h"
#include "int64x64.h"
#include <stdint.h>
+#include <limits>
#include <cmath>
#include <ostream>
@@ -36,61 +37,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
@@ -215,6 +167,21 @@
explicit Time (const std::string & s);
/**
+ * \brief Minimum representable Time
+ */
+ static Time Min ()
+ {
+ return Time (std::numeric_limits<int64_t>::min ());
+ }
+ /**
+ * \brief Maximum representable Time
+ */
+ static Time Max ()
+ {
+ return Time (std::numeric_limits<int64_t>::max ());
+ }
+
+ /**
* \return true if the time is zero, false otherwise.
*/
inline bool IsZero (void) const
@@ -699,7 +666,37 @@
ATTRIBUTE_VALUE_DEFINE (Time);
ATTRIBUTE_ACCESSOR_DEFINE (Time);
-ATTRIBUTE_CHECKER_DEFINE (Time);
+
+/**
+ * \brief Helper to make a Time checker with bounded range.
+ * Both limits are inclusive
+ *
+ * \return the AttributeChecker
+ */
+Ptr<const AttributeChecker> MakeTimeChecker (const Time min, const Time max);
+
+/**
+ * \brief Helper to make an unbounded Time checker.
+ *
+ * \return the AttributeChecker
+ */
+inline
+Ptr<const AttributeChecker> MakeTimeChecker (void)
+{
+ return MakeTimeChecker (Time::Min (), Time::Max ());
+}
+
+/**
+ * \brief Helper to make a Time checker with an upper bound
+ *
+ * \return the AttributeChecker
+ */
+inline
+Ptr<const AttributeChecker> MakeTimeChecker (const Time min)
+{
+ return MakeTimeChecker (min, Time::Max ());
+}
+
} // namespace ns3
--- a/src/core/model/random-variable-stream-helper.cc Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/* -*- 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 "random-variable-stream.h"
-#include "random-variable-stream-helper.h"
-#include "config.h"
-#include "pointer.h"
-#include "log.h"
-#include "assert.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<RandomVariableStream> rvs = ptr.Get<RandomVariableStream> ();
- NS_LOG_DEBUG ("RandomVariableStream found: " << rvs << "; setting stream to " << (stream + i));
- rvs->SetStream (stream + i);
- }
- return i;
-}
-
-} // namespace ns3
--- a/src/core/model/random-variable-stream-helper.h Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/* -*- 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 <string>
-
-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<RandomVariableStream>.
- *
- * \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<RandomVariableStream> ())
- *
- * \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 */
--- a/src/core/model/random-variable-stream.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/random-variable-stream.cc Wed Jul 24 13:20:24 2013 +0200
@@ -1170,8 +1170,6 @@
return tid;
}
TriangularRandomVariable::TriangularRandomVariable ()
- :
- m_mode (0.5)
{
// m_mean, m_min, and m_max are initialized after constructor by
// attributes
--- a/src/core/model/random-variable-stream.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/random-variable-stream.h Wed Jul 24 13:20:24 2013 +0200
@@ -1982,10 +1982,6 @@
/// The upper bound on values that can be returned by this RNG stream.
double m_max;
-
- /// It's easier to work with the mode internally instead of the
- /// mean. They are related by the simple: mean = (min+max+mode)/3.
- double m_mode;
};
/**
--- a/src/core/model/random-variable.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/random-variable.cc Wed Jul 24 13:20:24 2013 +0200
@@ -1700,8 +1700,8 @@
double
ErlangVariableImpl::GetValue (unsigned int k, double lambda)
{
- // XXX: Fixme: do not create a new
- // RNG stream every time the function is called !
+ /// \todo do not create a new
+ /// RNG stream every time the function is called !
NS_LOG_FUNCTION (this << k << lambda);
ExponentialVariable exponential (lambda);
@@ -2039,7 +2039,7 @@
}
return os;
}
- // XXX: support other distributions
+ /// \todo support other distributions
os.setstate (std::ios_base::badbit);
return os;
}
@@ -2125,7 +2125,7 @@
else
{
NS_FATAL_ERROR ("RandomVariable deserialization not implemented for " << type);
- // XXX: support other distributions.
+ /// \todo support other distributions.
}
return is;
}
--- a/src/core/model/realtime-simulator-impl.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/realtime-simulator-impl.cc Wed Jul 24 13:20:24 2013 +0200
@@ -795,8 +795,8 @@
Time
RealtimeSimulatorImpl::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);
}
--- a/src/core/model/realtime-simulator-impl.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/realtime-simulator-impl.h Wed Jul 24 13:20:24 2013 +0200
@@ -35,6 +35,9 @@
namespace ns3 {
+/**
+ * \ingroup simulator
+ */
class RealtimeSimulatorImpl : public SimulatorImpl
{
public:
--- a/src/core/model/ref-count-base.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/ref-count-base.h Wed Jul 24 13:20:24 2013 +0200
@@ -30,6 +30,7 @@
/**
* \brief A deprecated way to get reference-counting powers
*
+ * \deprecated
* Users who wish to use reference counting for a class of their own should use
* instead the template \ref ns3::SimpleRefCount. This class is maintained
* purely for compatibility to avoid breaking the code of users.
--- a/src/core/model/simulator.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/simulator.h Wed Jul 24 13:20:24 2013 +0200
@@ -39,6 +39,10 @@
/**
* \ingroup core
+ * \defgroup simulator Simulator
+ */
+/**
+ * \ingroup simulator
*
* \brief Control the scheduling of simulation events.
*
--- a/src/core/model/system-path.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/system-path.cc Wed Jul 24 13:20:24 2013 +0200
@@ -110,8 +110,8 @@
}
#elif defined (__win32__)
{
- // XXX: untested. it should work if code is compiled with
- // LPTSTR = char *
+ /// \todo untested. it should work if code is compiled with
+ /// LPTSTR = char *
DWORD size = 1024;
LPTSTR lpFilename = (LPTSTR) malloc (sizeof(TCHAR) * size);
DWORD status = GetModuleFilename (0, lpFilename, size);
@@ -232,7 +232,7 @@
}
closedir (dp);
#elif defined (HAVE_FIND_FIRST_FILE)
- // XXX: untested
+ /// \todo untested
HANDLE hFind;
WIN32_FIND_DATA fileData;
--- a/src/core/model/system-thread.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/system-thread.h Wed Jul 24 13:20:24 2013 +0200
@@ -148,7 +148,6 @@
Callback<void> m_callback;
pthread_t m_thread;
- void * m_ret;
#endif
};
--- a/src/core/model/test.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/test.cc Wed Jul 24 13:20:24 2013 +0200
@@ -484,22 +484,30 @@
TestRunnerImpl::ReplaceXmlSpecialCharacters (std::string xml) const
{
NS_LOG_FUNCTION (this << xml);
- std::string specials = "<>&\"'";
- std::string replacements[] = {"<", ">", "&", "'", """};
+ typedef std::map <char, std::string> specials_map;
+ specials_map specials;
+ specials['<'] = "<";
+ specials['>'] = ">";
+ specials['&'] = "&";
+ specials['"'] = "'";
+ specials['\''] = """;
+
std::string result;
- std::size_t index, length = xml.length ();
+ std::size_t length = xml.length ();
for (size_t i = 0; i < length; ++i)
{
char character = xml[i];
- if ((index = specials.find (character)) == std::string::npos)
+ specials_map::const_iterator it = specials.find (character);
+
+ if (it == specials.end ())
{
result.push_back (character);
}
else
{
- result += replacements[index];
+ result += it->second;
}
}
return result;
@@ -539,7 +547,7 @@
double user = test->m_result->clock.GetElapsedUser () / MS_PER_SEC;
double system = test->m_result->clock.GetElapsedSystem () / MS_PER_SEC;
- (*os).precision (3);
+ std::streamsize oldPrecision = (*os).precision (3);
*os << std::fixed;
std::string statusString = test->IsFailed ()?"FAIL":"PASS";
@@ -596,7 +604,8 @@
}
}
- os->unsetf(std::ios_base::floatfield);
+ (*os).unsetf(std::ios_base::floatfield);
+ (*os).precision (oldPrecision);
}
void
@@ -711,7 +720,7 @@
delete *j;
// Remove this test case from the test suite.
- test->m_children.erase (j);
+ j = test->m_children.erase (j);
}
else
{
--- a/src/core/model/test.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/test.h Wed Jul 24 13:20:24 2013 +0200
@@ -885,6 +885,7 @@
void SetDataDir (std::string directory);
/**
+ * \deprecated
* This method is deprecated. IsStatusFailure replaces it.
*/
bool GetErrorStatus (void) const NS_DEPRECATED;
--- a/src/core/model/time.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/time.cc Wed Jul 24 13:20:24 2013 +0200
@@ -186,7 +186,61 @@
}
ATTRIBUTE_VALUE_IMPLEMENT (Time);
-ATTRIBUTE_CHECKER_IMPLEMENT (Time);
+
+Ptr<const AttributeChecker>
+MakeTimeChecker (const Time min, const Time max)
+{
+ NS_LOG_FUNCTION (min << max);
+
+ struct Checker : public AttributeChecker
+ {
+ Checker (const Time minValue, const Time maxValue)
+ : m_minValue (minValue),
+ m_maxValue (maxValue) {}
+ virtual bool Check (const AttributeValue &value) const {
+ NS_LOG_FUNCTION (&value);
+ const TimeValue *v = dynamic_cast<const TimeValue *> (&value);
+ if (v == 0)
+ {
+ return false;
+ }
+ return v->Get () >= m_minValue && v->Get () <= m_maxValue;
+ }
+ virtual std::string GetValueTypeName (void) const {
+ NS_LOG_FUNCTION_NOARGS ();
+ return "ns3::TimeValue";
+ }
+ virtual bool HasUnderlyingTypeInformation (void) const {
+ NS_LOG_FUNCTION_NOARGS ();
+ return true;
+ }
+ virtual std::string GetUnderlyingTypeInformation (void) const {
+ NS_LOG_FUNCTION_NOARGS ();
+ std::ostringstream oss;
+ oss << "Time" << " " << m_minValue << ":" << m_maxValue;
+ return oss.str ();
+ }
+ virtual Ptr<AttributeValue> Create (void) const {
+ NS_LOG_FUNCTION_NOARGS ();
+ return ns3::Create<TimeValue> ();
+ }
+ virtual bool Copy (const AttributeValue &source, AttributeValue &destination) const {
+ NS_LOG_FUNCTION (&source << &destination);
+ const TimeValue *src = dynamic_cast<const TimeValue *> (&source);
+ TimeValue *dst = dynamic_cast<TimeValue *> (&destination);
+ if (src == 0 || dst == 0)
+ {
+ return false;
+ }
+ *dst = *src;
+ return true;
+ }
+ Time m_minValue;
+ Time m_maxValue;
+ } *checker = new Checker (min, max);
+ return Ptr<const AttributeChecker> (checker, false);
+}
+
} // namespace ns3
--- a/src/core/model/type-traits.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/type-traits.h Wed Jul 24 13:20:24 2013 +0200
@@ -1,294 +1,296 @@
#ifndef TYPE_TRAITS_H
#define TYPE_TRAITS_H
+/** Type trait reference values */
template <typename T>
struct TypeTraits
{
private:
- struct NullType {};
- template <typename U> struct UnConst
+ struct NullType {}; //!< Null value type traits
+ template <typename U> struct UnConst //!< Non-const type
{
- typedef U Result;
+ typedef U Result; //!< Non-const result type
};
- template <typename U> struct UnConst<const U>
+ template <typename U> struct UnConst<const U> //!< Non-const template type traits
{
- typedef U Result;
+ typedef U Result; //!< Non-const result type
};
- template <typename U> struct ReferenceTraits
+ template <typename U> struct ReferenceTraits //!< Non-reference type traits
{
- enum { IsReference = 0};
- typedef U ReferencedType;
+ enum { IsReference = 0 /**< Non-reference value */ };
+ typedef U ReferencedType; //!< Non-referenced result type
};
- template <typename U> struct ReferenceTraits<U&>
+ template <typename U> struct ReferenceTraits<U&>//!< Reference type traits
{
- enum { IsReference = 1};
- typedef U ReferencedType;
+ enum { IsReference = 1 /**< Reference value */ };
+ typedef U ReferencedType; //!< Referenced result type
};
- template <typename U> struct PointerTraits
+ template <typename U> struct PointerTraits //!< Non-pointer type traits
{
- enum { IsPointer = 0};
- typedef U PointeeType;
+ enum { IsPointer = 0}; //!< Non-pointer value
+ typedef U PointeeType; //!< Non-pointer result type
};
- template <typename U> struct PointerTraits<U *>
+ template <typename U> struct PointerTraits<U *> //!< Pointer type traits
{
- enum { IsPointer = 1};
- typedef U PointeeType;
+ enum { IsPointer = 1}; //!< Pointer value
+ typedef U PointeeType; //!< Pointer result type
};
- template <typename U> struct FunctionPtrTraits
+ template <typename U> struct FunctionPtrTraits //!< Non-function pointer type traits
{
- enum { IsFunctionPointer = 0};
+ enum { IsFunctionPointer = 0}; //!< Non-function pointer value
+ typedef NullType ReturnType; //!< Non-function pointer result type
};
template <typename U>
- struct FunctionPtrTraits <U (*)(void)>
+ struct FunctionPtrTraits <U (*)(void)> //!< Function pointer type traits
{
- enum { IsFunctionPointer = 1};
- enum { nArgs = 0};
- typedef U ReturnType;
+ enum { IsFunctionPointer = 1}; //!< Function pointer value
+ enum { nArgs = 0}; //!< Number of arguments
+ typedef U ReturnType; //!< Return type
};
template <typename U, typename V1>
- struct FunctionPtrTraits <U (*)(V1)>
- {
- enum { IsFunctionPointer = 1};
- enum { nArgs = 1};
- typedef U ReturnType;
- typedef V1 Arg1Type;
+ struct FunctionPtrTraits <U (*)(V1)> //!< Function pointer type traits
+ {
+ enum { IsFunctionPointer = 1}; //!< Function pointer value
+ enum { nArgs = 1}; //!< Number of arguments
+ typedef U ReturnType; //!< Return type
+ typedef V1 Arg1Type; //!< First argument type
};
template <typename U, typename V1, typename V2>
- struct FunctionPtrTraits <U (*)(V1,V2)>
- {
- enum { IsFunctionPointer = 1};
- enum { nArgs = 2};
- typedef U ReturnType;
- typedef V1 Arg1Type;
- typedef V2 Arg2Type;
+ struct FunctionPtrTraits <U (*)(V1,V2)> //!< Function pointer type traits
+ {
+ enum { IsFunctionPointer = 1}; //!< Function pointer value
+ enum { nArgs = 2}; //!< Number of arguments
+ typedef U ReturnType; //!< Return type
+ typedef V1 Arg1Type; //!< First argument type
+ typedef V2 Arg2Type; //!< Second argument type
};
template <typename U, typename V1, typename V2,
typename V3>
- struct FunctionPtrTraits <U (*)(V1,V2,V3)>
- {
- enum { IsFunctionPointer = 1};
- enum { nArgs = 3};
- typedef U ReturnType;
- typedef V1 Arg1Type;
- typedef V2 Arg2Type;
- typedef V3 Arg3Type;
+ struct FunctionPtrTraits <U (*)(V1,V2,V3)> //!< Function pointer type traits
+ {
+ enum { IsFunctionPointer = 1}; //!< Function pointer value
+ enum { nArgs = 3}; //!< Number of arguments
+ typedef U ReturnType; //!< Return type
+ typedef V1 Arg1Type; //!< First argument type
+ typedef V2 Arg2Type; //!< Second argument type
+ typedef V3 Arg3Type; //!< Third argument type
};
template <typename U, typename V1, typename V2,
typename V3, typename V4>
- struct FunctionPtrTraits <U (*)(V1,V2,V3,V4)>
- {
- enum { IsFunctionPointer = 1};
- enum { nArgs = 4};
- typedef U ReturnType;
- typedef V1 Arg1Type;
- typedef V2 Arg2Type;
- typedef V3 Arg3Type;
- typedef V4 Arg4Type;
+ struct FunctionPtrTraits <U (*)(V1,V2,V3,V4)> //!< Function pointer type traits
+ {
+ enum { IsFunctionPointer = 1}; //!< Function pointer value
+ enum { nArgs = 4}; //!< Number of arguments
+ typedef U ReturnType; //!< Return type
+ typedef V1 Arg1Type; //!< First argument type
+ typedef V2 Arg2Type; //!< Second argument type
+ typedef V3 Arg3Type; //!< Third argument type
+ typedef V4 Arg4Type; //!< Fourth argument type
};
template <typename U, typename V1, typename V2,
typename V3, typename V4,
typename V5>
- struct FunctionPtrTraits <U (*)(V1,V2,V3,V4,V5)>
- {
- enum { IsFunctionPointer = 1};
- enum { nArgs = 5};
- typedef U ReturnType;
- typedef V1 Arg1Type;
- typedef V2 Arg2Type;
- typedef V3 Arg3Type;
- typedef V4 Arg4Type;
- typedef V5 Arg5Type;
+ struct FunctionPtrTraits <U (*)(V1,V2,V3,V4,V5)>//!< Function pointer type traits
+ {
+ enum { IsFunctionPointer = 1}; //!< Function pointer value
+ enum { nArgs = 5}; //!< Number of arguments
+ typedef U ReturnType; //!< Return type
+ typedef V1 Arg1Type; //!< First argument type
+ typedef V2 Arg2Type; //!< Second argument type
+ typedef V3 Arg3Type; //!< Third argument type
+ typedef V4 Arg4Type; //!< Fourth argument type
+ typedef V5 Arg5Type; //!< Fifth argument type
};
template <typename U, typename V1, typename V2,
typename V3, typename V4,
typename V5, typename V6>
- struct FunctionPtrTraits <U (*)(V1,V2,V3,V4,V5,V6)>
+ struct FunctionPtrTraits <U (*)(V1,V2,V3,V4,V5,V6)> //!< Function pointer type traits
+ {
+ enum { IsFunctionPointer = 1}; //!< Function pointer value
+ enum { nArgs = 6}; //!< Number of arguments
+ typedef U ReturnType; //!< Return type
+ typedef V1 Arg1Type; //!< First argument type
+ typedef V2 Arg2Type; //!< Second argument type
+ typedef V3 Arg3Type; //!< Third argument type
+ typedef V4 Arg4Type; //!< Fourth argument type
+ typedef V5 Arg5Type; //!< Fifth argument type
+ typedef V6 Arg6Type; //!< Sixth argument type
+ };
+ template <typename U> struct PtrToMemberTraits //!< Pointer to member type traits
{
- enum { IsFunctionPointer = 1};
- enum { nArgs = 6};
- typedef U ReturnType;
- typedef V1 Arg1Type;
- typedef V2 Arg2Type;
- typedef V3 Arg3Type;
- typedef V4 Arg4Type;
- typedef V5 Arg5Type;
- typedef V6 Arg6Type;
- };
- template <typename U> struct PtrToMemberTraits
- {
- enum { IsPointerToMember = 0};
+ enum { IsPointerToMember = 0}; //!< Non-pointer to member value
};
template <typename U, typename V>
- struct PtrToMemberTraits <U (V::*) (void)>
+ struct PtrToMemberTraits <U (V::*) (void)> //!< Pointer to member type traits
{
- enum { IsPointerToMember = 1};
- enum { nArgs = 0};
- typedef U ReturnType;
+ enum { IsPointerToMember = 1}; //!< Pointer to member value
+ enum { nArgs = 0}; //!< Number of arguments
+ typedef U ReturnType; //!< Return type
};
template <typename U, typename V>
- struct PtrToMemberTraits <U (V::*) (void) const>
- {
- enum { IsPointerToMember = 1};
- enum { nArgs = 0};
- typedef U ReturnType;
+ struct PtrToMemberTraits <U (V::*) (void) const>//!< Pointer to const member type traits
+ {
+ enum { IsPointerToMember = 1}; //!< Pointer to member value
+ enum { nArgs = 0}; //!< Number of arguments
+ typedef U ReturnType; //!< Return type
};
template <typename U, typename V,typename W1>
- struct PtrToMemberTraits <U (V::*) (W1)>
- {
- enum { IsPointerToMember = 1};
- enum { nArgs = 1};
- typedef U ReturnType;
- typedef W1 Arg1Type;
+ struct PtrToMemberTraits <U (V::*) (W1)> //!< Pointer to member type traits
+ {
+ enum { IsPointerToMember = 1}; //!< Pointer to member value
+ enum { nArgs = 1}; //!< Number of arguments
+ typedef U ReturnType; //!< Return type
+ typedef W1 Arg1Type; //!< First argument type
};
template <typename U, typename V,typename W1>
- struct PtrToMemberTraits <U (V::*) (W1) const>
- {
- enum { IsPointerToMember = 1};
- enum { nArgs = 1};
- typedef U ReturnType;
- typedef W1 Arg1Type;
+ struct PtrToMemberTraits <U (V::*) (W1) const> //!< Pointer to const member type traits
+ {
+ enum { IsPointerToMember = 1}; //!< Pointer to member value
+ enum { nArgs = 1}; //!< Number of arguments
+ typedef U ReturnType; //!< Return type
+ typedef W1 Arg1Type; //!< First argument type
};
template <typename U, typename V,typename W1, typename W2>
- struct PtrToMemberTraits <U (V::*) (W1,W2)>
- {
- enum { IsPointerToMember = 1};
- enum { nArgs = 2};
- typedef U ReturnType;
- typedef W1 Arg1Type;
- typedef W2 Arg2Type;
+ struct PtrToMemberTraits <U (V::*) (W1,W2)> //!< Pointer to member type traits
+ {
+ enum { IsPointerToMember = 1}; //!< Pointer to member value
+ enum { nArgs = 2}; //!< Number of arguments
+ typedef U ReturnType; //!< Return type
+ typedef W1 Arg1Type; //!< First argument type
+ typedef W2 Arg2Type; //!< Second argument type
};
template <typename U, typename V,typename W1, typename W2>
- struct PtrToMemberTraits <U (V::*) (W1,W2) const>
- {
- enum { IsPointerToMember = 1};
- enum { nArgs = 2};
- typedef U ReturnType;
- typedef W1 Arg1Type;
- typedef W2 Arg2Type;
+ struct PtrToMemberTraits <U (V::*) (W1,W2) const> //!< Pointer to const member type traits
+ {
+ enum { IsPointerToMember = 1}; //!< Pointer to member value
+ enum { nArgs = 2}; //!< Number of arguments
+ typedef U ReturnType; //!< Return type
+ typedef W1 Arg1Type; //!< First argument type
+ typedef W2 Arg2Type; //!< Second argument type
};
template <typename U, typename V,
typename W1, typename W2,
typename W3>
- struct PtrToMemberTraits <U (V::*) (W1,W2,W3)>
- {
- enum { IsPointerToMember = 1};
- enum { nArgs = 3};
- typedef U ReturnType;
- typedef W1 Arg1Type;
- typedef W2 Arg2Type;
- typedef W3 Arg3Type;
+ struct PtrToMemberTraits <U (V::*) (W1,W2,W3)> //!< Pointer to member type traits
+ {
+ enum { IsPointerToMember = 1}; //!< Pointer to member value
+ enum { nArgs = 3}; //!< Number of arguments
+ typedef U ReturnType; //!< Return type
+ typedef W1 Arg1Type; //!< First argument type
+ typedef W2 Arg2Type; //!< Second argument type
+ typedef W3 Arg3Type; //!< Third argument type
};
template <typename U, typename V,
typename W1, typename W2,
typename W3>
- struct PtrToMemberTraits <U (V::*) (W1,W2,W3) const>
- {
- enum { IsPointerToMember = 1};
- enum { nArgs = 3};
- typedef U ReturnType;
- typedef W1 Arg1Type;
- typedef W2 Arg2Type;
- typedef W3 Arg3Type;
+ struct PtrToMemberTraits <U (V::*) (W1,W2,W3) const> //!< Pointer to const member type traits
+ {
+ enum { IsPointerToMember = 1}; //!< Pointer to member value
+ enum { nArgs = 3}; //!< Number of arguments
+ typedef U ReturnType; //!< Return type
+ typedef W1 Arg1Type; //!< First argument type
+ typedef W2 Arg2Type; //!< Second argument type
+ typedef W3 Arg3Type; //!< Third argument type
};
template <typename U, typename V,
typename W1, typename W2,
typename W3, typename W4>
- struct PtrToMemberTraits <U (V::*) (W1,W2,W3,W4)>
- {
- enum { IsPointerToMember = 1};
- enum { nArgs = 4};
- typedef U ReturnType;
- typedef W1 Arg1Type;
- typedef W2 Arg2Type;
- typedef W3 Arg3Type;
- typedef W4 Arg4Type;
+ struct PtrToMemberTraits <U (V::*) (W1,W2,W3,W4)> //!< Pointer to member type traits
+ {
+ enum { IsPointerToMember = 1}; //!< Pointer to member value
+ enum { nArgs = 4}; //!< Number of arguments
+ typedef U ReturnType; //!< Return type
+ typedef W1 Arg1Type; //!< First argument type
+ typedef W2 Arg2Type; //!< Second argument type
+ typedef W3 Arg3Type; //!< Third argument type
+ typedef W4 Arg4Type; //!< Fourth argument type
};
template <typename U, typename V,
typename W1, typename W2,
typename W3, typename W4>
- struct PtrToMemberTraits <U (V::*) (W1,W2,W3,W4) const>
- {
- enum { IsPointerToMember = 1};
- enum { nArgs = 4};
- typedef U ReturnType;
- typedef W1 Arg1Type;
- typedef W2 Arg2Type;
- typedef W3 Arg3Type;
- typedef W4 Arg4Type;
+ struct PtrToMemberTraits <U (V::*) (W1,W2,W3,W4) const> //!< Pointer to const member type traits
+ {
+ enum { IsPointerToMember = 1}; //!< Pointer to member value
+ enum { nArgs = 4}; //!< Number of arguments
+ typedef U ReturnType; //!< Return type
+ typedef W1 Arg1Type; //!< First argument type
+ typedef W2 Arg2Type; //!< Second argument type
+ typedef W3 Arg3Type; //!< Third argument type
+ typedef W4 Arg4Type; //!< Fourth argument type
};
template <typename U, typename V,
typename W1, typename W2,
typename W3, typename W4,
typename W5>
- struct PtrToMemberTraits <U (V::*) (W1,W2,W3,W4,W5)>
- {
- enum { IsPointerToMember = 1};
- enum { nArgs = 5};
- typedef U ReturnType;
- typedef W1 Arg1Type;
- typedef W2 Arg2Type;
- typedef W3 Arg3Type;
- typedef W4 Arg4Type;
- typedef W5 Arg5Type;
+ struct PtrToMemberTraits <U (V::*) (W1,W2,W3,W4,W5)> //!< Pointer to member type traits
+ {
+ enum { IsPointerToMember = 1}; //!< Pointer to member value
+ enum { nArgs = 5}; //!< Number of arguments
+ typedef U ReturnType; //!< Return type
+ typedef W1 Arg1Type; //!< First argument type
+ typedef W2 Arg2Type; //!< Second argument type
+ typedef W3 Arg3Type; //!< Third argument type
+ typedef W4 Arg4Type; //!< Fourth argument type
+ typedef W5 Arg5Type; //!< Fifth argument type
};
template <typename U, typename V,
typename W1, typename W2,
typename W3, typename W4,
typename W5>
- struct PtrToMemberTraits <U (V::*) (W1,W2,W3,W4,W5) const>
- {
- enum { IsPointerToMember = 1};
- enum { nArgs = 5};
- typedef U ReturnType;
- typedef W1 Arg1Type;
- typedef W2 Arg2Type;
- typedef W3 Arg3Type;
- typedef W4 Arg4Type;
- typedef W5 Arg5Type;
+ struct PtrToMemberTraits <U (V::*) (W1,W2,W3,W4,W5) const> //!< Pointer to const member type traits
+ {
+ enum { IsPointerToMember = 1}; //!< Pointer to member value
+ enum { nArgs = 5}; //!< Number of arguments
+ typedef U ReturnType; //!< Return type
+ typedef W1 Arg1Type; //!< First argument type
+ typedef W2 Arg2Type; //!< Second argument type
+ typedef W3 Arg3Type; //!< Third argument type
+ typedef W4 Arg4Type; //!< Fourth argument type
+ typedef W5 Arg5Type; //!< Fifth argument type
};
template <typename U, typename V,
typename W1, typename W2,
typename W3, typename W4,
typename W5, typename W6>
- struct PtrToMemberTraits <U (V::*) (W1,W2,W3,W4,W5,W6)>
- {
- enum { IsPointerToMember = 1};
- enum { nArgs = 6};
- typedef U ReturnType;
- typedef W1 Arg1Type;
- typedef W2 Arg2Type;
- typedef W3 Arg3Type;
- typedef W4 Arg4Type;
- typedef W5 Arg5Type;
- typedef W6 Arg6Type;
+ struct PtrToMemberTraits <U (V::*) (W1,W2,W3,W4,W5,W6)> //!< Pointer to member type traits
+ {
+ enum { IsPointerToMember = 1}; //!< Pointer to member value
+ enum { nArgs = 6}; //!< Number of arguments
+ typedef U ReturnType; //!< Return type
+ typedef W1 Arg1Type; //!< First argument type
+ typedef W2 Arg2Type; //!< Second argument type
+ typedef W3 Arg3Type; //!< Third argument type
+ typedef W4 Arg4Type; //!< Fourth argument type
+ typedef W5 Arg5Type; //!< Fifth argument type
+ typedef W6 Arg6Type; //!< Sixth argument type
};
template <typename U, typename V,
typename W1, typename W2,
typename W3, typename W4,
typename W5, typename W6>
- struct PtrToMemberTraits <U (V::*) (W1,W2,W3,W4,W5,W6) const>
- {
- enum { IsPointerToMember = 1};
- enum { nArgs = 6};
- typedef U ReturnType;
- typedef W1 Arg1Type;
- typedef W2 Arg2Type;
- typedef W3 Arg3Type;
- typedef W4 Arg4Type;
- typedef W5 Arg5Type;
- typedef W6 Arg6Type;
+ struct PtrToMemberTraits <U (V::*) (W1,W2,W3,W4,W5,W6) const> //!< Pointer to const member type traits
+ {
+ enum { IsPointerToMember = 1}; //!< Pointer to member value
+ enum { nArgs = 6}; //!< Number of arguments
+ typedef U ReturnType; //!< Return type
+ typedef W1 Arg1Type; //!< First argument type
+ typedef W2 Arg2Type; //!< Second argument type
+ typedef W3 Arg3Type; //!< Third argument type
+ typedef W4 Arg4Type; //!< Fourth argument type
+ typedef W5 Arg5Type; //!< Fifth argument type
+ typedef W6 Arg6Type; //!< Sixth argument type
};
public:
- typedef typename UnConst<T>::Result NonConstType;
- typedef typename ReferenceTraits<T>::ReferencedType ReferencedType;
- typedef typename PointerTraits<T>::PointeeType PointeeType;
- enum { IsPointerToMember = PtrToMemberTraits<T>::IsPointerToMember};
- enum { IsPointer = PointerTraits<T>::IsPointer};
- enum { IsReference = ReferenceTraits<T>::IsReference};
- enum { IsFunctionPointer = FunctionPtrTraits<T>::IsFunctionPointer};
- typedef PtrToMemberTraits<T> PointerToMemberTraits;
- typedef FunctionPtrTraits<T> FunctionPointerTraits;
+ typedef typename UnConst<T>::Result NonConstType; //!< Non-const type
+ typedef typename ReferenceTraits<T>::ReferencedType ReferencedType; //!< Referenced type
+ typedef typename PointerTraits<T>::PointeeType PointeeType; //!< Pointee type
+ enum { IsPointerToMember = PtrToMemberTraits<T>::IsPointerToMember}; //!< Pointer to member predicate
+ enum { IsPointer = PointerTraits<T>::IsPointer}; //!< Pointer predicate
+ enum { IsReference = ReferenceTraits<T>::IsReference}; //!< Reference predicate
+ enum { IsFunctionPointer = FunctionPtrTraits<T>::IsFunctionPointer}; //!< Function pointer predicate
+ typedef PtrToMemberTraits<T> PointerToMemberTraits; //!< Pointer to member traits type
+ typedef FunctionPtrTraits<T> FunctionPointerTraits; //!< Function pointer traits
};
--- a/src/core/model/wall-clock-synchronizer.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/model/wall-clock-synchronizer.cc Wed Jul 24 13:20:24 2013 +0200
@@ -203,7 +203,7 @@
// I'm not really sure about this number -- a boss of mine once said, "pick
// a number and it'll be wrong." But this works for now.
//
-// XXX BUGBUG Hardcoded tunable parameter below.
+// \todo Hardcoded tunable parameter below.
//
if (numberJiffies > 3)
{
--- a/src/core/test/attribute-test-suite.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/test/attribute-test-suite.cc Wed Jul 24 13:20:24 2013 +0200
@@ -33,6 +33,7 @@
#include "ns3/trace-source-accessor.h"
#include "ns3/pointer.h"
#include "ns3/object-factory.h"
+#include "ns3/nstime.h"
using namespace ns3;
@@ -190,6 +191,10 @@
CallbackValue (),
MakeCallbackAccessor (&AttributeObjectTest::m_cbValue),
MakeCallbackChecker ())
+ .AddAttribute ("TestTimeWithBounds", "help text",
+ TimeValue (Seconds (-2)),
+ MakeTimeAccessor (&AttributeObjectTest::m_timeWithBounds),
+ MakeTimeChecker (Seconds (-5), Seconds (10)))
;
return tid;
@@ -243,6 +248,7 @@
TracedValue<enum Test_e> m_enumSrc;
TracedValue<double> m_doubleSrc;
TracedValue<bool> m_boolSrc;
+ Time m_timeWithBounds;
};
NS_OBJECT_ENSURE_REGISTERED (AttributeObjectTest);
@@ -643,6 +649,73 @@
NS_TEST_ASSERT_MSG_EQ (ok, true, "Error in SetAttributeFailSafe() but value changes");
}
+template <> void
+AttributeTestCase<TimeValue>::DoRun (void)
+{
+ Ptr<AttributeObjectTest> p;
+ bool ok;
+
+ p = CreateObject<AttributeObjectTest> ();
+ NS_TEST_ASSERT_MSG_NE (p, 0, "Unable to CreateObject");
+
+ //
+ // Set value
+ //
+ ok = p->SetAttributeFailSafe ("TestTimeWithBounds", TimeValue (Seconds (5)));
+ NS_TEST_ASSERT_MSG_EQ (ok, true, "Could not SetAttributeFailSafe() via TimeValue to 5s");
+
+ ok = CheckGetCodePaths (p, "TestTimeWithBounds", "+5000000000.0ns", TimeValue (Seconds (5)));
+ NS_TEST_ASSERT_MSG_EQ (ok, true, "Attribute not set properly by SetAttributeFailSafe() (5s) via TimeValue");
+
+ ok = p->SetAttributeFailSafe ("TestTimeWithBounds", StringValue ("3s"));
+ NS_TEST_ASSERT_MSG_EQ (ok, true, "Could not SetAttributeFailSafe() via TimeValue to 5s");
+
+ ok = CheckGetCodePaths (p, "TestTimeWithBounds", "+3000000000.0ns", TimeValue (Seconds (3)));
+ NS_TEST_ASSERT_MSG_EQ (ok, true, "Attribute not set properly by SetAttributeFailSafe() (3s) via StringValue");
+
+
+ //
+ // Attributes can have limits other than the intrinsic limits of the
+ // underlying data types. These limits are specified in the Object.
+ //
+
+ //
+ // Set the Attribute at the positive limit
+ //
+ ok = p->SetAttributeFailSafe ("TestTimeWithBounds", TimeValue (Seconds (10)));
+ NS_TEST_ASSERT_MSG_EQ (ok, true, "Could not SetAttributeFailSafe() via TimeValue to 10");
+
+ ok = CheckGetCodePaths (p, "TestTimeWithBounds", "+10000000000.0ns", TimeValue (Seconds (10)));
+ NS_TEST_ASSERT_MSG_EQ (ok, true, "Attribute not set properly by SetAttributeFailSafe() (positive limit) via StringValue");
+
+ //
+ // Set the Attribute past the positive limit.
+ //
+ ok = p->SetAttributeFailSafe ("TestTimeWithBounds", TimeValue (Seconds (11)));
+ NS_TEST_ASSERT_MSG_EQ (ok, false, "Unexpectedly could SetAttributeFailSafe() via TimeValue to 11");
+
+ ok = CheckGetCodePaths (p, "TestTimeWithBounds", "+10000000000.0ns", TimeValue (Seconds (10)));
+ NS_TEST_ASSERT_MSG_EQ (ok, true, "Error in SetAttributeFailSafe() but value changes");
+
+ //
+ // Set the Attribute at the negative limit.
+ //
+ ok = p->SetAttributeFailSafe ("TestTimeWithBounds", TimeValue (Seconds (-5)));
+ NS_TEST_ASSERT_MSG_EQ (ok, true, "Could not SetAttributeFailSafe() via TimeValue to -5");
+
+ ok = CheckGetCodePaths (p, "TestTimeWithBounds", "-5000000000.0ns", TimeValue (Seconds (-5)));
+ NS_TEST_ASSERT_MSG_EQ (ok, true, "Attribute not set properly by SetAttributeFailSafe() (negative limit) via StringValue");
+
+ //
+ // Set the Attribute past the negative limit.
+ //
+ ok = p->SetAttributeFailSafe ("TestTimeWithBounds", TimeValue (Seconds (-6)));
+ NS_TEST_ASSERT_MSG_EQ (ok, false, "Unexpectedly could SetAttributeFailSafe() via TimeValue to -6");
+
+ ok = CheckGetCodePaths (p, "TestTimeWithBounds", "-5000000000.0ns", TimeValue (Seconds (-5)));
+ NS_TEST_ASSERT_MSG_EQ (ok, true, "Error in SetAttributeFailSafe() but value changes");
+}
+
// ===========================================================================
// Test the Attributes of type RandomVariableStream.
// ===========================================================================
@@ -1279,14 +1352,15 @@
AddTestCase (new AttributeTestCase<UintegerValue> ("Check Attributes of type UintegerValue"), TestCase::QUICK);
AddTestCase (new AttributeTestCase<DoubleValue> ("Check Attributes of type DoubleValue"), TestCase::QUICK);
AddTestCase (new AttributeTestCase<EnumValue> ("Check Attributes of type EnumValue"), TestCase::QUICK);
+ AddTestCase (new AttributeTestCase<TimeValue> ("Check Attributes of type TimeValue"), TestCase::QUICK);
AddTestCase (new RandomVariableStreamAttributeTestCase ("Check Attributes of type RandomVariableStream"), TestCase::QUICK);
AddTestCase (new ObjectVectorAttributeTestCase ("Check Attributes of type ObjectVectorValue"), TestCase::QUICK);
AddTestCase (new ObjectMapAttributeTestCase ("Check Attributes of type ObjectMapValue"), TestCase::QUICK);
+ AddTestCase (new PointerAttributeTestCase ("Check Attributes of type PointerValue"), TestCase::QUICK);
+ AddTestCase (new CallbackValueTestCase ("Check Attributes of type CallbackValue"), TestCase::QUICK);
AddTestCase (new IntegerTraceSourceAttributeTestCase ("Ensure TracedValue<uint8_t> can be set like IntegerValue"), TestCase::QUICK);
AddTestCase (new IntegerTraceSourceTestCase ("Ensure TracedValue<uint8_t> also works as trace source"), TestCase::QUICK);
AddTestCase (new TracedCallbackTestCase ("Ensure TracedCallback<double, int, float> works as trace source"), TestCase::QUICK);
- AddTestCase (new PointerAttributeTestCase ("Check Attributes of type PointerValue"), TestCase::QUICK);
- AddTestCase (new CallbackValueTestCase ("Check Attributes of type CallbackValue"), TestCase::QUICK);
}
static AttributesTestSuite attributesTestSuite;
--- a/src/core/test/command-line-test-suite.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/test/command-line-test-suite.cc Wed Jul 24 13:20:24 2013 +0200
@@ -29,16 +29,28 @@
using namespace ns3;
-// ===========================================================================
-// A test base class that drives Command Line parsing
-// ===========================================================================
+/*************************************************************************//**
+ * A test base class that drives Command Line parsing
+ ****************************************************************************/
class CommandLineTestCaseBase : public TestCase
{
public:
+ /**
+ * Constructor
+ *
+ * \param description purpose of this TestCase
+ */
CommandLineTestCaseBase (std::string description);
+ /** Destructor */
virtual ~CommandLineTestCaseBase () {}
- void Parse (const CommandLine &cmd, int n, ...);
+ /**
+ * Excercise the CommandLine with the provided arguments
+ *
+ * \param cmd the configured CommandLine
+ * \param n the number of arguments
+ */
+ void Parse (CommandLine &cmd, int n, ...);
};
CommandLineTestCaseBase::CommandLineTestCaseBase (std::string description)
@@ -47,7 +59,7 @@
}
void
-CommandLineTestCaseBase::Parse (const CommandLine &cmd, int n, ...)
+CommandLineTestCaseBase::Parse (CommandLine &cmd, int n, ...)
{
char **args = new char* [n+1];
args[0] = (char *) "Test";
@@ -66,17 +78,17 @@
delete [] args;
}
-// ===========================================================================
-// Test boolean Command Line processing
-// ===========================================================================
+/*************************************************************************//**
+ * Test boolean Command Line processing
+ ****************************************************************************/
class CommandLineBooleanTestCase : public CommandLineTestCaseBase
{
public:
- CommandLineBooleanTestCase ();
- virtual ~CommandLineBooleanTestCase () {}
+ CommandLineBooleanTestCase (); /**< Constructor */
+ virtual ~CommandLineBooleanTestCase () {} /**< Destructor */
private:
- virtual void DoRun (void);
+ virtual void DoRun (void); /**< Run the test */
};
@@ -97,20 +109,29 @@
NS_TEST_ASSERT_MSG_EQ (myBool, false, "Command parser did not correctly set a boolean value to false");
Parse (cmd, 1, "--my-bool=1");
- NS_TEST_ASSERT_MSG_EQ (myBool, true, "Command parser did not correctly set a boolean value to true");
+ NS_TEST_ASSERT_MSG_EQ (myBool, true, "Command parser did not correctly set a boolean value to true, given integer argument");
+
+ Parse (cmd, 1, "--my-bool");
+ NS_TEST_ASSERT_MSG_EQ (myBool, true, "Command parser did not correctly set a boolean value to true, given no argument");
+
+ Parse (cmd, 1, "--my-bool=t");
+ NS_TEST_ASSERT_MSG_EQ (myBool, true, "Command parser did not correctly set a boolean value to true, given 't' argument");
+
+ Parse (cmd, 1, "--my-bool=true");
+ NS_TEST_ASSERT_MSG_EQ (myBool, true, "Command parser did not correctly set a boolean value to true, given \"true\" argument");
}
-// ===========================================================================
-// Test int Command Line processing
-// ===========================================================================
+/*************************************************************************//**
+ * Test int Command Line processing
+ ****************************************************************************/
class CommandLineIntTestCase : public CommandLineTestCaseBase
{
public:
- CommandLineIntTestCase ();
- virtual ~CommandLineIntTestCase () {}
-
-private:
- virtual void DoRun (void);
+ CommandLineIntTestCase (); /**< Constructor */
+ virtual ~CommandLineIntTestCase () {} /**< Destructor */
+
+private:
+ virtual void DoRun (void); /**< Run the test */
};
@@ -138,17 +159,17 @@
NS_TEST_ASSERT_MSG_EQ (myInt32, +2, "Command parser did not correctly set an integer value to +2");
}
-// ===========================================================================
-// Test unsigned int Command Line processing
-// ===========================================================================
+/*************************************************************************//**
+ * Test unsigned int Command Line processing
+ ****************************************************************************/
class CommandLineUnsignedIntTestCase : public CommandLineTestCaseBase
{
public:
- CommandLineUnsignedIntTestCase ();
- virtual ~CommandLineUnsignedIntTestCase () {}
-
-private:
- virtual void DoRun (void);
+ CommandLineUnsignedIntTestCase (); /**< Constructor */
+ virtual ~CommandLineUnsignedIntTestCase () {} /**< Destructor */
+
+private:
+ virtual void DoRun (void); /**< Run the test */
};
@@ -173,17 +194,17 @@
NS_TEST_ASSERT_MSG_EQ (myUint32, 9, "Command parser did not correctly set an unsigned integer value to 9");
}
-// ===========================================================================
-// Test string Command Line processing
-// ===========================================================================
+/*************************************************************************//**
+ * Test string Command Line processing
+ ****************************************************************************/
class CommandLineStringTestCase : public CommandLineTestCaseBase
{
public:
- CommandLineStringTestCase ();
- virtual ~CommandLineStringTestCase () {}
-
-private:
- virtual void DoRun (void);
+ CommandLineStringTestCase (); /**< Constructor */
+ virtual ~CommandLineStringTestCase () {} /**< Destructor */
+
+private:
+ virtual void DoRun (void); /**< Run the test */
};
@@ -208,13 +229,13 @@
NS_TEST_ASSERT_MSG_EQ (myStr, "XX", "Command parser did not correctly set an string value to \"XX\"");
}
-// ===========================================================================
-// The Test Suite that glues all of the Test Cases together.
-// ===========================================================================
+/*************************************************************************//**
+ * The Test Suite that glues all of the Test Cases together.
+ ****************************************************************************/
class CommandLineTestSuite : public TestSuite
{
public:
- CommandLineTestSuite ();
+ CommandLineTestSuite (); /**< Constructor */
};
CommandLineTestSuite::CommandLineTestSuite ()
@@ -226,4 +247,4 @@
AddTestCase (new CommandLineStringTestCase, TestCase::QUICK);
}
-static CommandLineTestSuite CommandLineTestSuite;
+static CommandLineTestSuite CommandLineTestSuite; /**< Test instance */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/test/event-garbage-collector-test-suite.cc Wed Jul 24 13:20:24 2013 +0200
@@ -0,0 +1,89 @@
+/* -*- 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 <gjc@inescporto.pt>
+ */
+
+#include "ns3/test.h"
+#include "ns3/event-garbage-collector.h"
+
+namespace ns3 {
+
+class EventGarbageCollectorTestCase : public TestCase
+{
+ int m_counter;
+ EventGarbageCollector *m_events;
+
+ void EventGarbageCollectorCallback ();
+
+public:
+
+ EventGarbageCollectorTestCase ();
+ virtual ~EventGarbageCollectorTestCase ();
+ virtual void DoRun (void);
+};
+
+EventGarbageCollectorTestCase::EventGarbageCollectorTestCase ()
+ : TestCase ("EventGarbageCollector"), m_counter (0), m_events (0)
+{
+}
+
+EventGarbageCollectorTestCase::~EventGarbageCollectorTestCase ()
+{
+}
+
+void
+EventGarbageCollectorTestCase::EventGarbageCollectorCallback ()
+{
+ m_counter++;
+ if (m_counter == 50)
+ {
+ // this should cause the remaining (50) events to be cancelled
+ delete m_events;
+ m_events = 0;
+ }
+}
+
+void EventGarbageCollectorTestCase::DoRun (void)
+{
+ m_events = new EventGarbageCollector ();
+
+ for (int n = 0; n < 100; n++)
+ {
+ m_events->Track (Simulator::Schedule
+ (Simulator::Now (),
+ &EventGarbageCollectorTestCase::EventGarbageCollectorCallback,
+ this));
+ }
+ Simulator::Run ();
+ NS_TEST_EXPECT_MSG_EQ (m_events, 0, "");
+ NS_TEST_EXPECT_MSG_EQ (m_counter, 50, "");
+ Simulator::Destroy ();
+}
+
+static class EventGarbageCollectorTestSuite : public TestSuite
+{
+public:
+ EventGarbageCollectorTestSuite ()
+ : TestSuite ("event-garbage-collector", UNIT)
+ {
+ AddTestCase (new EventGarbageCollectorTestCase (), TestCase::QUICK);
+ }
+} g_eventGarbageCollectorTests;
+
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/test/hash-test-suite.cc Wed Jul 24 13:20:24 2013 +0200
@@ -0,0 +1,389 @@
+/* -*- 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. <pdbarnes@llnl.gov>
+ */
+
+#include <iomanip>
+#include <string>
+
+#include "ns3/test.h"
+#include "ns3/hash.h"
+
+namespace ns3 {
+
+/**
+ * Base class for hash tests
+ */
+class HashTestCase : public TestCase
+{
+public:
+ HashTestCase (const std::string name);
+ virtual ~HashTestCase ();
+protected:
+ void Check ( const std::string hashName, const uint32_t hash);
+ void Check ( const std::string hashName, const uint64_t hash);
+ std::string key;
+ uint32_t hash32Reference;
+ uint64_t hash64Reference;
+private:
+ void Check ( const std::string hashName, const int bits, const uint64_t hash);
+ virtual void DoRun (void);
+}; // class HashTestCase
+
+HashTestCase::HashTestCase (const std:: string name)
+ : TestCase (name),
+ key ("The quick brown fox jumped over the lazy dogs.")
+{
+}
+
+HashTestCase::~HashTestCase ()
+{
+}
+
+void
+HashTestCase::Check ( const std::string hashName, const uint32_t hash)
+{
+ Check (hashName, 32, hash);
+}
+
+void
+HashTestCase::Check ( const std::string hashName, const uint64_t hash)
+{
+ Check (hashName, 64, hash);
+}
+
+void
+HashTestCase::Check ( std::string hashName, int bits, uint64_t hash)
+{
+ int w;
+ std::string type;
+ uint64_t hashRef;
+
+ if (bits == 32)
+ {
+ w = 8;
+ type = "Hash32";
+ hashRef = hash32Reference;
+ }
+ else
+ {
+ w = 16;
+ type = "Hash64";
+ hashRef = hash64Reference;
+ }
+
+ std::cout << GetName () << "checking "
+ << hashName << " "
+ << bits << "-bit result...";
+ NS_TEST_EXPECT_MSG_EQ (hash, hashRef,
+ hashName << " " << type
+ << " produced " << std::hex << std::setw (w) << hash
+ << ", expected " << std::hex << std::setw (w) << hashRef
+ << std::dec
+ );
+ std::cout << std::hex << std::setw (w) << hash << ", ok"
+ << std::dec << std::endl;
+}
+
+void
+HashTestCase::DoRun (void)
+{
+}
+
+
+//----------------------------
+//
+// Test default hash on fixed string
+
+class DefaultHashTestCase : public HashTestCase
+{
+public:
+ DefaultHashTestCase ();
+ virtual ~DefaultHashTestCase ();
+private:
+ virtual void DoRun (void);
+};
+
+DefaultHashTestCase::DefaultHashTestCase ()
+ : HashTestCase ("DefaultHash: ")
+{
+}
+
+DefaultHashTestCase::~DefaultHashTestCase ()
+{
+}
+
+void
+DefaultHashTestCase::DoRun (void)
+{
+ std::cout << GetName () << "checking with key: \""
+ << key << "\"" << std::endl;
+
+ hash32Reference = 0x463d70e2; // murmur3(key)
+ Check ( "default", Hash32 (key));
+
+ hash64Reference = 0xa750412079d53e04;
+ Check ( "default", Hash64 (key));
+}
+
+//----------------------------
+//
+// Test FNV hash on fixed string
+
+class Fnv1aTestCase : public HashTestCase
+{
+public:
+ Fnv1aTestCase ();
+ virtual ~Fnv1aTestCase ();
+private:
+ virtual void DoRun (void);
+};
+
+Fnv1aTestCase::Fnv1aTestCase ()
+ : HashTestCase ("Fnv1a: ")
+{
+}
+
+Fnv1aTestCase::~Fnv1aTestCase ()
+{
+}
+
+void
+Fnv1aTestCase::DoRun (void)
+{
+ Hasher hasher = Hasher ( Create<Hash::Function::Fnv1a> () );
+ hash32Reference = 0xa3fc0d6d; // Fnv1a(key)
+ Check ("FNV1a", hasher.clear ().GetHash32 (key));
+
+ hash64Reference = 0x88f6cdbe0a31098d;
+ Check ( "FNV1a", hasher.clear ().GetHash64 (key));
+}
+
+
+//----------------------------
+//
+// Test Murmur3 hash on fixed string
+
+class Murmur3TestCase : public HashTestCase
+{
+public:
+ Murmur3TestCase ();
+ virtual ~Murmur3TestCase ();
+private:
+ virtual void DoRun (void);
+};
+
+Murmur3TestCase::Murmur3TestCase ()
+ : HashTestCase ("Murmur3: ")
+{
+}
+
+Murmur3TestCase::~Murmur3TestCase ()
+{
+}
+
+void
+Murmur3TestCase::DoRun (void)
+{
+ Hasher hasher = Hasher ( Create<Hash::Function::Murmur3> () );
+ hash32Reference = 0x463d70e2; // Murmur3(key)
+ Check ( "murmur3", hasher.clear ().GetHash32 (key));
+
+ hash64Reference = 0xa750412079d53e04;
+ Check ( "murmur3", hasher.clear ().GetHash64 (key));
+}
+
+
+//----------------------------
+//
+// Test Hash32Function_ptr/Hash64Function_ptr
+//
+// Simple hash function based on the GNU sum program
+// 16-bit checksum algorithm. See
+// http://svnweb.freebsd.org/base/stable/9/usr.bin/cksum/sum1.c?view=markup
+//
+uint16_t
+gnu_sum (const char * buffer, const size_t size)
+{
+ const char * p = buffer;
+ const char * const pend = p + size;
+
+ uint16_t checksum = 0; /* The checksum mod 2^16. */
+
+ while (p != pend)
+ {
+ checksum = (checksum >> 1) + ((checksum & 1) << 15); // barrel shift
+ checksum += *p++;
+ }
+ return checksum;
+}
+
+// Hash32FunctionPtr
+uint32_t
+gnu_sum32 (const char * buffer, const size_t size)
+{
+ uint32_t h = gnu_sum (buffer, size);
+ return (uint32_t)( (h << 16) + h);
+}
+
+// Hash64FunctionPtr
+uint64_t
+gnu_sum64 (const char * buffer, const size_t size)
+{
+ uint64_t h = gnu_sum32 (buffer, size);
+ return (uint64_t)( (h << 32) + h);
+}
+
+/**
+ * Test 32-bit function pointer
+ */
+class Hash32FunctionPtrTestCase : public HashTestCase
+{
+public:
+ Hash32FunctionPtrTestCase ();
+ virtual ~Hash32FunctionPtrTestCase ();
+private:
+ virtual void DoRun (void);
+};
+
+Hash32FunctionPtrTestCase::Hash32FunctionPtrTestCase ()
+ : HashTestCase ("Hash32FunctionPtr: ")
+{
+}
+
+Hash32FunctionPtrTestCase::~Hash32FunctionPtrTestCase ()
+{
+}
+
+void
+Hash32FunctionPtrTestCase::DoRun (void)
+{
+ Hasher hasher = Hasher ( Create<Hash::Function::Hash32> (&gnu_sum32) );
+ hash32Reference = 0x41264126; // Hash32FunctionPtr(key)
+ Check ( "gnu_sum32", hasher.clear ().GetHash32 (key));
+}
+
+/**
+ * Test 64-bit function pointer
+ */
+class Hash64FunctionPtrTestCase : public HashTestCase
+{
+public:
+ Hash64FunctionPtrTestCase ();
+ virtual ~Hash64FunctionPtrTestCase ();
+private:
+ virtual void DoRun (void);
+};
+
+Hash64FunctionPtrTestCase::Hash64FunctionPtrTestCase ()
+ : HashTestCase ("Hash64FunctionPtr: ")
+{
+}
+
+Hash64FunctionPtrTestCase::~Hash64FunctionPtrTestCase ()
+{
+}
+
+void
+Hash64FunctionPtrTestCase::DoRun (void)
+{
+ Hasher hasher = Hasher ( Create<Hash::Function::Hash64> (&gnu_sum64) );
+ hash64Reference = 0x4126412641264126; // Hash64FunctionPtr(key)
+ Check ( "gnu_sum64", hasher.clear ().GetHash64 (key));
+}
+
+/**
+ * Test incremental hashing
+ */
+class IncrementalTestCase : public HashTestCase
+{
+public:
+ IncrementalTestCase ();
+ virtual ~IncrementalTestCase ();
+private:
+ virtual void DoRun (void);
+ void DoHash (const std::string name, Hasher hasher);
+ // Test strings
+ std::string key1;
+ std::string key2;
+ std::string key12;
+};
+
+IncrementalTestCase::IncrementalTestCase ()
+ : HashTestCase ("Incremental: ")
+{
+}
+
+IncrementalTestCase::~IncrementalTestCase ()
+{
+}
+
+void
+IncrementalTestCase::DoHash (const std::string name, Hasher hasher)
+{
+ hash32Reference = hasher.clear ().GetHash32 (key12);
+ hasher.clear ().GetHash32 (key1);
+ Check ( name, hasher.GetHash32 (key2));
+
+ hash64Reference = hasher.clear ().GetHash64 (key12);
+ hasher.clear ().GetHash64 (key1);
+ Check ( name, hasher.GetHash64 (key2));
+}
+
+void
+IncrementalTestCase::DoRun (void)
+{
+ key1 = "The quick brown ";
+ key2 = "Incremental.";
+ key12 = key1 + key2;
+
+ std::cout << GetName () << "checking with key: "
+ << "\"" << key1 << "\"[" << key1.size () << "] + "
+ << "\"" << key2 << "\"[" << key2.size () << "]" << std::endl;
+ std::cout << GetName () << "equivalent to: "
+ << "\"" << key12 << "\"[" << key12.size () << "]" << std::endl;
+
+ DoHash ( "default", Hasher ( ) );
+ DoHash ( "murmur3", Hasher ( Create<Hash::Function::Murmur3> () ) );
+ DoHash ( "FNV1a", Hasher ( Create<Hash::Function::Fnv1a> () ) );
+}
+
+
+/**
+ * Hash functions test suite
+ */
+class HashTestSuite : public TestSuite
+{
+public:
+ HashTestSuite ();
+};
+
+HashTestSuite::HashTestSuite ()
+ : TestSuite ("hash", UNIT)
+{
+ AddTestCase (new DefaultHashTestCase, QUICK);
+ AddTestCase (new Murmur3TestCase, QUICK);
+ AddTestCase (new Fnv1aTestCase, QUICK);
+ AddTestCase (new Hash32FunctionPtrTestCase, QUICK);
+ AddTestCase (new Hash64FunctionPtrTestCase, QUICK);
+ AddTestCase (new IncrementalTestCase, QUICK);
+}
+
+static HashTestSuite g_hashTestSuite;
+
+} // namespace ns3
--- a/src/core/test/object-test-suite.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/test/object-test-suite.cc Wed Jul 24 13:20:24 2013 +0200
@@ -29,7 +29,7 @@
{
public:
static ns3::TypeId GetTypeId (void) {
- static ns3::TypeId tid = ns3::TypeId ("BaseA")
+ static ns3::TypeId tid = ns3::TypeId ("ObjectTest:BaseA")
.SetParent (Object::GetTypeId ())
.HideFromDocumentation ()
.AddConstructor<BaseA> ();
@@ -44,7 +44,7 @@
{
public:
static ns3::TypeId GetTypeId (void) {
- static ns3::TypeId tid = ns3::TypeId ("DerivedA")
+ static ns3::TypeId tid = ns3::TypeId ("ObjectTest:DerivedA")
.SetParent (BaseA::GetTypeId ())
.HideFromDocumentation ()
.AddConstructor<DerivedA> ();
@@ -61,7 +61,7 @@
{
public:
static ns3::TypeId GetTypeId (void) {
- static ns3::TypeId tid = ns3::TypeId ("BaseB")
+ static ns3::TypeId tid = ns3::TypeId ("ObjectTest:BaseB")
.SetParent (Object::GetTypeId ())
.HideFromDocumentation ()
.AddConstructor<BaseB> ();
@@ -76,7 +76,7 @@
{
public:
static ns3::TypeId GetTypeId (void) {
- static ns3::TypeId tid = ns3::TypeId ("DerivedB")
+ static ns3::TypeId tid = ns3::TypeId ("ObjectTest:DerivedB")
.SetParent (BaseB::GetTypeId ())
.HideFromDocumentation ()
.AddConstructor<DerivedB> ();
--- a/src/core/test/ptr-test-suite.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/test/ptr-test-suite.cc Wed Jul 24 13:20:24 2013 +0200
@@ -125,7 +125,7 @@
{
Ptr<NoCount> p = Create<NoCount> (this);
}
- NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 1, "XXX");
+ NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 1, "001");
m_nDestroyed = 0;
{
@@ -133,7 +133,7 @@
p = Create<NoCount> (this);
p = p;
}
- NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 1, "XXX");
+ NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 1, "002");
m_nDestroyed = 0;
{
@@ -141,7 +141,7 @@
p1 = Create<NoCount> (this);
Ptr<NoCount> p2 = p1;
}
- NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 1, "XXX");
+ NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 1, "003");
m_nDestroyed = 0;
{
@@ -150,7 +150,7 @@
Ptr<NoCount> p2;
p2 = p1;
}
- NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 1, "XXX");
+ NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 1, "004");
m_nDestroyed = 0;
{
@@ -159,7 +159,7 @@
Ptr<NoCount> p2 = Create<NoCount> (this);
p2 = p1;
}
- NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 2, "XXX");
+ NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 2, "005");
m_nDestroyed = 0;
{
@@ -169,7 +169,7 @@
p2 = Create<NoCount> (this);
p2 = p1;
}
- NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 2, "XXX");
+ NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 2, "006");
m_nDestroyed = 0;
{
@@ -177,7 +177,7 @@
p1 = Create<NoCount> (this);
p1 = Create<NoCount> (this);
}
- NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 2, "XXX");
+ NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 2, "007");
m_nDestroyed = 0;
{
@@ -188,9 +188,9 @@
p2 = Create<NoCount> (this);
p2 = p1;
}
- NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 1, "XXX");
+ NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 1, "008");
}
- NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 2, "XXX");
+ NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 2, "009");
m_nDestroyed = 0;
{
@@ -201,9 +201,9 @@
p2 = Create<NoCount> (this);
p2 = CallTest (p1);
}
- NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 1, "XXX");
+ NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 1, "010");
}
- NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 2, "XXX");
+ NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 2, "011");
{
Ptr<NoCount> p1;
@@ -241,7 +241,7 @@
raw = GetPointer (p);
p = 0;
}
- NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 0, "XXX");
+ NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 0, "012");
delete raw;
}
@@ -253,7 +253,7 @@
v1->Nothing ();
v2->Nothing ();
}
- NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 1, "XXX");
+ NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 1, "013");
{
Ptr<Base> p0 = Create<NoCount> (this);
--- a/src/core/test/random-variable-stream-test-suite.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/test/random-variable-stream-test-suite.cc Wed Jul 24 13:20:24 2013 +0200
@@ -1597,10 +1597,10 @@
// Test that values have approximately the right mean value.
//
- // XXX This test fails sometimes if the required tolerance is less
- // than 3%, which may be because there is a bug in the
- // implementation or that the mean of this distribution is more
- // senstive to its parameters than the others are.
+ /// \todo This test fails sometimes if the required tolerance is less
+ /// than 3%, which may be because there is a bug in the
+ /// implementation or that the mean of this distribution is more
+ /// senstive to its parameters than the others are.
double TOLERANCE = expectedMean * 3e-2;
NS_TEST_ASSERT_MSG_EQ_TOL (valueMean, expectedMean, TOLERANCE, "Wrong mean value.");
}
@@ -1740,10 +1740,10 @@
// Test that values have approximately the right mean value.
//
- // XXX This test fails sometimes if the required tolerance is less
- // than 3%, which may be because there is a bug in the
- // implementation or that the mean of this distribution is more
- // senstive to its parameters than the others are.
+ /// \todo This test fails sometimes if the required tolerance is less
+ /// than 3%, which may be because there is a bug in the
+ /// implementation or that the mean of this distribution is more
+ /// senstive to its parameters than the others are.
double TOLERANCE = expectedMean * 3e-2;
NS_TEST_ASSERT_MSG_EQ_TOL (valueMean, expectedMean, TOLERANCE, "Wrong mean value.");
}
@@ -2798,16 +2798,16 @@
AddTestCase (new RandomVariableStreamWeibullTestCase, TestCase::QUICK);
AddTestCase (new RandomVariableStreamWeibullAntitheticTestCase, TestCase::QUICK);
AddTestCase (new RandomVariableStreamLogNormalTestCase, TestCase::QUICK);
- // XXX This test is currently disabled because it fails sometimes.
- // A possible reason for the failure is that the antithetic code is
- // not implemented properly for this log-normal case.
+ /// \todo This test is currently disabled because it fails sometimes.
+ /// A possible reason for the failure is that the antithetic code is
+ /// not implemented properly for this log-normal case.
/*
AddTestCase (new RandomVariableStreamLogNormalAntitheticTestCase, TestCase::QUICK);
*/
AddTestCase (new RandomVariableStreamGammaTestCase, TestCase::QUICK);
- // XXX This test is currently disabled because it fails sometimes.
- // A possible reason for the failure is that the antithetic code is
- // not implemented properly for this gamma case.
+ /// \todo This test is currently disabled because it fails sometimes.
+ /// A possible reason for the failure is that the antithetic code is
+ /// not implemented properly for this gamma case.
/*
AddTestCase (new RandomVariableStreamGammaAntitheticTestCase, TestCase::QUICK);
*/
--- a/src/core/wscript Wed Jul 24 13:19:54 2013 +0200
+++ b/src/core/wscript Wed Jul 24 13:20:24 2013 +0200
@@ -147,6 +147,12 @@
'model/vector.cc',
'model/fatal-impl.cc',
'model/system-path.cc',
+ 'helper/random-variable-stream-helper.cc',
+ 'helper/event-garbage-collector.cc',
+ 'model/hash-function.cc',
+ 'model/hash-murmur3.cc',
+ 'model/hash-fnv.cc',
+ 'model/hash.cc',
]
core_test = bld.create_ns3_module_test_library('core')
@@ -161,6 +167,7 @@
'test/object-test-suite.cc',
'test/ptr-test-suite.cc',
'test/random-variable-test-suite.cc',
+ 'test/event-garbage-collector-test-suite.cc',
'test/many-uniform-random-variables-one-get-value-call-test-suite.cc',
'test/one-uniform-random-variable-many-get-value-calls-test-suite.cc',
'test/sample-test-suite.cc',
@@ -170,6 +177,7 @@
'test/traced-callback-test-suite.cc',
'test/type-traits-test-suite.cc',
'test/watchdog-test-suite.cc',
+ 'test/hash-test-suite.cc',
]
headers = bld(features='ns3header')
@@ -246,6 +254,12 @@
'model/system-path.h',
'model/unused.h',
'model/math.h',
+ 'helper/event-garbage-collector.h',
+ 'helper/random-variable-stream-helper.h',
+ 'model/hash-function.h',
+ 'model/hash-murmur3.h',
+ 'model/hash-fnv.h',
+ 'model/hash.h',
]
if sys.platform == 'win32':
--- a/src/csma-layout/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/csma-layout/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -156,6 +156,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')
## pcap-file.h (module 'network'): ns3::PcapFile [class]
module.add_class('PcapFile', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
@@ -350,8 +352,6 @@
module.add_class('OutputStreamWrapper', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >'])
## 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<ns3::Packet> >'])
- ## 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]
@@ -509,7 +509,6 @@
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'])
@@ -2652,6 +2651,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):
@@ -4946,6 +4949,16 @@
'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',
@@ -7074,6 +7087,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',
@@ -7085,13 +7102,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([])
--- a/src/csma-layout/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/csma-layout/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -156,6 +156,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')
## pcap-file.h (module 'network'): ns3::PcapFile [class]
module.add_class('PcapFile', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
@@ -350,8 +352,6 @@
module.add_class('OutputStreamWrapper', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >'])
## 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<ns3::Packet> >'])
- ## 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]
@@ -509,7 +509,6 @@
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'])
@@ -2652,6 +2651,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):
@@ -4946,6 +4949,16 @@
'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',
@@ -7074,6 +7087,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',
@@ -7085,13 +7102,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([])
--- a/src/csma/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/csma/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -100,6 +100,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')
## pcap-file.h (module 'network'): ns3::PcapFile [class]
module.add_class('PcapFile', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
@@ -274,8 +276,6 @@
module.add_enum('ErrorUnit', ['ERROR_UNIT_BIT', 'ERROR_UNIT_BYTE', 'ERROR_UNIT_PACKET'], outer_class=root_module['ns3::RateErrorModel'], import_from_module='ns.network')
## error-model.h (module 'network'): ns3::ReceiveListErrorModel [class]
module.add_class('ReceiveListErrorModel', import_from_module='ns.network', parent=root_module['ns3::ErrorModel'])
- ## 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]
@@ -419,7 +419,6 @@
register_Ns3ParetoRandomVariable_methods(root_module, root_module['ns3::ParetoRandomVariable'])
register_Ns3RateErrorModel_methods(root_module, root_module['ns3::RateErrorModel'])
register_Ns3ReceiveListErrorModel_methods(root_module, root_module['ns3::ReceiveListErrorModel'])
- 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'])
@@ -2017,6 +2016,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):
@@ -3340,6 +3343,16 @@
'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',
@@ -4997,6 +5010,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',
@@ -5145,13 +5162,6 @@
visibility='private', 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([])
--- a/src/csma/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/csma/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -100,6 +100,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')
## pcap-file.h (module 'network'): ns3::PcapFile [class]
module.add_class('PcapFile', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
@@ -274,8 +276,6 @@
module.add_enum('ErrorUnit', ['ERROR_UNIT_BIT', 'ERROR_UNIT_BYTE', 'ERROR_UNIT_PACKET'], outer_class=root_module['ns3::RateErrorModel'], import_from_module='ns.network')
## error-model.h (module 'network'): ns3::ReceiveListErrorModel [class]
module.add_class('ReceiveListErrorModel', import_from_module='ns.network', parent=root_module['ns3::ErrorModel'])
- ## 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]
@@ -419,7 +419,6 @@
register_Ns3ParetoRandomVariable_methods(root_module, root_module['ns3::ParetoRandomVariable'])
register_Ns3RateErrorModel_methods(root_module, root_module['ns3::RateErrorModel'])
register_Ns3ReceiveListErrorModel_methods(root_module, root_module['ns3::ReceiveListErrorModel'])
- 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'])
@@ -2017,6 +2016,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):
@@ -3340,6 +3343,16 @@
'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',
@@ -4997,6 +5010,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',
@@ -5145,13 +5162,6 @@
visibility='private', 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([])
--- a/src/dsdv/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/dsdv/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -130,6 +130,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<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [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]
@@ -328,8 +330,6 @@
module.add_class('Packet', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >'])
## 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]
@@ -503,7 +503,6 @@
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'])
@@ -2073,6 +2072,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):
@@ -4023,6 +4026,16 @@
'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',
@@ -6234,6 +6247,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',
@@ -6288,13 +6305,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([])
--- a/src/dsdv/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/dsdv/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -130,6 +130,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<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [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]
@@ -328,8 +330,6 @@
module.add_class('Packet', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >'])
## 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]
@@ -503,7 +503,6 @@
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'])
@@ -2073,6 +2072,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):
@@ -4023,6 +4026,16 @@
'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',
@@ -6234,6 +6247,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',
@@ -6288,13 +6305,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([])
--- a/src/dsdv/model/dsdv-routing-protocol.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/dsdv/model/dsdv-routing-protocol.cc Wed Jul 24 13:20:24 2013 +0200
@@ -691,7 +691,7 @@
/*Received update with same seq number but with same or greater hop count.
* Discard that update.
*/
- if (not m_advRoutingTable.AnyRunningEvent (dsdvHeader.GetDst ()))
+ if (!m_advRoutingTable.AnyRunningEvent (dsdvHeader.GetDst ()))
{
/*update the timer only if nexthop address matches thus discarding
* updates to that destination from other nodes.
@@ -711,7 +711,7 @@
else
{
// Received update with an old sequence number. Discard the update
- if (not m_advRoutingTable.AnyRunningEvent (dsdvHeader.GetDst ()))
+ if (!m_advRoutingTable.AnyRunningEvent (dsdvHeader.GetDst ()))
{
m_advRoutingTable.DeleteRoute (dsdvHeader.GetDst ());
}
@@ -743,7 +743,7 @@
}
else
{
- if (not m_advRoutingTable.AnyRunningEvent (dsdvHeader.GetDst ()))
+ if (!m_advRoutingTable.AnyRunningEvent (dsdvHeader.GetDst ()))
{
m_advRoutingTable.DeleteRoute (dsdvHeader.GetDst ());
}
@@ -786,7 +786,7 @@
<< " SeqNo:" << i->second.GetSeqNo () << " HopCount:"
<< i->second.GetHop () + 1);
RoutingTableEntry temp = i->second;
- if ((i->second.GetEntriesChanged () == true) && (not m_advRoutingTable.AnyRunningEvent (temp.GetDestination ())))
+ if ((i->second.GetEntriesChanged () == true) && (!m_advRoutingTable.AnyRunningEvent (temp.GetDestination ())))
{
dsdvHeader.SetDst (i->second.GetDestination ());
dsdvHeader.SetDstSeqno (i->second.GetSeqNo ());
@@ -1189,7 +1189,7 @@
for (std::map<Ipv4Address, RoutingTableEntry>::const_iterator i = allRoutes.begin (); i != allRoutes.end (); ++i)
{
RoutingTableEntry advEntry = i->second;
- if ((advEntry.GetEntriesChanged () == true) && (not m_advRoutingTable.AnyRunningEvent (advEntry.GetDestination ())))
+ if ((advEntry.GetEntriesChanged () == true) && (!m_advRoutingTable.AnyRunningEvent (advEntry.GetDestination ())))
{
if (!(advEntry.GetSeqNo () % 2))
{
--- a/src/dsdv/model/dsdv-rtable.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/dsdv/model/dsdv-rtable.cc Wed Jul 24 13:20:24 2013 +0200
@@ -39,9 +39,9 @@
namespace dsdv {
RoutingTableEntry::RoutingTableEntry (Ptr<NetDevice> dev,
Ipv4Address dst,
- u_int32_t seqNo,
+ uint32_t seqNo,
Ipv4InterfaceAddress iface,
- u_int32_t hops,
+ uint32_t hops,
Ipv4Address nextHop,
Time lifetime,
Time SettlingTime,
@@ -233,7 +233,7 @@
++i;
m_ipv4AddressEntry.erase (itmp);
}
- // TODO: Need to decide when to invalidate a route
+ /** \todo Need to decide when to invalidate a route */
/* else if (i->second.GetLifeTime() > m_holddownTime)
{
++i;
--- a/src/dsdv/model/dsdv-rtable.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/dsdv/model/dsdv-rtable.h Wed Jul 24 13:20:24 2013 +0200
@@ -57,8 +57,8 @@
{
public:
/// c-tor
- RoutingTableEntry (Ptr<NetDevice> dev = 0, Ipv4Address dst = Ipv4Address (), u_int32_t m_seqNo = 0,
- Ipv4InterfaceAddress iface = Ipv4InterfaceAddress (), u_int32_t hops = 0, Ipv4Address nextHop = Ipv4Address (),
+ RoutingTableEntry (Ptr<NetDevice> dev = 0, Ipv4Address dst = Ipv4Address (), uint32_t m_seqNo = 0,
+ Ipv4InterfaceAddress iface = Ipv4InterfaceAddress (), uint32_t hops = 0, Ipv4Address nextHop = Ipv4Address (),
Time lifetime = Simulator::Now (), Time SettlingTime = Simulator::Now (), bool changedEntries = false);
~RoutingTableEntry ();
--- a/src/dsdv/test/dsdv-testcase.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/dsdv/test/dsdv-testcase.cc Wed Jul 24 13:20:24 2013 +0200
@@ -78,22 +78,22 @@
hdr2.SetDstSeqno (4);
hdr2.SetHopCount (1);
packet->AddHeader (hdr2);
- NS_TEST_ASSERT_MSG_EQ (packet->GetSize (), 24, "XXX");
+ NS_TEST_ASSERT_MSG_EQ (packet->GetSize (), 24, "001");
}
{
dsdv::DsdvHeader hdr2;
packet->RemoveHeader (hdr2);
- NS_TEST_ASSERT_MSG_EQ (hdr2.GetSerializedSize (),12,"XXX");
- NS_TEST_ASSERT_MSG_EQ (hdr2.GetDst (),Ipv4Address ("10.1.1.3"),"XXX");
- NS_TEST_ASSERT_MSG_EQ (hdr2.GetDstSeqno (),4,"XXX");
- NS_TEST_ASSERT_MSG_EQ (hdr2.GetHopCount (),1,"XXX");
+ NS_TEST_ASSERT_MSG_EQ (hdr2.GetSerializedSize (),12,"002");
+ NS_TEST_ASSERT_MSG_EQ (hdr2.GetDst (),Ipv4Address ("10.1.1.3"),"003");
+ NS_TEST_ASSERT_MSG_EQ (hdr2.GetDstSeqno (),4,"004");
+ NS_TEST_ASSERT_MSG_EQ (hdr2.GetHopCount (),1,"005");
dsdv::DsdvHeader hdr1;
packet->RemoveHeader (hdr1);
- NS_TEST_ASSERT_MSG_EQ (hdr1.GetSerializedSize (),12,"XXX");
- NS_TEST_ASSERT_MSG_EQ (hdr1.GetDst (),Ipv4Address ("10.1.1.2"),"XXX");
- NS_TEST_ASSERT_MSG_EQ (hdr1.GetDstSeqno (),2,"XXX");
- NS_TEST_ASSERT_MSG_EQ (hdr1.GetHopCount (),2,"XXX");
+ NS_TEST_ASSERT_MSG_EQ (hdr1.GetSerializedSize (),12,"006");
+ NS_TEST_ASSERT_MSG_EQ (hdr1.GetDst (),Ipv4Address ("10.1.1.2"),"008");
+ NS_TEST_ASSERT_MSG_EQ (hdr1.GetDstSeqno (),2,"009");
+ NS_TEST_ASSERT_MSG_EQ (hdr1.GetHopCount (),2,"010");
}
}
@@ -156,28 +156,28 @@
dsdv::RoutingTableEntry rEntry;
if (rtable.LookupRoute (Ipv4Address ("10.1.1.4"), rEntry))
{
- NS_TEST_ASSERT_MSG_EQ (rEntry.GetDestination (),Ipv4Address ("10.1.1.4"),"XXX");
- NS_TEST_ASSERT_MSG_EQ (rEntry.GetSeqNo (),2,"XXX");
- NS_TEST_ASSERT_MSG_EQ (rEntry.GetHop (),2,"XXX");
+ NS_TEST_ASSERT_MSG_EQ (rEntry.GetDestination (),Ipv4Address ("10.1.1.4"),"100");
+ NS_TEST_ASSERT_MSG_EQ (rEntry.GetSeqNo (),2,"101");
+ NS_TEST_ASSERT_MSG_EQ (rEntry.GetHop (),2,"102");
}
if (rtable.LookupRoute (Ipv4Address ("10.1.1.2"), rEntry))
{
- NS_TEST_ASSERT_MSG_EQ (rEntry.GetDestination (),Ipv4Address ("10.1.1.2"),"XXX");
- NS_TEST_ASSERT_MSG_EQ (rEntry.GetSeqNo (),4,"XXX");
- NS_TEST_ASSERT_MSG_EQ (rEntry.GetHop (),1,"XXX");
+ NS_TEST_ASSERT_MSG_EQ (rEntry.GetDestination (),Ipv4Address ("10.1.1.2"),"103");
+ NS_TEST_ASSERT_MSG_EQ (rEntry.GetSeqNo (),4,"104");
+ NS_TEST_ASSERT_MSG_EQ (rEntry.GetHop (),1,"105");
}
if (rtable.LookupRoute (Ipv4Address ("10.1.1.3"), rEntry))
{
- NS_TEST_ASSERT_MSG_EQ (rEntry.GetDestination (),Ipv4Address ("10.1.1.3"),"XXX");
- NS_TEST_ASSERT_MSG_EQ (rEntry.GetSeqNo (),4,"XXX");
- NS_TEST_ASSERT_MSG_EQ (rEntry.GetHop (),1,"XXX");
+ NS_TEST_ASSERT_MSG_EQ (rEntry.GetDestination (),Ipv4Address ("10.1.1.3"),"106");
+ NS_TEST_ASSERT_MSG_EQ (rEntry.GetSeqNo (),4,"107");
+ NS_TEST_ASSERT_MSG_EQ (rEntry.GetHop (),1,"108");
}
if (rtable.LookupRoute (Ipv4Address ("10.1.1.255"), rEntry))
{
- NS_TEST_ASSERT_MSG_EQ (rEntry.GetDestination (),Ipv4Address ("10.1.1.255"),"XXX");
+ NS_TEST_ASSERT_MSG_EQ (rEntry.GetDestination (),Ipv4Address ("10.1.1.255"),"109");
}
- NS_TEST_ASSERT_MSG_EQ (rEntry.GetInterface ().GetLocal (),Ipv4Address ("10.1.1.1"),"XXX");
- NS_TEST_ASSERT_MSG_EQ (rEntry.GetInterface ().GetBroadcast (),Ipv4Address ("10.1.1.255"),"XXX");
+ NS_TEST_ASSERT_MSG_EQ (rEntry.GetInterface ().GetLocal (),Ipv4Address ("10.1.1.1"),"110");
+ NS_TEST_ASSERT_MSG_EQ (rEntry.GetInterface ().GetBroadcast (),Ipv4Address ("10.1.1.255"),"111");
NS_TEST_ASSERT_MSG_EQ (rtable.RoutingTableSize (),4,"Rtable size incorrect");
}
Simulator::Destroy ();
--- a/src/dsr/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/dsr/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -60,8 +60,8 @@
module.add_class('DsrHelper')
## dsr-main-helper.h (module 'dsr'): ns3::DsrMainHelper [class]
module.add_class('DsrMainHelper')
- ## event-garbage-collector.h (module 'tools'): ns3::EventGarbageCollector [class]
- module.add_class('EventGarbageCollector', import_from_module='ns.tools')
+ ## event-garbage-collector.h (module 'core'): ns3::EventGarbageCollector [class]
+ module.add_class('EventGarbageCollector', import_from_module='ns.core')
## event-id.h (module 'core'): ns3::EventId [class]
module.add_class('EventId', import_from_module='ns.core')
## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress [class]
@@ -150,6 +150,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<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [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]
@@ -414,8 +416,6 @@
module.add_class('SsidValue', import_from_module='ns.wifi', parent=root_module['ns3::AttributeValue'])
## tcp-l4-protocol.h (module 'internet'): ns3::TcpL4Protocol [class]
module.add_class('TcpL4Protocol', import_from_module='ns.internet', parent=root_module['ns3::IpL4Protocol'])
- ## 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]
@@ -750,7 +750,6 @@
register_Ns3SsidChecker_methods(root_module, root_module['ns3::SsidChecker'])
register_Ns3SsidValue_methods(root_module, root_module['ns3::SsidValue'])
register_Ns3TcpL4Protocol_methods(root_module, root_module['ns3::TcpL4Protocol'])
- 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'])
@@ -1328,11 +1327,11 @@
return
def register_Ns3EventGarbageCollector_methods(root_module, cls):
- ## event-garbage-collector.h (module 'tools'): ns3::EventGarbageCollector::EventGarbageCollector(ns3::EventGarbageCollector const & arg0) [copy constructor]
+ ## 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 'tools'): ns3::EventGarbageCollector::EventGarbageCollector() [constructor]
- cls.add_constructor([])
- ## event-garbage-collector.h (module 'tools'): void ns3::EventGarbageCollector::Track(ns3::EventId event) [member function]
+ ## 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')])
@@ -2451,6 +2450,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):
@@ -4820,6 +4823,16 @@
'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',
@@ -8641,6 +8654,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',
@@ -8917,13 +8934,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([])
@@ -10009,10 +10019,6 @@
'void',
[param('std::ostream &', 'os')],
is_const=True, is_virtual=True)
- ## dsr-option-header.h (module 'dsr'): ns3::Ipv4Address ns3::dsr::DsrOptionRrepHeader::SearchNextHop(ns3::Ipv4Address ipv4Address) [member function]
- cls.add_method('SearchNextHop',
- 'ns3::Ipv4Address',
- [param('ns3::Ipv4Address', 'ipv4Address')])
## dsr-option-header.h (module 'dsr'): void ns3::dsr::DsrOptionRrepHeader::Serialize(ns3::Buffer::Iterator start) const [member function]
cls.add_method('Serialize',
'void',
@@ -10051,11 +10057,6 @@
'ns3::dsr::DsrOptionHeader::Alignment',
[],
is_const=True, is_virtual=True)
- ## dsr-option-header.h (module 'dsr'): uint32_t ns3::dsr::DsrOptionRreqHeader::GetDataLength() const [member function]
- cls.add_method('GetDataLength',
- 'uint32_t',
- [],
- is_const=True)
## dsr-option-header.h (module 'dsr'): uint16_t ns3::dsr::DsrOptionRreqHeader::GetId() const [member function]
cls.add_method('GetId',
'uint16_t',
@@ -10105,10 +10106,6 @@
'void',
[param('ns3::Buffer::Iterator', 'start')],
is_const=True, is_virtual=True)
- ## dsr-option-header.h (module 'dsr'): void ns3::dsr::DsrOptionRreqHeader::SetDataLength(uint32_t dataLength) [member function]
- cls.add_method('SetDataLength',
- 'void',
- [param('uint32_t', 'dataLength')])
## dsr-option-header.h (module 'dsr'): void ns3::dsr::DsrOptionRreqHeader::SetId(uint16_t identification) [member function]
cls.add_method('SetId',
'void',
@@ -10394,11 +10391,6 @@
cls.add_method('GetElementsFromContext',
'std::vector< std::string >',
[param('std::string', 'context')])
- ## dsr-routing.h (module 'dsr'): uint8_t ns3::dsr::DsrRouting::GetExtensionNumber() const [member function]
- cls.add_method('GetExtensionNumber',
- 'uint8_t',
- [],
- is_const=True)
## dsr-routing.h (module 'dsr'): uint16_t ns3::dsr::DsrRouting::GetIDfromIP(ns3::Ipv4Address address) [member function]
cls.add_method('GetIDfromIP',
'uint16_t',
@@ -10603,10 +10595,6 @@
cls.add_method('SendRequest',
'void',
[param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Ipv4Address', 'source')])
- ## dsr-routing.h (module 'dsr'): void ns3::dsr::DsrRouting::SendRequestAndIncrement(ns3::Ptr<ns3::Packet> packet, ns3::Ipv4Address source, ns3::Ipv4Address destination) [member function]
- cls.add_method('SendRequestAndIncrement',
- 'void',
- [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'destination')])
## dsr-routing.h (module 'dsr'): void ns3::dsr::DsrRouting::SendUnreachError(ns3::Ipv4Address errorHop, ns3::Ipv4Address destination, ns3::Ipv4Address originalDst, uint8_t salvage, uint8_t protocol) [member function]
cls.add_method('SendUnreachError',
'void',
@@ -11334,10 +11322,6 @@
cls.add_method('DeleteRoute',
'bool',
[param('ns3::Ipv4Address', 'dst')])
- ## dsr-rcache.h (module 'dsr'): void ns3::dsr::RouteCache::DropPathWithDst(ns3::Ipv4Address dst) [member function]
- cls.add_method('DropPathWithDst',
- 'void',
- [param('ns3::Ipv4Address', 'dst')])
## dsr-rcache.h (module 'dsr'): bool ns3::dsr::RouteCache::FindSameRoute(ns3::dsr::RouteCacheEntry & rt, std::list<ns3::dsr::RouteCacheEntry, std::allocator<ns3::dsr::RouteCacheEntry> > & rtVector) [member function]
cls.add_method('FindSameRoute',
'bool',
@@ -11361,11 +11345,6 @@
'ns3::Callback< void, ns3::Ipv4Address, unsigned char, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >',
[],
is_const=True)
- ## dsr-rcache.h (module 'dsr'): ns3::Ipv4Address ns3::dsr::RouteCache::GetDestination() const [member function]
- cls.add_method('GetDestination',
- 'ns3::Ipv4Address',
- [],
- is_const=True)
## dsr-rcache.h (module 'dsr'): ns3::Time ns3::dsr::RouteCache::GetExpireTime(ns3::Ipv4Address addr) [member function]
cls.add_method('GetExpireTime',
'ns3::Time',
@@ -11420,10 +11399,6 @@
'ns3::Time',
[],
is_const=True)
- ## dsr-rcache.h (module 'dsr'): bool ns3::dsr::RouteCache::IsEqual(ns3::dsr::RouteCacheEntry ca) [member function]
- cls.add_method('IsEqual',
- 'bool',
- [param('ns3::dsr::RouteCacheEntry', 'ca')])
## dsr-rcache.h (module 'dsr'): bool ns3::dsr::RouteCache::IsLinkCache() [member function]
cls.add_method('IsLinkCache',
'bool',
--- a/src/dsr/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/dsr/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -60,8 +60,8 @@
module.add_class('DsrHelper')
## dsr-main-helper.h (module 'dsr'): ns3::DsrMainHelper [class]
module.add_class('DsrMainHelper')
- ## event-garbage-collector.h (module 'tools'): ns3::EventGarbageCollector [class]
- module.add_class('EventGarbageCollector', import_from_module='ns.tools')
+ ## event-garbage-collector.h (module 'core'): ns3::EventGarbageCollector [class]
+ module.add_class('EventGarbageCollector', import_from_module='ns.core')
## event-id.h (module 'core'): ns3::EventId [class]
module.add_class('EventId', import_from_module='ns.core')
## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress [class]
@@ -150,6 +150,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<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [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]
@@ -414,8 +416,6 @@
module.add_class('SsidValue', import_from_module='ns.wifi', parent=root_module['ns3::AttributeValue'])
## tcp-l4-protocol.h (module 'internet'): ns3::TcpL4Protocol [class]
module.add_class('TcpL4Protocol', import_from_module='ns.internet', parent=root_module['ns3::IpL4Protocol'])
- ## 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]
@@ -750,7 +750,6 @@
register_Ns3SsidChecker_methods(root_module, root_module['ns3::SsidChecker'])
register_Ns3SsidValue_methods(root_module, root_module['ns3::SsidValue'])
register_Ns3TcpL4Protocol_methods(root_module, root_module['ns3::TcpL4Protocol'])
- 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'])
@@ -1328,11 +1327,11 @@
return
def register_Ns3EventGarbageCollector_methods(root_module, cls):
- ## event-garbage-collector.h (module 'tools'): ns3::EventGarbageCollector::EventGarbageCollector(ns3::EventGarbageCollector const & arg0) [copy constructor]
+ ## 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 'tools'): ns3::EventGarbageCollector::EventGarbageCollector() [constructor]
- cls.add_constructor([])
- ## event-garbage-collector.h (module 'tools'): void ns3::EventGarbageCollector::Track(ns3::EventId event) [member function]
+ ## 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')])
@@ -2451,6 +2450,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):
@@ -4820,6 +4823,16 @@
'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',
@@ -8641,6 +8654,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',
@@ -8917,13 +8934,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([])
@@ -10009,10 +10019,6 @@
'void',
[param('std::ostream &', 'os')],
is_const=True, is_virtual=True)
- ## dsr-option-header.h (module 'dsr'): ns3::Ipv4Address ns3::dsr::DsrOptionRrepHeader::SearchNextHop(ns3::Ipv4Address ipv4Address) [member function]
- cls.add_method('SearchNextHop',
- 'ns3::Ipv4Address',
- [param('ns3::Ipv4Address', 'ipv4Address')])
## dsr-option-header.h (module 'dsr'): void ns3::dsr::DsrOptionRrepHeader::Serialize(ns3::Buffer::Iterator start) const [member function]
cls.add_method('Serialize',
'void',
@@ -10051,11 +10057,6 @@
'ns3::dsr::DsrOptionHeader::Alignment',
[],
is_const=True, is_virtual=True)
- ## dsr-option-header.h (module 'dsr'): uint32_t ns3::dsr::DsrOptionRreqHeader::GetDataLength() const [member function]
- cls.add_method('GetDataLength',
- 'uint32_t',
- [],
- is_const=True)
## dsr-option-header.h (module 'dsr'): uint16_t ns3::dsr::DsrOptionRreqHeader::GetId() const [member function]
cls.add_method('GetId',
'uint16_t',
@@ -10105,10 +10106,6 @@
'void',
[param('ns3::Buffer::Iterator', 'start')],
is_const=True, is_virtual=True)
- ## dsr-option-header.h (module 'dsr'): void ns3::dsr::DsrOptionRreqHeader::SetDataLength(uint32_t dataLength) [member function]
- cls.add_method('SetDataLength',
- 'void',
- [param('uint32_t', 'dataLength')])
## dsr-option-header.h (module 'dsr'): void ns3::dsr::DsrOptionRreqHeader::SetId(uint16_t identification) [member function]
cls.add_method('SetId',
'void',
@@ -10394,11 +10391,6 @@
cls.add_method('GetElementsFromContext',
'std::vector< std::string >',
[param('std::string', 'context')])
- ## dsr-routing.h (module 'dsr'): uint8_t ns3::dsr::DsrRouting::GetExtensionNumber() const [member function]
- cls.add_method('GetExtensionNumber',
- 'uint8_t',
- [],
- is_const=True)
## dsr-routing.h (module 'dsr'): uint16_t ns3::dsr::DsrRouting::GetIDfromIP(ns3::Ipv4Address address) [member function]
cls.add_method('GetIDfromIP',
'uint16_t',
@@ -10603,10 +10595,6 @@
cls.add_method('SendRequest',
'void',
[param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Ipv4Address', 'source')])
- ## dsr-routing.h (module 'dsr'): void ns3::dsr::DsrRouting::SendRequestAndIncrement(ns3::Ptr<ns3::Packet> packet, ns3::Ipv4Address source, ns3::Ipv4Address destination) [member function]
- cls.add_method('SendRequestAndIncrement',
- 'void',
- [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'destination')])
## dsr-routing.h (module 'dsr'): void ns3::dsr::DsrRouting::SendUnreachError(ns3::Ipv4Address errorHop, ns3::Ipv4Address destination, ns3::Ipv4Address originalDst, uint8_t salvage, uint8_t protocol) [member function]
cls.add_method('SendUnreachError',
'void',
@@ -11334,10 +11322,6 @@
cls.add_method('DeleteRoute',
'bool',
[param('ns3::Ipv4Address', 'dst')])
- ## dsr-rcache.h (module 'dsr'): void ns3::dsr::RouteCache::DropPathWithDst(ns3::Ipv4Address dst) [member function]
- cls.add_method('DropPathWithDst',
- 'void',
- [param('ns3::Ipv4Address', 'dst')])
## dsr-rcache.h (module 'dsr'): bool ns3::dsr::RouteCache::FindSameRoute(ns3::dsr::RouteCacheEntry & rt, std::list<ns3::dsr::RouteCacheEntry, std::allocator<ns3::dsr::RouteCacheEntry> > & rtVector) [member function]
cls.add_method('FindSameRoute',
'bool',
@@ -11361,11 +11345,6 @@
'ns3::Callback< void, ns3::Ipv4Address, unsigned char, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >',
[],
is_const=True)
- ## dsr-rcache.h (module 'dsr'): ns3::Ipv4Address ns3::dsr::RouteCache::GetDestination() const [member function]
- cls.add_method('GetDestination',
- 'ns3::Ipv4Address',
- [],
- is_const=True)
## dsr-rcache.h (module 'dsr'): ns3::Time ns3::dsr::RouteCache::GetExpireTime(ns3::Ipv4Address addr) [member function]
cls.add_method('GetExpireTime',
'ns3::Time',
@@ -11420,10 +11399,6 @@
'ns3::Time',
[],
is_const=True)
- ## dsr-rcache.h (module 'dsr'): bool ns3::dsr::RouteCache::IsEqual(ns3::dsr::RouteCacheEntry ca) [member function]
- cls.add_method('IsEqual',
- 'bool',
- [param('ns3::dsr::RouteCacheEntry', 'ca')])
## dsr-rcache.h (module 'dsr'): bool ns3::dsr::RouteCache::IsLinkCache() [member function]
cls.add_method('IsLinkCache',
'bool',
--- a/src/dsr/model/dsr-errorbuff.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/dsr/model/dsr-errorbuff.cc Wed Jul 24 13:20:24 2013 +0200
@@ -58,7 +58,7 @@
NS_LOG_INFO ("packet id " << i->GetPacket ()->GetUid () << " " << entry.GetPacket ()->GetUid () << " source " << i->GetSource () << " " << entry.GetSource ()
<< " next hop " << i->GetNextHop () << " " << entry.GetNextHop () << " dst " << i->GetDestination () << " " << entry.GetDestination ());
- /// TODO check the source and destination over here
+ /// \todo check the source and destination over here
if ((i->GetPacket ()->GetUid () == entry.GetPacket ()->GetUid ()) && (i->GetSource () == entry.GetSource ()) && (i->GetNextHop () == entry.GetSource ())
&& (i->GetDestination () == entry.GetDestination ()))
{
--- a/src/dsr/model/dsr-option-header.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/dsr/model/dsr-option-header.h Wed Jul 24 13:20:24 2013 +0200
@@ -338,16 +338,6 @@
*/
Ipv4Address GetNodeAddress (uint8_t index) const;
/**
- * \brief Set the data length.
- * \param dataLength the data length
- */
- void SetDataLength (uint32_t dataLength);
- /**
- * \brief Get the data length.
- * \return the data length
- */
- uint32_t GetDataLength () const;
- /**
* \brief Set the request id number.
* \param the identification number
*/
@@ -512,12 +502,6 @@
* \return the router IPv4 Address
*/
Ipv4Address GetNodeAddress (uint8_t index) const;
- /*
- * \brief Search the next hop Ipv4 address
- * \param Our own IP address
- * \return The next hop address of the route
- */
- Ipv4Address SearchNextHop (Ipv4Address ipv4Address);
/**
* \brief Print some informations about the packet.
* \param os output stream
--- a/src/dsr/model/dsr-options.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/dsr/model/dsr-options.cc Wed Jul 24 13:20:24 2013 +0200
@@ -1481,7 +1481,7 @@
p->RemoveHeader (rerrUnsupport);
rerrSize = rerrUnsupport.GetSerializedSize ();
- // This is for the other two error options, not supporting for now TODO
+ /// \todo This is for the other two error options, not supporting for now
// uint32_t serialized = DoSendError (p, rerrUnsupport, rerrSize, ipv4Address, protocol);
uint32_t serialized = 0;
return serialized;
--- a/src/dsr/model/dsr-rcache.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/dsr/model/dsr-rcache.cc Wed Jul 24 13:20:24 2013 +0200
@@ -502,7 +502,7 @@
for (std::map<Link, LinkStab>::iterator i = m_linkCache.begin (); i != m_linkCache.end (); ++i)
{
// Here the weight is set as 1
- // May need to set different weight for different link here later TODO
+ /// \todo May need to set different weight for different link here later
uint32_t weight = 1;
m_netGraph[i->first.m_low][i->first.m_high] = weight;
m_netGraph[i->first.m_high][i->first.m_low] = weight;
@@ -523,7 +523,7 @@
}
else
{
- /// TODO get rid of the debug here
+ /// \todo get rid of the debug here
NS_LOG_INFO ("The node stability " << i->second.GetNodeStability ().GetSeconds ());
NS_LOG_INFO ("The stability here " << Time (i->second.GetNodeStability () * m_stabilityIncrFactor).GetSeconds ());
NodeStab ns (Time (i->second.GetNodeStability () * m_stabilityIncrFactor));
@@ -546,7 +546,7 @@
}
else
{
- // TODO remove it here
+ /// \todo remove it here
NS_LOG_INFO ("The stability here " << i->second.GetNodeStability ().GetSeconds ());
NS_LOG_INFO ("The stability here " << Time (i->second.GetNodeStability () / m_stabilityDecrFactor).GetSeconds ());
NodeStab ns (Time (i->second.GetNodeStability () / m_stabilityDecrFactor));
@@ -624,7 +624,7 @@
if (m_linkCache[link].GetLinkStability () < m_useExtends)
{
m_linkCache[link].SetLinkStability (m_useExtends);
- /// TODO remove after debug
+ /// \todo remove after debug
NS_LOG_INFO ("The time of the link " << m_linkCache[link].GetLinkStability ().GetSeconds ());
}
}
@@ -785,7 +785,7 @@
// erase the two kind of links to make sure the link is removed from the link cache
NS_LOG_DEBUG ("Erase the route");
m_linkCache.erase (link1);
- /// TODO get rid of this one
+ /// \todo get rid of this one
NS_LOG_DEBUG ("The link cache size " << m_linkCache.size());
m_linkCache.erase (link2);
NS_LOG_DEBUG ("The link cache size " << m_linkCache.size());
@@ -1141,14 +1141,18 @@
RouteCache::AddNeighbor (std::vector<Ipv4Address> nodeList, Ipv4Address ownAddress, Time expire)
{
NS_LOG_LOGIC ("Add neighbor number " << nodeList.size ());
- for (std::vector<Ipv4Address>::iterator j = nodeList.begin (); j != nodeList.end (); ++j)
+ for (std::vector<Ipv4Address>::iterator j = nodeList.begin (); j != nodeList.end ();)
{
Ipv4Address addr = *j;
if (addr == ownAddress)
{
- nodeList.erase (j);
+ j = nodeList.erase (j);
NS_LOG_DEBUG ("The node list size " << nodeList.size ());
}
+ else
+ {
+ ++j;
+ }
Neighbor neighbor (addr, LookupMacAddress (addr), expire + Simulator::Now ());
m_nb.push_back (neighbor);
PurgeMac ();
@@ -1179,7 +1183,7 @@
if (pred (*j))
{
NS_LOG_LOGIC ("Close link to " << j->m_neighborAddress);
- // disable temporarily TODO
+ /// \todo disable temporarily
// m_handleLinkFailure (j->m_neighborAddress);
}
}
--- a/src/dsr/model/dsr-rcache.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/dsr/model/dsr-rcache.h Wed Jul 24 13:20:24 2013 +0200
@@ -327,18 +327,6 @@
* \brief Define the vector of route entries.
*/
typedef std::list<RouteCacheEntry::IP_VECTOR> routeVector;
- /**
- * \brief Get the destination address of the route.
- */
- Ipv4Address GetDestination (void) const;
- /**
- * \brief Remove all packets with destination IP address dst
- */
- void DropPathWithDst (Ipv4Address dst);
- /**
- * \brief To know if the two entries are the same
- */
- bool IsEqual (RouteCacheEntry ca);
// /\name Fields
// \{
bool GetSubRoute () const
--- a/src/dsr/model/dsr-routing.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/dsr/model/dsr-routing.cc Wed Jul 24 13:20:24 2013 +0200
@@ -474,7 +474,7 @@
Ptr<Packet> newP = p->Copy();
WifiMacHeader hdr;
newP->RemoveHeader(hdr);
- /// TODO this is a hard-coded check, need to find a better way to work on this
+ /// \todo this is a hard-coded check, need to find a better way to work on this
if (newP->GetSize () == 4)
{
NS_LOG_WARN ("WifiMacTrailer left, skip this packet");
@@ -1014,7 +1014,7 @@
Ptr<Packet> cleanP = packet->Copy ();
uint8_t protocol = i->GetProtocol ();
- m_sendBuffer.GetBuffer ().erase (i);
+ i = m_sendBuffer.GetBuffer ().erase (i);
DsrRoutingHeader dsrRoutingHeader;
Ptr<Packet> copyP = packet->Copy ();
@@ -1094,7 +1094,7 @@
m_downTarget (newPacket, m_mainAddress, nextHop, GetProtocolNumber (), m_ipv4Route);
- // TODO
+ /// \todo New DsrNetworkQueueEntry
// DsrNetworkQueueEntry newEntry (newPacket, m_mainAddress, nextHop, Simulator::Now (), m_ipv4Route);
//
// if (dsrNetworkQueue->Enqueue (newEntry))
@@ -1475,7 +1475,7 @@
m_downTarget (newPacket, m_mainAddress, nextHop, GetProtocolNumber (), m_ipv4Route);
- // TODO
+ /// \todo New DsrNetworkQueueEntry
// DsrNetworkQueueEntry newEntry (newPacket, m_mainAddress, nextHop, Simulator::Now (), m_ipv4Route);
//
// if (dsrNetworkQueue->Enqueue (newEntry))
@@ -1520,7 +1520,7 @@
m_downTarget (packet, m_mainAddress, nextHop, GetProtocolNumber (), route);
- // TODO
+ /// \todo New DsrNetworkQueueEntry
// DsrNetworkQueueEntry newEntry (packet, m_mainAddress, nextHop, Simulator::Now (), route);
//
// if (dsrNetworkQueue->Enqueue (newEntry))
@@ -1732,7 +1732,7 @@
m_downTarget (packet, source, nextHop, GetProtocolNumber (), m_ipv4Route);
- //TODO
+ /// \todo New DsrNetworkQueueEntry
// DsrNetworkQueueEntry newEntry (packet, source, nextHop, Simulator::Now (), m_ipv4Route);
//
// if (dsrNetworkQueue->Enqueue (newEntry))
@@ -2038,7 +2038,7 @@
m_downTarget (newPacket, m_mainAddress, nextHop, GetProtocolNumber (), m_ipv4Route);
- // TODO
+ /// \todo New DsrNetworkQueueEntry
// DsrNetworkQueueEntry newEntry (newPacket, m_mainAddress, nextHop, Simulator::Now (), m_ipv4Route);
//
// if (dsrNetworkQueue->Enqueue (newEntry))
@@ -2390,7 +2390,7 @@
m_downTarget (p, m_mainAddress, nextHop, GetProtocolNumber (), m_ipv4Route);
- // TODO
+ /// \todo New DsrNetworkQueueEntry
// DsrNetworkQueueEntry newEntry (p, m_mainAddress, nextHop, Simulator::Now (), m_ipv4Route);
//
// if (dsrNetworkQueue->Enqueue (newEntry))
@@ -3227,7 +3227,7 @@
m_downTarget (packet, source, m_broadcast, GetProtocolNumber (), 0);
- // TODO
+ /// \todo New DsrNetworkQueueEntry
// DsrNetworkQueueEntry newEntry (packet, source, m_broadcast, Simulator::Now (), 0);
// if (dsrNetworkQueue->Enqueue (newEntry))
// {
@@ -3333,7 +3333,7 @@
m_downTarget (packet, source, nextHop, GetProtocolNumber (), route);
- // TODO
+ /// \todo New DsrNetworkQueueEntry
// DsrNetworkQueueEntry newEntry (packet, source, nextHop, Simulator::Now (), route);
// if (dsrNetworkQueue->Enqueue (newEntry))
// {
@@ -3410,7 +3410,7 @@
m_downTarget (packet, m_mainAddress, destination, GetProtocolNumber (), route);
- // TODO
+ /// \todo New DsrNetworkQueueEntry
// DsrNetworkQueueEntry newEntry (packet, m_mainAddress, destination, Simulator::Now (), route);
// if (dsrNetworkQueue->Enqueue (newEntry))
// {
--- a/src/dsr/model/dsr-routing.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/dsr/model/dsr-routing.h Wed Jul 24 13:20:24 2013 +0200
@@ -383,15 +383,6 @@
*/
void SendErrorRequest (DsrOptionRerrUnreachHeader &rerr, uint8_t protocol);
/**
- * \brief Send the route request and increment the request count
- * \param the original packet
- * \param source address
- * \param destination address
- */
- void SendRequestAndIncrement (Ptr<Packet> packet,
- Ipv4Address source,
- Ipv4Address destination);
- /**
* \brief Forward the route request if the node is not the destination
* \param the original packet
* \param source address
@@ -475,11 +466,6 @@
IpL4Protocol::DownTargetCallback GetDownTarget (void) const;
IpL4Protocol::DownTargetCallback6 GetDownTarget6 (void) const;
/**
- * \brief Get the extension number.
- * \return extension number
- */
- uint8_t GetExtensionNumber () const;
- /**
* \brief Process method
* Called from Ipv4L3Protocol::Receive.
*
--- a/src/dsr/model/dsr-rreq-table.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/dsr/model/dsr-rreq-table.cc Wed Jul 24 13:20:24 2013 +0200
@@ -225,7 +225,7 @@
RreqTable::MarkLinkAsUnidirectional (Ipv4Address neighbor, Time blacklistTimeout)
{
NS_LOG_LOGIC ("Add neighbor address in blacklist " << m_blackList.size ());
- for (std::vector<BlackList>::iterator i = m_blackList.begin (); i != m_blackList.end (); ++i)
+ for (std::vector<BlackList>::iterator i = m_blackList.begin (); i != m_blackList.end (); i++)
{
if (i->m_neighborAddress == neighbor)
{
--- a/src/emu/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/emu/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -96,6 +96,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')
## pcap-file.h (module 'network'): ns3::PcapFile [class]
module.add_class('PcapFile', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
@@ -226,8 +228,6 @@
module.add_class('OutputStreamWrapper', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >'])
## 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<ns3::Packet> >'])
- ## 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]
@@ -347,7 +347,6 @@
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'])
@@ -1895,6 +1894,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):
@@ -3061,6 +3064,16 @@
'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',
@@ -4049,6 +4062,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',
@@ -4060,13 +4077,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([])
--- a/src/emu/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/emu/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -96,6 +96,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')
## pcap-file.h (module 'network'): ns3::PcapFile [class]
module.add_class('PcapFile', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
@@ -226,8 +228,6 @@
module.add_class('OutputStreamWrapper', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >'])
## 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<ns3::Packet> >'])
- ## 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]
@@ -347,7 +347,6 @@
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'])
@@ -1895,6 +1894,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):
@@ -3061,6 +3064,16 @@
'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',
@@ -4049,6 +4062,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',
@@ -4060,13 +4077,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([])
--- a/src/energy/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/energy/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -98,6 +98,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')
## rv-battery-model-helper.h (module 'energy'): ns3::RvBatteryModelHelper [class]
module.add_class('RvBatteryModelHelper', parent=root_module['ns3::EnergySourceHelper'])
## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [class]
@@ -244,8 +246,6 @@
module.add_class('RvBatteryModel', parent=root_module['ns3::EnergySource'])
## simple-device-energy-model.h (module 'energy'): ns3::SimpleDeviceEnergyModel [class]
module.add_class('SimpleDeviceEnergyModel', parent=root_module['ns3::DeviceEnergyModel'])
- ## 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]
@@ -392,7 +392,6 @@
register_Ns3Packet_methods(root_module, root_module['ns3::Packet'])
register_Ns3RvBatteryModel_methods(root_module, root_module['ns3::RvBatteryModel'])
register_Ns3SimpleDeviceEnergyModel_methods(root_module, root_module['ns3::SimpleDeviceEnergyModel'])
- 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'])
@@ -1831,6 +1830,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):
@@ -2827,6 +2830,16 @@
'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',
@@ -4572,6 +4585,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',
@@ -4749,13 +4766,6 @@
is_const=True, visibility='private', 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([])
--- a/src/energy/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/energy/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -98,6 +98,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')
## rv-battery-model-helper.h (module 'energy'): ns3::RvBatteryModelHelper [class]
module.add_class('RvBatteryModelHelper', parent=root_module['ns3::EnergySourceHelper'])
## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [class]
@@ -244,8 +246,6 @@
module.add_class('RvBatteryModel', parent=root_module['ns3::EnergySource'])
## simple-device-energy-model.h (module 'energy'): ns3::SimpleDeviceEnergyModel [class]
module.add_class('SimpleDeviceEnergyModel', parent=root_module['ns3::DeviceEnergyModel'])
- ## 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]
@@ -392,7 +392,6 @@
register_Ns3Packet_methods(root_module, root_module['ns3::Packet'])
register_Ns3RvBatteryModel_methods(root_module, root_module['ns3::RvBatteryModel'])
register_Ns3SimpleDeviceEnergyModel_methods(root_module, root_module['ns3::SimpleDeviceEnergyModel'])
- 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'])
@@ -1831,6 +1830,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):
@@ -2827,6 +2830,16 @@
'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',
@@ -4572,6 +4585,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',
@@ -4749,13 +4766,6 @@
is_const=True, visibility='private', 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([])
--- a/src/fd-net-device/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/fd-net-device/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -96,6 +96,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')
## pcap-file.h (module 'network'): ns3::PcapFile [class]
module.add_class('PcapFile', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
@@ -234,12 +236,8 @@
module.add_class('OutputStreamWrapper', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >'])
## 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<ns3::Packet> >'])
- ## planetlab-fd-net-device-helper.h (module 'fd-net-device'): ns3::PlanetLabFdNetDeviceHelper [class]
- module.add_class('PlanetLabFdNetDeviceHelper', parent=root_module['ns3::EmuFdNetDeviceHelper'])
## tap-fd-net-device-helper.h (module 'fd-net-device'): ns3::TapFdNetDeviceHelper [class]
module.add_class('TapFdNetDeviceHelper', parent=root_module['ns3::EmuFdNetDeviceHelper'])
- ## 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]
@@ -365,9 +363,7 @@
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_Ns3PlanetLabFdNetDeviceHelper_methods(root_module, root_module['ns3::PlanetLabFdNetDeviceHelper'])
register_Ns3TapFdNetDeviceHelper_methods(root_module, root_module['ns3::TapFdNetDeviceHelper'])
- 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'])
@@ -1916,6 +1912,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):
@@ -3126,6 +3126,16 @@
'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',
@@ -4164,6 +4174,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',
@@ -4175,36 +4189,6 @@
[param('ns3::Ptr< ns3::NixVector >', 'arg0')])
return
-def register_Ns3PlanetLabFdNetDeviceHelper_methods(root_module, cls):
- ## planetlab-fd-net-device-helper.h (module 'fd-net-device'): ns3::PlanetLabFdNetDeviceHelper::PlanetLabFdNetDeviceHelper(ns3::PlanetLabFdNetDeviceHelper const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::PlanetLabFdNetDeviceHelper const &', 'arg0')])
- ## planetlab-fd-net-device-helper.h (module 'fd-net-device'): ns3::PlanetLabFdNetDeviceHelper::PlanetLabFdNetDeviceHelper() [constructor]
- cls.add_constructor([])
- ## planetlab-fd-net-device-helper.h (module 'fd-net-device'): void ns3::PlanetLabFdNetDeviceHelper::SetTapIpAddress(ns3::Ipv4Address address) [member function]
- cls.add_method('SetTapIpAddress',
- 'void',
- [param('ns3::Ipv4Address', 'address')])
- ## planetlab-fd-net-device-helper.h (module 'fd-net-device'): void ns3::PlanetLabFdNetDeviceHelper::SetTapMask(ns3::Ipv4Mask mask) [member function]
- cls.add_method('SetTapMask',
- 'void',
- [param('ns3::Ipv4Mask', 'mask')])
- ## planetlab-fd-net-device-helper.h (module 'fd-net-device'): int ns3::PlanetLabFdNetDeviceHelper::CreateFileDescriptor() const [member function]
- cls.add_method('CreateFileDescriptor',
- 'int',
- [],
- is_const=True, visibility='protected', is_virtual=True)
- ## planetlab-fd-net-device-helper.h (module 'fd-net-device'): ns3::Ptr<ns3::NetDevice> ns3::PlanetLabFdNetDeviceHelper::InstallPriv(ns3::Ptr<ns3::Node> node) const [member function]
- cls.add_method('InstallPriv',
- 'ns3::Ptr< ns3::NetDevice >',
- [param('ns3::Ptr< ns3::Node >', 'node')],
- is_const=True, visibility='protected', is_virtual=True)
- ## planetlab-fd-net-device-helper.h (module 'fd-net-device'): void ns3::PlanetLabFdNetDeviceHelper::SetFileDescriptor(ns3::Ptr<ns3::FdNetDevice> device) const [member function]
- cls.add_method('SetFileDescriptor',
- 'void',
- [param('ns3::Ptr< ns3::FdNetDevice >', 'device')],
- is_const=True, visibility='protected', is_virtual=True)
- return
-
def register_Ns3TapFdNetDeviceHelper_methods(root_module, cls):
## tap-fd-net-device-helper.h (module 'fd-net-device'): ns3::TapFdNetDeviceHelper::TapFdNetDeviceHelper(ns3::TapFdNetDeviceHelper const & arg0) [copy constructor]
cls.add_constructor([param('ns3::TapFdNetDeviceHelper const &', 'arg0')])
@@ -4251,13 +4235,6 @@
is_const=True, 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([])
--- a/src/fd-net-device/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/fd-net-device/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -96,6 +96,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')
## pcap-file.h (module 'network'): ns3::PcapFile [class]
module.add_class('PcapFile', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
@@ -234,12 +236,8 @@
module.add_class('OutputStreamWrapper', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >'])
## 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<ns3::Packet> >'])
- ## planetlab-fd-net-device-helper.h (module 'fd-net-device'): ns3::PlanetLabFdNetDeviceHelper [class]
- module.add_class('PlanetLabFdNetDeviceHelper', parent=root_module['ns3::EmuFdNetDeviceHelper'])
## tap-fd-net-device-helper.h (module 'fd-net-device'): ns3::TapFdNetDeviceHelper [class]
module.add_class('TapFdNetDeviceHelper', parent=root_module['ns3::EmuFdNetDeviceHelper'])
- ## 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]
@@ -365,9 +363,7 @@
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_Ns3PlanetLabFdNetDeviceHelper_methods(root_module, root_module['ns3::PlanetLabFdNetDeviceHelper'])
register_Ns3TapFdNetDeviceHelper_methods(root_module, root_module['ns3::TapFdNetDeviceHelper'])
- 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'])
@@ -1916,6 +1912,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):
@@ -3126,6 +3126,16 @@
'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',
@@ -4164,6 +4174,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',
@@ -4175,36 +4189,6 @@
[param('ns3::Ptr< ns3::NixVector >', 'arg0')])
return
-def register_Ns3PlanetLabFdNetDeviceHelper_methods(root_module, cls):
- ## planetlab-fd-net-device-helper.h (module 'fd-net-device'): ns3::PlanetLabFdNetDeviceHelper::PlanetLabFdNetDeviceHelper(ns3::PlanetLabFdNetDeviceHelper const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::PlanetLabFdNetDeviceHelper const &', 'arg0')])
- ## planetlab-fd-net-device-helper.h (module 'fd-net-device'): ns3::PlanetLabFdNetDeviceHelper::PlanetLabFdNetDeviceHelper() [constructor]
- cls.add_constructor([])
- ## planetlab-fd-net-device-helper.h (module 'fd-net-device'): void ns3::PlanetLabFdNetDeviceHelper::SetTapIpAddress(ns3::Ipv4Address address) [member function]
- cls.add_method('SetTapIpAddress',
- 'void',
- [param('ns3::Ipv4Address', 'address')])
- ## planetlab-fd-net-device-helper.h (module 'fd-net-device'): void ns3::PlanetLabFdNetDeviceHelper::SetTapMask(ns3::Ipv4Mask mask) [member function]
- cls.add_method('SetTapMask',
- 'void',
- [param('ns3::Ipv4Mask', 'mask')])
- ## planetlab-fd-net-device-helper.h (module 'fd-net-device'): int ns3::PlanetLabFdNetDeviceHelper::CreateFileDescriptor() const [member function]
- cls.add_method('CreateFileDescriptor',
- 'int',
- [],
- is_const=True, visibility='protected', is_virtual=True)
- ## planetlab-fd-net-device-helper.h (module 'fd-net-device'): ns3::Ptr<ns3::NetDevice> ns3::PlanetLabFdNetDeviceHelper::InstallPriv(ns3::Ptr<ns3::Node> node) const [member function]
- cls.add_method('InstallPriv',
- 'ns3::Ptr< ns3::NetDevice >',
- [param('ns3::Ptr< ns3::Node >', 'node')],
- is_const=True, visibility='protected', is_virtual=True)
- ## planetlab-fd-net-device-helper.h (module 'fd-net-device'): void ns3::PlanetLabFdNetDeviceHelper::SetFileDescriptor(ns3::Ptr<ns3::FdNetDevice> device) const [member function]
- cls.add_method('SetFileDescriptor',
- 'void',
- [param('ns3::Ptr< ns3::FdNetDevice >', 'device')],
- is_const=True, visibility='protected', is_virtual=True)
- return
-
def register_Ns3TapFdNetDeviceHelper_methods(root_module, cls):
## tap-fd-net-device-helper.h (module 'fd-net-device'): ns3::TapFdNetDeviceHelper::TapFdNetDeviceHelper(ns3::TapFdNetDeviceHelper const & arg0) [copy constructor]
cls.add_constructor([param('ns3::TapFdNetDeviceHelper const &', 'arg0')])
@@ -4251,13 +4235,6 @@
is_const=True, 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([])
--- a/src/fd-net-device/doc/fd-net-device.rst Wed Jul 24 13:19:54 2013 +0200
+++ b/src/fd-net-device/doc/fd-net-device.rst Wed Jul 24 13:20:24 2013 +0200
@@ -273,7 +273,7 @@
on your network and won't conflict with anything else (including another
simulation using such devices) on your network. If you are using the emulated
FdNetDevice configuration in separate simulations,
- you must consider global MAC address
+you must consider global MAC address
assignment issues and ensure that MAC addresses are unique across all
simulations. The emulated net device respects the MAC address provided in the
``Address`` attribute so you can do this manually. For larger simulations, you
--- a/src/fd-net-device/helper/creator-utils.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/fd-net-device/helper/creator-utils.cc Wed Jul 24 13:20:24 2013 +0200
@@ -18,6 +18,7 @@
#include <unistd.h>
#include <string>
+#include <cstring>
#include <iostream>
#include <iomanip>
#include <sstream>
--- a/src/fd-net-device/model/fd-net-device.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/fd-net-device/model/fd-net-device.cc Wed Jul 24 13:20:24 2013 +0200
@@ -284,9 +284,9 @@
}
}
-// XXX: Consider having a instance member m_packetBuffer and using memmove
-// instead of memcpy to add the PI header.
-// It might be faster in this case to use memmove and avoid the extra mallocs.
+/// \todo Consider having a instance member m_packetBuffer and using memmove
+/// instead of memcpy to add the PI header.
+/// It might be faster in this case to use memmove and avoid the extra mallocs.
static void
AddPIHeader (uint8_t *&buf, ssize_t &len)
{
--- a/src/fd-net-device/wscript Wed Jul 24 13:19:54 2013 +0200
+++ b/src/fd-net-device/wscript Wed Jul 24 13:20:24 2013 +0200
@@ -20,12 +20,20 @@
define_name = 'HAVE_IF_NETS_H')
# Enable the FdNetDevice module.
- # Our only requirement is threading support.
- conf.env['ENABLE_FDNETDEV'] = True
- conf.report_optional_feature("FdNetDevice",
- "File descriptor NetDevice",
- True,
- "FdNetDevice module enabled")
+ # Besides threading support, we also require ethernet.h
+ conf.env['ENABLE_FDNETDEV'] = conf.check_nonfatal(header_name='net/ethernet.h',
+ define_name='HAVE_NET_ETHERNET_H')
+ if conf.env['ENABLE_FDNETDEV']:
+ conf.report_optional_feature("FdNetDevice",
+ "File descriptor NetDevice",
+ True,
+ "FdNetDevice module enabled")
+ else:
+ conf.report_optional_feature("FdNetDevice",
+ "File descriptor NetDevice",
+ False,
+ "<net/ethernet.h> include not detected")
+
else:
conf.report_optional_feature("FdNetDevice",
"File descriptor NetDevice",
--- a/src/flow-monitor/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/flow-monitor/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -132,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<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [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]
@@ -314,8 +316,6 @@
module.add_class('OutputStreamWrapper', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >'])
## 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<ns3::Packet> >'])
- ## 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]
@@ -467,7 +467,6 @@
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'])
@@ -2069,6 +2068,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):
@@ -3927,6 +3930,16 @@
'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',
@@ -5809,6 +5822,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',
@@ -5820,13 +5837,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([])
--- a/src/flow-monitor/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/flow-monitor/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -132,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<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [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]
@@ -314,8 +316,6 @@
module.add_class('OutputStreamWrapper', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >'])
## 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<ns3::Packet> >'])
- ## 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]
@@ -467,7 +467,6 @@
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'])
@@ -2069,6 +2068,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):
@@ -3927,6 +3930,16 @@
'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',
@@ -5809,6 +5822,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',
@@ -5820,13 +5837,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([])
--- a/src/flow-monitor/model/histogram.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/flow-monitor/model/histogram.h Wed Jul 24 13:20:24 2013 +0200
@@ -49,8 +49,8 @@
void SerializeToXmlStream (std::ostream &os, int indent, std::string elementName) const;
- // TODO: add method(s) to estimate N, µ, and s² from the histogram,
- // see http://www.dspguide.com/ch2/4.htm
+ /// \todo add method(s) to estimate N, µ, and s² from the histogram,
+ /// see http://www.dspguide.com/ch2/4.htm
private:
std::vector<uint32_t> m_histogram;
--- a/src/flow-monitor/wscript Wed Jul 24 13:19:54 2013 +0200
+++ b/src/flow-monitor/wscript Wed Jul 24 13:20:24 2013 +0200
@@ -1,7 +1,7 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
- obj = bld.create_ns3_module('flow-monitor', ['internet', 'config-store', 'tools'])
+ obj = bld.create_ns3_module('flow-monitor', ['internet', 'config-store'])
obj.source = ["model/%s" % s for s in [
'flow-monitor.cc',
'flow-classifier.cc',
--- a/src/internet/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -194,6 +194,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')
## pcap-file.h (module 'network'): ns3::PcapFile [class]
module.add_class('PcapFile', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
@@ -642,8 +644,6 @@
module.add_class('TcpReno', parent=root_module['ns3::TcpSocketBase'])
## tcp-rfc793.h (module 'internet'): ns3::TcpRfc793 [class]
module.add_class('TcpRfc793', parent=root_module['ns3::TcpSocketBase'])
- ## 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]
@@ -973,7 +973,6 @@
register_Ns3TcpNewReno_methods(root_module, root_module['ns3::TcpNewReno'])
register_Ns3TcpReno_methods(root_module, root_module['ns3::TcpReno'])
register_Ns3TcpRfc793_methods(root_module, root_module['ns3::TcpRfc793'])
- 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'])
@@ -2900,6 +2899,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',
@@ -2939,16 +2943,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',
@@ -3945,6 +3969,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):
@@ -9498,6 +9526,16 @@
'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',
@@ -11168,6 +11206,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<const ns3::NetDevice> device, ns3::Ipv4Address dst, ns3::Ipv4InterfaceAddress::InterfaceAddressScope_e scope) [member function]
cls.add_method('SelectSourceAddress',
'ns3::Ipv4Address',
@@ -11330,6 +11373,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<ns3::Packet> p, ns3::Ipv4Address dest) [member function]
cls.add_method('Send',
'void',
@@ -11490,6 +11537,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<const ns3::NetDevice> device, ns3::Ipv4Address dst, ns3::Ipv4InterfaceAddress::InterfaceAddressScope_e scope) [member function]
cls.add_method('SelectSourceAddress',
'ns3::Ipv4Address',
@@ -12122,6 +12174,11 @@
'bool',
[param('uint32_t', 'interface'), param('uint32_t', 'addressIndex')],
is_pure_virtual=True, is_virtual=True)
+ ## ipv6.h (module 'internet'): bool ns3::Ipv6::RemoveAddress(uint32_t interface, ns3::Ipv6Address address) [member function]
+ cls.add_method('RemoveAddress',
+ 'bool',
+ [param('uint32_t', 'interface'), param('ns3::Ipv6Address', 'address')],
+ is_pure_virtual=True, is_virtual=True)
## ipv6.h (module 'internet'): void ns3::Ipv6::SetDown(uint32_t interface) [member function]
cls.add_method('SetDown',
'void',
@@ -12781,6 +12838,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<ns3::Packet> p, ns3::Ipv6Address dest) [member function]
cls.add_method('Send',
'void',
@@ -12951,6 +13012,11 @@
'bool',
[param('uint32_t', 'interfaceIndex'), param('uint32_t', 'addressIndex')],
is_virtual=True)
+ ## ipv6-l3-protocol.h (module 'internet'): bool ns3::Ipv6L3Protocol::RemoveAddress(uint32_t interface, ns3::Ipv6Address address) [member function]
+ cls.add_method('RemoveAddress',
+ 'bool',
+ [param('uint32_t', 'interface'), param('ns3::Ipv6Address', 'address')],
+ is_virtual=True)
## ipv6-l3-protocol.h (module 'internet'): void ns3::Ipv6L3Protocol::SetMetric(uint32_t i, uint16_t metric) [member function]
cls.add_method('SetMetric',
'void',
@@ -13245,10 +13311,10 @@
'void',
[param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')],
is_pure_virtual=True, is_const=True, is_virtual=True)
- ## ipv6-routing-protocol.h (module 'internet'): bool ns3::Ipv6RoutingProtocol::RouteInput(ns3::Ptr<const ns3::Packet> p, ns3::Ipv6Header const & header, ns3::Ptr<const ns3::NetDevice> idev, ns3::Callback<void,ns3::Ptr<ns3::Ipv6Route>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback<void,ns3::Ptr<ns3::Ipv6MulticastRoute>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::Socket::SocketErrno,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ecb) [member function]
+ ## ipv6-routing-protocol.h (module 'internet'): bool ns3::Ipv6RoutingProtocol::RouteInput(ns3::Ptr<const ns3::Packet> p, ns3::Ipv6Header const & header, ns3::Ptr<const ns3::NetDevice> idev, ns3::Callback<void,ns3::Ptr<const ns3::NetDevice>,ns3::Ptr<ns3::Ipv6Route>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback<void,ns3::Ptr<const ns3::NetDevice>,ns3::Ptr<ns3::Ipv6MulticastRoute>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,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::Ipv6Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv6Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv6MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header 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::Ipv6Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')],
+ [param('ns3::Ptr< ns3::Packet const >', 'p'), param('ns3::Ipv6Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice const >, ns3::Ptr< ns3::Ipv6Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice const >, ns3::Ptr< ns3::Ipv6MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header 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::Ipv6Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')],
is_pure_virtual=True, is_virtual=True)
## ipv6-routing-protocol.h (module 'internet'): ns3::Ptr<ns3::Ipv6Route> ns3::Ipv6RoutingProtocol::RouteOutput(ns3::Ptr<ns3::Packet> p, ns3::Ipv6Header const & header, ns3::Ptr<ns3::NetDevice> oif, ns3::Socket::SocketErrno & sockerr) [member function]
cls.add_method('RouteOutput',
@@ -13380,10 +13446,10 @@
cls.add_method('RemoveRoute',
'void',
[param('ns3::Ipv6Address', 'network'), param('ns3::Ipv6Prefix', 'prefix'), param('uint32_t', 'ifIndex'), param('ns3::Ipv6Address', 'prefixToUse')])
- ## ipv6-static-routing.h (module 'internet'): bool ns3::Ipv6StaticRouting::RouteInput(ns3::Ptr<const ns3::Packet> p, ns3::Ipv6Header const & header, ns3::Ptr<const ns3::NetDevice> idev, ns3::Callback<void,ns3::Ptr<ns3::Ipv6Route>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback<void,ns3::Ptr<ns3::Ipv6MulticastRoute>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::Socket::SocketErrno,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ecb) [member function]
+ ## ipv6-static-routing.h (module 'internet'): bool ns3::Ipv6StaticRouting::RouteInput(ns3::Ptr<const ns3::Packet> p, ns3::Ipv6Header const & header, ns3::Ptr<const ns3::NetDevice> idev, ns3::Callback<void,ns3::Ptr<const ns3::NetDevice>,ns3::Ptr<ns3::Ipv6Route>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback<void,ns3::Ptr<const ns3::NetDevice>,ns3::Ptr<ns3::Ipv6MulticastRoute>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,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::Ipv6Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv6Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv6MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header 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::Ipv6Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')],
+ [param('ns3::Ptr< ns3::Packet const >', 'p'), param('ns3::Ipv6Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice const >, ns3::Ptr< ns3::Ipv6Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice const >, ns3::Ptr< ns3::Ipv6MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header 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::Ipv6Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')],
is_virtual=True)
## ipv6-static-routing.h (module 'internet'): ns3::Ptr<ns3::Ipv6Route> ns3::Ipv6StaticRouting::RouteOutput(ns3::Ptr<ns3::Packet> p, ns3::Ipv6Header const & header, ns3::Ptr<ns3::NetDevice> oif, ns3::Socket::SocketErrno & sockerr) [member function]
cls.add_method('RouteOutput',
@@ -14230,6 +14296,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',
@@ -14605,13 +14675,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([])
@@ -15297,10 +15360,10 @@
cls.add_method('SendRS',
'void',
[param('ns3::Ipv6Address', 'src'), param('ns3::Ipv6Address', 'dst'), param('ns3::Address', 'hardwareAddress')])
- ## icmpv6-l4-protocol.h (module 'internet'): void ns3::Icmpv6L4Protocol::SendRedirection(ns3::Ptr<ns3::Packet> redirectedPacket, ns3::Ipv6Address dst, ns3::Ipv6Address redirTarget, ns3::Ipv6Address redirDestination, ns3::Address redirHardwareTarget) [member function]
+ ## icmpv6-l4-protocol.h (module 'internet'): void ns3::Icmpv6L4Protocol::SendRedirection(ns3::Ptr<ns3::Packet> redirectedPacket, ns3::Ipv6Address src, ns3::Ipv6Address dst, ns3::Ipv6Address redirTarget, ns3::Ipv6Address redirDestination, ns3::Address redirHardwareTarget) [member function]
cls.add_method('SendRedirection',
'void',
- [param('ns3::Ptr< ns3::Packet >', 'redirectedPacket'), param('ns3::Ipv6Address', 'dst'), param('ns3::Ipv6Address', 'redirTarget'), param('ns3::Ipv6Address', 'redirDestination'), param('ns3::Address', 'redirHardwareTarget')])
+ [param('ns3::Ptr< ns3::Packet >', 'redirectedPacket'), param('ns3::Ipv6Address', 'src'), param('ns3::Ipv6Address', 'dst'), param('ns3::Ipv6Address', 'redirTarget'), param('ns3::Ipv6Address', 'redirDestination'), param('ns3::Address', 'redirHardwareTarget')])
## icmpv6-l4-protocol.h (module 'internet'): void ns3::Icmpv6L4Protocol::SetNode(ns3::Ptr<ns3::Node> node) [member function]
cls.add_method('SetNode',
'void',
@@ -15624,10 +15687,10 @@
'void',
[param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')],
is_const=True, is_virtual=True)
- ## ipv6-list-routing.h (module 'internet'): bool ns3::Ipv6ListRouting::RouteInput(ns3::Ptr<const ns3::Packet> p, ns3::Ipv6Header const & header, ns3::Ptr<const ns3::NetDevice> idev, ns3::Callback<void,ns3::Ptr<ns3::Ipv6Route>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback<void,ns3::Ptr<ns3::Ipv6MulticastRoute>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::Socket::SocketErrno,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ecb) [member function]
+ ## ipv6-list-routing.h (module 'internet'): bool ns3::Ipv6ListRouting::RouteInput(ns3::Ptr<const ns3::Packet> p, ns3::Ipv6Header const & header, ns3::Ptr<const ns3::NetDevice> idev, ns3::Callback<void,ns3::Ptr<const ns3::NetDevice>,ns3::Ptr<ns3::Ipv6Route>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback<void,ns3::Ptr<const ns3::NetDevice>,ns3::Ptr<ns3::Ipv6MulticastRoute>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,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::Ipv6Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv6Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv6MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header 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::Ipv6Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')],
+ [param('ns3::Ptr< ns3::Packet const >', 'p'), param('ns3::Ipv6Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice const >, ns3::Ptr< ns3::Ipv6Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice const >, ns3::Ptr< ns3::Ipv6MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header 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::Ipv6Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')],
is_virtual=True)
## ipv6-list-routing.h (module 'internet'): ns3::Ptr<ns3::Ipv6Route> ns3::Ipv6ListRouting::RouteOutput(ns3::Ptr<ns3::Packet> p, ns3::Ipv6Header const & header, ns3::Ptr<ns3::NetDevice> oif, ns3::Socket::SocketErrno & sockerr) [member function]
cls.add_method('RouteOutput',
--- a/src/internet/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -194,6 +194,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')
## pcap-file.h (module 'network'): ns3::PcapFile [class]
module.add_class('PcapFile', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
@@ -642,8 +644,6 @@
module.add_class('TcpReno', parent=root_module['ns3::TcpSocketBase'])
## tcp-rfc793.h (module 'internet'): ns3::TcpRfc793 [class]
module.add_class('TcpRfc793', parent=root_module['ns3::TcpSocketBase'])
- ## 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]
@@ -973,7 +973,6 @@
register_Ns3TcpNewReno_methods(root_module, root_module['ns3::TcpNewReno'])
register_Ns3TcpReno_methods(root_module, root_module['ns3::TcpReno'])
register_Ns3TcpRfc793_methods(root_module, root_module['ns3::TcpRfc793'])
- 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'])
@@ -2900,6 +2899,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',
@@ -2939,16 +2943,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',
@@ -3945,6 +3969,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):
@@ -9498,6 +9526,16 @@
'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',
@@ -11168,6 +11206,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<const ns3::NetDevice> device, ns3::Ipv4Address dst, ns3::Ipv4InterfaceAddress::InterfaceAddressScope_e scope) [member function]
cls.add_method('SelectSourceAddress',
'ns3::Ipv4Address',
@@ -11330,6 +11373,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<ns3::Packet> p, ns3::Ipv4Address dest) [member function]
cls.add_method('Send',
'void',
@@ -11490,6 +11537,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<const ns3::NetDevice> device, ns3::Ipv4Address dst, ns3::Ipv4InterfaceAddress::InterfaceAddressScope_e scope) [member function]
cls.add_method('SelectSourceAddress',
'ns3::Ipv4Address',
@@ -12122,6 +12174,11 @@
'bool',
[param('uint32_t', 'interface'), param('uint32_t', 'addressIndex')],
is_pure_virtual=True, is_virtual=True)
+ ## ipv6.h (module 'internet'): bool ns3::Ipv6::RemoveAddress(uint32_t interface, ns3::Ipv6Address address) [member function]
+ cls.add_method('RemoveAddress',
+ 'bool',
+ [param('uint32_t', 'interface'), param('ns3::Ipv6Address', 'address')],
+ is_pure_virtual=True, is_virtual=True)
## ipv6.h (module 'internet'): void ns3::Ipv6::SetDown(uint32_t interface) [member function]
cls.add_method('SetDown',
'void',
@@ -12781,6 +12838,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<ns3::Packet> p, ns3::Ipv6Address dest) [member function]
cls.add_method('Send',
'void',
@@ -12951,6 +13012,11 @@
'bool',
[param('uint32_t', 'interfaceIndex'), param('uint32_t', 'addressIndex')],
is_virtual=True)
+ ## ipv6-l3-protocol.h (module 'internet'): bool ns3::Ipv6L3Protocol::RemoveAddress(uint32_t interface, ns3::Ipv6Address address) [member function]
+ cls.add_method('RemoveAddress',
+ 'bool',
+ [param('uint32_t', 'interface'), param('ns3::Ipv6Address', 'address')],
+ is_virtual=True)
## ipv6-l3-protocol.h (module 'internet'): void ns3::Ipv6L3Protocol::SetMetric(uint32_t i, uint16_t metric) [member function]
cls.add_method('SetMetric',
'void',
@@ -13245,10 +13311,10 @@
'void',
[param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')],
is_pure_virtual=True, is_const=True, is_virtual=True)
- ## ipv6-routing-protocol.h (module 'internet'): bool ns3::Ipv6RoutingProtocol::RouteInput(ns3::Ptr<const ns3::Packet> p, ns3::Ipv6Header const & header, ns3::Ptr<const ns3::NetDevice> idev, ns3::Callback<void,ns3::Ptr<ns3::Ipv6Route>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback<void,ns3::Ptr<ns3::Ipv6MulticastRoute>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::Socket::SocketErrno,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ecb) [member function]
+ ## ipv6-routing-protocol.h (module 'internet'): bool ns3::Ipv6RoutingProtocol::RouteInput(ns3::Ptr<const ns3::Packet> p, ns3::Ipv6Header const & header, ns3::Ptr<const ns3::NetDevice> idev, ns3::Callback<void,ns3::Ptr<const ns3::NetDevice>,ns3::Ptr<ns3::Ipv6Route>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback<void,ns3::Ptr<const ns3::NetDevice>,ns3::Ptr<ns3::Ipv6MulticastRoute>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,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::Ipv6Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv6Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv6MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header 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::Ipv6Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')],
+ [param('ns3::Ptr< ns3::Packet const >', 'p'), param('ns3::Ipv6Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice const >, ns3::Ptr< ns3::Ipv6Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice const >, ns3::Ptr< ns3::Ipv6MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header 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::Ipv6Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')],
is_pure_virtual=True, is_virtual=True)
## ipv6-routing-protocol.h (module 'internet'): ns3::Ptr<ns3::Ipv6Route> ns3::Ipv6RoutingProtocol::RouteOutput(ns3::Ptr<ns3::Packet> p, ns3::Ipv6Header const & header, ns3::Ptr<ns3::NetDevice> oif, ns3::Socket::SocketErrno & sockerr) [member function]
cls.add_method('RouteOutput',
@@ -13380,10 +13446,10 @@
cls.add_method('RemoveRoute',
'void',
[param('ns3::Ipv6Address', 'network'), param('ns3::Ipv6Prefix', 'prefix'), param('uint32_t', 'ifIndex'), param('ns3::Ipv6Address', 'prefixToUse')])
- ## ipv6-static-routing.h (module 'internet'): bool ns3::Ipv6StaticRouting::RouteInput(ns3::Ptr<const ns3::Packet> p, ns3::Ipv6Header const & header, ns3::Ptr<const ns3::NetDevice> idev, ns3::Callback<void,ns3::Ptr<ns3::Ipv6Route>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback<void,ns3::Ptr<ns3::Ipv6MulticastRoute>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::Socket::SocketErrno,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ecb) [member function]
+ ## ipv6-static-routing.h (module 'internet'): bool ns3::Ipv6StaticRouting::RouteInput(ns3::Ptr<const ns3::Packet> p, ns3::Ipv6Header const & header, ns3::Ptr<const ns3::NetDevice> idev, ns3::Callback<void,ns3::Ptr<const ns3::NetDevice>,ns3::Ptr<ns3::Ipv6Route>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback<void,ns3::Ptr<const ns3::NetDevice>,ns3::Ptr<ns3::Ipv6MulticastRoute>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,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::Ipv6Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv6Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv6MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header 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::Ipv6Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')],
+ [param('ns3::Ptr< ns3::Packet const >', 'p'), param('ns3::Ipv6Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice const >, ns3::Ptr< ns3::Ipv6Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice const >, ns3::Ptr< ns3::Ipv6MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header 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::Ipv6Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')],
is_virtual=True)
## ipv6-static-routing.h (module 'internet'): ns3::Ptr<ns3::Ipv6Route> ns3::Ipv6StaticRouting::RouteOutput(ns3::Ptr<ns3::Packet> p, ns3::Ipv6Header const & header, ns3::Ptr<ns3::NetDevice> oif, ns3::Socket::SocketErrno & sockerr) [member function]
cls.add_method('RouteOutput',
@@ -14230,6 +14296,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',
@@ -14605,13 +14675,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([])
@@ -15297,10 +15360,10 @@
cls.add_method('SendRS',
'void',
[param('ns3::Ipv6Address', 'src'), param('ns3::Ipv6Address', 'dst'), param('ns3::Address', 'hardwareAddress')])
- ## icmpv6-l4-protocol.h (module 'internet'): void ns3::Icmpv6L4Protocol::SendRedirection(ns3::Ptr<ns3::Packet> redirectedPacket, ns3::Ipv6Address dst, ns3::Ipv6Address redirTarget, ns3::Ipv6Address redirDestination, ns3::Address redirHardwareTarget) [member function]
+ ## icmpv6-l4-protocol.h (module 'internet'): void ns3::Icmpv6L4Protocol::SendRedirection(ns3::Ptr<ns3::Packet> redirectedPacket, ns3::Ipv6Address src, ns3::Ipv6Address dst, ns3::Ipv6Address redirTarget, ns3::Ipv6Address redirDestination, ns3::Address redirHardwareTarget) [member function]
cls.add_method('SendRedirection',
'void',
- [param('ns3::Ptr< ns3::Packet >', 'redirectedPacket'), param('ns3::Ipv6Address', 'dst'), param('ns3::Ipv6Address', 'redirTarget'), param('ns3::Ipv6Address', 'redirDestination'), param('ns3::Address', 'redirHardwareTarget')])
+ [param('ns3::Ptr< ns3::Packet >', 'redirectedPacket'), param('ns3::Ipv6Address', 'src'), param('ns3::Ipv6Address', 'dst'), param('ns3::Ipv6Address', 'redirTarget'), param('ns3::Ipv6Address', 'redirDestination'), param('ns3::Address', 'redirHardwareTarget')])
## icmpv6-l4-protocol.h (module 'internet'): void ns3::Icmpv6L4Protocol::SetNode(ns3::Ptr<ns3::Node> node) [member function]
cls.add_method('SetNode',
'void',
@@ -15624,10 +15687,10 @@
'void',
[param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')],
is_const=True, is_virtual=True)
- ## ipv6-list-routing.h (module 'internet'): bool ns3::Ipv6ListRouting::RouteInput(ns3::Ptr<const ns3::Packet> p, ns3::Ipv6Header const & header, ns3::Ptr<const ns3::NetDevice> idev, ns3::Callback<void,ns3::Ptr<ns3::Ipv6Route>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback<void,ns3::Ptr<ns3::Ipv6MulticastRoute>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::Socket::SocketErrno,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ecb) [member function]
+ ## ipv6-list-routing.h (module 'internet'): bool ns3::Ipv6ListRouting::RouteInput(ns3::Ptr<const ns3::Packet> p, ns3::Ipv6Header const & header, ns3::Ptr<const ns3::NetDevice> idev, ns3::Callback<void,ns3::Ptr<const ns3::NetDevice>,ns3::Ptr<ns3::Ipv6Route>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ucb, ns3::Callback<void,ns3::Ptr<const ns3::NetDevice>,ns3::Ptr<ns3::Ipv6MulticastRoute>,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback<void,ns3::Ptr<const ns3::Packet>,const ns3::Ipv6Header&,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::Ipv6Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv6Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv6MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header 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::Ipv6Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')],
+ [param('ns3::Ptr< ns3::Packet const >', 'p'), param('ns3::Ipv6Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice const >, ns3::Ptr< ns3::Ipv6Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice const >, ns3::Ptr< ns3::Ipv6MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv6Header 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::Ipv6Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')],
is_virtual=True)
## ipv6-list-routing.h (module 'internet'): ns3::Ptr<ns3::Ipv6Route> ns3::Ipv6ListRouting::RouteOutput(ns3::Ptr<ns3::Packet> p, ns3::Ipv6Header const & header, ns3::Ptr<ns3::NetDevice> oif, ns3::Socket::SocketErrno & sockerr) [member function]
cls.add_method('RouteOutput',
--- a/src/internet/doc/internet-stack.rst Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/doc/internet-stack.rst Wed Jul 24 13:20:24 2013 +0200
@@ -14,48 +14,83 @@
IPv6, Neighbor Discovery, and other related protocols.
Internet Nodes are not subclasses of class Node; they are simply Nodes that have
-had a bunch of IPv4-related objects aggregated to them. They can be put together
+had a bunch of IP-related objects aggregated to them. They can be put together
by hand, or via a helper function :cpp:func:`InternetStackHelper::Install ()`
which does the following to all nodes passed in as arguments:::
void
InternetStackHelper::Install (Ptr<Node> node) const
{
- if (node->GetObject<Ipv4> () != 0)
+ if (m_ipv4Enabled)
{
- NS_FATAL_ERROR ("InternetStackHelper::Install(): Aggregating "
- "an InternetStack to a node with an existing Ipv4 object");
- return;
+ /* IPv4 stack */
+ if (node->GetObject<Ipv4> () != 0)
+ {
+ NS_FATAL_ERROR ("InternetStackHelper::Install (): Aggregating "
+ "an InternetStack to a node with an existing Ipv4 object");
+ return;
+ }
+
+ CreateAndAggregateObjectFromTypeId (node, "ns3::ArpL3Protocol");
+ CreateAndAggregateObjectFromTypeId (node, "ns3::Ipv4L3Protocol");
+ CreateAndAggregateObjectFromTypeId (node, "ns3::Icmpv4L4Protocol");
+ // Set routing
+ Ptr<Ipv4> ipv4 = node->GetObject<Ipv4> ();
+ Ptr<Ipv4RoutingProtocol> ipv4Routing = m_routing->Create (node);
+ ipv4->SetRoutingProtocol (ipv4Routing);
}
- CreateAndAggregateObjectFromTypeId (node, "ns3::ArpL3Protocol");
- CreateAndAggregateObjectFromTypeId (node, "ns3::Ipv4L3Protocol");
- CreateAndAggregateObjectFromTypeId (node, "ns3::Icmpv4L4Protocol");
- CreateAndAggregateObjectFromTypeId (node, "ns3::UdpL4Protocol");
- node->AggregateObject (m_tcpFactory.Create<Object> ());
- Ptr<PacketSocketFactory> factory = CreateObject<PacketSocketFactory> ();
- node->AggregateObject (factory);
- // Set routing
- Ptr<Ipv4> ipv4 = node->GetObject<Ipv4> ();
- Ptr<Ipv4RoutingProtocol> ipv4Routing = m_routing->Create (node);
- ipv4->SetRoutingProtocol (ipv4Routing);
+ if (m_ipv6Enabled)
+ {
+ /* IPv6 stack */
+ if (node->GetObject<Ipv6> () != 0)
+ {
+ NS_FATAL_ERROR ("InternetStackHelper::Install (): Aggregating "
+ "an InternetStack to a node with an existing Ipv6 object");
+ return;
+ }
+
+ CreateAndAggregateObjectFromTypeId (node, "ns3::Ipv6L3Protocol");
+ CreateAndAggregateObjectFromTypeId (node, "ns3::Icmpv6L4Protocol");
+ // Set routing
+ Ptr<Ipv6> ipv6 = node->GetObject<Ipv6> ();
+ Ptr<Ipv6RoutingProtocol> ipv6Routing = m_routingv6->Create (node);
+ ipv6->SetRoutingProtocol (ipv6Routing);
+
+ /* register IPv6 extensions and options */
+ ipv6->RegisterExtensions ();
+ ipv6->RegisterOptions ();
+ }
+
+ if (m_ipv4Enabled || m_ipv6Enabled)
+ {
+ /* UDP and TCP stacks */
+ CreateAndAggregateObjectFromTypeId (node, "ns3::UdpL4Protocol");
+ node->AggregateObject (m_tcpFactory.Create<Object> ());
+ Ptr<PacketSocketFactory> factory = CreateObject<PacketSocketFactory> ();
+ node->AggregateObject (factory);
+ }
}
Where multiple implementations exist in |ns3| (TCP, IP routing), these objects
are added by a factory object (TCP) or by a routing helper (m_routing).
Note that the routing protocol is configured and set outside this
-function. By default, the following protocols are added to Ipv4:::
+function. By default, the following protocols are added:::
- InternetStackHelper::InternetStackHelper ()
+ void InternetStackHelper::Initialize ()
{
SetTcp ("ns3::TcpL4Protocol");
- static Ipv4StaticRoutingHelper staticRouting;
- static Ipv4GlobalRoutingHelper globalRouting;
- static Ipv4ListRoutingHelper listRouting;
+ Ipv4StaticRoutingHelper staticRouting;
+ Ipv4GlobalRoutingHelper globalRouting;
+ Ipv4ListRoutingHelper listRouting;
+ Ipv6ListRoutingHelper listRoutingv6;
+ Ipv6StaticRoutingHelper staticRoutingv6;
listRouting.Add (staticRouting, 0);
listRouting.Add (globalRouting, -10);
+ listRoutingv6.Add (staticRoutingv6, 0);
SetRoutingHelper (listRouting);
+ SetRoutingHelper (listRoutingv6);
}
By default, IPv4 and IPv6 are enabled.
@@ -63,14 +98,14 @@
Internet Node structure
+++++++++++++++++++++++
-An IPv4-capable Node (an |ns3| Node augmented by aggregation to have one or more
+An IP-capable Node (an |ns3| Node augmented by aggregation to have one or more
IP stacks) has the following internal structure.
Layer-3 protocols
~~~~~~~~~~~~~~~~~
At the lowest layer, sitting above the NetDevices, are the "layer 3" protocols,
-including IPv4, IPv6, and ARP. The class
+including IPv4, IPv6, ARP and so on. The class
:cpp:class:`Ipv4L3Protocol` is an implementation class whose public interface is
typically class :cpp:class:`Ipv4`, but the
Ipv4L3Protocol public API is also used internally at present.
@@ -211,11 +246,11 @@
local address, destination port, destination address) associated with the
socket, and a receive callback for the socket.
-Ipv4-capable node interfaces
-++++++++++++++++++++++++++++
+IP-capable node interfaces
+++++++++++++++++++++++++++
Many of the implementation details, or internal objects themselves, of
-Ipv4-capable Node objects are not exposed at the simulator public API. This
+IP-capable Node objects are not exposed at the simulator public API. This
allows for different implementations; for instance, replacing the native |ns3|
models with ported TCP/IP stack code.
--- a/src/internet/doc/ipv6.rst Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/doc/ipv6.rst Wed Jul 24 13:20:24 2013 +0200
@@ -1,7 +1,405 @@
.. include:: replace.txt
-IPv6
+IPv6
----
-*Placeholder chapter*
+This chapter describes the |ns3| IPv6 model capabilities and limitations along with its
+usage and examples.
+
+IPv6 model description
+**********************
+
+The IPv6 model is loosely patterned after the Linux implementation;
+the implementation is not complete as some features of IPv6 are not of
+much interest to simulation studies, and some features of IPv6 are simply
+not modeled yet in |ns3|.
+
+The base class :cpp:class:`Ipv6`
+defines a generic API, while the class :cpp:class:`Ipv6L3Protocol` is the actual class
+implementing the protocol. The actual classes used by the IPv6 stack are located mainly
+in the directory ``src/internet``.
+
+The implementation of IPv6 is contained in the following files:
+
+::
+
+ src/internet/model/icmpv6-header.{cc,h}
+ src/internet/model/icmpv6-l4-protocol.{cc,h}
+ src/internet/model/ipv6.{cc,h}
+ src/internet/model/ipv6-address-generator.{cc,h}
+ src/internet/model/ipv6-autoconfigured-prefix.{cc,h}
+ src/internet/model/ipv6-end-point.{cc,h}
+ src/internet/model/ipv6-end-point-demux.{cc,h}
+ src/internet/model/ipv6-extension.{cc,h}
+ src/internet/model/ipv6-extension-demux.{cc,h}
+ src/internet/model/ipv6-extension-header.{cc,h}
+ src/internet/model/ipv6-header.{cc,h}
+ src/internet/model/ipv6-interface.{cc,h}
+ src/internet/model/ipv6-interface-address.{cc,h}
+ src/internet/model/ipv6-l3-protocol.{cc,h}
+ src/internet/model/ipv6-list-routing.{cc,h}
+ src/internet/model/ipv6-option.{cc,h}
+ src/internet/model/ipv6-option-demux.{cc,h}
+ src/internet/model/ipv6-option-header.{cc,h}
+ src/internet/model/ipv6-packet-info-tag.{cc,h}
+ src/internet/model/ipv6-pmtu-cache.{cc,h}
+ src/internet/model/ipv6-raw-socket-factory.{cc,h}
+ src/internet/model/ipv6-raw-socket-factory-impl.{cc,h}
+ src/internet/model/ipv6-raw-socket-impl.{cc,h}
+ src/internet/model/ipv6-route.{cc,h}
+ src/internet/model/ipv6-routing-protocol.{cc,h}
+ src/internet/model/ipv6-routing-table-entry.{cc,h}
+ src/internet/model/ipv6-static-routing.{cc,h}
+ src/internet/model/ndisc-cache.{cc,h}
+ src/network/utils/inet6-socket-address.{cc,h}
+ src/network/utils/ipv6-address.{cc,h}
+
+Also some helpers are involved with IPv6:
+
+::
+
+ src/internet/helper/internet-stack-helper.{cc,h}
+ src/internet/helper/ipv6-address-helper.{cc,h}
+ src/internet/helper/ipv6-interface-container.{cc,h}
+ src/internet/helper/ipv6-list-routing-helper.{cc,h}
+ src/internet/helper/ipv6-routing-helper.{cc,h}
+ src/internet/helper/ipv6-static-routing-helper.{cc,h}
+
+The model files can be roughly divided into:
+
+* protocol models (e.g., ipv6, ipv6-l3-protocol, icmpv6-l4-protocol, etc.)
+* routing models (i.e., anything with 'routing' in its name)
+* sockets and interfaces (e.g., ipv6-raw-socket, ipv6-interface, ipv6-end-point, etc.)
+* address-related things
+* headers, option headers, extension headers, etc.
+* accessory classes (e.g., ndisc-cache)
+
+
+Usage
+*****
+
+The following description is based on using the typical helpers found in the example code.
+
+IPv6 does not need to be activated in a node. it is automatically added to the
+available protocols once the Internet Stack is installed.
+
+In order to *not* install IPv6 along with IPv4, it is possible to use
+:cpp:class:`ns3::InternetStackHelper` method `SetIpv6StackInstall (bool enable)`
+before installing the InternetStack in the nodes.
+
+Note that to have an IPv6-only network (i.e., to not install the IPv4 stack in a node)
+one should use :cpp:class:`ns3::InternetStackHelper` method `SetIpv4StackInstall (bool enable)`
+before the stack installation.
+
+As an example, in the following code node 0 will have both IPv4 and IPv6, node 1 only
+only IPv6 and node 2 only IPv4:
+
+::
+
+ NodeContainer n;
+ n.Create (3);
+
+ InternetStackHelper internet;
+ InternetStackHelper internetV4only;
+ InternetStackHelper internetV6only;
+
+ internetV4only.SetIpv6StackInstall (false);
+ internetV6only.SetIpv4StackInstall (false);
+
+ internet.Install (n.Get (0));
+ internetV6only.Install (n.Get (1));
+ internetV4only.Install (n.Get (2));
+
+
+
+IPv6 addresses assignment
+=========================
+
+In order to use IPv6 on a network, the first thing to do is assigning IPv6 addresses.
+
+Any IPv6-enabled |ns3| node will have at least one NetDevice: the :cpp:class:`ns3::LoopbackNetDevice`.
+The loopback device address is ``::1``.
+All the other NetDevices will have one or more IPv6 addresses:
+
+* One link-local address: ``fe80::interface ID``, where ``interface ID`` is derived from the NetDevice MAC address.
+* Zero or more global addresses, e.g., ``2001:db8::1``.
+
+Typically the first address on an interface will be the link-local one, with the global
+address(es) being the following ones.
+
+IPv6 global addresses might be:
+
+* manually assigned
+* auto-generated
+
+|ns3| can use both methods, and it's quite important to understand the implications of both.
+
+Manually assigned IPv6 adddresses
++++++++++++++++++++++++++++++++++
+
+This is probably the easiest and most used method. As an example:
+
+::
+
+ Ptr<Node> n0 = CreateObject<Node> ();
+ Ptr<Node> n1 = CreateObject<Node> ();
+ NodeContainer net (n0, n1);
+ CsmaHelper csma;
+ NetDeviceContainer ndc = csma.Install (net);
+
+ NS_LOG_INFO ("Assign IPv6 Addresses.");
+ Ipv6AddressHelper ipv6;
+ ipv6.SetBase (Ipv6Address ("2001:db8::"), Ipv6Prefix (64));
+ Ipv6InterfaceContainer ic = ipv6.Assign (ndc);
+
+This method will add two global IPv6 addresses to the nodes. Note that, as usual for IPv6,
+all the nodes will also have a link-local address. Typically the first address on an
+interface will be the link-local one, with the global address(es) being the following ones.
+
+Auto-generated IPv6 adddresses
+##############################
+
+This is accomplished by relying on the RADVD protocol, implemented by the class
+:cpp:class:`Radvd`. At the time there is no helper for this application, and the
+use is rather difficult (see ``examples/ipv6/radvd.cc``).
+
+Upon using this method, the nodes will acquire dynamically (i.e., during the simulation)
+one (or more) global address(es) according to the RADVD configuration.
+These addresses will be bases on the RADVD announced prefix and the node's EUI-64.
+
+Random-generated IPv6 adddresses
+################################
+
+While IPv6 real nodes will use randomly generated addresses to protect privacy, |ns3|
+does NOT have this capability. This feature haven't been so far considered as interesting
+for simulation.
+
+Duplicate Address Detection (DAD)
+#################################
+
+Nodes will perform DAD (it can be disabled using an :cpp:class:`Icmpv6L4Protocol` attribute).
+Upon receiving a DAD, however, nodes will not react to it. As is: DAD reaction is
+incomplete so far.
+The main reason relies on the missing random-generated address capability. Moreover,
+since |ns3| nodes will usually be well-behaving, therea should't be any Duplicate Address.
+This might be changed in the future, so as to avoid issues with real-world
+integrated simulations.
+
+Host and Router behaviour in IPv6 and |ns3|
+===========================================
+
+In IPv6 there is a clear distinction between *routers* and *hosts*. As one might expect,
+routers can forward packets from an interface to another interface, while hosts drop
+packets not directed to them.
+
+Unfortunately, forwarding is not the only thing affected by this distinction, and forwarding
+itself might be fine-tuned, e.g., to forward packets incoming from an interface and drop
+packets from another interface.
+
+In |ns3| a node is configured to be an *host* by default. There are two main ways to change
+this behaviour:
+
+* Using :cpp:class:`ns3::Ipv6InterfaceContainer` `SetForwarding(uint32_t i, bool router)` where ``i`` is the interface index in the container.
+* Changing the :cpp:class:`ns3::Ipv6` attribute ``IpForward``.
+Either one can be used during the simulation.
+
+A fine-grained setup can be accomplished by using :cpp:class:`ns3::Ipv6Interface` `SetForwarding (bool forward);`
+which allows to change the behaviour on a per-interface-basis.
+
+Note that the node-wide configuration only serves as a convenient method to enable/disable the
+:cpp:class:`ns3::Ipv6Interface` specific setting. An Ipv6Interface added to a node
+with forwarding enabled will be set to be forwarding as well.
+This is really important when a node has interfaces added during the simulation.
+
+According to the :cpp:class:`ns3::Ipv6Interface` forwarding state, the following happens:
+
+* Forwarding OFF
+
+ * The node will NOT reply to Router Solicitation
+ * The node will react to Router Advertisement
+ * The node will periodically send Router Solicitation
+ * Routing protocols MUST DROP packets not directed to the node
+
+* Forwarding ON
+
+ * The node will reply to Router Solicitation
+ * The node will NOT react to Router Advertisement
+ * The node will NOT send Router Solicitation
+ * Routing protocols MUST forward packets
+
+The behaviour is matching ip-sysctl.txt (http://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt)
+with the difference that it's not possible to override the behaviour using esoteric settings
+(e.g., forwarding but accept router advertisements, accept_ra=2, or forwarding but send router solicitations
+forwarding=2).
+
+Consider carefully the implications of packet forwarding. As an example, a node will NOT send
+ICMPv6 PACKET_TOO_BIG messages from an interface with frowarding off. This is completely normal,
+as the Routing protocol will drop the packet before attempting to forward it.
+
+
+Helpers
+=======
+
+Typically the helpers used in IPv6 setup are:
+
+* :cpp:class:`ns3::InternetStackHelper`
+* :cpp:class:`ns3::Ipv6AddressHelper`
+* :cpp:class:`ns3::Ipv6InterfaceContainer`
+
+The use is almost identical to the corresponding IPv4 case, e.g.:
+
+::
+
+ NodeContainer n;
+ n.Create (4);
+
+ NS_LOG_INFO ("Create IPv6 Internet Stack");
+ InternetStackHelper internetv6;
+ internetv6.Install (n);
+
+ NS_LOG_INFO ("Create channels.");
+ CsmaHelper csma;
+ NetDeviceContainer d = csma.Install (n);
+
+ NS_LOG_INFO ("Create networks and assign IPv6 Addresses.");
+ Ipv6AddressHelper ipv6;
+ ipv6.SetBase (Ipv6Address ("2001:db8::"), Ipv6Prefix (64));
+ Ipv6InterfaceContainer iic = ipv6.Assign (d);
+
+Additionally, a common task is to enable forwarding on one of the nodes and to
+setup a default route toward it in the other nodes, e.g.:
+
+::
+
+ iic.SetForwarding (0, true);
+ iic.SetDefaultRouteInAllNodes (0);
+
+This will enable forwarding on the node *0* and will setup a default route in
+:cpp:class:`ns3::Ipv6StaticRouting` on all the other nodes. Note that this
+requires that Ipv6StaticRouting is present in the nodes.
+
+The IPv6 routing helpers enable the user to perform specific tasks on the
+particular routing algorith and to print the routing tables.
+
+
+Attributes
+==========
+
+Many classes in the |ns3| IPv6 implementation contain attributes. The most
+useful ones are:
+
+* :cpp:class:`ns3::Ipv6`
+
+ * `IpForward`, boolean, default false. Globally enable or disable IP forwarding for all current and future IPv6 devices.
+ * `MtuDiscover`, boolean, default true. If disabled, every interface will have its MTU set to 1280 bytes.
+
+* :cpp:class:`ns3::Ipv6L3Protocol`
+
+ * `DefaultTtl`, uint8_t, default 64. The TTL value set by default on all outgoing packets generated on this node.
+ * `SendIcmpv6Redirect`, boolean, default true. Send the ICMPv6 Redirect when appropriate.
+
+* :cpp:class:`ns3::Icmpv6L4Protocol`
+
+ * `DAD`, boolean, default true. Always do DAD (Duplicate Address Detection) check.
+
+* :cpp:class:`ns3::NdiscCache`
+
+ * `UnresolvedQueueSize`, uint32_t, default 3. Size of the queue for packets pending an NA reply.
+
+Output
+======
+
+The IPv6 stack provides some useful trace sources:
+
+* :cpp:class:`ns3::Ipv6L3Protocol`
+
+ * `Tx`, Send IPv6 packet to outgoing interface.
+ * `Rx`, Receive IPv6 packet from incoming interface.
+ * `Drop`, Drop IPv6 packet.
+
+* :cpp:class:`ns3::Ipv6Extension`
+
+ * `Drop`, Drop IPv6 packet.
+
+The latest trace source is generated when a packet contains an unknown option blocking its processing.
+
+Mind that :cpp:class:`ns3::NdiscCache` could drop packets as well, and they are not logged
+in a trace source (yet). This might generate some confusion in the sent/received packets counters.
+
+Advanced Usage
+==============
+
+IPv6 maximum transmission unit (MTU) and fragmentation
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+|ns3| NetDevices define the MTU according to the L2 simulated Device. IPv6 requires
+that the minimum MTU is 1280 bytes, so all NetDevices are required to support at least
+this MTU. This is the link-MTU.
+
+In order to support different MTUs in a source-destination path, |ns3| IPv6 model can
+perform fragmentation.
+This can be either triggered by receiving a packet bigger than the link-MTU from the L4
+protocols (UDP, TCP, etc.), or by receving an ICMPv6 PACKET_TOO_BIG message.
+The model mimics RFC 1981, with the following notable exceptions:
+
+* L4 protocols are not informed of the Path MTU change
+* TCP can not change its Segment Size according to the Path-MTU.
+
+Both limitations are going to be removed in due time.
+
+The Path-MTU cache is currently based on the source-destination IPv6 addresses. Further
+classifications (e.g., flow label) are possible but not yet implemented.
+
+The Path-MTU default validity time is 10 minutes. After the cache entry expiration, the
+Path-MTU information is removed and the next packet will (eventually) trigger a new ICMPv6
+PACKET_TOO_BIG message.
+Note that 1) this is consistent with the RFC specification and 2) L4 protocols are
+responsible for retransmitting the packets.
+
+Examples
+========
+
+The examples for IPv6 are in the directory ``examples/ipv6``. These examples focus on
+the most interesting IPv6 peculiarities, such as fragmentation, redirect and so on.
+
+Moreover, most TCP and UDP examples located in ``examples/udp``, ``examples/tcp``, etc.
+have a command-line option to use IPv6 instead of IPv4.
+
+Troubleshooting
+===============
+
+There are just a few pitfalls to avoid while using |ns3| IPv6.
+
+Routing loops
++++++++++++++
+
+Since the only (so far) routing scheme available for IPv6 is :cpp:class:`ns3::Ipv6StaticRouting`,
+default router have to be setup manually. When there are two or more routers in a network
+(e.g., node A and node B), avoid using the helper function `SetDefaultRouteInAllNodes`
+for more than one router.
+
+The consequence would be to install a default route to B in A and a default route pointing to
+A in B, generating a loop.
+
+Global address leakage
+++++++++++++++++++++++
+
+Remember that addresses in IPv6 are *global* by definition. When using IPv6 with an emulation
+|ns3| capability, avoid at all costs address leakage toward the global Internet.
+It is advisable to setup an external firewall to prevent leakage.
+
+2001:DB8::/32 addresses
++++++++++++++++++++++++
+
+IPv6 standard (RFC 3849) defines the ``2001:DB8::/32`` address class for the *documentation*.
+This manual uses this convention. The addresses in this class are, however, only usable in
+a document, and routers should discard them.
+
+Validation
+**********
+
+The IPv6 protocols has not yet been extensively validated against real implementations.
+The actual tests involve mainly performing checks of the .pcap trace files with Wireshark,
+and the results are positive.
+
--- a/src/internet/helper/ipv4-routing-helper.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/helper/ipv4-routing-helper.cc Wed Jul 24 13:20:24 2013 +0200
@@ -17,10 +17,12 @@
*
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
*/
+
#include "ns3/node.h"
#include "ns3/node-list.h"
#include "ns3/simulator.h"
#include "ns3/ipv4-routing-protocol.h"
+#include "ns3/ipv4-list-routing.h"
#include "ipv4-routing-helper.h"
namespace ns3 {
@@ -80,4 +82,27 @@
Simulator::Schedule (printInterval, &Ipv4RoutingHelper::PrintEvery, this, printInterval, node, stream);
}
+template<class T>
+Ptr<T> Ipv4RoutingHelper::GetRouting (Ptr<Ipv4RoutingProtocol> protocol)
+{
+ Ptr<T> ret = DynamicCast<T> (protocol);
+ if (ret == 0)
+ {
+ // trying to check if protocol is a list routing
+ Ptr<Ipv4ListRouting> lrp = DynamicCast<Ipv4ListRouting> (protocol);
+ if (lrp != 0)
+ {
+ for (uint32_t i = 0; i < lrp->GetNRoutingProtocols (); i++)
+ {
+ int16_t priority;
+ ret = GetRouting<T> (lrp->GetRoutingProtocol (i, priority)); // potential recursion, if inside ListRouting is ListRouting
+ if (ret != 0)
+ break;
+ }
+ }
+ }
+
+ return ret;
+}
+
} // namespace ns3
--- a/src/internet/helper/ipv4-routing-helper.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/helper/ipv4-routing-helper.h Wed Jul 24 13:20:24 2013 +0200
@@ -17,6 +17,7 @@
*
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
*/
+
#ifndef IPV4_ROUTING_HELPER_H
#define IPV4_ROUTING_HELPER_H
@@ -107,6 +108,18 @@
*/
void PrintRoutingTableEvery (Time printInterval, Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const;
+ /**
+ * \brief Request a specified routing protocol <T> from Ipv4RoutingProtocol protocol
+ *
+ * If protocol is Ipv4ListRouting, then protocol will be searched in the list,
+ * otherwise a simple DynamicCast will be performed
+ *
+ * \param protocol Smart pointer to Ipv4RoutingProtocol object
+ * \return a Smart Pointer to the requested protocol (zero if the protocol can't be found)
+ */
+ template<class T>
+ static Ptr<T> GetRouting (Ptr<Ipv4RoutingProtocol> protocol);
+
private:
void Print (Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const;
void PrintEvery (Time printInterval, Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const;
--- a/src/internet/helper/ipv6-address-helper.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/helper/ipv6-address-helper.cc Wed Jul 24 13:20:24 2013 +0200
@@ -23,7 +23,9 @@
#include "ns3/ptr.h"
#include "ns3/node.h"
#include "ns3/net-device.h"
+#include "ns3/mac16-address.h"
#include "ns3/mac48-address.h"
+#include "ns3/mac64-address.h"
#include "ns3/ipv6.h"
#include "ns3/ipv6-address-generator.h"
@@ -51,8 +53,8 @@
Ipv6Address base)
{
NS_LOG_FUNCTION (this << network << prefix << base);
- // XXX for now we do not enforce the prefix because the underlying
- // Ipv6AddressGenerator does not handle prefixes well that are not 64 bits
+ /// \todo for now we do not enforce the prefix because the underlying
+ /// Ipv6AddressGenerator does not handle prefixes well that are not 64 bits
Ipv6AddressGenerator::Init (network, Ipv6Prefix (64), base);
}
@@ -60,16 +62,30 @@
Ipv6Address Ipv6AddressHelper::NewAddress (Address addr)
{
NS_LOG_FUNCTION (this << addr);
- if (Mac48Address::IsMatchingType (addr))
+ if (Mac16Address::IsMatchingType (addr))
+ {
+ Ipv6Address network = Ipv6AddressGenerator::GetNetwork (Ipv6Prefix (64));
+ Ipv6Address address = Ipv6Address::MakeAutoconfiguredAddress (Mac16Address::ConvertFrom (addr), network);
+ Ipv6AddressGenerator::AddAllocated (address);
+ return address;
+ }
+ else if (Mac48Address::IsMatchingType (addr))
{
Ipv6Address network = Ipv6AddressGenerator::GetNetwork (Ipv6Prefix (64));
Ipv6Address address = Ipv6Address::MakeAutoconfiguredAddress (Mac48Address::ConvertFrom (addr), network);
Ipv6AddressGenerator::AddAllocated (address);
return address;
- }
+ }
+ else if (Mac64Address::IsMatchingType (addr))
+ {
+ Ipv6Address network = Ipv6AddressGenerator::GetNetwork (Ipv6Prefix (64));
+ Ipv6Address address = Ipv6Address::MakeAutoconfiguredAddress (Mac64Address::ConvertFrom (addr), network);
+ Ipv6AddressGenerator::AddAllocated (address);
+ return address;
+ }
else
{
- NS_FATAL_ERROR ("Did not pass in a Mac48Address");
+ NS_FATAL_ERROR ("Did not pass in a valid Mac Address (16, 48 or 64 bits)");
}
/* never reached */
return Ipv6Address ("::");
--- a/src/internet/helper/ipv6-address-helper.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/helper/ipv6-address-helper.h Wed Jul 24 13:20:24 2013 +0200
@@ -110,6 +110,7 @@
*
* \param network The IPv6 network
* \param prefix The prefix
+ * \deprecated
*/
void NewNetwork (Ipv6Address network, Ipv6Prefix prefix) NS_DEPRECATED;
@@ -174,29 +175,6 @@
*/
Ipv6InterfaceContainer AssignWithoutAddress (const NetDeviceContainer &c);
-private:
- /**
- * \internal
- * \brief The IPv6 network.
- */
- uint8_t m_network[16];
-
- /**
- * \internal
- * \brief The prefix (mask).
- */
- uint8_t m_prefix[16];
-
- /**
- * \internal
- * \brief The base interface ID
- */
- uint64_t m_base;
- /**
- * \internal
- * \brief The current interface ID
- */
- uint64_t m_iid;
};
} /* namespace ns3 */
--- a/src/internet/helper/ipv6-interface-container.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/helper/ipv6-interface-container.cc Wed Jul 24 13:20:24 2013 +0200
@@ -88,7 +88,7 @@
{
uint32_t other;
/* assume first global address is index 1 (0 is link-local) */
- Ipv6Address routerAddress = ipv6->GetAddress (m_interfaces[i].second, 1).GetAddress ();
+ Ipv6Address routerAddress = ipv6->GetAddress (m_interfaces[i].second, 0).GetAddress ();
for (other = 0; other < m_interfaces.size (); other++)
{
@@ -109,7 +109,7 @@
{
Ptr<Ipv6> ipv6 = m_interfaces[i].first;
Ptr<Ipv6> ipv6Router = m_interfaces[router].first;
- Ipv6Address routerAddress = ipv6Router->GetAddress (m_interfaces[router].second, 1).GetAddress ();
+ Ipv6Address routerAddress = ipv6Router->GetAddress (m_interfaces[router].second, 0).GetAddress ();
Ptr<Ipv6StaticRouting> routing = 0;
Ipv6StaticRoutingHelper routingHelper;
--- a/src/internet/helper/ipv6-routing-helper.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/helper/ipv6-routing-helper.cc Wed Jul 24 13:20:24 2013 +0200
@@ -22,6 +22,7 @@
#include "ns3/node-list.h"
#include "ns3/simulator.h"
#include "ns3/ipv6-routing-protocol.h"
+#include "ns3/ipv6-list-routing.h"
#include "ipv6-routing-helper.h"
namespace ns3 {
@@ -81,4 +82,27 @@
Simulator::Schedule (printInterval, &Ipv6RoutingHelper::PrintEvery, this, printInterval, node, stream);
}
+template<class T>
+Ptr<T> Ipv6RoutingHelper::GetRouting (Ptr<Ipv6RoutingProtocol> protocol)
+{
+ Ptr<T> ret = DynamicCast<T> (protocol);
+ if (ret == 0)
+ {
+ // trying to check if protocol is a list routing
+ Ptr<Ipv6ListRouting> lrp = DynamicCast<Ipv6ListRouting> (protocol);
+ if (lrp != 0)
+ {
+ for (uint32_t i = 0; i < lrp->GetNRoutingProtocols (); i++)
+ {
+ int16_t priority;
+ ret = GetRouting<T> (lrp->GetRoutingProtocol (i, priority)); // potential recursion, if inside ListRouting is ListRouting
+ if (ret != 0)
+ break;
+ }
+ }
+ }
+
+ return ret;
+}
+
} // namespace ns3
--- a/src/internet/helper/ipv6-routing-helper.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/helper/ipv6-routing-helper.h Wed Jul 24 13:20:24 2013 +0200
@@ -110,6 +110,18 @@
*/
void PrintRoutingTableEvery (Time printInterval, Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const;
+ /**
+ * \brief Request a specified routing protocol <T> from Ipv6RoutingProtocol protocol
+ *
+ * If protocol is Ipv6ListRouting, then protocol will be searched in the list,
+ * otherwise a simple DynamicCast will be performed
+ *
+ * \param protocol Smart pointer to Ipv6RoutingProtocol object
+ * \return a Smart Pointer to the requested protocol (zero if the protocol can't be found)
+ */
+ template<class T>
+ static Ptr<T> GetRouting (Ptr<Ipv6RoutingProtocol> protocol);
+
private:
void Print (Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const;
void PrintEvery (Time printInterval, Ptr<Node> node, Ptr<OutputStreamWrapper> stream) const;
--- a/src/internet/model/global-route-manager-impl.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/global-route-manager-impl.h Wed Jul 24 13:20:24 2013 +0200
@@ -706,7 +706,7 @@
* @brief Delete all static routes on all nodes that have a
* GlobalRouterInterface
*
- * TODO: separate manually assigned static routes from static routes that
+ * \todo separate manually assigned static routes from static routes that
* the global routing code injects, and only delete the latter
* @internal
*
--- a/src/internet/model/icmpv6-header.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/icmpv6-header.cc Wed Jul 24 13:20:24 2013 +0200
@@ -1470,7 +1470,7 @@
Icmpv6OptionHeader::Icmpv6OptionHeader ()
{
NS_LOG_FUNCTION (this);
- /* TODO */
+ /** \todo */
m_type = 0;
m_len = 0;
}
--- a/src/internet/model/icmpv6-l4-protocol.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/icmpv6-l4-protocol.cc Wed Jul 24 13:20:24 2013 +0200
@@ -168,7 +168,7 @@
return;
}
- /* TODO : disable multicast loopback to prevent NS probing to be received by the sender */
+ /** \todo disable multicast loopback to prevent NS probing to be received by the sender */
Ptr<Packet> p = ForgeNS ("::",Ipv6Address::MakeSolicitedAddress (target), target, interface->GetDevice ()->GetAddress ());
@@ -222,7 +222,7 @@
case Icmpv6Header::ICMPV6_ECHO_REPLY:
// EchoReply does not contain any info about L4
// so we can not forward it up.
- // TODO: implement request / reply consistency check.
+ /// \todo implement request / reply consistency check.
break;
case Icmpv6Header::ICMPV6_ERROR_DESTINATION_UNREACHABLE:
HandleDestinationUnreachable (p, header.GetSourceAddress (), header.GetDestinationAddress (), interface);
@@ -252,7 +252,7 @@
Ptr<Ipv6L3Protocol> ipv6 = m_node->GetObject<Ipv6L3Protocol> ();
- // TODO assuming the ICMP is carrying a extensionless IP packet
+ /// \todo assuming the ICMP is carrying a extensionless IP packet
uint8_t nextHeader = ipHeader.GetNextHeader ();
@@ -319,7 +319,7 @@
{
p->RemoveHeader (mtuHdr);
hasMtu = true;
- /* XXX case of multiple prefix on single interface */
+ /** \todo case of multiple prefix on single interface */
/* interface->GetDevice ()->SetMtu (m.GetMtu ()); */
}
break;
@@ -595,18 +595,16 @@
if (!entry)
{
- /* ouch!! we are victim of a DAD */
+ /* ouch!! we might be victim of a DAD */
- /* Logically dead code (DEADCODE)
- * b/c loop test compares default Ipv6InterfaceAddress to target
-
Ipv6InterfaceAddress ifaddr;
bool found = false;
uint32_t i = 0;
- uint32_t nb = 0;
+ uint32_t nb = interface->GetNAddresses ();
for (i = 0; i < nb; i++)
{
+ ifaddr = interface->GetAddress (i);
if (ifaddr.GetAddress () == target)
{
found = true;
@@ -621,7 +619,7 @@
interface->SetState (ifaddr.GetAddress (), Ipv6InterfaceAddress::INVALID);
}
}
- */
+
/* we have not initiated any communication with the target so... discard the NA */
return;
}
@@ -1083,7 +1081,7 @@
SendMessage (p, dst, header, 255);
}
-void Icmpv6L4Protocol::SendRedirection (Ptr<Packet> redirectedPacket, Ipv6Address dst, Ipv6Address redirTarget, Ipv6Address redirDestination, Address redirHardwareTarget)
+void Icmpv6L4Protocol::SendRedirection (Ptr<Packet> redirectedPacket, Ipv6Address src, Ipv6Address dst, Ipv6Address redirTarget, Ipv6Address redirDestination, Address redirHardwareTarget)
{
NS_LOG_FUNCTION (this << redirectedPacket << dst << redirTarget << redirDestination << redirHardwareTarget);
uint32_t llaSize = 0;
@@ -1128,7 +1126,10 @@
Icmpv6Redirection redirectionHeader;
redirectionHeader.SetTarget (redirTarget);
redirectionHeader.SetDestination (redirDestination);
- SendMessage (p, dst, redirectionHeader, 64);
+ redirectionHeader.CalculatePseudoHeaderChecksum (src, dst, p->GetSize () + redirectionHeader.GetSerializedSize (), PROT_NUMBER);
+ p->AddHeader (redirectionHeader);
+
+ SendMessage (p, src, dst, 64);
}
Ptr<Packet> Icmpv6L4Protocol::ForgeNA (Ipv6Address src, Ipv6Address dst, Address* hardwareAddress, uint8_t flags)
@@ -1374,8 +1375,8 @@
if (!ipv6->IsForwarding (ipv6->GetInterfaceForDevice (interface->GetDevice ())) && addr.IsLinkLocal ())
{
- /* XXX because all nodes start at the same time, there will be many of RS arround 1 second of simulation time
- * TODO Add random delays before sending RS
+ /* \todo Add random delays before sending RS
+ * because all nodes start at the same time, there will be many of RS arround 1 second of simulation time
*/
Simulator::Schedule (Seconds (0.0), &Icmpv6L4Protocol::SendRS, PeekPointer (icmpv6), ifaddr.GetAddress (), Ipv6Address::GetAllRoutersMulticast (), interface->GetDevice ()->GetAddress ());
}
--- a/src/internet/model/icmpv6-l4-protocol.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/icmpv6-l4-protocol.h Wed Jul 24 13:20:24 2013 +0200
@@ -274,12 +274,13 @@
/**
* \brief Send an ICMPv6 Redirection.
* \param redirectedPacket the redirected packet
- * \param dst destination IPv6 address
+ * \param src IPv6 address to send the redirect from
+ * \param dst IPv6 address to send the redirect to
* \param redirTarget IPv6 target address for Icmpv6Redirection
* \param redirDestination IPv6 destination address for Icmpv6Redirection
* \param redirHardwareTarget L2 target address for Icmpv6OptionRdirected
*/
- void SendRedirection (Ptr<Packet> redirectedPacket, Ipv6Address dst, Ipv6Address redirTarget, Ipv6Address redirDestination, Address redirHardwareTarget);
+ void SendRedirection (Ptr<Packet> redirectedPacket, Ipv6Address src, Ipv6Address dst, Ipv6Address redirTarget, Ipv6Address redirDestination, Address redirHardwareTarget);
/**
* \brief Forge a Neighbor Solicitation.
--- a/src/internet/model/ipv4-global-routing.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ipv4-global-routing.cc Wed Jul 24 13:20:24 2013 +0200
@@ -230,7 +230,7 @@
// create a Ipv4Route object from the selected routing table entry
rtentry = Create<Ipv4Route> ();
rtentry->SetDestination (route->GetDest ());
- // XXX handle multi-address case
+ /// \todo handle multi-address case
rtentry->SetSource (m_ipv4->GetAddress (route->GetInterface (), 0).GetLocal ());
rtentry->SetGateway (route->GetGateway ());
uint32_t interfaceIdx = route->GetInterface ();
@@ -489,11 +489,11 @@
if (header.GetDestination ().IsBroadcast ())
{
NS_LOG_LOGIC ("For me (Ipv4Addr broadcast address)");
- // TODO: Local Deliver for broadcast
- // TODO: Forward broadcast
+ /// \todo Local Deliver for broadcast
+ /// \todo Forward broadcast
}
- // TODO: Configurable option to enable RFC 1222 Strong End System Model
+ /// \todo Configurable option to enable RFC 1222 Strong End System Model
// Right now, we will be permissive and allow a source to send us
// a packet to one of our other interface addresses; that is, the
// destination unicast address does not match one of the iif addresses,
--- a/src/internet/model/ipv4-interface.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ipv4-interface.cc Wed Jul 24 13:20:24 2013 +0200
@@ -207,8 +207,8 @@
// Check for a loopback device
if (DynamicCast<LoopbackNetDevice> (m_device))
{
- // XXX additional checks needed here (such as whether multicast
- // goes to loopback)?
+ /// \todo additional checks needed here (such as whether multicast
+ /// goes to loopback)?
m_device->Send (p, m_device->GetBroadcast (),
Ipv4L3Protocol::PROT_NUMBER);
return;
@@ -346,5 +346,28 @@
return (addr); // quiet compiler
}
+Ipv4InterfaceAddress
+Ipv4Interface::RemoveAddress(Ipv4Address address)
+{
+ NS_LOG_FUNCTION(this << address);
+
+ if (address == address.GetLoopback())
+ {
+ NS_LOG_WARN ("Cannot remove loopback address.");
+ return Ipv4InterfaceAddress();
+ }
+
+ for(Ipv4InterfaceAddressListI it = m_ifaddrs.begin(); it != m_ifaddrs.end(); it++)
+ {
+ if((*it).GetLocal() == address)
+ {
+ Ipv4InterfaceAddress ifAddr = *it;
+ m_ifaddrs.erase(it);
+ return ifAddr;
+ }
+ }
+ return Ipv4InterfaceAddress();
+}
+
} // namespace ns3
--- a/src/internet/model/ipv4-interface.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ipv4-interface.h Wed Jul 24 13:20:24 2013 +0200
@@ -152,6 +152,15 @@
*/
Ipv4InterfaceAddress RemoveAddress (uint32_t index);
+ /**
+ * \brief Remove the given Ipv4 address from the interface.
+ * \param address The Ipv4 address to remove
+ * \returns The removed Ipv4 interface address
+ * \returns The null interface address if the interface did not contain the
+ * address or if loopback address was passed as argument
+ */
+ Ipv4InterfaceAddress RemoveAddress (Ipv4Address address);
+
protected:
virtual void DoDispose (void);
private:
--- a/src/internet/model/ipv4-l3-protocol.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ipv4-l3-protocol.cc Wed Jul 24 13:20:24 2013 +0200
@@ -687,9 +687,9 @@
}
}
-// 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
Ipv4L3Protocol::BuildHeader (
Ipv4Address source,
@@ -979,6 +979,29 @@
return false;
}
+bool
+Ipv4L3Protocol::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<Ipv4Interface> 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
Ipv4L3Protocol::SelectSourceAddress (Ptr<const NetDevice> device,
Ipv4Address dst, Ipv4InterfaceAddress::InterfaceAddressScope_e scope)
--- a/src/internet/model/ipv4-l3-protocol.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ipv4-l3-protocol.h Wed Jul 24 13:20:24 2013 +0200
@@ -194,6 +194,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 interface, Ipv4Address address);
Ipv4Address SelectSourceAddress (Ptr<const NetDevice> device,
Ipv4Address dst, Ipv4InterfaceAddress::InterfaceAddressScope_e scope);
--- a/src/internet/model/ipv4-route.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ipv4-route.h Wed Jul 24 13:20:24 2013 +0200
@@ -145,6 +145,7 @@
/**
* \param oif outgoing interface
* \return TTL for this route
+ * \deprecated
*/
uint32_t GetOutputTtl (uint32_t oif) NS_DEPRECATED;
--- a/src/internet/model/ipv4-static-routing.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ipv4-static-routing.cc Wed Jul 24 13:20:24 2013 +0200
@@ -34,7 +34,7 @@
#include "ipv4-static-routing.h"
#include "ipv4-routing-table-entry.h"
-NS_LOG_COMPONENT_DEFINE ("Ipv4StaticRoung");
+NS_LOG_COMPONENT_DEFINE ("Ipv4StaticRouting");
using std::make_pair;
@@ -516,12 +516,12 @@
if (ipHeader.GetDestination ().IsBroadcast ())
{
NS_LOG_LOGIC ("For me (Ipv4Addr broadcast address)");
- // TODO: Local Deliver for broadcast
- // TODO: Forward broadcast
+ /// \todo Local Deliver for broadcast
+ /// \todo Forward broadcast
}
NS_LOG_LOGIC ("Unicast destination");
- // TODO: Configurable option to enable RFC 1222 Strong End System Model
+ /// \todo Configurable option to enable RFC 1222 Strong End System Model
// Right now, we will be permissive and allow a source to send us
// a packet to one of our other interface addresses; that is, the
// destination unicast address does not match one of the iif addresses,
--- a/src/internet/model/ipv4.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ipv4.h Wed Jul 24 13:20:24 2013 +0200
@@ -248,6 +248,15 @@
*/
virtual bool RemoveAddress (uint32_t interface, uint32_t addressIndex) = 0;
+ /**
+ * \brief Remove the given address on named Ipv4 interface
+ *
+ * \param interface Interface number of an Ipv4 interface
+ * \param address The address to remove
+ * \returns true if the operation succeeded
+ */
+ virtual bool RemoveAddress (uint32_t interface, Ipv4Address address) = 0;
+
/**
* \brief Return the first primary source address with scope less than
* or equal to the requested scope, to use in sending a packet to
--- a/src/internet/model/ipv6-extension-header.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ipv6-extension-header.cc Wed Jul 24 13:20:24 2013 +0200
@@ -613,23 +613,23 @@
void Ipv6ExtensionESPHeader::Print (std::ostream &os) const
{
- /* TODO */
+ /** \todo */
}
uint32_t Ipv6ExtensionESPHeader::GetSerializedSize () const
{
- /* TODO */
+ /** \todo */
return 0;
}
void Ipv6ExtensionESPHeader::Serialize (Buffer::Iterator start) const
{
- /* TODO */
+ /** \todo */
}
uint32_t Ipv6ExtensionESPHeader::Deserialize (Buffer::Iterator start)
{
- /* TODO */
+ /** \todo */
return 0;
}
@@ -659,23 +659,23 @@
void Ipv6ExtensionAHHeader::Print (std::ostream &os) const
{
- /* TODO */
+ /** \todo */
}
uint32_t Ipv6ExtensionAHHeader::GetSerializedSize () const
{
- /* TODO */
+ /** \todo */
return 0;
}
void Ipv6ExtensionAHHeader::Serialize (Buffer::Iterator start) const
{
- /* TODO */
+ /** \todo */
}
uint32_t Ipv6ExtensionAHHeader::Deserialize (Buffer::Iterator start)
{
- /* TODO */
+ /** \todo */
return 0;
}
--- a/src/internet/model/ipv6-extension.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ipv6-extension.cc Wed Jul 24 13:20:24 2013 +0200
@@ -54,7 +54,7 @@
UintegerValue (0),
MakeUintegerAccessor (&Ipv6Extension::GetExtensionNumber),
MakeUintegerChecker<uint8_t> ())
- .AddTraceSource ("Drop", "Drop ipv6 packet",
+ .AddTraceSource ("Drop", "Drop IPv6 packet",
MakeTraceSourceAccessor (&Ipv6Extension::m_dropTrace))
;
return tid;
@@ -1036,7 +1036,7 @@
{
NS_LOG_FUNCTION (this << packet << offset << ipv6Header << dst << nextHeader << isDropped);
- /* TODO */
+ /** \todo */
return 0;
}
@@ -1074,7 +1074,7 @@
{
NS_LOG_FUNCTION (this << packet << offset << ipv6Header << dst << nextHeader << isDropped);
- /* TODO */
+ /** \todo */
return true;
}
--- a/src/internet/model/ipv6-interface-address.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ipv6-interface-address.cc Wed Jul 24 13:20:24 2013 +0200
@@ -95,6 +95,12 @@
/* link-local address is always /64 prefix */
m_prefix = Ipv6Prefix (64);
}
+ else if (address.IsLinkLocalMulticast ())
+ {
+ m_scope = LINKLOCAL;
+ /* link-local multicast address is always /16 prefix */
+ m_prefix = Ipv6Prefix (16);
+ }
else
{
m_scope = GLOBAL;
--- a/src/internet/model/ipv6-interface.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ipv6-interface.cc Wed Jul 24 13:20:24 2013 +0200
@@ -25,6 +25,8 @@
#include "ipv6-interface.h"
#include "ns3/net-device.h"
#include "loopback-net-device.h"
+#include "ns3/mac16-address.h"
+#include "ns3/mac64-address.h"
#include "ipv6-l3-protocol.h"
#include "icmpv6-l4-protocol.h"
#include "ndisc-cache.h"
@@ -87,11 +89,21 @@
{
Address addr = GetDevice ()->GetAddress ();
- if (Mac48Address::IsMatchingType (addr))
+ if (Mac16Address::IsMatchingType (addr))
+ {
+ Ipv6InterfaceAddress ifaddr = Ipv6InterfaceAddress (Ipv6Address::MakeAutoconfiguredLinkLocalAddress (Mac16Address::ConvertFrom (addr)), Ipv6Prefix (64));
+ AddAddress (ifaddr);
+ }
+ else if (Mac48Address::IsMatchingType (addr))
{
Ipv6InterfaceAddress ifaddr = Ipv6InterfaceAddress (Ipv6Address::MakeAutoconfiguredLinkLocalAddress (Mac48Address::ConvertFrom (addr)), Ipv6Prefix (64));
AddAddress (ifaddr);
}
+ else if (Mac64Address::IsMatchingType (addr))
+ {
+ Ipv6InterfaceAddress ifaddr = Ipv6InterfaceAddress (Ipv6Address::MakeAutoconfiguredLinkLocalAddress (Mac64Address::ConvertFrom (addr)), Ipv6Prefix (64));
+ AddAddress (ifaddr);
+ }
else
{
NS_ASSERT_MSG (false, "IPv6 autoconf for this kind of address not implemented.");
@@ -291,6 +303,29 @@
return addr; /* quiet compiler */
}
+Ipv6InterfaceAddress
+Ipv6Interface::RemoveAddress(Ipv6Address address)
+{
+ NS_LOG_FUNCTION(this << address);
+
+ if (address == address.GetLoopback())
+ {
+ NS_LOG_WARN ("Cannot remove loopback address.");
+ return Ipv6InterfaceAddress();
+ }
+
+ for (Ipv6InterfaceAddressListI it = m_addresses.begin (); it != m_addresses.end (); ++it)
+ {
+ if((*it).GetAddress() == address)
+ {
+ Ipv6InterfaceAddress iface = (*it);
+ m_addresses.erase(it);
+ return iface;
+ }
+ }
+ return Ipv6InterfaceAddress();
+}
+
Ipv6InterfaceAddress Ipv6Interface::GetAddressMatchingDestination (Ipv6Address dst)
{
NS_LOG_FUNCTION (this << dst);
@@ -323,7 +358,7 @@
/* check if destination is localhost (::1) */
if (DynamicCast<LoopbackNetDevice> (m_device))
{
- /* XXX additional checks needed here (such as whether multicast
+ /** \todo additional checks needed here (such as whether multicast
* goes to loopback)?
*/
m_device->Send (p, m_device->GetBroadcast (), Ipv6L3Protocol::PROT_NUMBER);
--- a/src/internet/model/ipv6-interface.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ipv6-interface.h Wed Jul 24 13:20:24 2013 +0200
@@ -228,6 +228,15 @@
Ipv6InterfaceAddress RemoveAddress (uint32_t index);
/**
+ * \brief Remove the given Ipv6 address from the interface.
+ * \param address The Ipv6 address to remove
+ * \returns The removed Ipv6 interface address
+ * \returns The null interface address if the interface did not contain the
+ * address or if loopback address was passed as argument
+ */
+ Ipv6InterfaceAddress RemoveAddress (Ipv6Address address);
+
+ /**
* \brief Update state of an interface address.
* \param address IPv6 address
* \param state new state
--- a/src/internet/model/ipv6-l3-protocol.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ipv6-l3-protocol.cc Wed Jul 24 13:20:24 2013 +0200
@@ -28,6 +28,8 @@
#include "ns3/object-vector.h"
#include "ns3/ipv6-routing-protocol.h"
#include "ns3/ipv6-route.h"
+#include "ns3/mac16-address.h"
+#include "ns3/mac64-address.h"
#include "loopback-net-device.h"
#include "ipv6-l3-protocol.h"
@@ -263,11 +265,19 @@
if (flags & (1 << 6)) /* auto flag */
{
- /* XXX : add other L2 address case */
- if (Mac48Address::IsMatchingType (addr))
+ // In case of new MacAddress types, remember to change Ipv6L3Protocol::RemoveAutoconfiguredAddress as well
+ if (Mac16Address::IsMatchingType (addr))
+ {
+ address = Ipv6InterfaceAddress (Ipv6Address::MakeAutoconfiguredAddress (Mac16Address::ConvertFrom (addr), network));
+ }
+ else if (Mac48Address::IsMatchingType (addr))
{
address = Ipv6InterfaceAddress (Ipv6Address::MakeAutoconfiguredAddress (Mac48Address::ConvertFrom (addr), network));
}
+ else if (Mac64Address::IsMatchingType (addr))
+ {
+ address = Ipv6InterfaceAddress (Ipv6Address::MakeAutoconfiguredAddress (Mac64Address::ConvertFrom (addr), network));
+ }
else
{
NS_FATAL_ERROR ("Unknown method to make autoconfigured address for this kind of device.");
@@ -312,7 +322,25 @@
Address addr = iface->GetDevice ()->GetAddress ();
uint32_t max = iface->GetNAddresses ();
uint32_t i = 0;
- Ipv6Address toFound = Ipv6Address::MakeAutoconfiguredAddress (Mac48Address::ConvertFrom (addr), network);
+ Ipv6Address toFound;
+
+ if (Mac16Address::IsMatchingType (addr))
+ {
+ toFound = Ipv6Address::MakeAutoconfiguredAddress (Mac16Address::ConvertFrom (addr), network);
+ }
+ else if (Mac48Address::IsMatchingType (addr))
+ {
+ toFound = Ipv6Address::MakeAutoconfiguredAddress (Mac48Address::ConvertFrom (addr), network);
+ }
+ else if (Mac64Address::IsMatchingType (addr))
+ {
+ toFound = Ipv6Address::MakeAutoconfiguredAddress (Mac64Address::ConvertFrom (addr), network);
+ }
+ else
+ {
+ NS_FATAL_ERROR ("Unknown method to make autoconfigured address for this kind of device.");
+ return;
+ }
for (i = 0; i < max; i++)
{
@@ -381,6 +409,29 @@
return false;
}
+bool
+Ipv6L3Protocol::RemoveAddress (uint32_t i, Ipv6Address address)
+{
+ NS_LOG_FUNCTION (this << i << address);
+
+ if (address == Ipv6Address::GetLoopback())
+ {
+ NS_LOG_WARN ("Cannot remove loopback address.");
+ return false;
+ }
+ Ptr<Ipv6Interface> interface = GetInterface (i);
+ Ipv6InterfaceAddress ifAddr = interface->RemoveAddress (address);
+ if (ifAddr != Ipv6InterfaceAddress ())
+ {
+ if (m_routingProtocol != 0)
+ {
+ m_routingProtocol->NotifyRemoveAddress (i, ifAddr);
+ }
+ return true;
+ }
+ return false;
+}
+
void Ipv6L3Protocol::SetMetric (uint32_t i, uint16_t metric)
{
NS_LOG_FUNCTION (this << i << metric);
@@ -800,7 +851,20 @@
if (packet->GetSize () > (size_t)(dev->GetMtu () + 40)) /* 40 => size of IPv6 header */
{
// Router => drop
- if (m_ipForward)
+
+ bool fromMe = false;
+ for (uint32_t i=0; i<GetNInterfaces(); i++ )
+ {
+ for (uint32_t j=0; j<GetNAddresses(i); j++ )
+ {
+ if (GetAddress(i,j).GetAddress() == ipHeader.GetSourceAddress())
+ {
+ fromMe = true;
+ break;
+ }
+ }
+ }
+ if (!fromMe)
{
Ptr<Icmpv6L4Protocol> icmpv6 = GetIcmpv6 ();
if ( icmpv6 )
@@ -883,11 +947,19 @@
}
}
-void Ipv6L3Protocol::IpForward (Ptr<Ipv6Route> rtentry, Ptr<const Packet> p, const Ipv6Header& header)
+void Ipv6L3Protocol::IpForward (Ptr<const NetDevice> idev, Ptr<Ipv6Route> rtentry, Ptr<const Packet> p, const Ipv6Header& header)
{
NS_LOG_FUNCTION (this << rtentry << p << header);
NS_LOG_LOGIC ("Forwarding logic for node: " << m_node->GetId ());
+ // Drop RFC 3849 packets: 2001:db8::/32
+ if (header.GetDestinationAddress().IsDocumentation())
+ {
+ NS_LOG_WARN ("Received a packet for 2001:db8::/32 (documentation class). Drop.");
+ m_dropTrace (header, p, DROP_ROUTE_ERROR, m_node->GetObject<Ipv6> (), 0);
+ return;
+ }
+
// Forwarding
Ipv6Header ipHeader = header;
Ptr<Packet> packet = p->Copy ();
@@ -920,9 +992,12 @@
* exists.
*/
- if (m_sendIcmpv6Redirect &&
- ((!rtentry->GetGateway ().IsAny () && rtentry->GetGateway ().CombinePrefix (Ipv6Prefix (64)) == header.GetSourceAddress ().CombinePrefix (Ipv6Prefix (64)))
- || (rtentry->GetDestination ().CombinePrefix (Ipv6Prefix (64)) == header.GetSourceAddress ().CombinePrefix (Ipv6Prefix (64)))))
+ /* Theoretically we should also check if the redirect target is on the same network
+ * as the source node. On the other hand, we are sure that the router we're redirecting to
+ * used a link-local address. As a consequence, they MUST be on the same network, the link-local net.
+ */
+
+ if (m_sendIcmpv6Redirect && (rtentry->GetOutputDevice ()==idev))
{
NS_LOG_LOGIC ("ICMPv6 redirect!");
Ptr<Icmpv6L4Protocol> icmpv6 = GetIcmpv6 ();
@@ -938,21 +1013,22 @@
}
copy->AddHeader (header);
+ Ipv6Address linkLocal = GetInterface (GetInterfaceForDevice (rtentry->GetOutputDevice ()))->GetLinkLocalAddress ().GetAddress ();
if (icmpv6->Lookup (target, rtentry->GetOutputDevice (), 0, &hardwareTarget))
{
- icmpv6->SendRedirection (copy, src, target, dst, hardwareTarget);
+ icmpv6->SendRedirection (copy, linkLocal, src, target, dst, hardwareTarget);
}
else
{
- icmpv6->SendRedirection (copy, src, target, dst, Address ());
+ icmpv6->SendRedirection (copy, linkLocal, src, target, dst, Address ());
}
}
SendRealOut (rtentry, packet, ipHeader);
}
-void Ipv6L3Protocol::IpMulticastForward (Ptr<Ipv6MulticastRoute> mrtentry, Ptr<const Packet> p, const Ipv6Header& header)
+void Ipv6L3Protocol::IpMulticastForward (Ptr<const NetDevice> idev, Ptr<Ipv6MulticastRoute> mrtentry, Ptr<const Packet> p, const Ipv6Header& header)
{
NS_LOG_FUNCTION (this << mrtentry << p << header);
NS_LOG_LOGIC ("Multicast forwarding logic for node: " << m_node->GetId ());
--- a/src/internet/model/ipv6-l3-protocol.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ipv6-l3-protocol.h Wed Jul 24 13:20:24 2013 +0200
@@ -249,6 +249,14 @@
bool RemoveAddress (uint32_t interfaceIndex, uint32_t addressIndex);
/**
+ * \brief Remove a specified Ipv6 address from an interface.
+ * \param interfaceIndex interface index
+ * \param address Ipv6Address to be removed from the interface
+ * \returns true if the operation succeeded
+ */
+ bool RemoveAddress (uint32_t interface, Ipv6Address address);
+
+ /**
* \brief Set metric for an interface.
* \param i index
* \param metric
@@ -420,19 +428,21 @@
/**
* \brief Forward a packet.
+ * \param idev Pointer to ingress network device
* \param rtentry route
* \param p packet to forward
* \param header IPv6 header to add to the packet
*/
- void IpForward (Ptr<Ipv6Route> rtentry, Ptr<const Packet> p, const Ipv6Header& header);
+ void IpForward (Ptr<const NetDevice> idev, Ptr<Ipv6Route> rtentry, Ptr<const Packet> p, const Ipv6Header& header);
/**
* \brief Forward a packet in multicast.
+ * \param idev Pointer to ingress network device
* \param mrtentry route
* \param p packet to forward
* \param header IPv6 header to add to the packet
*/
- void IpMulticastForward (Ptr<Ipv6MulticastRoute> mrtentry, Ptr<const Packet> p, const Ipv6Header& header);
+ void IpMulticastForward (Ptr<const NetDevice> idev, Ptr<Ipv6MulticastRoute> mrtentry, Ptr<const Packet> p, const Ipv6Header& header);
/**
* \brief Deliver a packet.
--- a/src/internet/model/ipv6-list-routing.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ipv6-list-routing.cc Wed Jul 24 13:20:24 2013 +0200
@@ -147,7 +147,7 @@
return retVal;
}
- // TODO: Configurable option to enable RFC 1222 Strong End System Model
+ /// \todo Configurable option to enable RFC 1222 Strong End System Model
// Right now, we will be permissive and allow a source to send us
// a packet to one of our other interface addresses; that is, the
// destination unicast address does not match one of the iif addresses,
--- a/src/internet/model/ipv6-raw-socket-impl.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ipv6-raw-socket-impl.cc Wed Jul 24 13:20:24 2013 +0200
@@ -244,7 +244,14 @@
}
}
- ipv6->Send (p, route->GetSource (), dst, m_protocol, route);
+ if (m_src.IsAny ())
+ {
+ ipv6->Send (p, route->GetSource (), dst, m_protocol, route);
+ }
+ else
+ {
+ ipv6->Send (p, m_src, dst, m_protocol, route);
+ }
// Return only payload size (as Linux does).
return p->GetSize () - hdr.GetSerializedSize ();
}
--- a/src/internet/model/ipv6-route.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ipv6-route.h Wed Jul 24 13:20:24 2013 +0200
@@ -200,6 +200,7 @@
* \brief Get output TTL for this route.
* \param oif outgoing interface
* \return TTL for this route
+ * \deprecated
*/
uint32_t GetOutputTtl (uint32_t oif) NS_DEPRECATED;
--- a/src/internet/model/ipv6-routing-protocol.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ipv6-routing-protocol.h Wed Jul 24 13:20:24 2013 +0200
@@ -56,8 +56,8 @@
public:
static TypeId GetTypeId (void);
- typedef Callback<void, Ptr<Ipv6Route>, Ptr<const Packet>, const Ipv6Header &> UnicastForwardCallback;
- typedef Callback<void, Ptr<Ipv6MulticastRoute>, Ptr<const Packet>, const Ipv6Header &> MulticastForwardCallback;
+ typedef Callback<void, Ptr<const NetDevice>, Ptr<Ipv6Route>, Ptr<const Packet>, const Ipv6Header &> UnicastForwardCallback;
+ typedef Callback<void, Ptr<const NetDevice>, Ptr<Ipv6MulticastRoute>, Ptr<const Packet>, const Ipv6Header &> MulticastForwardCallback;
typedef Callback<void, Ptr<const Packet>, const Ipv6Header &, uint32_t > LocalDeliverCallback;
typedef Callback<void, Ptr<const Packet>, const Ipv6Header &, Socket::SocketErrno > ErrorCallback;
--- a/src/internet/model/ipv6-static-routing.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ipv6-static-routing.cc Wed Jul 24 13:20:24 2013 +0200
@@ -97,6 +97,8 @@
void Ipv6StaticRouting::AddHostRouteTo (Ipv6Address dst, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse, uint32_t metric)
{
NS_LOG_FUNCTION (this << dst << nextHop << interface << prefixToUse << metric);
+ NS_ASSERT_MSG(nextHop.IsLinkLocal(), "Ipv6StaticRouting::AddHostRouteTo - Next hop must be link-local");
+
AddNetworkRouteTo (dst, Ipv6Prefix::GetOnes (), nextHop, interface, prefixToUse, metric);
}
@@ -117,6 +119,8 @@
void Ipv6StaticRouting::AddNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse, uint32_t metric)
{
NS_LOG_FUNCTION (this << network << networkPrefix << nextHop << interface << prefixToUse << metric);
+ NS_ASSERT_MSG(nextHop.IsLinkLocal(), "Ipv6StaticRouting::AddNetworkRouteTo - Next hop must be link-local");
+
Ipv6RoutingTableEntry* route = new Ipv6RoutingTableEntry ();
*route = Ipv6RoutingTableEntry::CreateNetworkRouteTo (network, networkPrefix, nextHop, interface, prefixToUse);
m_networkRoutes.push_back (std::make_pair (route, metric));
@@ -302,7 +306,7 @@
}
else if (route->GetDest ().IsAny ()) /* default route */
{
- rtentry->SetSource (SourceAddressSelection (interfaceIdx, route->GetPrefixToUse ().IsAny () ? route->GetGateway () : route->GetPrefixToUse ()));
+ rtentry->SetSource (SourceAddressSelection (interfaceIdx, route->GetPrefixToUse ().IsAny () ? dst : route->GetPrefixToUse ()));
}
else
{
@@ -555,7 +559,7 @@
if (mrtentry)
{
NS_LOG_LOGIC ("Multicast route found");
- mcb (mrtentry, p, header); // multicast forwarding callback
+ mcb (idev, mrtentry, p, header); // multicast forwarding callback
return true;
}
else
@@ -565,7 +569,7 @@
}
}
- // TODO: Configurable option to enable RFC 1222 Strong End System Model
+ /// \todo Configurable option to enable RFC 1222 Strong End System Model
// Right now, we will be permissive and allow a source to send us
// a packet to one of our other interface addresses; that is, the
// destination unicast address does not match one of the iif addresses,
@@ -607,7 +611,7 @@
if (rtentry != 0)
{
NS_LOG_LOGIC ("Found unicast destination- calling unicast callback");
- ucb (rtentry, p, header); // unicast forwarding callback
+ ucb (idev, rtentry, p, header); // unicast forwarding callback
return true;
}
else
@@ -728,7 +732,7 @@
NS_LOG_FUNCTION (this << dst << mask << nextHop << interface);
if (dst != Ipv6Address::GetZero ())
{
- for (NetworkRoutesI j = m_networkRoutes.begin (); j != m_networkRoutes.end (); j++)
+ for (NetworkRoutesI j = m_networkRoutes.begin (); j != m_networkRoutes.end ();)
{
Ipv6RoutingTableEntry* rtentry = j->first;
Ipv6Prefix prefix = rtentry->GetDestNetworkPrefix ();
@@ -737,7 +741,11 @@
if (dst == entry && prefix == mask && rtentry->GetInterface () == interface)
{
delete j->first;
- m_networkRoutes.erase (j);
+ j = m_networkRoutes.erase (j);
+ }
+ else
+ {
+ ++j;
}
}
}
@@ -761,13 +769,14 @@
return ret;
}
- /* useally IPv6 interfaces have one link-local address and one global address */
+ /* usually IPv6 interfaces have one link-local address and one global address */
for (uint32_t i = 1; i < m_ipv6->GetNAddresses (interface); i++)
{
Ipv6InterfaceAddress test = m_ipv6->GetAddress (interface, i);
+ Ipv6InterfaceAddress dst(dest);
- if (test.GetAddress ().CombinePrefix (test.GetPrefix ()) == dest.CombinePrefix (test.GetPrefix ()))
+ if (test.GetScope() == dst.GetScope())
{
return test.GetAddress ();
}
--- a/src/internet/model/ipv6-static-routing.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ipv6-static-routing.h Wed Jul 24 13:20:24 2013 +0200
@@ -74,7 +74,7 @@
/**
* \brief Add route to host.
* \param dest destination address
- * \param nextHop next hop address to route the packet
+ * \param nextHop next hop address to route the packet. Must be a link-local address
* \param interface interface index
* \param prefixToUse prefix that should be used for source address for this destination
* \param metric metric of route in case of multiple routes to same destination
@@ -103,7 +103,7 @@
* \brief Add route to network.
* \param network network address
* \param networkPrefix network prefix*
- * \param nextHop next hop address to route the packet
+ * \param nextHop next hop address to route the packet. Must be a link-local address
* \param interface interface index
* \param prefixToUse prefix that should be used for source address for this destination
* \param metric metric of route in case of multiple routes to same destination
--- a/src/internet/model/ipv6.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ipv6.h Wed Jul 24 13:20:24 2013 +0200
@@ -218,6 +218,15 @@
virtual bool RemoveAddress (uint32_t interface, uint32_t addressIndex) = 0;
/**
+ * \brief Remove the given address on named Ipv6 interface
+ *
+ * \param interface Interface number of an IPv6 interface
+ * \param address the address to remove
+ * \returns true if the operation succeeded
+ */
+ virtual bool RemoveAddress (uint32_t interface, Ipv6Address address) = 0;
+
+ /**
* \brief Set metric on specified Ipv6 interface.
*
* \param interface The interface number of an IPv6 interface
--- a/src/internet/model/ndisc-cache.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/ndisc-cache.cc Wed Jul 24 13:20:24 2013 +0200
@@ -182,7 +182,7 @@
if (m_waiting.size () >= m_ndCache->GetUnresQlen ())
{
/* we store only m_unresQlen packet => first packet in first packet remove */
- /* XXX report packet as 'dropped' */
+ /** \todo report packet as 'dropped' */
m_waiting.remove (0);
}
m_waiting.push_back (p);
@@ -191,7 +191,7 @@
void NdiscCache::Entry::ClearWaitingPacket ()
{
NS_LOG_FUNCTION_NOARGS ();
- /* XXX report packets as 'dropped' */
+ /** \todo report packets as 'dropped' */
m_waiting.clear ();
}
--- a/src/internet/model/nsc-tcp-l4-protocol.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/nsc-tcp-l4-protocol.cc Wed Jul 24 13:20:24 2013 +0200
@@ -114,7 +114,7 @@
int external_rand ()
{
- return 1; // TODO
+ return 1; /// \todo
}
NscTcpL4Protocol::NscTcpL4Protocol ()
@@ -384,7 +384,7 @@
void NscTcpL4Protocol::wakeup ()
{
- // TODO
+ /// \todo
// this should schedule a timer to read from all tcp sockets now... this is
// an indication that data might be waiting on the socket
@@ -450,7 +450,7 @@
// IP address of the subnet but this was found to fail for
// some use cases in /30 subnets.
- // XXX
+ /// \todo Bug 1398 NSC's limitation to single-interface nodes
m_nscStack->add_default_gateway (addrOss.str ().c_str ());
}
}
--- a/src/internet/model/nsc-tcp-socket-impl.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/nsc-tcp-socket-impl.cc Wed Jul 24 13:20:24 2013 +0200
@@ -843,7 +843,7 @@
case NSC_EAGAIN: return ERROR_AGAIN;
case NSC_EISCONN: // fallthrough
case NSC_EALREADY: return ERROR_ISCONN;
- case NSC_ECONNREFUSED: return ERROR_NOROUTETOHOST; // XXX, better mapping?
+ case NSC_ECONNREFUSED: return ERROR_NOROUTETOHOST; /// \todo better mapping?
case NSC_ECONNRESET: // for no, all of these fall through
case NSC_EHOSTDOWN:
case NSC_ENETUNREACH:
@@ -851,7 +851,7 @@
case NSC_EMSGSIZE: return ERROR_MSGSIZE;
case NSC_ENOTCONN: return ERROR_NOTCONN;
case NSC_ESHUTDOWN: return ERROR_SHUTDOWN;
- case NSC_ETIMEDOUT: return ERROR_NOTCONN; // XXX - this mapping isn't correct
+ case NSC_ETIMEDOUT: return ERROR_NOTCONN; /// \todo this mapping isn't correct
case NSC_ENOTDIR: // used by eg. sysctl(2). Shouldn't happen normally,
// but is triggered by e.g. show_config().
case NSC_EUNKNOWN: return ERROR_INVAL; // Catches stacks that 'return -1' without real mapping
--- a/src/internet/model/nsc-tcp-socket-impl.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/nsc-tcp-socket-impl.h Wed Jul 24 13:20:24 2013 +0200
@@ -102,7 +102,7 @@
void ConnectionSucceeded ();
// Manage data tx/rx
- // XXX This should be virtual and overridden
+ /// \todo This should be virtual and overridden
Ptr<NscTcpSocketImpl> Copy ();
// attribute related
--- a/src/internet/model/pending-data.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/pending-data.cc Wed Jul 24 13:20:24 2013 +0200
@@ -124,7 +124,7 @@
uint32_t PendingData::SizeFromOffset (uint32_t offset)
{ // Find out how much data is available from offset
NS_LOG_FUNCTION (this << offset);
- // XXX should this return zero, or error out?
+ /// \todo should this return zero, or error out?
if (offset > size) return 0; // No data at requested offset
return size - offset; // Available data after offset
}
--- a/src/internet/model/tcp-header.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/tcp-header.h Wed Jul 24 13:20:24 2013 +0200
@@ -47,7 +47,9 @@
virtual ~TcpHeader ();
/**
- * \brief Enable checksum calculation for TCP (XXX currently has no effect)
+ * \brief Enable checksum calculation for TCP
+ *
+ * \todo currently has no effect
*/
void EnableChecksums (void);
//Setters
--- a/src/internet/model/tcp-l4-protocol.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/tcp-l4-protocol.cc Wed Jul 24 13:20:24 2013 +0200
@@ -188,6 +188,7 @@
socket->SetNode (m_node);
socket->SetTcp (this);
socket->SetRtt (rtt);
+ m_sockets.push_back (socket);
return socket;
}
@@ -611,7 +612,8 @@
TcpHeader outgoingHeader = outgoing;
outgoingHeader.SetLength (5); //header length in units of 32bit words
- /* outgoingHeader.SetUrgentPointer (0); //XXX */
+ /** \todo UrgentPointer */
+ /* outgoingHeader.SetUrgentPointer (0); */
if(Node::ChecksumEnabled ())
{
outgoingHeader.EnableChecksums ();
@@ -662,7 +664,8 @@
}
TcpHeader outgoingHeader = outgoing;
outgoingHeader.SetLength (5); //header length in units of 32bit words
- /* outgoingHeader.SetUrgentPointer (0); //XXX */
+ /** \todo UrgentPointer */
+ /* outgoingHeader.SetUrgentPointer (0); */
if(Node::ChecksumEnabled ())
{
outgoingHeader.EnableChecksums ();
--- a/src/internet/model/udp-socket-impl.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/model/udp-socket-impl.cc Wed Jul 24 13:20:24 2013 +0200
@@ -86,7 +86,7 @@
{
NS_LOG_FUNCTION_NOARGS ();
- // XXX todo: leave any multicast groups that have been joined
+ /// \todo leave any multicast groups that have been joined
m_node = 0;
/**
* Note: actually this function is called AFTER
@@ -734,8 +734,10 @@
return 0;
}
-// XXX maximum message size for UDP broadcast is limited by MTU
+
+// maximum message size for UDP broadcast is limited by MTU
// size of underlying link; we are not checking that now.
+/// \todo Check MTU size of underlying link
uint32_t
UdpSocketImpl::GetTxAvailable (void) const
{
--- a/src/internet/test/global-route-manager-impl-test-suite.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/test/global-route-manager-impl-test-suite.cc Wed Jul 24 13:20:24 2013 +0200
@@ -200,7 +200,7 @@
Simulator::Run ();
-// XXX here we should do some verification of the routes built
+/// \todo here we should do some verification of the routes built
Simulator::Destroy ();
@@ -208,7 +208,7 @@
// all of the LSAs, which each destroys the attached LinkRecords.
delete srm;
- // XXX
+ /// \todo Testing
// No testing has actually been done other than making sure that this code
// does not crash
}
--- a/src/internet/test/ipv4-address-generator-test-suite.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/test/ipv4-address-generator-test-suite.cc Wed Jul 24 13:20:24 2013 +0200
@@ -46,30 +46,30 @@
Ipv4AddressGenerator::Init (Ipv4Address ("1.0.0.0"), Ipv4Mask ("255.0.0.0"),
Ipv4Address ("0.0.0.0"));
network = Ipv4AddressGenerator::GetNetwork (Ipv4Mask ("255.0.0.0"));
- NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("1.0.0.0"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("1.0.0.0"), "001");
network = Ipv4AddressGenerator::NextNetwork (Ipv4Mask ("255.0.0.0"));
- NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("2.0.0.0"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("2.0.0.0"), "001");
Ipv4AddressGenerator::Init (Ipv4Address ("0.1.0.0"),
Ipv4Mask ("255.255.0.0"), Ipv4Address ("0.0.0.0"));
network = Ipv4AddressGenerator::GetNetwork (Ipv4Mask ("255.255.0.0"));
- NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.1.0.0"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.1.0.0"), "003");
network = Ipv4AddressGenerator::NextNetwork (Ipv4Mask ("255.255.0.0"));
- NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.2.0.0"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.2.0.0"), "004");
Ipv4AddressGenerator::Init (Ipv4Address ("0.0.1.0"),
Ipv4Mask ("255.255.255.0"), Ipv4Address ("0.0.0.0"));
network = Ipv4AddressGenerator::GetNetwork (Ipv4Mask ("255.255.255.0"));
- NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.0.1.0"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.0.1.0"), "005");
network = Ipv4AddressGenerator::NextNetwork (Ipv4Mask ("255.255.255.0"));
- NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.0.2.0"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.0.2.0"), "006");
network = Ipv4AddressGenerator::NextNetwork (Ipv4Mask ("255.0.0.0"));
- NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("3.0.0.0"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("3.0.0.0"), "007");
network = Ipv4AddressGenerator::NextNetwork (Ipv4Mask ("255.255.0.0"));
- NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.3.0.0"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.3.0.0"), "008");
network = Ipv4AddressGenerator::NextNetwork (Ipv4Mask ("255.255.255.0"));
- NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.0.3.0"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.0.3.0"), "009");
}
class AddressAllocatorTestCase : public TestCase
@@ -94,23 +94,23 @@
Ipv4AddressGenerator::Init (Ipv4Address ("1.0.0.0"), Ipv4Mask ("255.0.0.0"),
Ipv4Address ("0.0.0.3"));
address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.0.0.0"));
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("1.0.0.3"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("1.0.0.3"), "100");
address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.0.0.0"));
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("1.0.0.4"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("1.0.0.4"), "101");
Ipv4AddressGenerator::Init (Ipv4Address ("0.1.0.0"),
Ipv4Mask ("255.255.0.0"), Ipv4Address ("0.0.0.3"));
address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.0.0"));
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.1.0.3"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.1.0.3"), "102");
address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.0.0"));
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.1.0.4"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.1.0.4"), "103");
Ipv4AddressGenerator::Init (Ipv4Address ("0.0.1.0"),
Ipv4Mask ("255.255.255.0"), Ipv4Address ("0.0.0.3"));
address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.255.0"));
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.1.3"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.1.3"), "104");
address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.255.0"));
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.1.4"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.1.4"), "105");
}
void
@@ -150,38 +150,38 @@
Ipv4AddressGenerator::Init (Ipv4Address ("3.0.0.0"), Ipv4Mask ("255.0.0.0"),
Ipv4Address ("0.0.0.3"));
address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.0.0.0"));
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("3.0.0.3"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("3.0.0.3"), "200");
address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.0.0.0"));
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("3.0.0.4"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("3.0.0.4"), "201");
network = Ipv4AddressGenerator::NextNetwork (Ipv4Mask ("255.0.0.0"));
- NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("4.0.0.0"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("4.0.0.0"), "202");
address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.0.0.0"));
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("4.0.0.5"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("4.0.0.5"), "203");
Ipv4AddressGenerator::Init (Ipv4Address ("0.3.0.0"),
Ipv4Mask ("255.255.0.0"), Ipv4Address ("0.0.0.3"));
address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.0.0"));
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.3.0.3"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.3.0.3"), "204");
address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.0.0"));
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.3.0.4"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.3.0.4"), "205");
network = Ipv4AddressGenerator::NextNetwork (Ipv4Mask ("255.255.0.0"));
- NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.4.0.0"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.4.0.0"), "206");
address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.0.0"));
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.4.0.5"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.4.0.5"), "207");
Ipv4AddressGenerator::Init (Ipv4Address ("0.0.3.0"),
Ipv4Mask ("255.255.255.0"), Ipv4Address ("0.0.0.3"));
address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.255.0"));
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.3.3"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.3.3"), "208");
address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.255.0"));
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.3.4"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.3.4"), "209");
network = Ipv4AddressGenerator::NextNetwork (Ipv4Mask ("255.255.255.0"));
- NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.0.4.0"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.0.4.0"), "210");
address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.255.0"));
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.4.5"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.4.5"), "211");
}
class ExampleAddressGeneratorTestCase : public TestCase
@@ -215,11 +215,11 @@
Ipv4AddressGenerator::Init (Ipv4Address ("192.168.0.0"),
Ipv4Mask ("255.255.255.0"), Ipv4Address ("0.0.0.3"));
address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.255.0"));
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("192.168.0.3"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("192.168.0.3"), "300");
address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.255.0"));
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("192.168.0.4"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("192.168.0.4"), "301");
address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.255.0"));
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("192.168.0.5"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("192.168.0.5"), "302");
//
// Allocate the next network out of our /24 network (this should be
// 192.168.1.0) and begin allocating with IP address 0.0.0.3 out of that
@@ -233,7 +233,7 @@
// is 192.168.1.3, of course.
//
address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.255.0"));
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("192.168.1.3"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("192.168.1.3"), "304");
}
class AddressCollisionTestCase : public TestCase
@@ -286,19 +286,19 @@
Ipv4AddressGenerator::TestMode ();
bool added = Ipv4AddressGenerator::AddAllocated ("0.0.0.21");
- NS_TEST_EXPECT_MSG_EQ (added, true, "XXX");
+ NS_TEST_EXPECT_MSG_EQ (added, true, "400");
added = Ipv4AddressGenerator::AddAllocated ("0.0.0.4");
- NS_TEST_EXPECT_MSG_EQ (added, false, "XXX");
+ NS_TEST_EXPECT_MSG_EQ (added, false, "401");
added = Ipv4AddressGenerator::AddAllocated ("0.0.0.9");
- NS_TEST_EXPECT_MSG_EQ (added, false, "XXX");
+ NS_TEST_EXPECT_MSG_EQ (added, false, "402");
added = Ipv4AddressGenerator::AddAllocated ("0.0.0.16");
- NS_TEST_EXPECT_MSG_EQ (added, false, "XXX");
+ NS_TEST_EXPECT_MSG_EQ (added, false, "403");
added = Ipv4AddressGenerator::AddAllocated ("0.0.0.21");
- NS_TEST_EXPECT_MSG_EQ (added, false, "XXX");
+ NS_TEST_EXPECT_MSG_EQ (added, false, "404");
}
--- a/src/internet/test/ipv4-address-helper-test-suite.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/test/ipv4-address-helper-test-suite.cc Wed Jul 24 13:20:24 2013 +0200
@@ -52,21 +52,21 @@
h.SetBase ("1.0.0.0", "255.0.0.0");
network = h.NewNetwork ();
- NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("2.0.0.0"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("2.0.0.0"), "100");
address = h.NewAddress ();
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("2.0.0.1"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("2.0.0.1"), "101");
h.SetBase ("0.1.0.0", "255.255.0.0");
network = h.NewNetwork ();
- NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.2.0.0"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.2.0.0"), "102");
address = h.NewAddress ();
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.2.0.1"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.2.0.1"), "103");
h.SetBase ("0.0.1.0", "255.255.255.0");
network = h.NewNetwork ();
- NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.0.2.0"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.0.2.0"), "104");
address = h.NewAddress ();
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.2.1"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.2.1"), "105");
}
class AddressAllocatorHelperTestCase : public TestCase
@@ -99,21 +99,21 @@
h.SetBase ("1.0.0.0", "255.0.0.0", "0.0.0.3");
address = h.NewAddress ();
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("1.0.0.3"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("1.0.0.3"), "200");
address = h.NewAddress ();
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("1.0.0.4"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("1.0.0.4"), "201");
h.SetBase ("0.1.0.0", "255.255.0.0", "0.0.0.3");
address = h.NewAddress ();
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.1.0.3"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.1.0.3"), "202");
address = h.NewAddress ();
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.1.0.4"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.1.0.4"), "203");
h.SetBase ("0.0.1.0", "255.255.255.0", "0.0.0.3");
address = h.NewAddress ();
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.1.3"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.1.3"), "204");
address = h.NewAddress ();
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.1.4"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.1.4"), "205");
}
class ResetAllocatorHelperTestCase : public TestCase
@@ -143,33 +143,33 @@
h.SetBase ("1.0.0.0", "255.0.0.0", "0.0.0.3");
address = h.NewAddress ();
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("1.0.0.3"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("1.0.0.3"), "301");
address = h.NewAddress ();
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("1.0.0.4"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("1.0.0.4"), "302");
network = h.NewNetwork ();
- NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("2.0.0.0"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("2.0.0.0"), "303");
address = h.NewAddress ();
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("2.0.0.3"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("2.0.0.3"), "304");
h.SetBase ("0.1.0.0", "255.255.0.0", "0.0.0.3");
address = h.NewAddress ();
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.1.0.3"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.1.0.3"), "305");
address = h.NewAddress ();
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.1.0.4"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.1.0.4"), "306");
network = h.NewNetwork ();
- NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.2.0.0"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.2.0.0"), "307");
address = h.NewAddress ();
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.2.0.3"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.2.0.3"), "308");
h.SetBase ("0.0.1.0", "255.255.255.0", "0.0.0.3");
address = h.NewAddress ();
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.1.3"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.1.3"), "309");
address = h.NewAddress ();
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.1.4"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.1.4"), "310");
network = h.NewNetwork ();
- NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.0.2.0"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.0.2.0"), "311");
address = h.NewAddress ();
- NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.2.3"), "XXX");
+ NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.2.3"), "312");
}
void
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/internet/test/ipv4-forwarding-test.cc Wed Jul 24 13:20:24 2013 +0200
@@ -0,0 +1,221 @@
+/* -*- 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 <tommaso.pecorella@unifi.it>
+ */
+
+#include "ns3/test.h"
+#include "ns3/socket-factory.h"
+#include "ns3/udp-socket-factory.h"
+#include "ns3/simulator.h"
+#include "ns3/simple-channel.h"
+#include "ns3/simple-net-device.h"
+#include "ns3/drop-tail-queue.h"
+#include "ns3/socket.h"
+#include "ns3/boolean.h"
+
+#include "ns3/log.h"
+#include "ns3/node.h"
+#include "ns3/inet-socket-address.h"
+
+#include "ns3/arp-l3-protocol.h"
+#include "ns3/ipv4-l3-protocol.h"
+#include "ns3/icmpv4-l4-protocol.h"
+#include "ns3/udp-l4-protocol.h"
+#include "ns3/ipv4-static-routing.h"
+
+#include <string>
+#include <limits>
+
+using namespace ns3;
+
+static void
+AddInternetStack (Ptr<Node> node)
+{
+ //ARP
+ Ptr<ArpL3Protocol> arp = CreateObject<ArpL3Protocol> ();
+ node->AggregateObject (arp);
+ //IPV4
+ Ptr<Ipv4L3Protocol> ipv4 = CreateObject<Ipv4L3Protocol> ();
+ //Routing for Ipv4
+ Ptr<Ipv4StaticRouting> ipv4Routing = CreateObject<Ipv4StaticRouting> ();
+ ipv4->SetRoutingProtocol (ipv4Routing);
+ node->AggregateObject (ipv4);
+ node->AggregateObject (ipv4Routing);
+ //ICMP
+ Ptr<Icmpv4L4Protocol> icmp = CreateObject<Icmpv4L4Protocol> ();
+ node->AggregateObject (icmp);
+ //UDP
+ Ptr<UdpL4Protocol> udp = CreateObject<UdpL4Protocol> ();
+ node->AggregateObject (udp);
+}
+
+
+class Ipv4ForwardingTest : public TestCase
+{
+ Ptr<Packet> m_receivedPacket;
+ void DoSendData (Ptr<Socket> socket, std::string to);
+ void SendData (Ptr<Socket> socket, std::string to);
+
+public:
+ virtual void DoRun (void);
+ Ipv4ForwardingTest ();
+
+ void ReceivePkt (Ptr<Socket> socket);
+};
+
+Ipv4ForwardingTest::Ipv4ForwardingTest ()
+ : TestCase ("UDP socket implementation")
+{
+}
+
+void Ipv4ForwardingTest::ReceivePkt (Ptr<Socket> socket)
+{
+ uint32_t availableData;
+ availableData = socket->GetRxAvailable ();
+ m_receivedPacket = socket->Recv (std::numeric_limits<uint32_t>::max (), 0);
+ NS_ASSERT (availableData == m_receivedPacket->GetSize ());
+}
+
+void
+Ipv4ForwardingTest::DoSendData (Ptr<Socket> socket, std::string to)
+{
+ Address realTo = InetSocketAddress (Ipv4Address (to.c_str ()), 1234);
+ NS_TEST_EXPECT_MSG_EQ (socket->SendTo (Create<Packet> (123), 0, realTo),
+ 123, "100");
+}
+
+void
+Ipv4ForwardingTest::SendData (Ptr<Socket> socket, std::string to)
+{
+ m_receivedPacket = Create<Packet> ();
+ Simulator::ScheduleWithContext (socket->GetNode ()->GetId (), Seconds (0),
+ &Ipv4ForwardingTest::DoSendData, this, socket, to);
+ Simulator::Run ();
+}
+
+void
+Ipv4ForwardingTest::DoRun (void)
+{
+ // Create topology
+
+ // Receiver Node
+ Ptr<Node> rxNode = CreateObject<Node> ();
+ AddInternetStack (rxNode);
+ Ptr<SimpleNetDevice> rxDev;
+ { // first interface
+ rxDev = CreateObject<SimpleNetDevice> ();
+ rxDev->SetAddress (Mac48Address::ConvertFrom (Mac48Address::Allocate ()));
+ rxNode->AddDevice (rxDev);
+ Ptr<Ipv4> ipv4 = rxNode->GetObject<Ipv4> ();
+ uint32_t netdev_idx = ipv4->AddInterface (rxDev);
+ Ipv4InterfaceAddress ipv4Addr = Ipv4InterfaceAddress (Ipv4Address ("10.0.0.2"), Ipv4Mask (0xffff0000U));
+ ipv4->AddAddress (netdev_idx, ipv4Addr);
+ ipv4->SetUp (netdev_idx);
+ }
+
+ // Forwarding Node
+ Ptr<Node> fwNode = CreateObject<Node> ();
+ AddInternetStack (fwNode);
+ Ptr<SimpleNetDevice> fwDev1, fwDev2;
+ { // first interface
+ fwDev1 = CreateObject<SimpleNetDevice> ();
+ fwDev1->SetAddress (Mac48Address::ConvertFrom (Mac48Address::Allocate ()));
+ fwNode->AddDevice (fwDev1);
+ Ptr<Ipv4> ipv4 = fwNode->GetObject<Ipv4> ();
+ uint32_t netdev_idx = ipv4->AddInterface (fwDev1);
+ Ipv4InterfaceAddress ipv4Addr = Ipv4InterfaceAddress (Ipv4Address ("10.0.0.1"), Ipv4Mask (0xffff0000U));
+ ipv4->AddAddress (netdev_idx, ipv4Addr);
+ ipv4->SetUp (netdev_idx);
+ }
+
+ { // second interface
+ fwDev2 = CreateObject<SimpleNetDevice> ();
+ fwDev2->SetAddress (Mac48Address::ConvertFrom (Mac48Address::Allocate ()));
+ fwNode->AddDevice (fwDev2);
+ Ptr<Ipv4> ipv4 = fwNode->GetObject<Ipv4> ();
+ uint32_t netdev_idx = ipv4->AddInterface (fwDev2);
+ Ipv4InterfaceAddress ipv4Addr = Ipv4InterfaceAddress (Ipv4Address ("10.1.0.1"), Ipv4Mask (0xffff0000U));
+ ipv4->AddAddress (netdev_idx, ipv4Addr);
+ ipv4->SetUp (netdev_idx);
+ }
+
+ // Sender Node
+ Ptr<Node> txNode = CreateObject<Node> ();
+ AddInternetStack (txNode);
+ Ptr<SimpleNetDevice> txDev;
+ {
+ txDev = CreateObject<SimpleNetDevice> ();
+ txDev->SetAddress (Mac48Address::ConvertFrom (Mac48Address::Allocate ()));
+ txNode->AddDevice (txDev);
+ Ptr<Ipv4> ipv4 = txNode->GetObject<Ipv4> ();
+ uint32_t netdev_idx = ipv4->AddInterface (txDev);
+ Ipv4InterfaceAddress ipv4Addr = Ipv4InterfaceAddress (Ipv4Address ("10.1.0.2"), Ipv4Mask (0xffff0000U));
+ ipv4->AddAddress (netdev_idx, ipv4Addr);
+ ipv4->SetUp (netdev_idx);
+ Ptr<Ipv4StaticRouting> ipv4StaticRouting = txNode->GetObject<Ipv4StaticRouting> ();
+ ipv4StaticRouting->SetDefaultRoute(Ipv4Address("10.1.0.1"), netdev_idx);
+ }
+
+ // link the two nodes
+ Ptr<SimpleChannel> channel1 = CreateObject<SimpleChannel> ();
+ rxDev->SetChannel (channel1);
+ fwDev1->SetChannel (channel1);
+
+ Ptr<SimpleChannel> channel2 = CreateObject<SimpleChannel> ();
+ fwDev2->SetChannel (channel2);
+ txDev->SetChannel (channel2);
+
+ // Create the UDP sockets
+ Ptr<SocketFactory> rxSocketFactory = rxNode->GetObject<UdpSocketFactory> ();
+ Ptr<Socket> rxSocket = rxSocketFactory->CreateSocket ();
+ NS_TEST_EXPECT_MSG_EQ (rxSocket->Bind (InetSocketAddress (Ipv4Address ("10.0.0.2"), 1234)), 0, "trivial");
+ rxSocket->SetRecvCallback (MakeCallback (&Ipv4ForwardingTest::ReceivePkt, this));
+
+ Ptr<SocketFactory> txSocketFactory = txNode->GetObject<UdpSocketFactory> ();
+ Ptr<Socket> txSocket = txSocketFactory->CreateSocket ();
+ txSocket->SetAllowBroadcast (true);
+
+ // ------ Now the tests ------------
+
+ // Unicast test
+ SendData (txSocket, "10.0.0.2");
+ NS_TEST_EXPECT_MSG_EQ (m_receivedPacket->GetSize (), 123, "IPv4 Forwarding on");
+
+ m_receivedPacket->RemoveAllByteTags ();
+ m_receivedPacket = 0;
+
+ Ptr<Ipv4> ipv4 = fwNode->GetObject<Ipv4> ();
+ ipv4->SetAttribute("IpForward", BooleanValue (false));
+ SendData (txSocket, "10.0.0.2");
+ NS_TEST_EXPECT_MSG_EQ (m_receivedPacket->GetSize (), 0, "IPv4 Forwarding off");
+
+ Simulator::Destroy ();
+
+}
+
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+class Ipv4ForwardingTestSuite : public TestSuite
+{
+public:
+ Ipv4ForwardingTestSuite () : TestSuite ("ipv4-forwarding", UNIT)
+ {
+ AddTestCase (new Ipv4ForwardingTest, TestCase::QUICK);
+ }
+} g_ipv4forwardingTestSuite;
--- a/src/internet/test/ipv4-list-routing-test-suite.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/test/ipv4-list-routing-test-suite.cc Wed Jul 24 13:20:24 2013 +0200
@@ -73,10 +73,10 @@
lr->AddRoutingProtocol (bRouting, -5);
int16_t first = 3;
uint32_t num = lr->GetNRoutingProtocols ();
- NS_TEST_ASSERT_MSG_EQ (num, 2, "XXX");
+ NS_TEST_ASSERT_MSG_EQ (num, 2, "100");
Ptr<Ipv4RoutingProtocol> firstRp = lr->GetRoutingProtocol (0, first);
- NS_TEST_ASSERT_MSG_EQ (-5, first, "XXX");
- NS_TEST_ASSERT_MSG_EQ (firstRp, bRouting, "XXX");
+ NS_TEST_ASSERT_MSG_EQ (-5, first, "101");
+ NS_TEST_ASSERT_MSG_EQ (firstRp, bRouting, "102");
}
class Ipv4ListRoutingPositiveTestCase : public TestCase
@@ -103,13 +103,13 @@
int16_t first = 3;
int16_t second = 3;
uint32_t num = lr->GetNRoutingProtocols ();
- NS_TEST_ASSERT_MSG_EQ (num, 2, "XXX");
+ NS_TEST_ASSERT_MSG_EQ (num, 2, "200");
Ptr<Ipv4RoutingProtocol> firstRp = lr->GetRoutingProtocol (0, first);
- NS_TEST_ASSERT_MSG_EQ (10, first, "XXX");
- NS_TEST_ASSERT_MSG_EQ (firstRp, aRouting, "XXX");
+ NS_TEST_ASSERT_MSG_EQ (10, first, "201");
+ NS_TEST_ASSERT_MSG_EQ (firstRp, aRouting, "202");
Ptr<Ipv4RoutingProtocol> secondRp = lr->GetRoutingProtocol (1, second);
- NS_TEST_ASSERT_MSG_EQ (5, second, "XXX");
- NS_TEST_ASSERT_MSG_EQ (secondRp, bRouting, "XXX");
+ NS_TEST_ASSERT_MSG_EQ (5, second, "203");
+ NS_TEST_ASSERT_MSG_EQ (secondRp, bRouting, "204");
}
static class Ipv4ListRoutingTestSuite : public TestSuite
--- a/src/internet/test/ipv4-packet-info-tag-test-suite.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/test/ipv4-packet-info-tag-test-suite.cc Wed Jul 24 13:20:24 2013 +0200
@@ -114,7 +114,7 @@
if (DynamicCast<UdpSocket> (socket) != 0)
{
NS_TEST_EXPECT_MSG_EQ (socket->SendTo (Create<Packet> (123), 0, realTo),
- 123, "XXX");
+ 123, "100");
}
// Should only Ipv4RawSock
else
--- a/src/internet/test/ipv4-test.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/test/ipv4-test.cc Wed Jul 24 13:20:24 2013 +0200
@@ -94,9 +94,53 @@
Ipv4InterfaceAddress output = interface->GetAddress (2);
NS_TEST_ASSERT_MSG_EQ (ifaceAddr4, output,
"The addresses should be identical");
+
+ /* Test Ipv4Interface()::RemoveAddress(address) */
+ output = interface->RemoveAddress (Ipv4Address ("250.0.0.1"));
+ NS_TEST_ASSERT_MSG_EQ (ifaceAddr4, output,
+ "Wrong Interface Address Removed??");
+ num = interface->GetNAddresses ();
+ NS_TEST_ASSERT_MSG_EQ (num, 2, "Should find 2 addresses??");
+
+ /* Remove a non-existent Address */
+ output = interface->RemoveAddress (Ipv4Address ("253.123.9.81"));
+ NS_TEST_ASSERT_MSG_EQ (Ipv4InterfaceAddress (), output,
+ "Removed non-existent address??");
+ num = interface->GetNAddresses ();
+ NS_TEST_ASSERT_MSG_EQ (num, 2, "Should find 2 addresses??");
+
+ /* Remove a Loopback Address */
+ output = interface->RemoveAddress (Ipv4Address::GetLoopback ());
+ NS_TEST_ASSERT_MSG_EQ (Ipv4InterfaceAddress (), output,
+ "Able to remove loopback address??");
+ num = interface->GetNAddresses ();
+ NS_TEST_ASSERT_MSG_EQ (num, 2, "Should find 2 addresses??");
+
+ /* Test Ipv4Address::RemoveAddress(i, addresss) */
+ bool result = ipv4->RemoveAddress (index, Ipv4Address
+("192.168.0.2"));
+ NS_TEST_ASSERT_MSG_EQ (true, result, "Unable to remove Address??");
+ num = interface->GetNAddresses ();
+ NS_TEST_ASSERT_MSG_EQ (num, 1, "Should find 1 addresses??");
+
+ /* Remove a non-existent Address */
+ result = ipv4->RemoveAddress (index, Ipv4Address ("189.0.0.1"));
+ NS_TEST_ASSERT_MSG_EQ (false, result,
+ "Removed non-existent address??");
+ num = interface->GetNAddresses ();
+ NS_TEST_ASSERT_MSG_EQ (num, 1, "Should find 1 addresses??");
+
+ /* Remove a loopback Address */
+ result = ipv4->RemoveAddress (index, Ipv4Address::GetLoopback ());
+ NS_TEST_ASSERT_MSG_EQ (false, result,
+ "Able to remove loopback address??");
+ num = interface->GetNAddresses ();
+ NS_TEST_ASSERT_MSG_EQ (num, 1, "Should find 1 addresses??");
+
Simulator::Destroy ();
}
+
static class IPv4L3ProtocolTestSuite : public TestSuite
{
public:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/internet/test/ipv6-forwarding-test.cc Wed Jul 24 13:20:24 2013 +0200
@@ -0,0 +1,228 @@
+/* -*- 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 <tommaso.pecorella@unifi.it>
+ */
+
+#include "ns3/test.h"
+#include "ns3/socket-factory.h"
+#include "ns3/udp-socket-factory.h"
+#include "ns3/simulator.h"
+#include "ns3/simple-channel.h"
+#include "ns3/simple-net-device.h"
+#include "ns3/drop-tail-queue.h"
+#include "ns3/socket.h"
+#include "ns3/boolean.h"
+
+#include "ns3/log.h"
+#include "ns3/node.h"
+#include "ns3/inet6-socket-address.h"
+
+#include "ns3/ipv6-l3-protocol.h"
+#include "ns3/icmpv6-l4-protocol.h"
+#include "ns3/udp-l4-protocol.h"
+#include "ns3/ipv6-static-routing.h"
+
+#include <string>
+#include <limits>
+
+using namespace ns3;
+
+static void
+AddInternetStack6 (Ptr<Node> node)
+{
+ //IPV6
+ Ptr<Ipv6L3Protocol> ipv6 = CreateObject<Ipv6L3Protocol> ();
+ //Routing for Ipv6
+ Ptr<Ipv6StaticRouting> ipv6Routing = CreateObject<Ipv6StaticRouting> ();
+ ipv6->SetRoutingProtocol (ipv6Routing);
+ node->AggregateObject (ipv6);
+ node->AggregateObject (ipv6Routing);
+ //ICMP
+ Ptr<Icmpv6L4Protocol> icmp = CreateObject<Icmpv6L4Protocol> ();
+ node->AggregateObject (icmp);
+ //Ipv6 Extensions
+ ipv6->RegisterExtensions ();
+ ipv6->RegisterOptions ();
+ //UDP
+ Ptr<UdpL4Protocol> udp = CreateObject<UdpL4Protocol> ();
+ node->AggregateObject (udp);
+}
+
+
+
+class Ipv6ForwardingTest : public TestCase
+{
+ Ptr<Packet> m_receivedPacket;
+ void DoSendData (Ptr<Socket> socket, std::string to);
+ void SendData (Ptr<Socket> socket, std::string to);
+
+public:
+ virtual void DoRun (void);
+ Ipv6ForwardingTest ();
+
+ void ReceivePkt (Ptr<Socket> socket);
+};
+
+Ipv6ForwardingTest::Ipv6ForwardingTest ()
+ : TestCase ("UDP6 socket implementation")
+{
+}
+
+void Ipv6ForwardingTest::ReceivePkt (Ptr<Socket> socket)
+{
+ uint32_t availableData;
+ availableData = socket->GetRxAvailable ();
+ m_receivedPacket = socket->Recv (std::numeric_limits<uint32_t>::max (), 0);
+ NS_ASSERT (availableData == m_receivedPacket->GetSize ());
+ //cast availableData to void, to suppress 'availableData' set but not used
+ //compiler warning
+ (void) availableData;
+}
+
+void
+Ipv6ForwardingTest::DoSendData (Ptr<Socket> socket, std::string to)
+{
+ Address realTo = Inet6SocketAddress (Ipv6Address (to.c_str ()), 1234);
+ NS_TEST_EXPECT_MSG_EQ (socket->SendTo (Create<Packet> (123), 0, realTo),
+ 123, "100");
+}
+
+void
+Ipv6ForwardingTest::SendData (Ptr<Socket> socket, std::string to)
+{
+ m_receivedPacket = Create<Packet> ();
+ Simulator::ScheduleWithContext (socket->GetNode ()->GetId (), Seconds (0),
+ &Ipv6ForwardingTest::DoSendData, this, socket, to);
+ Simulator::Run ();
+}
+
+void
+Ipv6ForwardingTest::DoRun (void)
+{
+ // Create topology
+
+ // Receiver Node
+ Ptr<Node> rxNode = CreateObject<Node> ();
+ AddInternetStack6 (rxNode);
+ Ptr<SimpleNetDevice> rxDev;
+ { // first interface
+ rxDev = CreateObject<SimpleNetDevice> ();
+ rxDev->SetAddress (Mac48Address::ConvertFrom (Mac48Address::Allocate ()));
+ rxNode->AddDevice (rxDev);
+ Ptr<Ipv6> ipv6 = rxNode->GetObject<Ipv6> ();
+ uint32_t netdev_idx = ipv6->AddInterface (rxDev);
+ Ipv6InterfaceAddress ipv6Addr = Ipv6InterfaceAddress (Ipv6Address ("2001:1::2"), Ipv6Prefix (64));
+ ipv6->AddAddress (netdev_idx, ipv6Addr);
+ ipv6->SetUp (netdev_idx);
+ }
+
+ // Forwarding Node
+ Ptr<Node> fwNode = CreateObject<Node> ();
+ AddInternetStack6 (fwNode);
+ Ptr<SimpleNetDevice> fwDev1, fwDev2;
+ { // first interface
+ fwDev1 = CreateObject<SimpleNetDevice> ();
+ fwDev1->SetAddress (Mac48Address::ConvertFrom (Mac48Address::Allocate ()));
+ fwNode->AddDevice (fwDev1);
+ Ptr<Ipv6> ipv6 = fwNode->GetObject<Ipv6> ();
+ uint32_t netdev_idx = ipv6->AddInterface (fwDev1);
+ Ipv6InterfaceAddress ipv6Addr = Ipv6InterfaceAddress (Ipv6Address ("2001:1::1"), Ipv6Prefix (64));
+ ipv6->AddAddress (netdev_idx, ipv6Addr);
+ ipv6->SetUp (netdev_idx);
+ }
+
+ Ipv6Address nextHop;
+ { // second interface
+ fwDev2 = CreateObject<SimpleNetDevice> ();
+ fwDev2->SetAddress (Mac48Address::ConvertFrom (Mac48Address::Allocate ()));
+ fwNode->AddDevice (fwDev2);
+ Ptr<Ipv6> ipv6 = fwNode->GetObject<Ipv6> ();
+ uint32_t netdev_idx = ipv6->AddInterface (fwDev2);
+ Ipv6InterfaceAddress ipv6Addr = Ipv6InterfaceAddress (Ipv6Address ("2001:2::1"), Ipv6Prefix (64));
+ nextHop = ipv6->GetAddress(netdev_idx, 0).GetAddress();
+ ipv6->AddAddress (netdev_idx, ipv6Addr);
+ ipv6->SetUp (netdev_idx);
+ }
+
+ // Sender Node
+ Ptr<Node> txNode = CreateObject<Node> ();
+ AddInternetStack6 (txNode);
+ Ptr<SimpleNetDevice> txDev;
+ {
+ txDev = CreateObject<SimpleNetDevice> ();
+ txDev->SetAddress (Mac48Address::ConvertFrom (Mac48Address::Allocate ()));
+ txNode->AddDevice (txDev);
+ Ptr<Ipv6> ipv6 = txNode->GetObject<Ipv6> ();
+ uint32_t netdev_idx = ipv6->AddInterface (txDev);
+ Ipv6InterfaceAddress ipv6Addr = Ipv6InterfaceAddress (Ipv6Address ("2001:2::2"), Ipv6Prefix (64));
+ ipv6->AddAddress (netdev_idx, ipv6Addr);
+ ipv6->SetUp (netdev_idx);
+ Ptr<Ipv6StaticRouting> ipv6StaticRouting = txNode->GetObject<Ipv6StaticRouting> ();
+ ipv6StaticRouting->SetDefaultRoute(nextHop, netdev_idx);
+ }
+
+ // link the two nodes
+ Ptr<SimpleChannel> channel1 = CreateObject<SimpleChannel> ();
+ rxDev->SetChannel (channel1);
+ fwDev1->SetChannel (channel1);
+
+ Ptr<SimpleChannel> channel2 = CreateObject<SimpleChannel> ();
+ fwDev2->SetChannel (channel2);
+ txDev->SetChannel (channel2);
+
+ // Create the UDP sockets
+ Ptr<SocketFactory> rxSocketFactory = rxNode->GetObject<UdpSocketFactory> ();
+ Ptr<Socket> rxSocket = rxSocketFactory->CreateSocket ();
+ NS_TEST_EXPECT_MSG_EQ (rxSocket->Bind (Inet6SocketAddress (Ipv6Address ("2001:1::2"), 1234)), 0, "trivial");
+ rxSocket->SetRecvCallback (MakeCallback (&Ipv6ForwardingTest::ReceivePkt, this));
+
+ Ptr<SocketFactory> txSocketFactory = txNode->GetObject<UdpSocketFactory> ();
+ Ptr<Socket> txSocket = txSocketFactory->CreateSocket ();
+ txSocket->SetAllowBroadcast (true);
+
+ // ------ Now the tests ------------
+
+ // Unicast test
+ SendData (txSocket, "2001:1::2");
+ NS_TEST_EXPECT_MSG_EQ (m_receivedPacket->GetSize (), 0, "IPv6 Forwarding off");
+
+ m_receivedPacket->RemoveAllByteTags ();
+ m_receivedPacket = 0;
+
+ Ptr<Ipv6> ipv6 = fwNode->GetObject<Ipv6> ();
+ ipv6->SetAttribute("IpForward", BooleanValue (true));
+ SendData (txSocket, "2001:1::2");
+ NS_TEST_EXPECT_MSG_EQ (m_receivedPacket->GetSize (), 123, "IPv6 Forwarding on");
+
+ m_receivedPacket->RemoveAllByteTags ();
+
+ Simulator::Destroy ();
+
+}
+
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+class Ipv6ForwardingTestSuite : public TestSuite
+{
+public:
+ Ipv6ForwardingTestSuite () : TestSuite ("ipv6-forwarding", UNIT)
+ {
+ AddTestCase (new Ipv6ForwardingTest, TestCase::QUICK);
+ }
+} g_ipv6forwardingTestSuite;
--- a/src/internet/test/ipv6-fragmentation-test.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/test/ipv6-fragmentation-test.cc Wed Jul 24 13:20:24 2013 +0200
@@ -265,12 +265,7 @@
void
Ipv6FragmentationTest::DoRun (void)
{
- // set the arp cache to something quite high
- // we shouldn't need because the NetDevice used doesn't need arp, but still
- // Config::SetDefault ("ns3::ArpCache::PendingQueueSize", UintegerValue (100));
-// LogComponentEnable ("ErrorNetDevice", LOG_LEVEL_ALL);
-// LogComponentEnableAll(LOG_LEVEL_ALL);
-// Create topology
+ // Create topology
// Receiver Node
Ptr<Node> serverNode = CreateObject<Node> ();
--- a/src/internet/test/ipv6-list-routing-test-suite.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/test/ipv6-list-routing-test-suite.cc Wed Jul 24 13:20:24 2013 +0200
@@ -80,10 +80,10 @@
lr->AddRoutingProtocol (bRouting, -5);
int16_t first = 3;
uint32_t num = lr->GetNRoutingProtocols ();
- NS_TEST_ASSERT_MSG_EQ (num, 2, "XXX");
+ NS_TEST_ASSERT_MSG_EQ (num, 2, "100");
Ptr<Ipv6RoutingProtocol> firstRp = lr->GetRoutingProtocol (0, first);
- NS_TEST_ASSERT_MSG_EQ (-5, first, "XXX");
- NS_TEST_ASSERT_MSG_EQ (firstRp, bRouting, "XXX");
+ NS_TEST_ASSERT_MSG_EQ (-5, first, "101");
+ NS_TEST_ASSERT_MSG_EQ (firstRp, bRouting, "102");
}
class Ipv6ListRoutingPositiveTestCase : public TestCase
@@ -110,13 +110,13 @@
int16_t first = 3;
int16_t second = 3;
uint32_t num = lr->GetNRoutingProtocols ();
- NS_TEST_ASSERT_MSG_EQ (num, 2, "XXX");
+ NS_TEST_ASSERT_MSG_EQ (num, 2, "200");
Ptr<Ipv6RoutingProtocol> firstRp = lr->GetRoutingProtocol (0, first);
- NS_TEST_ASSERT_MSG_EQ (10, first, "XXX");
- NS_TEST_ASSERT_MSG_EQ (firstRp, aRouting, "XXX");
+ NS_TEST_ASSERT_MSG_EQ (10, first, "201");
+ NS_TEST_ASSERT_MSG_EQ (firstRp, aRouting, "202");
Ptr<Ipv6RoutingProtocol> secondRp = lr->GetRoutingProtocol (1, second);
- NS_TEST_ASSERT_MSG_EQ (5, second, "XXX");
- NS_TEST_ASSERT_MSG_EQ (secondRp, bRouting, "XXX");
+ NS_TEST_ASSERT_MSG_EQ (5, second, "203");
+ NS_TEST_ASSERT_MSG_EQ (secondRp, bRouting, "204");
}
static class Ipv6ListRoutingTestSuite : public TestSuite
--- a/src/internet/test/ipv6-packet-info-tag-test-suite.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/test/ipv6-packet-info-tag-test-suite.cc Wed Jul 24 13:20:24 2013 +0200
@@ -106,7 +106,7 @@
if (DynamicCast<UdpSocket> (socket) != 0)
{
NS_TEST_EXPECT_MSG_EQ (socket->SendTo (Create<Packet> (123), 0, realTo),
- 123, "XXX");
+ 123, "100");
}
// Should only Ipv6RawSock
else
--- a/src/internet/test/ipv6-raw-test.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/test/ipv6-raw-test.cc Wed Jul 24 13:20:24 2013 +0200
@@ -121,7 +121,7 @@
m_receivedPacket2 = socket->RecvFrom (std::numeric_limits<uint32_t>::max (), 0, addr);
NS_ASSERT (availableData == m_receivedPacket2->GetSize ());
Inet6SocketAddress v6addr = Inet6SocketAddress::ConvertFrom (addr);
- NS_TEST_EXPECT_MSG_EQ (v6addr.GetIpv6 (),Ipv6Address ("fe80:0000:0000:0000:0200:00ff:fe00:0003"), "recvfrom");
+ NS_TEST_EXPECT_MSG_EQ (v6addr.GetIpv6 (),Ipv6Address ("2001:0db8:0000:0000:0000:0000:0000:0002"), "recvfrom");
}
void
--- a/src/internet/test/ipv6-test.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/test/ipv6-test.cc Wed Jul 24 13:20:24 2013 +0200
@@ -136,6 +136,48 @@
index = ipv6->GetInterfaceForAddress ("2001:ffff:5678:9000::1"); /* address we just remove */
NS_TEST_ASSERT_MSG_EQ (index, (uint32_t) -1, "Address should not be found??");
+
+ /* Test Ipv6Interface()::RemoveAddress(address) */
+ output = interface->RemoveAddress (Ipv6Address ("2001:1234:5678:9000::1"));
+ NS_TEST_ASSERT_MSG_EQ (ifaceAddr1, output, "Wrong Interface Address Removed??");
+ num = interface->GetNAddresses ();
+ NS_TEST_ASSERT_MSG_EQ (num, 1, "Number of addresses should be 1??");
+
+ /* Remove a non-existent Address */
+ output = interface->RemoveAddress (Ipv6Address ("2001:1234:5678:9000::1"));
+ NS_TEST_ASSERT_MSG_EQ (Ipv6InterfaceAddress (), output,
+ "Removed non-existent address??");
+ num = interface->GetNAddresses ();
+ NS_TEST_ASSERT_MSG_EQ (num, 1, "Number of addresses should be 1??");
+
+ /* Remove a loopback Address */
+ output = interface->RemoveAddress (Ipv6Address::GetLoopback ());
+ NS_TEST_ASSERT_MSG_EQ (Ipv6InterfaceAddress (), output,
+ "Able to remove loopback address??");
+ num = interface->GetNAddresses ();
+ NS_TEST_ASSERT_MSG_EQ (num, 1, "Number of addresses should be 1??");
+
+ /* Test Ipv6Address::RemoveAddress(index, addresss) */
+ index = ipv6->GetInterfaceForAddress ("2001:ffff:5678:9001::2");
+ bool result = ipv6->RemoveAddress (index, Ipv6Address
+ ("2001:ffff:5678:9001::2"));
+ NS_TEST_ASSERT_MSG_EQ (result, true, "Unable to remove Address??");
+ num = interface2->GetNAddresses ();
+ NS_TEST_ASSERT_MSG_EQ (num, 1, "Number of addresses should be 1??");
+
+ /* Remove a non-existent Address */
+ result = ipv6->RemoveAddress (index, Ipv6Address
+ ("2001:ffff:5678:9001::2"));
+ NS_TEST_ASSERT_MSG_EQ (result, false, "Removed Non-existent address??");
+ num = interface2->GetNAddresses ();
+ NS_TEST_ASSERT_MSG_EQ (num, 1, "Number of addresses should be 1??");
+
+ /* Remove a loopback Address */
+ result = ipv6->RemoveAddress (index, Ipv6Address::GetLoopback ());
+ NS_TEST_ASSERT_MSG_EQ (result, false, "Able to remove loopback address??");
+ num = interface2->GetNAddresses ();
+ NS_TEST_ASSERT_MSG_EQ (num, 1, "Number of addresses should be 1??");
+
Simulator::Destroy ();
} //end DoRun
static class IPv6L3ProtocolTestSuite : public TestSuite
--- a/src/internet/test/udp-test.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/test/udp-test.cc Wed Jul 24 13:20:24 2013 +0200
@@ -242,7 +242,7 @@
{
Address realTo = InetSocketAddress (Ipv4Address (to.c_str ()), 1234);
NS_TEST_EXPECT_MSG_EQ (socket->SendTo (Create<Packet> (123), 0, realTo),
- 123, "XXX");
+ 123, "100");
}
void
@@ -445,7 +445,7 @@
{
Address realTo = Inet6SocketAddress (Ipv6Address (to.c_str ()), 1234);
NS_TEST_EXPECT_MSG_EQ (socket->SendTo (Create<Packet> (123), 0, realTo),
- 123, "XXX");
+ 123, "200");
}
void
--- a/src/internet/wscript Wed Jul 24 13:19:54 2013 +0200
+++ b/src/internet/wscript Wed Jul 24 13:20:24 2013 +0200
@@ -201,6 +201,7 @@
'test/ipv4-raw-test.cc',
'test/ipv4-header-test.cc',
'test/ipv4-fragmentation-test.cc',
+ 'test/ipv4-forwarding-test.cc',
'test/error-channel.cc',
'test/error-net-device.cc',
'test/ipv4-test.cc',
@@ -214,6 +215,7 @@
'test/ipv6-address-generator-test-suite.cc',
'test/ipv6-dual-stack-test-suite.cc',
'test/ipv6-fragmentation-test.cc',
+ 'test/ipv6-forwarding-test.cc',
'test/ipv6-address-helper-test-suite.cc',
'test/rtt-test.cc',
]
--- a/src/lte/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -618,6 +618,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')
## ff-mac-common.h (module 'lte'): ns3::PagingInfoListElement_s [struct]
module.add_class('PagingInfoListElement_s')
## ff-mac-common.h (module 'lte'): ns3::PhichListElement_s [struct]
@@ -1196,8 +1198,6 @@
module.add_class('TdMtFfMacScheduler', parent=root_module['ns3::FfMacScheduler'])
## tdtbfq-ff-mac-scheduler.h (module 'lte'): ns3::TdTbfqFfMacScheduler [class]
module.add_class('TdTbfqFfMacScheduler', parent=root_module['ns3::FfMacScheduler'])
- ## 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'])
## tta-ff-mac-scheduler.h (module 'lte'): ns3::TtaFfMacScheduler [class]
@@ -1343,12 +1343,12 @@
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 const >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ns3::LtePhyTxEndCallback')
+ 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::LtePhyTxEndCallback*')
+ 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::LtePhyTxEndCallback&')
typehandlers.add_type_alias('std::vector< std::vector< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > >, std::allocator< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > > > >, std::allocator< std::vector< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > >, std::allocator< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > > > > > >', 'ns3::DlHarqRlcPduListBuffer_t')
typehandlers.add_type_alias('std::vector< std::vector< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > >, std::allocator< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > > > >, std::allocator< std::vector< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > >, std::allocator< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > > > > > >*', 'ns3::DlHarqRlcPduListBuffer_t*')
typehandlers.add_type_alias('std::vector< std::vector< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > >, std::allocator< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > > > >, std::allocator< std::vector< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > >, std::allocator< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > > > > > >&', 'ns3::DlHarqRlcPduListBuffer_t&')
- 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::LtePhyTxEndCallback')
- 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::LtePhyTxEndCallback*')
- 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::LtePhyTxEndCallback&')
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&')
@@ -1974,7 +1974,6 @@
register_Ns3TdBetFfMacScheduler_methods(root_module, root_module['ns3::TdBetFfMacScheduler'])
register_Ns3TdMtFfMacScheduler_methods(root_module, root_module['ns3::TdMtFfMacScheduler'])
register_Ns3TdTbfqFfMacScheduler_methods(root_module, root_module['ns3::TdTbfqFfMacScheduler'])
- register_Ns3TimeChecker_methods(root_module, root_module['ns3::TimeChecker'])
register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue'])
register_Ns3TtaFfMacScheduler_methods(root_module, root_module['ns3::TtaFfMacScheduler'])
register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker'])
@@ -7271,6 +7270,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):
@@ -8334,19 +8337,6 @@
def register_Ns3Int64x64_t_methods(root_module, cls):
cls.add_binary_comparison_operator('!=')
cls.add_inplace_numeric_operator('+=', param('ns3::int64x64_t const &', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short unsigned int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned char const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('signed char const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('double const', 'right'))
- cls.add_unary_numeric_operator('-')
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', 'right'))
cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right'))
cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right'))
cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right'))
@@ -8371,6 +8361,19 @@
cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('signed char const', 'right'))
cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('double const', 'right'))
cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short unsigned int const', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned char const', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long int const', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long int const', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('int const', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short int const', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('signed char const', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('double const', 'right'))
+ cls.add_unary_numeric_operator('-')
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', 'right'))
cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right'))
cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right'))
cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right'))
@@ -10854,13 +10857,13 @@
return
def register_Ns3SpectrumValue_methods(root_module, cls):
- cls.add_unary_numeric_operator('-')
- cls.add_binary_numeric_operator('-', root_module['ns3::SpectrumValue'], root_module['ns3::SpectrumValue'], param('double', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::SpectrumValue'], root_module['ns3::SpectrumValue'], param('ns3::SpectrumValue const &', 'right'))
cls.add_binary_numeric_operator('*', root_module['ns3::SpectrumValue'], root_module['ns3::SpectrumValue'], param('double', 'right'))
cls.add_binary_numeric_operator('*', root_module['ns3::SpectrumValue'], root_module['ns3::SpectrumValue'], param('ns3::SpectrumValue const &', 'right'))
cls.add_binary_numeric_operator('+', root_module['ns3::SpectrumValue'], root_module['ns3::SpectrumValue'], param('double', 'right'))
cls.add_binary_numeric_operator('+', root_module['ns3::SpectrumValue'], root_module['ns3::SpectrumValue'], param('ns3::SpectrumValue const &', 'right'))
+ cls.add_unary_numeric_operator('-')
+ cls.add_binary_numeric_operator('-', root_module['ns3::SpectrumValue'], root_module['ns3::SpectrumValue'], param('double', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::SpectrumValue'], root_module['ns3::SpectrumValue'], param('ns3::SpectrumValue const &', 'right'))
cls.add_binary_numeric_operator('/', root_module['ns3::SpectrumValue'], root_module['ns3::SpectrumValue'], param('double', 'right'))
cls.add_binary_numeric_operator('/', root_module['ns3::SpectrumValue'], root_module['ns3::SpectrumValue'], param('ns3::SpectrumValue const &', 'right'))
cls.add_output_stream_operator()
@@ -10926,8 +10929,8 @@
def register_Ns3Time_methods(root_module, cls):
cls.add_binary_comparison_operator('!=')
cls.add_inplace_numeric_operator('+=', param('ns3::Time const &', 'right'))
+ cls.add_binary_numeric_operator('+', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right'))
cls.add_binary_numeric_operator('-', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right'))
cls.add_binary_comparison_operator('<')
cls.add_binary_comparison_operator('>')
cls.add_inplace_numeric_operator('-=', param('ns3::Time const &', 'right'))
@@ -11057,6 +11060,16 @@
'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',
@@ -16815,6 +16828,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',
@@ -17955,13 +17972,6 @@
[param('uint16_t', 'rnti'), param('uint8_t', 'txMode')])
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([])
--- a/src/lte/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -618,6 +618,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')
## ff-mac-common.h (module 'lte'): ns3::PagingInfoListElement_s [struct]
module.add_class('PagingInfoListElement_s')
## ff-mac-common.h (module 'lte'): ns3::PhichListElement_s [struct]
@@ -1196,8 +1198,6 @@
module.add_class('TdMtFfMacScheduler', parent=root_module['ns3::FfMacScheduler'])
## tdtbfq-ff-mac-scheduler.h (module 'lte'): ns3::TdTbfqFfMacScheduler [class]
module.add_class('TdTbfqFfMacScheduler', parent=root_module['ns3::FfMacScheduler'])
- ## 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'])
## tta-ff-mac-scheduler.h (module 'lte'): ns3::TtaFfMacScheduler [class]
@@ -1343,12 +1343,12 @@
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 const >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ns3::LtePhyTxEndCallback')
+ 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::LtePhyTxEndCallback*')
+ 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::LtePhyTxEndCallback&')
typehandlers.add_type_alias('std::vector< std::vector< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > >, std::allocator< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > > > >, std::allocator< std::vector< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > >, std::allocator< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > > > > > >', 'ns3::DlHarqRlcPduListBuffer_t')
typehandlers.add_type_alias('std::vector< std::vector< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > >, std::allocator< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > > > >, std::allocator< std::vector< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > >, std::allocator< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > > > > > >*', 'ns3::DlHarqRlcPduListBuffer_t*')
typehandlers.add_type_alias('std::vector< std::vector< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > >, std::allocator< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > > > >, std::allocator< std::vector< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > >, std::allocator< std::vector< ns3::RlcPduListElement_s, std::allocator< ns3::RlcPduListElement_s > > > > > >&', 'ns3::DlHarqRlcPduListBuffer_t&')
- 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::LtePhyTxEndCallback')
- 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::LtePhyTxEndCallback*')
- 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::LtePhyTxEndCallback&')
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&')
@@ -1974,7 +1974,6 @@
register_Ns3TdBetFfMacScheduler_methods(root_module, root_module['ns3::TdBetFfMacScheduler'])
register_Ns3TdMtFfMacScheduler_methods(root_module, root_module['ns3::TdMtFfMacScheduler'])
register_Ns3TdTbfqFfMacScheduler_methods(root_module, root_module['ns3::TdTbfqFfMacScheduler'])
- register_Ns3TimeChecker_methods(root_module, root_module['ns3::TimeChecker'])
register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue'])
register_Ns3TtaFfMacScheduler_methods(root_module, root_module['ns3::TtaFfMacScheduler'])
register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker'])
@@ -7271,6 +7270,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):
@@ -8334,19 +8337,6 @@
def register_Ns3Int64x64_t_methods(root_module, cls):
cls.add_binary_comparison_operator('!=')
cls.add_inplace_numeric_operator('+=', param('ns3::int64x64_t const &', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short unsigned int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned char const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('signed char const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('double const', 'right'))
- cls.add_unary_numeric_operator('-')
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', 'right'))
cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right'))
cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right'))
cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right'))
@@ -8371,6 +8361,19 @@
cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('signed char const', 'right'))
cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('double const', 'right'))
cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short unsigned int const', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned char const', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long int const', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long int const', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('int const', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short int const', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('signed char const', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('double const', 'right'))
+ cls.add_unary_numeric_operator('-')
+ cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', 'right'))
cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right'))
cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right'))
cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right'))
@@ -10854,13 +10857,13 @@
return
def register_Ns3SpectrumValue_methods(root_module, cls):
- cls.add_unary_numeric_operator('-')
- cls.add_binary_numeric_operator('-', root_module['ns3::SpectrumValue'], root_module['ns3::SpectrumValue'], param('double', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::SpectrumValue'], root_module['ns3::SpectrumValue'], param('ns3::SpectrumValue const &', 'right'))
cls.add_binary_numeric_operator('*', root_module['ns3::SpectrumValue'], root_module['ns3::SpectrumValue'], param('double', 'right'))
cls.add_binary_numeric_operator('*', root_module['ns3::SpectrumValue'], root_module['ns3::SpectrumValue'], param('ns3::SpectrumValue const &', 'right'))
cls.add_binary_numeric_operator('+', root_module['ns3::SpectrumValue'], root_module['ns3::SpectrumValue'], param('double', 'right'))
cls.add_binary_numeric_operator('+', root_module['ns3::SpectrumValue'], root_module['ns3::SpectrumValue'], param('ns3::SpectrumValue const &', 'right'))
+ cls.add_unary_numeric_operator('-')
+ cls.add_binary_numeric_operator('-', root_module['ns3::SpectrumValue'], root_module['ns3::SpectrumValue'], param('double', 'right'))
+ cls.add_binary_numeric_operator('-', root_module['ns3::SpectrumValue'], root_module['ns3::SpectrumValue'], param('ns3::SpectrumValue const &', 'right'))
cls.add_binary_numeric_operator('/', root_module['ns3::SpectrumValue'], root_module['ns3::SpectrumValue'], param('double', 'right'))
cls.add_binary_numeric_operator('/', root_module['ns3::SpectrumValue'], root_module['ns3::SpectrumValue'], param('ns3::SpectrumValue const &', 'right'))
cls.add_output_stream_operator()
@@ -10926,8 +10929,8 @@
def register_Ns3Time_methods(root_module, cls):
cls.add_binary_comparison_operator('!=')
cls.add_inplace_numeric_operator('+=', param('ns3::Time const &', 'right'))
+ cls.add_binary_numeric_operator('+', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right'))
cls.add_binary_numeric_operator('-', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right'))
cls.add_binary_comparison_operator('<')
cls.add_binary_comparison_operator('>')
cls.add_inplace_numeric_operator('-=', param('ns3::Time const &', 'right'))
@@ -11057,6 +11060,16 @@
'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',
@@ -16815,6 +16828,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',
@@ -17955,13 +17972,6 @@
[param('uint16_t', 'rnti'), param('uint8_t', 'txMode')])
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([])
--- a/src/lte/doc/Makefile Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/doc/Makefile Wed Jul 24 13:20:24 2013 +0200
@@ -148,6 +148,8 @@
IMAGES = $(IMAGES_NOBUILD) $(IMAGES_BUILD)
+RESCALE = $(shell hg root)/utils/rescale-pdf.sh
+
%.eps : %.dia; $(DIA) -t eps $< -e $@
%.png : %.dia; $(DIA) -t png $< -e $@
%.png : %.seqdiag; $(SEQDIAG) -Tpng --no-transparency -o $@ $<
@@ -155,19 +157,19 @@
%.png : %.eps; $(CONVERT) $< $@
%.pdf : %.seqdiag
$(SEQDIAG) -Tpdf -o $@ $<
- if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi
+ if test x$($@_width) != x; then $(RESCALE) $($@_width) $@ ; fi
%.pdf : %.dot
$(DOT) -Tpdf -o $@ $<
- if test x$($@_width) != x; then ./rescale-pdf.sh $($@_width) $@ ; fi
+ if test x$($@_width) != x; then $(RESCALE) $($@_width) $@ ; fi
%.pdf : %.eps
$(EPSTOPDF) $< -o=$@
- if test x$($@_width) != x; ./rescale-pdf.sh $($@_width) $@ ; fi
+ if test x$($@_width) != x; then $(RESCALE) $($@_width) $@ ; fi
%.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 =
--- a/src/lte/doc/rescale-pdf.sh Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -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}}
Binary file src/lte/doc/source/figures/lte-subframe-structure.dia has changed
--- a/src/lte/doc/source/lte-design.rst Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/doc/source/lte-design.rst Wed Jul 24 13:20:24 2013 +0200
@@ -1081,7 +1081,7 @@
\right)}{\tau}
-For what concern the HARQ, PF implements the non adaptive version, which implies that in allocating the retransmission attempts the scheduler uses the same allocation configuration of the original block, which means maintaining the same RBGs and MCS. UEs that are allocated for HARQ retransmissions are not considered for the transmission of new data in case they have a transmission opportunity available in the same TTI. Finally, HARQ can be disabled with ns3 attribute system for maintaining backward compatibility with old test cases and code, in detail::
+For what concern the HARQ, PF implements the non adaptive version, which implies that in allocating the retransmission attempts the scheduler uses the same allocation configuration of the original block, which means maintaining the same RBGs and MCS. UEs that are allocated for HARQ retransmissions are not considered for the transmission of new data in case they have a transmission opportunity available in the same TTI. Finally, HARQ can be disabled with ns3 attribute system for maintaining backward compatibility with old test cases and code, in detail.
Maximum Throughput (MT) Scheduler
@@ -1098,7 +1098,7 @@
subframe index, and :math:`k` be the resource block index; let :math:`M_{i,k}(t)` be MCS
usable by user :math:`i` on resource block :math:`k` according to what reported by the AMC
model (see `Adaptive Modulation and Coding`_); finally, let :math:`S(M, B)` be the TB
-size in bits as defined in [TS36.213]_ for the case where a number :math:`B` of
+size in bits as defined in [TS36213]_ for the case where a number :math:`B` of
resource blocks is used. The achievable rate :math:`R_{i}(k,t)` in bit/s for user :math:`i`
on resource block :math:`k` at subframe :math:`t` is defined as
--- a/src/lte/doc/source/lte-testing.rst Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/doc/source/lte-testing.rst Wed Jul 24 13:20:24 2013 +0200
@@ -383,7 +383,7 @@
Let :math:`\tau` be the TTI duration, :math:`B` the transmission
bandwidth configuration in number of RBs, :math:`M` the modulation and
coding scheme in use at the given SNR and :math:`S(M, B)` be the
-transport block size as defined in [TS36.213]_. The reference
+transport block size as defined in [TS36213]_. The reference
throughput :math:`T` in bit/s achieved by each UE is calculated as
.. math::
@@ -573,16 +573,16 @@
--------------------
-The test suite ``lte-phy-error-model`` generates different test cases for evaluating both data and control error models. For what concern the data, the test consists of nine test cases with single eNB and a various number of UEs, all having the same Radio Bearer specification. Each test is designed for evaluating the error rate perceived by a specific TB size in order to verify that it corresponds to the expected values according to the BLER generated for CB size analog to the TB size. This means that, for instance, the test will check that the performance of a TB of :math:`N` bits is analogous to the one of a a CB size of :math:`N` bits by collecting the performance of a user which has been forced the generation of a such TB size according to the distance to eNB. In order to significantly test the BER at MAC level, we modified the Adaptive Modulation and Coding (AMC) module, the ``LteAmc`` class, for making it less robust to channel conditions by adding a configurable BER parameter (called ``Ber`` in the ns3 attribute system) which enable the selection of the desired BER at MAC level when choosing the MCS to be used. In detail, the AMC module has been forced to select the AMC considering a BER of 0.01 (instead of the standard value equal to 0.00005). We note that, these values do not reflect actual BER since they come from an analytical bound which do not consider all the transmission chain aspects; therefore the resulted BER might be different.
+The test suite ``lte-phy-error-model`` generates different test cases for evaluating both data and control error models. For what concern the data, the test consists of nine test cases with single eNB and a various number of UEs, all having the same Radio Bearer specification. Each test is designed for evaluating the error rate perceived by a specific TB size in order to verify that it corresponds to the expected values according to the BLER generated for CB size analog to the TB size. This means that, for instance, the test will check that the performance of a TB of :math:`N` bits is analogous to the one of a a CB size of :math:`N` bits by collecting the performance of a user which has been forced the generation of a such TB size according to the distance to eNB. In order to significantly test the BLER at MAC level, we configured the Adaptive Modulation and Coding (AMC) module, the ``LteAmc`` class, for making it less robust to channel conditions by using the PiroEW2010 AMC model and configuring it to select the MCS considering a target BER of 0.03 (instead of the default value of 0.00005). We note that these values do not reflect the actual BER, since they come from an analytical bound which does not consider all the transmission chain aspects; therefore the BER and BLER actually experienced at the reception of a TB is in general different.
The parameters of the nine test cases are reported in the following:
- #. 4 UEs placed 1800 meters far from the eNB, which implies the use of MCS 2 (SINR of -5.51 dB) and a TB of 256 bits, that in turns produce a BER of 0.33 (see point A in figure :ref:`fig-mcs-2-test`).
- #. 2 UEs placed 1800 meters far from the eNB, which implies the use of MCS 2 (SINR of -5.51 dB) and a TB of 528 bits, that in turns produce a BER of 0.11 (see point B in figure :ref:`fig-mcs-2-test`).
- #. 1 UE placed 1800 meters far from the eNB, which implies the use of MCS 2 (SINR of -5.51 dB) and a TB of 1088 bits, that in turns produce a BER of 0.02 (see point C in figure :ref:`fig-mcs-2-test`).
- #. 1 UE placed 600 meters far from the eNB, which implies the use of MCS 12 (SINR of 4.43 dB) and a TB of 4800 bits, that in turns produce a BER of 0.3 (see point D in figure :ref:`fig-mcs-12-test`).
- #. 3 UEs placed 600 meters far from the eNB, which implies the use of MCS 12 (SINR of 4.43 dB) and a TB of 1632 bits, that in turns produce a BER of 0.55 (see point E in figure :ref:`fig-mcs-12-test`).
- #. 1 UE placed 470 meters far from the eNB, which implies the use of MCS 16 (SINR of 8.48 dB) and a TB of 7272 bits (segmented in 2 CBs of 3648 and 3584 bits), that in turns produce a BER of 0.14, since each CB has CBLER equal to 0.075 (see point F in figure :ref:`fig-mcs-14-test`).
+ #. 4 UEs placed 1800 meters far from the eNB, which implies the use of MCS 2 (SINR of -5.51 dB) and a TB of 256 bits, that in turns produce a BLER of 0.33 (see point A in figure :ref:`fig-mcs-2-test`).
+ #. 2 UEs placed 1800 meters far from the eNB, which implies the use of MCS 2 (SINR of -5.51 dB) and a TB of 528 bits, that in turns produce a BLER of 0.11 (see point B in figure :ref:`fig-mcs-2-test`).
+ #. 1 UE placed 1800 meters far from the eNB, which implies the use of MCS 2 (SINR of -5.51 dB) and a TB of 1088 bits, that in turns produce a BLER of 0.02 (see point C in figure :ref:`fig-mcs-2-test`).
+ #. 1 UE placed 600 meters far from the eNB, which implies the use of MCS 12 (SINR of 4.43 dB) and a TB of 4800 bits, that in turns produce a BLER of 0.3 (see point D in figure :ref:`fig-mcs-12-test`).
+ #. 3 UEs placed 600 meters far from the eNB, which implies the use of MCS 12 (SINR of 4.43 dB) and a TB of 1632 bits, that in turns produce a BLER of 0.55 (see point E in figure :ref:`fig-mcs-12-test`).
+ #. 1 UE placed 470 meters far from the eNB, which implies the use of MCS 16 (SINR of 8.48 dB) and a TB of 7272 bits (segmented in 2 CBs of 3648 and 3584 bits), that in turns produce a BLER of 0.14, since each CB has CBLER equal to 0.075 (see point F in figure :ref:`fig-mcs-14-test`).
.. _fig-mcs-2-test:
@@ -608,14 +608,14 @@
BLER for test 6.
-The test verifies that in each case the expected number of packets received correct corresponds to a Bernoulli distribution with a confidence interval of 95%, where the probability of success in each trail is :math:`1-BER` and :math:`n` is the total number of packet sent.
+The test verifies that in each case the expected number of packets received correct corresponds to a Bernoulli distribution with a confidence interval of 99%, where the probability of success in each trail is :math:`p=1-BER` and :math:`n` is the total number of packet sent.
The error model of PCFICH-PDDCH channels consists of 4 test cases with a single UE and several eNBs, where the UE is connected to only one eNB in order to have the remaining acting as interfering ones. The errors on data are disabled in order to verify only the ones due to erroneous decodification of PCFICH-PDCCH. The test verifies that the error on the data received respects the decodification error probability of the PCFICH-PDCCH with a tolerance of 0.1 due to the errors that might be produced in quantizing the MI and the error curve. As before, the system has been forced on working in a less conservative fashion in the AMC module for appreciating the results in border situations. The parameters of the 4 tests cases are reported in the following:
- #. 2 eNBs placed 1078 meters far from the UE, which implies a SINR of -2.00 dB and a TB of 217 bits, that in turns produce a BER of 0.007.
- #. 3 eNBs placed 1078 meters far from the UE, which implies a SINR of -4.00 dB and a TB of 217 bits, that in turns produce a BER of 0.045.
- #. 4 eNBs placed 1078 meters far from the UE, which implies a SINR of -6.00 dB and a TB of 133 bits, that in turns produce a BER of 0.206.
- #. 5 eNBs placed 1078 meters far from the UE, which implies a SINR of -7.00 dB and a TB of 81 bits, that in turns produce a BER of 0.343.
+ #. 2 eNBs placed 1078 meters far from the UE, which implies a SINR of -2.00 dB and a TB of 217 bits, that in turns produce a BLER of 0.007.
+ #. 3 eNBs placed 1078 meters far from the UE, which implies a SINR of -4.00 dB and a TB of 217 bits, that in turns produce a BLER of 0.045.
+ #. 4 eNBs placed 1078 meters far from the UE, which implies a SINR of -6.00 dB and a TB of 133 bits, that in turns produce a BLER of 0.206.
+ #. 5 eNBs placed 1078 meters far from the UE, which implies a SINR of -7.00 dB and a TB of 81 bits, that in turns produce a BLER of 0.343.
HARQ Model
--- a/src/lte/model/epc-x2.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/model/epc-x2.cc Wed Jul 24 13:20:24 2013 +0200
@@ -750,7 +750,7 @@
GtpuHeader gtpu;
gtpu.SetTeid (params.gtpTeid);
- gtpu.SetLength (params.ueData->GetSize () + gtpu.GetSerializedSize () - 8); // TODO This should be done in GtpuHeader
+ gtpu.SetLength (params.ueData->GetSize () + gtpu.GetSerializedSize () - 8); /// \todo This should be done in GtpuHeader
NS_LOG_INFO ("GTP-U header: " << gtpu);
Ptr<Packet> packet = params.ueData;
--- a/src/lte/model/fdbet-ff-mac-scheduler.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/model/fdbet-ff-mac-scheduler.cc Wed Jul 24 13:20:24 2013 +0200
@@ -1224,7 +1224,7 @@
itMap++;
} // end while allocation
- ret.m_nrOfPdcchOfdmSymbols = 1; // TODO: check correct value according the DCIs txed
+ ret.m_nrOfPdcchOfdmSymbols = 1; /// \todo check correct value according the DCIs txed
// update UEs stats
--- a/src/lte/model/fdmt-ff-mac-scheduler.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/model/fdmt-ff-mac-scheduler.cc Wed Jul 24 13:20:24 2013 +0200
@@ -1217,7 +1217,7 @@
itMap++;
} // end while allocation
- ret.m_nrOfPdcchOfdmSymbols = 1; // TODO: check correct value according the DCIs txed
+ ret.m_nrOfPdcchOfdmSymbols = 1; /// \todo check correct value according the DCIs txed
m_schedSapUser->SchedDlConfigInd (ret);
--- a/src/lte/model/fdtbfq-ff-mac-scheduler.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/model/fdtbfq-ff-mac-scheduler.cc Wed Jul 24 13:20:24 2013 +0200
@@ -1469,7 +1469,7 @@
itMap++;
} // end while allocation
- ret.m_nrOfPdcchOfdmSymbols = 1; // TODO: check correct value according the DCIs txed
+ ret.m_nrOfPdcchOfdmSymbols = 1; /// \todo check correct value according the DCIs txed
m_schedSapUser->SchedDlConfigInd (ret);
--- a/src/lte/model/lte-enb-net-device.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/model/lte-enb-net-device.cc Wed Jul 24 13:20:24 2013 +0200
@@ -97,13 +97,13 @@
"as per 3GPP 36.101 Section 5.7.3. ",
UintegerValue (100),
MakeUintegerAccessor (&LteEnbNetDevice::m_dlEarfcn),
- MakeUintegerChecker<uint16_t> (0, 6149))
+ MakeUintegerChecker<uint16_t> (0, 6599))
.AddAttribute ("UlEarfcn",
"Uplink E-UTRA Absolute Radio Frequency Channel Number (EARFCN) "
"as per 3GPP 36.101 Section 5.7.3. ",
UintegerValue (18100),
MakeUintegerAccessor (&LteEnbNetDevice::m_ulEarfcn),
- MakeUintegerChecker<uint16_t> (18000, 24149))
+ MakeUintegerChecker<uint16_t> (18000, 24599))
;
return tid;
}
--- a/src/lte/model/lte-rlc-am.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/model/lte-rlc-am.cc Wed Jul 24 13:20:24 2013 +0200
@@ -835,7 +835,7 @@
( (! IsInsideReceivingWindow (m_vrX)) && (m_vrX != m_vrMr) )
)
{
- // TODO stop and reset the t-Reordering
+ /// \todo stop and reset the t-Reordering
NS_LOG_LOGIC ("Stop reordering timer");
m_reorderingTimer.Cancel ();
}
@@ -861,7 +861,7 @@
- // TODO To remove
+ /// \todo To remove
// 5.1.2.2.3 Actions when an UMD PDU is placed in the reception buffer
// When an UMD PDU with SN = x is placed in the reception buffer, the receiving UM RLC entity shall:
@@ -1095,7 +1095,7 @@
if ( lengthIndicator >= packet->GetSize () )
{
NS_LOG_LOGIC ("INTERNAL ERROR: Not enough data in the packet (" << packet->GetSize () << "). Needed LI=" << lengthIndicator);
- // TODO What to do in this case? Discard packet and continue? Or Assert?
+ /// \todo What to do in this case? Discard packet and continue? Or Assert?
}
// Split packet in two fragments
@@ -1471,7 +1471,7 @@
}
-// TODO To remove
+/// \todo To remove
// void
// LteRlcAm::ReassembleOutsideWindow (void)
// {
@@ -1497,7 +1497,7 @@
// }
-// TODO To remove
+/// \todo To remove
// void
// LteRlcAm::ReassembleSnLessThan (uint16_t seqNumber)
// {
--- a/src/lte/model/lte-rlc-am.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/model/lte-rlc-am.h Wed Jul 24 13:20:24 2013 +0200
@@ -147,7 +147,7 @@
/**
* Configurable parameters. See section 7.4 in TS 36.322
*/
- uint16_t m_maxRetxThreshold; // TODO How these parameters are configured???
+ uint16_t m_maxRetxThreshold; /// \todo How these parameters are configured???
uint16_t m_pollPdu;
uint16_t m_pollByte;
--- a/src/lte/model/lte-rlc.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/model/lte-rlc.h Wed Jul 24 13:20:24 2013 +0200
@@ -101,7 +101,7 @@
- // TODO MRE What is the sense to duplicate all the interfaces here???
+ /// \todo MRE What is the sense to duplicate all the interfaces here???
// NB to avoid the use of multiple inheritance
protected:
--- a/src/lte/model/lte-ue-mac.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/model/lte-ue-mac.cc Wed Jul 24 13:20:24 2013 +0200
@@ -486,7 +486,7 @@
LteUeMac::DoRemoveLc (uint8_t lcId)
{
NS_LOG_FUNCTION (this << " lcId" << lcId);
- NS_ASSERT_MSG (m_lcInfoMap.find (lcId) == m_lcInfoMap.end (), "could not find LCID " << lcId);
+ NS_ASSERT_MSG (m_lcInfoMap.find (lcId) != m_lcInfoMap.end (), "could not find LCID " << lcId);
m_lcInfoMap.erase (lcId);
}
@@ -704,9 +704,9 @@
if (it->rapId == m_raPreambleId) // RAR is for me
{
RecvRaResponse (it->rarPayload);
- // TODO:: RRC generates the RecvRaResponse messaged
- // for avoiding holes in transmission at PHY layer
- // (which produce erroneous UL CQI evaluation)
+ /// \todo RRC generates the RecvRaResponse messaged
+ /// for avoiding holes in transmission at PHY layer
+ /// (which produce erroneous UL CQI evaluation)
}
}
}
--- a/src/lte/model/lte-ue-net-device.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/model/lte-ue-net-device.cc Wed Jul 24 13:20:24 2013 +0200
@@ -200,8 +200,11 @@
LteUeNetDevice::Send (Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber)
{
NS_LOG_FUNCTION (this << dest << protocolNumber);
- NS_ASSERT_MSG (protocolNumber == Ipv4L3Protocol::PROT_NUMBER, "unsupported protocol " << protocolNumber << ", only IPv4 is supported");
-
+ if (protocolNumber != Ipv4L3Protocol::PROT_NUMBER)
+ {
+ NS_LOG_INFO("unsupported protocol " << protocolNumber << ", only IPv4 is supported");
+ return true;
+ }
return m_nas->Send (packet);
}
--- a/src/lte/model/lte-ue-rrc.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/model/lte-ue-rrc.cc Wed Jul 24 13:20:24 2013 +0200
@@ -1143,7 +1143,7 @@
{
NS_LOG_INFO ("request to modify existing DRBID");
Ptr<LteDataRadioBearerInfo> drbInfo = drbMapIt->second;
- // TODO: currently not implemented. Would need to modify drbInfo, and then propagate changes to the MAC
+ /// \todo currently not implemented. Would need to modify drbInfo, and then propagate changes to the MAC
}
}
--- a/src/lte/model/pf-ff-mac-scheduler.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/model/pf-ff-mac-scheduler.cc Wed Jul 24 13:20:24 2013 +0200
@@ -1247,7 +1247,7 @@
itMap++;
} // end while allocation
- ret.m_nrOfPdcchOfdmSymbols = 1; // TODO: check correct value according the DCIs txed
+ ret.m_nrOfPdcchOfdmSymbols = 1; /// \todo check correct value according the DCIs txed
// update UEs stats
--- a/src/lte/model/pss-ff-mac-scheduler.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/model/pss-ff-mac-scheduler.cc Wed Jul 24 13:20:24 2013 +0200
@@ -1548,7 +1548,7 @@
itMap++;
} // end while allocation
- ret.m_nrOfPdcchOfdmSymbols = 1; // TODO: check correct value according the DCIs txed
+ ret.m_nrOfPdcchOfdmSymbols = 1; /// \todo check correct value according the DCIs txed
// update UEs stats
--- a/src/lte/model/rr-ff-mac-scheduler.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/model/rr-ff-mac-scheduler.cc Wed Jul 24 13:20:24 2013 +0200
@@ -1154,7 +1154,7 @@
}
while ((*it).m_rnti != m_nextRntiDl);
- ret.m_nrOfPdcchOfdmSymbols = 1; // TODO: check correct value according the DCIs txed
+ ret.m_nrOfPdcchOfdmSymbols = 1; /// \todo check correct value according the DCIs txed
m_schedSapUser->SchedDlConfigInd (ret);
return;
--- a/src/lte/model/tdbet-ff-mac-scheduler.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/model/tdbet-ff-mac-scheduler.cc Wed Jul 24 13:20:24 2013 +0200
@@ -1147,7 +1147,7 @@
itMap++;
} // end while allocation
- ret.m_nrOfPdcchOfdmSymbols = 1; // TODO: check correct value according the DCIs txed
+ ret.m_nrOfPdcchOfdmSymbols = 1; /// \todo check correct value according the DCIs txed
// update UEs stats
--- a/src/lte/model/tdmt-ff-mac-scheduler.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/model/tdmt-ff-mac-scheduler.cc Wed Jul 24 13:20:24 2013 +0200
@@ -1157,7 +1157,7 @@
itMap++;
} // end while allocation
- ret.m_nrOfPdcchOfdmSymbols = 1; // TODO: check correct value according the DCIs txed
+ ret.m_nrOfPdcchOfdmSymbols = 1; /// \todo check correct value according the DCIs txed
m_schedSapUser->SchedDlConfigInd (ret);
--- a/src/lte/model/tdtbfq-ff-mac-scheduler.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/model/tdtbfq-ff-mac-scheduler.cc Wed Jul 24 13:20:24 2013 +0200
@@ -1255,7 +1255,7 @@
itMap++;
} // end while allocation
- ret.m_nrOfPdcchOfdmSymbols = 1; // TODO: check correct value according the DCIs txed
+ ret.m_nrOfPdcchOfdmSymbols = 1; /// \todo check correct value according the DCIs txed
m_schedSapUser->SchedDlConfigInd (ret);
--- a/src/lte/model/tta-ff-mac-scheduler.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/model/tta-ff-mac-scheduler.cc Wed Jul 24 13:20:24 2013 +0200
@@ -1236,7 +1236,7 @@
itMap++;
} // end while allocation
- ret.m_nrOfPdcchOfdmSymbols = 1; // TODO: check correct value according the DCIs txed
+ ret.m_nrOfPdcchOfdmSymbols = 1; /// \todo check correct value according the DCIs txed
m_schedSapUser->SchedDlConfigInd (ret);
--- a/src/lte/test/lte-test-phy-error-model.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/test/lte-test-phy-error-model.cc Wed Jul 24 13:20:24 2013 +0200
@@ -1,6 +1,6 @@
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
+ * Copyright (c) 2011-2013 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
@@ -16,6 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Marco Miozzo <marco.miozzo@cttc.es>
+ * Nicola Baldo <nbaldo@cttc.es>
*/
#include <ns3/object.h>
@@ -63,28 +64,35 @@
// Tests on DL Control Channels (PCFICH+PDDCH)
- // 1 interfering eNB SINR -2.0 BER 0.007 TB size 217
+ // 1 interfering eNB SINR -2.0 BLER 0.007 TB size 217
AddTestCase (new LenaDlCtrlPhyErrorModelTestCase (2, 1078, 217, 0.007), TestCase::QUICK);
- // 2 interfering eNBs SINR -4.0 BER 0.037 TB size 217
+ // 2 interfering eNBs SINR -4.0 BLER 0.037 TB size 217
AddTestCase (new LenaDlCtrlPhyErrorModelTestCase (3, 1040, 217, 0.045), TestCase::EXTENSIVE);
- // 3 interfering eNBs SINR -6.0 BER 0.21 TB size 133
+ // 3 interfering eNBs SINR -6.0 BLER 0.21 TB size 133
AddTestCase (new LenaDlCtrlPhyErrorModelTestCase (4, 1250, 133, 0.206), TestCase::EXTENSIVE);
- // 4 interfering eNBs SINR -7.0 BER 0.34 TB size 133
+ // 4 interfering eNBs SINR -7.0 BLER 0.34 TB size 133
AddTestCase (new LenaDlCtrlPhyErrorModelTestCase (5, 1260, 81, 0.343), TestCase::EXTENSIVE);
- // Tests on DL/UL Data channels (PDSCH, PUSCH)
- // MCS 2 TB size of 256 bits BER 0.33 SINR -5.51
- AddTestCase (new LenaDataPhyErrorModelTestCase (4, 1800, 32, 0.33, 50), TestCase::QUICK);
-// MCS 2 TB size of 528 bits BER 0.11 SINR -5.51
- AddTestCase (new LenaDataPhyErrorModelTestCase (2, 1800, 66, 0.11, 34), TestCase::EXTENSIVE);
-// MCS 2 TB size of 1088 bits BER 0.02 SINR -5.51
- AddTestCase (new LenaDataPhyErrorModelTestCase (1, 1800, 136, 0.02, 16), TestCase::EXTENSIVE);
- // MCS 12 TB size of 4800 bits BER 0.3 SINR 4.43
- AddTestCase (new LenaDataPhyErrorModelTestCase (1, 600, 600, 0.3, 48), TestCase::EXTENSIVE);
-// MCS 12 TB size of 1632 bits BER 0.55 SINR 4.43
- AddTestCase (new LenaDataPhyErrorModelTestCase (3, 600, 204, 0.55, 52), TestCase::EXTENSIVE);
-// MCS 16 TB size of 7272 bits (3648 x 3584) BER 0.14 SINR 8.48
-// BER 0.14 = 1 - ((1-0.075)*(1-0.075))
+ // Tests on DL Data channels (PDSCH)
+ // the tolerance is calculated with the following octave code:
+ //
+ // n = 1000;
+ // for p=1-[0.33 0.11 0.2 0.3 0.55 0.14]
+ // tol = n*p - binoinv(0.005, n, p)
+ // endfor
+
+ // MCS 2 TB size of 256 bits BLER 0.33 SINR -5.51
+ AddTestCase (new LenaDataPhyErrorModelTestCase (4, 1800, 32, 0.33, 39), TestCase::QUICK);
+// MCS 2 TB size of 528 bits BLER 0.11 SINR -5.51
+ AddTestCase (new LenaDataPhyErrorModelTestCase (2, 1800, 66, 0.11, 26), TestCase::EXTENSIVE);
+// MCS 2 TB size of 1088 bits BLER 0.02 SINR -5.51
+ AddTestCase (new LenaDataPhyErrorModelTestCase (1, 1800, 136, 0.02, 33), TestCase::EXTENSIVE);
+ // MCS 12 TB size of 4800 bits BLER 0.3 SINR 4.43
+ AddTestCase (new LenaDataPhyErrorModelTestCase (1, 600, 600, 0.3, 38), TestCase::EXTENSIVE);
+// MCS 12 TB size of 1632 bits BLER 0.55 SINR 4.43
+ AddTestCase (new LenaDataPhyErrorModelTestCase (3, 600, 204, 0.55, 40), TestCase::EXTENSIVE);
+// MCS 16 TB size of 7272 bits (3648 x 3584) BLER 0.14 SINR 8.48
+// BLER 0.14 = 1 - ((1-0.075)*(1-0.075))
AddTestCase (new LenaDataPhyErrorModelTestCase (1, 470, 781, 0.14, 29), TestCase::EXTENSIVE);
@@ -101,13 +109,13 @@
return oss.str ();
}
-LenaDataPhyErrorModelTestCase::LenaDataPhyErrorModelTestCase (uint16_t nUser, uint16_t dist, uint16_t tbSize, double berRef, uint16_t bernQuantile)
+LenaDataPhyErrorModelTestCase::LenaDataPhyErrorModelTestCase (uint16_t nUser, uint16_t dist, uint16_t tbSize, double blerRef, uint16_t toleranceRxPackets)
: TestCase (BuildNameString (nUser, dist)),
m_nUser (nUser),
m_dist (dist),
m_tbSize (tbSize),
- m_berRef (berRef),
- m_bernQuantile (bernQuantile)
+ m_blerRef (blerRef),
+ m_toleranceRxPackets (toleranceRxPackets)
{
}
@@ -119,55 +127,12 @@
LenaDataPhyErrorModelTestCase::DoRun (void)
{
- double ber = 0.03;
+ double ber = 0.03;
Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (ber));
Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (true));
Config::SetDefault ("ns3::RrFfMacScheduler::HarqEnabled", BooleanValue (false));
-// LogComponentEnable ("LteEnbRrc", LOG_LEVEL_ALL);
-// LogComponentEnable ("LteUeRrc", LOG_LEVEL_ALL);
-// LogComponentEnable ("LteEnbMac", LOG_LEVEL_ALL);
-// LogComponentEnable ("LteUeMac", LOG_LEVEL_ALL);
-// LogComponentEnable ("LteRlc", LOG_LEVEL_ALL);
-//
-// LogComponentEnable ("LtePhy", LOG_LEVEL_ALL);
-// LogComponentEnable ("LteEnbPhy", LOG_LEVEL_ALL);
-// LogComponentEnable ("LteUePhy", LOG_LEVEL_ALL);
-
-// LogComponentEnable ("LteSpectrumPhy", LOG_LEVEL_ALL);
-// LogComponentEnable ("LteInterference", LOG_LEVEL_ALL);
-// LogComponentEnable ("LteSinrChunkProcessor", LOG_LEVEL_ALL);
-//
-// LogComponentEnable ("LtePropagationLossModel", LOG_LEVEL_ALL);
-// LogComponentEnable ("LossModel", LOG_LEVEL_ALL);
-// LogComponentEnable ("ShadowingLossModel", LOG_LEVEL_ALL);
-// LogComponentEnable ("PenetrationLossModel", LOG_LEVEL_ALL);
-// LogComponentEnable ("MultipathLossModel", LOG_LEVEL_ALL);
-// LogComponentEnable ("PathLossModel", LOG_LEVEL_ALL);
-//
-// LogComponentEnable ("LteNetDevice", LOG_LEVEL_ALL);
-// LogComponentEnable ("LteUeNetDevice", LOG_LEVEL_ALL);
-// LogComponentEnable ("LteEnbNetDevice", LOG_LEVEL_ALL);
-
-// LogComponentEnable ("RrFfMacScheduler", LOG_LEVEL_ALL);
-// LogComponentEnable ("LenaHelper", LOG_LEVEL_ALL);
-// LogComponentEnable ("RlcStatsCalculator", LOG_LEVEL_ALL);
-
-
-// LogComponentEnable ("LteSpectrumPhy", LOG_LEVEL_ALL);
-// LogComponentEnable ("LteEnbMac", LOG_LEVEL_ALL);
-// LogComponentEnable ("LteEnbPhy", LOG_LEVEL_ALL);
-// LogComponentEnable ("LteUePhy", LOG_LEVEL_ALL);
-// LogComponentEnable ("RrFfMacScheduler", LOG_LEVEL_ALL);
-// LogComponentEnable ("LenaHelper", LOG_LEVEL_ALL);
-// LogComponentEnable ("BuildingsPropagationLossModel", LOG_LEVEL_ALL);
-// LogComponentEnable ("LteMiErrorModel", LOG_LEVEL_ALL);
-// LogComponentEnable ("LteAmc", LOG_LEVEL_ALL);
-//
-// LogComponentDisableAll (LOG_LEVEL_ALL);
-
- LogComponentEnable ("LenaTestPhyErrorModel", LOG_LEVEL_ALL);
/**
@@ -235,42 +200,47 @@
}
lena->EnableRlcTraces ();
- double simulationTime = 1.000;
+ Time simulationTime = Seconds (1.000);
- Simulator::Stop (Seconds (simulationTime));
+ Simulator::Stop (simulationTime);
Ptr<RadioBearerStatsCalculator> rlcStats = lena->GetRlcStats ();
- rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (simulationTime)));
+ rlcStats->SetAttribute ("EpochDuration", TimeValue (simulationTime));
Simulator::Run ();
- /**
- * Check that the assignation is done in a RR fashion
- */
- NS_LOG_INFO ("\tTest downlink/uplink data shared channels (PDSCH and PUSCH)");
- NS_LOG_INFO ("Test with " << m_nUser << " user(s) at distance " << m_dist << " expected BER " << m_berRef);
- std::vector <uint64_t> dlDataRxed;
+ NS_LOG_INFO ("\tTest downlink data shared channels (PDSCH)");
+ NS_LOG_INFO ("Test with " << m_nUser << " user(s) at distance " << m_dist << " expected BLER " << m_blerRef);
for (int i = 0; i < m_nUser; i++)
{
// get the imsi
uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi ();
- // get the lcId
- uint8_t lcId = 1;
- dlDataRxed.push_back (rlcStats->GetDlRxData (imsi, lcId));
- double txed = rlcStats->GetDlTxData (imsi, lcId);
- int n = txed / m_tbSize;
- int lambda = (double)dlDataRxed.at (i) / m_tbSize;
- double ber = 1.0 - ((double)dlDataRxed.at (i)/txed);
- double np = n-n*m_berRef;
- NS_LOG_INFO ("\tUser " << i << " imsi " << imsi << " bytes rxed " << (double)dlDataRxed.at (i) << " txed " << txed
- << " BER " << ber << " Err " << std::fabs (m_berRef - ber) << " lambda " << lambda
- << " np " << np << " difference " << std::abs (lambda - np) << " quantile " << m_bernQuantile);
- NS_UNUSED (ber);
+ uint8_t lcId = 3;
+
+ double dlRxPackets = rlcStats->GetDlRxPackets (imsi, lcId);
+ double dlTxPackets = rlcStats->GetDlTxPackets (imsi, lcId);
+ double dlBler = 1.0 - (dlRxPackets/dlTxPackets);
+ double expectedDlRxPackets = dlTxPackets -dlTxPackets*m_blerRef;
+ NS_LOG_INFO ("\tUser " << i << " imsi " << imsi << " DOWNLINK"
+ << " pkts rx " << dlRxPackets << " tx " << dlTxPackets
+ << " BLER " << dlBler << " Err " << std::fabs (m_blerRef - dlBler)
+ << " expected rx " << expectedDlRxPackets
+ << " difference " << std::abs (expectedDlRxPackets - dlRxPackets)
+ << " tolerance " << m_toleranceRxPackets);
+ NS_UNUSED (dlBler);
+
+ // sanity check for whether the tx packets reported by the stats are correct
+ // we expect one packet per TTI, excluding the initial RRC connection establishment period
+ double expectedDlMinTxPackets = simulationTime.GetMilliSeconds () - 50;
+ NS_TEST_ASSERT_MSG_GT (dlTxPackets, expectedDlMinTxPackets, " too few DL TX packets reported");
+
// the quantiles are evaluated offline according to a Bernoulli
// ditribution with n equal to the number of packet sent and p equal
- // to the BER (see /reference/bernuolliDistribution.m for details)
- NS_TEST_ASSERT_MSG_EQ_TOL (lambda, np, m_bernQuantile, " Unexpected BER distribution!");
+ // to the BLER (see /reference/bernuolliDistribution.m for details)
+ NS_TEST_ASSERT_MSG_EQ_TOL (dlRxPackets, expectedDlRxPackets, m_toleranceRxPackets, " Unexpected DL BLER distribution!");
+
+
}
@@ -289,12 +259,12 @@
}
-LenaDlCtrlPhyErrorModelTestCase::LenaDlCtrlPhyErrorModelTestCase (uint16_t nEnb, uint16_t dist, uint16_t tbSize, double berRef)
+LenaDlCtrlPhyErrorModelTestCase::LenaDlCtrlPhyErrorModelTestCase (uint16_t nEnb, uint16_t dist, uint16_t tbSize, double blerRef)
: TestCase (BuildNameString (nEnb, dist)),
m_nEnb (nEnb),
m_dist (dist),
m_tbSize (tbSize),
-m_berRef (berRef)
+m_blerRef (blerRef)
{
}
@@ -312,50 +282,6 @@
Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (true));
Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
Config::SetDefault ("ns3::RrFfMacScheduler::HarqEnabled", BooleanValue (false));
- // LogComponentEnable ("LteEnbRrc", LOG_LEVEL_ALL);
- // LogComponentEnable ("LteUeRrc", LOG_LEVEL_ALL);
- // LogComponentEnable ("LteEnbMac", LOG_LEVEL_ALL);
- // LogComponentEnable ("LteUeMac", LOG_LEVEL_ALL);
- // LogComponentEnable ("LteRlc", LOG_LEVEL_ALL);
- //
- // LogComponentEnable ("LtePhy", LOG_LEVEL_ALL);
- // LogComponentEnable ("LteEnbPhy", LOG_LEVEL_ALL);
- // LogComponentEnable ("LteUePhy", LOG_LEVEL_ALL);
-
- // LogComponentEnable ("LteSpectrumPhy", LOG_LEVEL_ALL);
- // LogComponentEnable ("LteInterference", LOG_LEVEL_ALL);
- // LogComponentEnable ("LteSinrChunkProcessor", LOG_LEVEL_ALL);
- //
- // LogComponentEnable ("LtePropagationLossModel", LOG_LEVEL_ALL);
- // LogComponentEnable ("LossModel", LOG_LEVEL_ALL);
- // LogComponentEnable ("ShadowingLossModel", LOG_LEVEL_ALL);
- // LogComponentEnable ("PenetrationLossModel", LOG_LEVEL_ALL);
- // LogComponentEnable ("MultipathLossModel", LOG_LEVEL_ALL);
- // LogComponentEnable ("PathLossModel", LOG_LEVEL_ALL);
- //
- // LogComponentEnable ("LteNetDevice", LOG_LEVEL_ALL);
- // LogComponentEnable ("LteUeNetDevice", LOG_LEVEL_ALL);
- // LogComponentEnable ("LteEnbNetDevice", LOG_LEVEL_ALL);
-
-// LogComponentEnable ("RrFfMacScheduler", LOG_LEVEL_ALL);
- // LogComponentEnable ("LenaHelper", LOG_LEVEL_ALL);
- // LogComponentEnable ("RlcStatsCalculator", LOG_LEVEL_ALL);
-
-
- // LogComponentEnable ("LteSpectrumPhy", LOG_LEVEL_ALL);
- // LogComponentEnable ("LteEnbMac", LOG_LEVEL_ALL);
- // LogComponentEnable ("LteEnbPhy", LOG_LEVEL_ALL);
- // LogComponentEnable ("LteUePhy", LOG_LEVEL_ALL);
-// LogComponentEnable ("RrFfMacScheduler", LOG_LEVEL_ALL);
- // LogComponentEnable ("LenaHelper", LOG_LEVEL_ALL);
- // LogComponentEnable ("BuildingsPropagationLossModel", LOG_LEVEL_ALL);
-// LogComponentEnable ("LteMiErrorModel", LOG_LEVEL_ALL);
- // LogComponentEnable ("LteAmc", LOG_LEVEL_ALL);
- //
-// LogComponentDisableAll (LOG_LEVEL_ALL);
-
- LogComponentEnable ("LenaTestPhyErrorModel", LOG_LEVEL_ALL);
-
/**
* Initialize Simulation Scenario: 1 eNB and m_nUser UEs
@@ -423,38 +349,39 @@
lena->EnableRlcTraces ();
- double simulationTime = 1.000;
+ Time simulationTime = Seconds (1.000);
- Simulator::Stop (Seconds (simulationTime));
+ Simulator::Stop (simulationTime);
Ptr<RadioBearerStatsCalculator> rlcStats = lena->GetRlcStats ();
- rlcStats->SetAttribute ("EpochDuration", TimeValue (Seconds (simulationTime)));
+ rlcStats->SetAttribute ("EpochDuration", TimeValue (simulationTime));
Simulator::Run ();
- /**
- * Check that the assignation is done in a RR fashion
- */
NS_LOG_INFO ("\tTest downlink control channels (PCFICH+PDCCH)");
- NS_LOG_INFO ("Test with " << m_nEnb << " eNB(s) at distance " << m_dist << " expected BER " << m_berRef);
- std::vector <uint64_t> dlDataRxed;
+ NS_LOG_INFO ("Test with " << m_nEnb << " eNB(s) at distance " << m_dist << " expected BLER " << m_blerRef);
int nUser = 1;
for (int i = 0; i < nUser; i++)
- {
- // get the imsi
- uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi ();
- // get the lcId
- uint8_t lcId = 1;
- dlDataRxed.push_back (rlcStats->GetDlRxData (imsi, lcId));
- double txed = rlcStats->GetDlTxData (imsi, lcId);
- double ber = 1.0 - ((double)dlDataRxed.at (i)/txed);
- NS_LOG_INFO ("\tUser " << i << " imsi " << imsi << " bytes rxed " << (double)dlDataRxed.at (i) << " txed " << txed
- << " BER " << ber << " Err " << fabs (m_berRef - ber));
- NS_UNUSED (ber);
- NS_TEST_ASSERT_MSG_EQ_TOL (ber, m_berRef, 0.1, " Unexpected BER distribution!");
- }
-
+ {
+ // get the imsi
+ uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi ();
+ uint8_t lcId = 3;
+ double dlRxPackets = rlcStats->GetDlRxPackets (imsi, lcId);
+ double dlTxPackets = rlcStats->GetDlTxPackets (imsi, lcId);
+ double bler = 1.0 - (dlRxPackets/dlTxPackets);
+ NS_LOG_INFO ("\tUser " << i << " imsi " << imsi
+ << " pkts rx " << dlRxPackets << " tx " << dlTxPackets
+ << " BLER " << bler << " Err " << fabs (m_blerRef - bler));
+ NS_UNUSED (bler);
+
+ // sanity check for whether the tx packets reported by the stats are correct
+ // we expect one packet per TTI, excluding the initial RRC connection establishment period
+ double expectedMinDlTxPackets = simulationTime.GetMilliSeconds () - 50;
+ NS_TEST_ASSERT_MSG_GT (dlTxPackets, expectedMinDlTxPackets, " too few TX packets reported");
+
+ NS_TEST_ASSERT_MSG_EQ_TOL (bler, m_blerRef, 0.1, " Unexpected BLER distribution!");
+ }
Simulator::Destroy ();
}
--- a/src/lte/test/lte-test-phy-error-model.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/lte/test/lte-test-phy-error-model.h Wed Jul 24 13:20:24 2013 +0200
@@ -38,7 +38,7 @@
class LenaDataPhyErrorModelTestCase : public TestCase
{
public:
- LenaDataPhyErrorModelTestCase (uint16_t nUser, uint16_t dist, uint16_t tbSize, double refBer, uint16_t bernQuantile);
+ LenaDataPhyErrorModelTestCase (uint16_t nUser, uint16_t dist, uint16_t tbSize, double refBler, uint16_t toleranceRxPackets);
virtual ~LenaDataPhyErrorModelTestCase ();
private:
@@ -47,8 +47,8 @@
uint16_t m_nUser;
uint16_t m_dist;
uint16_t m_tbSize;
- double m_berRef;
- uint16_t m_bernQuantile;
+ double m_blerRef;
+ uint16_t m_toleranceRxPackets;
};
@@ -57,7 +57,7 @@
class LenaDlCtrlPhyErrorModelTestCase : public TestCase
{
public:
- LenaDlCtrlPhyErrorModelTestCase (uint16_t nEnbr, uint16_t dist, uint16_t tbSize, double refBer);
+ LenaDlCtrlPhyErrorModelTestCase (uint16_t nEnbr, uint16_t dist, uint16_t tbSize, double refBler);
virtual ~LenaDlCtrlPhyErrorModelTestCase ();
private:
@@ -66,7 +66,7 @@
uint16_t m_nEnb;
uint16_t m_dist;
uint16_t m_tbSize;
- double m_berRef;
+ double m_blerRef;
};
--- a/src/mesh/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mesh/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -126,6 +126,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')
## pcap-file.h (module 'network'): ns3::PcapFile [class]
module.add_class('PcapFile', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
@@ -368,8 +370,6 @@
module.add_class('SsidValue', import_from_module='ns.wifi', parent=root_module['ns3::AttributeValue'])
## supported-rates.h (module 'wifi'): ns3::SupportedRates [class]
module.add_class('SupportedRates', import_from_module='ns.wifi', parent=root_module['ns3::WifiInformationElement'])
- ## 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]
@@ -676,7 +676,6 @@
register_Ns3SsidChecker_methods(root_module, root_module['ns3::SsidChecker'])
register_Ns3SsidValue_methods(root_module, root_module['ns3::SsidValue'])
register_Ns3SupportedRates_methods(root_module, root_module['ns3::SupportedRates'])
- 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'])
@@ -2609,6 +2608,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):
@@ -4474,6 +4477,16 @@
'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',
@@ -7766,6 +7779,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',
@@ -8157,13 +8174,6 @@
cls.add_instance_attribute('extended', 'ns3::ExtendedSupportedRatesIE', is_const=False)
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([])
--- a/src/mesh/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mesh/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -126,6 +126,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')
## pcap-file.h (module 'network'): ns3::PcapFile [class]
module.add_class('PcapFile', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
@@ -368,8 +370,6 @@
module.add_class('SsidValue', import_from_module='ns.wifi', parent=root_module['ns3::AttributeValue'])
## supported-rates.h (module 'wifi'): ns3::SupportedRates [class]
module.add_class('SupportedRates', import_from_module='ns.wifi', parent=root_module['ns3::WifiInformationElement'])
- ## 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]
@@ -676,7 +676,6 @@
register_Ns3SsidChecker_methods(root_module, root_module['ns3::SsidChecker'])
register_Ns3SsidValue_methods(root_module, root_module['ns3::SsidValue'])
register_Ns3SupportedRates_methods(root_module, root_module['ns3::SupportedRates'])
- 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'])
@@ -2609,6 +2608,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):
@@ -4474,6 +4477,16 @@
'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',
@@ -7766,6 +7779,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',
@@ -8157,13 +8174,6 @@
cls.add_instance_attribute('extended', 'ns3::ExtendedSupportedRatesIE', is_const=False)
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([])
--- a/src/mesh/helper/flame/flame-installer.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mesh/helper/flame/flame-installer.cc Wed Jul 24 13:20:24 2013 +0200
@@ -55,7 +55,7 @@
FlameStack::Report (const Ptr<MeshPointDevice> mp, std::ostream& os)
{
mp->Report (os);
- // TODO report flame counters
+ /// \todo report flame counters
Ptr<FlameProtocol> flame = mp->GetObject<FlameProtocol> ();
NS_ASSERT (flame != 0);
flame->Report (os);
@@ -64,7 +64,7 @@
FlameStack::ResetStats (const Ptr<MeshPointDevice> mp)
{
mp->ResetStats ();
- // TODO reset flame counters
+ /// \todo reset flame counters
Ptr<FlameProtocol> flame = mp->GetObject<FlameProtocol> ();
NS_ASSERT (flame != 0);
--- a/src/mesh/helper/mesh-helper.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mesh/helper/mesh-helper.h Wed Jul 24 13:20:24 2013 +0200
@@ -119,7 +119,8 @@
* Set PHY standard
*/
void SetStandard (enum WifiPhyStandard standard);
- //void SetMeshId (std::string s); // XXX
+ /// \todo SetMeshId
+ //void SetMeshId (std::string s);
/**
* \brief Spread/not spread frequency channels of MP interfaces.
*
--- a/src/mesh/model/dot11s/hwmp-protocol-mac.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mesh/model/dot11s/hwmp-protocol-mac.cc Wed Jul 24 13:20:24 2013 +0200
@@ -65,7 +65,7 @@
m_stats.rxData++;
m_stats.rxDataBytes += packet->GetSize ();
- //TODO: address extension
+ /// \todo address extension
Mac48Address destination;
Mac48Address source;
switch (meshHdr.GetAddressExt ())
--- a/src/mesh/model/dot11s/ie-dot11s-preq.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mesh/model/dot11s/ie-dot11s-preq.cc Wed Jul 24 13:20:24 2013 +0200
@@ -348,7 +348,7 @@
return;
}
}
- //TODO: check overflow
+ /// \todo check overflow
Ptr<DestinationAddressUnit> new_element = Create<DestinationAddressUnit> ();
new_element->SetFlags (doFlag, rfFlag, (dest_seq_number == 0));
new_element->SetDestinationAddress (dest_address);
--- a/src/mesh/model/dot11s/ie-dot11s-preq.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mesh/model/dot11s/ie-dot11s-preq.h Wed Jul 24 13:20:24 2013 +0200
@@ -132,7 +132,7 @@
/**
* how many destinations we support
*/
- uint8_t m_maxSize; //TODO: make as an attribute
+ uint8_t m_maxSize; /// \todo make as an attribute
/**
* Fields of information element:
*/
--- a/src/mesh/model/dot11s/peer-link-frame.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mesh/model/dot11s/peer-link-frame.cc Wed Jul 24 13:20:24 2013 +0200
@@ -72,7 +72,7 @@
PeerLinkFrameStart::GetFields () const
{
PlinkFrameStartFields retval;
- //TODO: protocol version:
+ /// \todo protocol version:
retval.subtype = m_subtype;
retval.capability = m_capability;
retval.aid = m_aid;
--- a/src/mesh/model/dot11s/peer-management-protocol.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mesh/model/dot11s/peer-management-protocol.h Wed Jul 24 13:20:24 2013 +0200
@@ -137,7 +137,8 @@
std::vector < Ptr<PeerLink> > GetPeerLinks () const;
/// Get list of active peers of my given interface
std::vector<Mac48Address> GetPeers (uint32_t interface) const;
- /// Get mesh point address. TODO this used by plugins only. Now MAC plugins can ask MP addrress directly from main MAC
+ /// Get mesh point address.
+ /// \todo this used by plugins only. Now MAC plugins can ask MP addrress directly from main MAC
Mac48Address GetAddress ();
uint8_t GetNumberOfLinks ();
void SetMeshId (std::string s);
--- a/src/mesh/model/mesh-point-device.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mesh/model/mesh-point-device.h Wed Jul 24 13:20:24 2013 +0200
@@ -44,7 +44,7 @@
* From the level 3 point of view MeshPointDevice is similar to BridgeNetDevice, but the packets,
* which going through may be changed (because L2 protocols may require their own headers or tags).
*
- * Attributes: TODO
+ * Attributes: \todo
*/
class MeshPointDevice : public NetDevice
{
@@ -135,12 +135,13 @@
/**
* \brief Response callback for L2 routing protocol. This will be executed when routing information is ready.
*
- * \param success True is route found. TODO: diagnose routing errors
+ * \param success True is route found.
* \param packet Packet to send
* \param src Source MAC address
* \param dst Destination MAC address
* \param protocol Protocol ID
* \param iface Interface to use (ID) for send (decided by routing protocol). All interfaces will be used if outIface = 0xffffffff
+ * \todo diagnose routing errors
*/
void
DoSend (bool success, Ptr<Packet> packet, Mac48Address src, Mac48Address dst, uint16_t protocol,
--- a/src/mesh/model/mesh-wifi-interface-mac-plugin.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mesh/model/mesh-wifi-interface-mac-plugin.h Wed Jul 24 13:20:24 2013 +0200
@@ -36,7 +36,7 @@
*
* \brief Common interface for mesh point interface MAC plugins
*
- * TODO: plugins description
+ * \todo plugins description
*/
class MeshWifiInterfaceMacPlugin : public SimpleRefCount<MeshWifiInterfaceMacPlugin>
{
@@ -49,20 +49,20 @@
* \brief Process received frame
*
* \return false if (and only if) frame should be dropped
- * TODO define when MAC call this
+ * \todo define when MAC call this
*/
virtual bool Receive (Ptr<Packet> packet, const WifiMacHeader & header) = 0;
/**
* \brief Update frame before it will be forwarded down
*
* \return false if (and only if) frame should be dropped
- * TODO define when MAC call this, preconditions & postconditions
+ * \todo define when MAC call this, preconditions & postconditions
*/
virtual bool UpdateOutcomingFrame (Ptr<Packet> packet, WifiMacHeader & header, Mac48Address from, Mac48Address to) = 0;
/**
* \brief Update beacon before it will be formed and sent
*
- * TODO define when MAC call this
+ * \todo define when MAC call this
*/
virtual void UpdateBeacon (MeshWifiBeacon & beacon) const = 0;
/**
--- a/src/mesh/model/mesh-wifi-interface-mac.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mesh/model/mesh-wifi-interface-mac.cc Wed Jul 24 13:20:24 2013 +0200
@@ -193,8 +193,8 @@
{
NS_LOG_FUNCTION (this);
NS_ASSERT (m_phy != 0); // need PHY to set/get channel
- /* TODO
- *
+ /**
+ * \todo
* Correct channel switching is:
*
* 1. Interface down, e.g. to stop packets from layer 3
@@ -513,7 +513,7 @@
MeshWifiInterfaceMac::Statistics::Print (std::ostream & os) const
{
os << "<Statistics "
- // TODO txBeacons
+ /// \todo txBeacons
"rxBeacons=\"" << recvBeacons << "\" "
"txFrames=\"" << sentFrames << "\" "
"txBytes=\"" << sentBytes << "\" "
--- a/src/mesh/model/mesh-wifi-interface-mac.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mesh/model/mesh-wifi-interface-mac.h Wed Jul 24 13:20:24 2013 +0200
@@ -99,7 +99,8 @@
///\name Plugins
// \{
- /// Install plugin. TODO return unique ID to allow unregister plugins
+ /// Install plugin.
+ /// \todo return unique ID to allow unregister plugins
void InstallPlugin (Ptr<MeshWifiInterfaceMacPlugin> plugin);
// \}
@@ -147,7 +148,8 @@
private:
/// Frame receive handler
void Receive (Ptr<Packet> packet, WifiMacHeader const *hdr);
- /// Send frame. Frame is supposed to be tagged by routing information. TODO: clarify this point
+ /// Send frame. Frame is supposed to be tagged by routing information.
+ /// \todo clarify this point
void ForwardDown (Ptr<const Packet> packet, Mac48Address from, Mac48Address to);
/// Send beacon
void SendBeacon ();
--- a/src/mesh/test/dot11s/hwmp-proactive-regression.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mesh/test/dot11s/hwmp-proactive-regression.h Wed Jul 24 13:20:24 2013 +0200
@@ -64,7 +64,7 @@
void CheckResults ();
private:
- /// XXX It is important to have pointers here
+ /// \internal It is important to have pointers here
NodeContainer * m_nodes;
/// Simulation time
Time m_time;
--- a/src/mesh/test/dot11s/hwmp-reactive-regression.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mesh/test/dot11s/hwmp-reactive-regression.h Wed Jul 24 13:20:24 2013 +0200
@@ -77,7 +77,7 @@
virtual void DoRun ();
void CheckResults ();
private:
- /// XXX It is important to have pointers here
+ /// \internal It is important to have pointers here
NodeContainer * m_nodes;
/// Simulation time
Time m_time;
--- a/src/mesh/test/dot11s/hwmp-simplest-regression.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mesh/test/dot11s/hwmp-simplest-regression.h Wed Jul 24 13:20:24 2013 +0200
@@ -75,7 +75,7 @@
void CheckResults ();
private:
- /// XXX It is important to have pointers here
+ /// \internal It is important to have pointers here
NodeContainer * m_nodes;
/// Simulation time
Time m_time;
--- a/src/mesh/test/dot11s/hwmp-target-flags-regression.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mesh/test/dot11s/hwmp-target-flags-regression.h Wed Jul 24 13:20:24 2013 +0200
@@ -74,7 +74,7 @@
void CheckResults ();
private:
- /// XXX It is important to have pointers here
+ /// \internal It is important to have pointers here
NodeContainer * m_nodes;
/// Simulation time
Time m_time;
--- a/src/mesh/test/dot11s/pmp-regression.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mesh/test/dot11s/pmp-regression.h Wed Jul 24 13:20:24 2013 +0200
@@ -49,7 +49,7 @@
~PeerManagementProtocolRegressionTest ();
private:
- /// XXX It is important to have pointers here
+ /// \internal It is important to have pointers here
NodeContainer * m_nodes;
/// Simulation time
Time m_time;
--- a/src/mesh/test/flame/flame-regression.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mesh/test/flame/flame-regression.h Wed Jul 24 13:20:24 2013 +0200
@@ -63,7 +63,7 @@
void CheckResults ();
private:
- /// XXX It is important to have pointers here
+ /// \internal It is important to have pointers here
NodeContainer * m_nodes;
/// Simulation time
Time m_time;
--- a/src/mobility/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mobility/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -226,8 +226,6 @@
module.add_class('RectangleValue', parent=root_module['ns3::AttributeValue'])
## steady-state-random-waypoint-mobility-model.h (module 'mobility'): ns3::SteadyStateRandomWaypointMobilityModel [class]
module.add_class('SteadyStateRandomWaypointMobilityModel', parent=root_module['ns3::MobilityModel'])
- ## 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]
@@ -378,7 +376,6 @@
register_Ns3RectangleChecker_methods(root_module, root_module['ns3::RectangleChecker'])
register_Ns3RectangleValue_methods(root_module, root_module['ns3::RectangleValue'])
register_Ns3SteadyStateRandomWaypointMobilityModel_methods(root_module, root_module['ns3::SteadyStateRandomWaypointMobilityModel'])
- 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'])
@@ -2253,6 +2250,16 @@
'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',
@@ -3879,13 +3886,6 @@
visibility='private', 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([])
--- a/src/mobility/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mobility/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -226,8 +226,6 @@
module.add_class('RectangleValue', parent=root_module['ns3::AttributeValue'])
## steady-state-random-waypoint-mobility-model.h (module 'mobility'): ns3::SteadyStateRandomWaypointMobilityModel [class]
module.add_class('SteadyStateRandomWaypointMobilityModel', parent=root_module['ns3::MobilityModel'])
- ## 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]
@@ -378,7 +376,6 @@
register_Ns3RectangleChecker_methods(root_module, root_module['ns3::RectangleChecker'])
register_Ns3RectangleValue_methods(root_module, root_module['ns3::RectangleValue'])
register_Ns3SteadyStateRandomWaypointMobilityModel_methods(root_module, root_module['ns3::SteadyStateRandomWaypointMobilityModel'])
- 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'])
@@ -2253,6 +2250,16 @@
'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',
@@ -3879,13 +3886,6 @@
visibility='private', 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([])
--- a/src/mobility/model/constant-velocity-helper.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mobility/model/constant-velocity-helper.cc Wed Jul 24 13:20:24 2013 +0200
@@ -20,18 +20,23 @@
#include "ns3/simulator.h"
#include "ns3/rectangle.h"
#include "ns3/box.h"
+#include "ns3/log.h"
#include "constant-velocity-helper.h"
+NS_LOG_COMPONENT_DEFINE ("ConstantVelocityHelper");
+
namespace ns3 {
ConstantVelocityHelper::ConstantVelocityHelper ()
: m_paused (true)
{
+ NS_LOG_FUNCTION (this);
}
ConstantVelocityHelper::ConstantVelocityHelper (const Vector &position)
: m_position (position),
m_paused (true)
{
+ NS_LOG_FUNCTION (this << position);
}
ConstantVelocityHelper::ConstantVelocityHelper (const Vector &position,
const Vector &vel)
@@ -39,10 +44,12 @@
m_velocity (vel),
m_paused (true)
{
+ NS_LOG_FUNCTION (this << position << vel);
}
void
ConstantVelocityHelper::SetPosition (const Vector &position)
{
+ NS_LOG_FUNCTION (this << position);
m_position = position;
m_velocity = Vector (0.0, 0.0, 0.0);
m_lastUpdate = Simulator::Now ();
@@ -51,17 +58,20 @@
Vector
ConstantVelocityHelper::GetCurrentPosition (void) const
{
+ NS_LOG_FUNCTION (this);
return m_position;
}
Vector
ConstantVelocityHelper::GetVelocity (void) const
{
+ NS_LOG_FUNCTION (this);
return m_paused ? Vector (0.0, 0.0, 0.0) : m_velocity;
}
void
ConstantVelocityHelper::SetVelocity (const Vector &vel)
{
+ NS_LOG_FUNCTION (this << vel);
m_velocity = vel;
m_lastUpdate = Simulator::Now ();
}
@@ -69,6 +79,7 @@
void
ConstantVelocityHelper::Update (void) const
{
+ NS_LOG_FUNCTION (this);
Time now = Simulator::Now ();
NS_ASSERT (m_lastUpdate <= now);
Time deltaTime = now - m_lastUpdate;
@@ -86,6 +97,7 @@
void
ConstantVelocityHelper::UpdateWithBounds (const Rectangle &bounds) const
{
+ NS_LOG_FUNCTION (this << bounds);
Update ();
m_position.x = std::min (bounds.xMax, m_position.x);
m_position.x = std::max (bounds.xMin, m_position.x);
@@ -96,6 +108,7 @@
void
ConstantVelocityHelper::UpdateWithBounds (const Box &bounds) const
{
+ NS_LOG_FUNCTION (this << bounds);
Update ();
m_position.x = std::min (bounds.xMax, m_position.x);
m_position.x = std::max (bounds.xMin, m_position.x);
@@ -108,12 +121,14 @@
void
ConstantVelocityHelper::Pause (void)
{
+ NS_LOG_FUNCTION (this);
m_paused = true;
}
void
ConstantVelocityHelper::Unpause (void)
{
+ NS_LOG_FUNCTION (this);
m_paused = false;
}
--- a/src/mpi/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mpi/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -68,6 +68,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')
## mpi-interface.h (module 'mpi'): ns3::SentBuffer [class]
module.add_class('SentBuffer')
## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [class]
@@ -158,8 +160,6 @@
module.add_class('ObjectFactoryValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue'])
## 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<ns3::Packet> >'])
- ## 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]
@@ -243,7 +243,6 @@
register_Ns3ObjectFactoryChecker_methods(root_module, root_module['ns3::ObjectFactoryChecker'])
register_Ns3ObjectFactoryValue_methods(root_module, root_module['ns3::ObjectFactoryValue'])
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'])
@@ -1068,6 +1067,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):
@@ -2017,6 +2020,16 @@
'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',
@@ -2664,6 +2677,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',
@@ -2675,13 +2692,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([])
--- a/src/mpi/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mpi/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -68,6 +68,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')
## mpi-interface.h (module 'mpi'): ns3::SentBuffer [class]
module.add_class('SentBuffer')
## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [class]
@@ -158,8 +160,6 @@
module.add_class('ObjectFactoryValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue'])
## 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<ns3::Packet> >'])
- ## 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]
@@ -243,7 +243,6 @@
register_Ns3ObjectFactoryChecker_methods(root_module, root_module['ns3::ObjectFactoryChecker'])
register_Ns3ObjectFactoryValue_methods(root_module, root_module['ns3::ObjectFactoryValue'])
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'])
@@ -1068,6 +1067,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):
@@ -2017,6 +2020,16 @@
'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',
@@ -2664,6 +2677,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',
@@ -2675,13 +2692,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([])
--- a/src/mpi/model/distributed-simulator-impl.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mpi/model/distributed-simulator-impl.cc Wed Jul 24 13:20:24 2013 +0200
@@ -499,8 +499,8 @@
Time
DistributedSimulatorImpl::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);
}
--- a/src/mpi/model/distributed-simulator-impl.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/mpi/model/distributed-simulator-impl.h Wed Jul 24 13:20:24 2013 +0200
@@ -84,6 +84,7 @@
};
/**
+ * \ingroup simulator
* \ingroup mpi
*
* \brief distributed simulator implementation using lookahead
--- a/src/netanim/examples/uan-animation.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/netanim/examples/uan-animation.cc Wed Jul 24 13:20:24 2013 +0200
@@ -41,7 +41,6 @@
#include "ns3/network-module.h"
#include "ns3/netanim-module.h"
#include "ns3/mobility-module.h"
-#include "ns3/tools-module.h"
#include "ns3/applications-module.h"
#include <fstream>
--- a/src/netanim/examples/uan-animation.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/netanim/examples/uan-animation.h Wed Jul 24 13:20:24 2013 +0200
@@ -22,7 +22,6 @@
#define UAN_CW_EXAMPLE_H
#include "ns3/network-module.h"
-#include "ns3/tools-module.h"
#include "ns3/uan-module.h"
using namespace ns3;
--- a/src/netanim/examples/wscript Wed Jul 24 13:19:54 2013 +0200
+++ b/src/netanim/examples/wscript Wed Jul 24 13:20:24 2013 +0200
@@ -18,7 +18,7 @@
obj.source = 'wireless-animation.cc'
obj = bld.create_ns3_program('uan-animation',
- ['netanim', 'internet', 'mobility', 'tools', 'applications', 'uan'])
+ ['netanim', 'internet', 'mobility', 'applications', 'uan'])
obj.source = 'uan-animation.cc'
obj = bld.create_ns3_program('dynamic_linknode',
--- a/src/netanim/model/animation-interface.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/netanim/model/animation-interface.cc Wed Jul 24 13:20:24 2013 +0200
@@ -214,7 +214,7 @@
continue;
}
NS_LOG_INFO ("Begin Track Route for: " << trackElement.destination.c_str () << " From:" << trackElement.fromNodeId);
- Ptr<Packet> pkt = 0;
+ Ptr<Packet> pkt = Create<Packet> ();
Ipv4Header header;
header.SetDestination (Ipv4Address (trackElement.destination.c_str ()));
Socket::SocketErrno sockerr;
@@ -1192,7 +1192,7 @@
AddPendingWifiPacket (AnimUid, pktinfo);
NS_LOG_WARN ("WifiPhyRxBegin: unknown Uid, but we are adding a wifi packet");
}
- // TODO: NS_ASSERT (WifiPacketIsPending (AnimUid) == true);
+ /// \todo NS_ASSERT (WifiPacketIsPending (AnimUid) == true);
m_pendingWifiPackets[AnimUid].ProcessRxBegin (ndev, Simulator::Now ());
m_pendingWifiPackets[AnimUid].ProcessRxEnd (ndev, Simulator::Now (), UpdatePosition (n));
OutputWirelessPacket (p, m_pendingWifiPackets[AnimUid], m_pendingWifiPackets[AnimUid].GetRxInfo (ndev));
@@ -1215,7 +1215,7 @@
AnimPacketInfo pktinfo (ndev, Simulator::Now (), Simulator::Now (), UpdatePosition (n));
AddPendingWifiPacket (AnimUid, pktinfo);
}
- // TODO: NS_ASSERT (WifiPacketIsPending (AnimUid) == true);
+ /// \todo NS_ASSERT (WifiPacketIsPending (AnimUid) == true);
AnimPacketInfo& pktInfo = m_pendingWifiPackets[AnimUid];
pktInfo.ProcessRxEnd (ndev, Simulator::Now (), UpdatePosition (n));
AnimRxInfo pktrxInfo = pktInfo.GetRxInfo (ndev);
@@ -1241,7 +1241,7 @@
NS_LOG_WARN ("WifiMacRxTrace: unknown Uid");
return;
}
- // TODO: NS_ASSERT (WifiPacketIsPending (AnimUid) == true);
+ /// \todo NS_ASSERT (WifiPacketIsPending (AnimUid) == true);
AnimPacketInfo& pktInfo = m_pendingWifiPackets[AnimUid];
AnimRxInfo pktrxInfo = pktInfo.GetRxInfo (ndev);
if (pktrxInfo.IsPhyRxComplete ())
@@ -1267,7 +1267,7 @@
gAnimUid++;
NS_LOG_INFO ("WimaxTxTrace for packet:" << gAnimUid);
AnimPacketInfo pktinfo (ndev, Simulator::Now (), Simulator::Now () + Seconds (0.001), UpdatePosition (n));
- //TODO 0.0001 is used until Wimax implements TxBegin and TxEnd traces
+ /// \todo 0.0001 is used until Wimax implements TxBegin and TxEnd traces
AnimByteTag tag;
tag.Set (gAnimUid);
p->AddByteTag (tag);
@@ -1289,7 +1289,7 @@
AnimPacketInfo& pktInfo = m_pendingWimaxPackets[AnimUid];
pktInfo.ProcessRxBegin (ndev, Simulator::Now ());
pktInfo.ProcessRxEnd (ndev, Simulator::Now () + Seconds (0.001), UpdatePosition (n));
- //TODO 0.001 is used until Wimax implements RxBegin and RxEnd traces
+ /// \todo 0.001 is used until Wimax implements RxBegin and RxEnd traces
AnimRxInfo pktrxInfo = pktInfo.GetRxInfo (ndev);
OutputWirelessPacket (p, pktInfo, pktrxInfo);
}
@@ -1305,7 +1305,7 @@
gAnimUid++;
NS_LOG_INFO ("LteTxTrace for packet:" << gAnimUid);
AnimPacketInfo pktinfo (ndev, Simulator::Now (), Simulator::Now () + Seconds (0.001), UpdatePosition (n));
- //TODO 0.0001 is used until Lte implements TxBegin and TxEnd traces
+ /// \todo 0.0001 is used until Lte implements TxBegin and TxEnd traces
AnimByteTag tag;
tag.Set (gAnimUid);
p->AddByteTag (tag);
@@ -1331,7 +1331,7 @@
AnimPacketInfo& pktInfo = m_pendingLtePackets[AnimUid];
pktInfo.ProcessRxBegin (ndev, Simulator::Now ());
pktInfo.ProcessRxEnd (ndev, Simulator::Now () + Seconds (0.001), UpdatePosition (n));
- //TODO 0.001 is used until Lte implements RxBegin and RxEnd traces
+ /// \todo 0.001 is used until Lte implements RxBegin and RxEnd traces
AnimRxInfo pktrxInfo = pktInfo.GetRxInfo (ndev);
OutputWirelessPacket (p, pktInfo, pktrxInfo);
}
@@ -1360,7 +1360,7 @@
gAnimUid++;
NS_LOG_INFO ("LteSpectrumPhyTxTrace for packet:" << gAnimUid);
AnimPacketInfo pktinfo (ndev, Simulator::Now (), Simulator::Now () + Seconds (0.001), UpdatePosition (n));
- //TODO 0.0001 is used until Lte implements TxBegin and TxEnd traces
+ /// \todo 0.0001 is used until Lte implements TxBegin and TxEnd traces
AnimByteTag tag;
tag.Set (gAnimUid);
p->AddByteTag (tag);
@@ -1399,7 +1399,7 @@
AnimPacketInfo& pktInfo = m_pendingLtePackets[AnimUid];
pktInfo.ProcessRxBegin (ndev, Simulator::Now ());
pktInfo.ProcessRxEnd (ndev, Simulator::Now () + Seconds (0.001), UpdatePosition (n));
- //TODO 0.001 is used until Lte implements RxBegin and RxEnd traces
+ /// \todo 0.001 is used until Lte implements RxBegin and RxEnd traces
AnimRxInfo pktrxInfo = pktInfo.GetRxInfo (ndev);
OutputWirelessPacket (p, pktInfo, pktrxInfo);
}
@@ -1440,7 +1440,7 @@
AddPendingCsmaPacket (AnimUid, pktinfo);
NS_LOG_WARN ("Unknown Uid, but adding Csma Packet anyway");
}
- // TODO: NS_ASSERT (CsmaPacketIsPending (AnimUid) == true);
+ /// \todo NS_ASSERT (CsmaPacketIsPending (AnimUid) == true);
AnimPacketInfo& pktInfo = m_pendingCsmaPackets[AnimUid];
pktInfo.m_lbTx = Simulator::Now ().GetSeconds ();
}
@@ -1459,7 +1459,7 @@
NS_LOG_WARN ("CsmaPhyRxEndTrace: unknown Uid");
return;
}
- // TODO: NS_ASSERT (CsmaPacketIsPending (AnimUid) == true);
+ /// \todo NS_ASSERT (CsmaPacketIsPending (AnimUid) == true);
AnimPacketInfo& pktInfo = m_pendingCsmaPackets[AnimUid];
m_pendingCsmaPackets[AnimUid].ProcessRxBegin (ndev, Simulator::Now ());
pktInfo.ProcessRxEnd (ndev, Simulator::Now (), UpdatePosition (n));
@@ -1483,7 +1483,7 @@
NS_LOG_WARN ("CsmaMacRxTrace: unknown Uid");
return;
}
- // TODO: NS_ASSERT (CsmaPacketIsPending (AnimUid) == true);
+ /// \todo NS_ASSERT (CsmaPacketIsPending (AnimUid) == true);
AnimPacketInfo& pktInfo = m_pendingCsmaPackets[AnimUid];
AnimRxInfo pktrxInfo = pktInfo.GetRxInfo (ndev);
if (pktrxInfo.IsPhyRxComplete ())
--- a/src/network/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/network/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -82,6 +82,10 @@
root_module['ns3::Ipv6Address'].implicitly_converts_to(root_module['ns3::Address'])
## ipv6-address.h (module 'network'): ns3::Ipv6Prefix [class]
module.add_class('Ipv6Prefix')
+ ## mac16-address.h (module 'network'): ns3::Mac16Address [class]
+ module.add_class('Mac16Address')
+ ## 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')
## mac48-address.h (module 'network'): ns3::Mac48Address [class]
@@ -124,6 +128,8 @@
module.add_class('PacketTagList')
## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData [struct]
module.add_class('TagData', 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'])
## packetbb.h (module 'network'): ns3::PbbAddressTlvBlock [class]
module.add_class('PbbAddressTlvBlock')
## packetbb.h (module 'network'): ns3::PbbTlvBlock [class]
@@ -336,10 +342,18 @@
module.add_class('ListErrorModel', 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', parent=root_module['ns3::AttributeChecker'])
+ ## mac16-address.h (module 'network'): ns3::Mac16AddressValue [class]
+ module.add_class('Mac16AddressValue', parent=root_module['ns3::AttributeValue'])
## mac48-address.h (module 'network'): ns3::Mac48AddressChecker [class]
module.add_class('Mac48AddressChecker', parent=root_module['ns3::AttributeChecker'])
## mac48-address.h (module 'network'): ns3::Mac48AddressValue [class]
module.add_class('Mac48AddressValue', parent=root_module['ns3::AttributeValue'])
+ ## mac64-address.h (module 'network'): ns3::Mac64AddressChecker [class]
+ module.add_class('Mac64AddressChecker', parent=root_module['ns3::AttributeChecker'])
+ ## mac64-address.h (module 'network'): ns3::Mac64AddressValue [class]
+ module.add_class('Mac64AddressValue', parent=root_module['ns3::AttributeValue'])
## net-device.h (module 'network'): ns3::NetDevice [class]
module.add_class('NetDevice', parent=root_module['ns3::Object'])
## net-device.h (module 'network'): ns3::NetDevice::PacketType [enumeration]
@@ -390,8 +404,6 @@
module.add_class('SimpleChannel', parent=root_module['ns3::Channel'])
## simple-net-device.h (module 'network'): ns3::SimpleNetDevice [class]
module.add_class('SimpleNetDevice', 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]
@@ -408,15 +420,9 @@
module.add_class('PbbAddressTlv', parent=root_module['ns3::PbbTlv'])
module.add_container('std::list< ns3::Ptr< ns3::Packet > >', 'ns3::Ptr< ns3::Packet >', container_type='list')
module.add_container('std::list< unsigned int >', 'unsigned int', container_type='list')
- 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&')
typehandlers.add_type_alias('ns3::SequenceNumber< unsigned short, short >', 'ns3::SequenceNumber16')
typehandlers.add_type_alias('ns3::SequenceNumber< unsigned short, short >*', 'ns3::SequenceNumber16*')
typehandlers.add_type_alias('ns3::SequenceNumber< unsigned short, short >&', 'ns3::SequenceNumber16&')
- 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::SequenceNumber< unsigned int, int >', 'ns3::SequenceNumber32')
typehandlers.add_type_alias('ns3::SequenceNumber< unsigned int, int >*', 'ns3::SequenceNumber32*')
typehandlers.add_type_alias('ns3::SequenceNumber< unsigned int, int >&', 'ns3::SequenceNumber32&')
@@ -426,9 +432,15 @@
typehandlers.add_type_alias('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ns3::GenericPhyRxEndErrorCallback')
typehandlers.add_type_alias('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >*', 'ns3::GenericPhyRxEndErrorCallback*')
typehandlers.add_type_alias('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >&', 'ns3::GenericPhyRxEndErrorCallback&')
+ 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&')
## Register a nested module for the namespace FatalImpl
@@ -475,6 +487,7 @@
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'])
@@ -588,8 +601,12 @@
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_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'])
@@ -613,7 +630,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'])
@@ -624,8 +640,8 @@
return
def register_Ns3Address_methods(root_module, cls):
+ cls.add_binary_comparison_operator('!=')
cls.add_binary_comparison_operator('<')
- cls.add_binary_comparison_operator('!=')
cls.add_output_stream_operator()
cls.add_binary_comparison_operator('==')
## address.h (module 'network'): ns3::Address::Address() [constructor]
@@ -1495,8 +1511,8 @@
return
def register_Ns3Ipv4Address_methods(root_module, cls):
+ cls.add_binary_comparison_operator('!=')
cls.add_binary_comparison_operator('<')
- cls.add_binary_comparison_operator('!=')
cls.add_output_stream_operator()
cls.add_binary_comparison_operator('==')
## ipv4-address.h (module 'network'): ns3::Ipv4Address::Ipv4Address(ns3::Ipv4Address const & arg0) [copy constructor]
@@ -1666,8 +1682,8 @@
return
def register_Ns3Ipv6Address_methods(root_module, cls):
+ cls.add_binary_comparison_operator('!=')
cls.add_binary_comparison_operator('<')
- cls.add_binary_comparison_operator('!=')
cls.add_output_stream_operator()
cls.add_binary_comparison_operator('==')
## ipv6-address.h (module 'network'): ns3::Ipv6Address::Ipv6Address() [constructor]
@@ -1759,6 +1775,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',
@@ -1798,16 +1819,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',
@@ -1896,9 +1937,46 @@
is_const=True)
return
-def register_Ns3Mac48Address_methods(root_module, cls):
+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('<')
cls.add_output_stream_operator()
cls.add_binary_comparison_operator('==')
## mac48-address.h (module 'network'): ns3::Mac48Address::Mac48Address(ns3::Mac48Address const & arg0) [copy constructor]
@@ -1970,6 +2048,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]
@@ -2499,6 +2578,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):
@@ -3133,8 +3216,8 @@
return
def register_Ns3TypeId_methods(root_module, cls):
+ cls.add_binary_comparison_operator('!=')
cls.add_binary_comparison_operator('<')
- cls.add_binary_comparison_operator('!=')
cls.add_output_stream_operator()
cls.add_binary_comparison_operator('==')
## type-id.h (module 'core'): ns3::TypeId::TypeId(char const * name) [constructor]
@@ -3314,6 +3397,8 @@
return
def register_Ns3Int64x64_t_methods(root_module, cls):
+ cls.add_binary_comparison_operator('!=')
+ cls.add_inplace_numeric_operator('+=', param('ns3::int64x64_t const &', 'right'))
cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right'))
cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right'))
cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right'))
@@ -3365,9 +3450,7 @@
cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', 'right'))
cls.add_binary_comparison_operator('<')
cls.add_binary_comparison_operator('>')
- cls.add_binary_comparison_operator('!=')
cls.add_inplace_numeric_operator('*=', param('ns3::int64x64_t const &', 'right'))
- cls.add_inplace_numeric_operator('+=', param('ns3::int64x64_t const &', 'right'))
cls.add_inplace_numeric_operator('-=', param('ns3::int64x64_t const &', 'right'))
cls.add_inplace_numeric_operator('/=', param('ns3::int64x64_t const &', 'right'))
cls.add_output_stream_operator()
@@ -4987,12 +5070,12 @@
return
def register_Ns3Time_methods(root_module, cls):
+ cls.add_binary_comparison_operator('!=')
+ cls.add_inplace_numeric_operator('+=', param('ns3::Time const &', 'right'))
cls.add_binary_numeric_operator('+', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right'))
cls.add_binary_numeric_operator('-', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right'))
cls.add_binary_comparison_operator('<')
cls.add_binary_comparison_operator('>')
- cls.add_binary_comparison_operator('!=')
- cls.add_inplace_numeric_operator('+=', param('ns3::Time const &', 'right'))
cls.add_inplace_numeric_operator('-=', param('ns3::Time const &', 'right'))
cls.add_output_stream_operator()
cls.add_binary_comparison_operator('<=')
@@ -5120,6 +5203,16 @@
'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',
@@ -6398,6 +6491,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::AttributeValue> 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<ns3::AttributeChecker const> 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<ns3::AttributeChecker const> 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([])
@@ -6438,6 +6571,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::AttributeValue> 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<ns3::AttributeChecker const> 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<ns3::AttributeChecker const> 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_Ns3NetDevice_methods(root_module, cls):
## net-device.h (module 'network'): ns3::NetDevice::NetDevice() [constructor]
cls.add_constructor([])
@@ -6965,6 +7138,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',
@@ -8415,13 +8592,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([])
@@ -8648,10 +8818,18 @@
module.add_function('MakeIpv6PrefixChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
[])
+ ## mac16-address.h (module 'network'): extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeMac16AddressChecker() [free function]
+ module.add_function('MakeMac16AddressChecker',
+ 'ns3::Ptr< ns3::AttributeChecker const >',
+ [])
## mac48-address.h (module 'network'): extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeMac48AddressChecker() [free function]
module.add_function('MakeMac48AddressChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
[])
+ ## mac64-address.h (module 'network'): extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeMac64AddressChecker() [free function]
+ module.add_function('MakeMac64AddressChecker',
+ 'ns3::Ptr< ns3::AttributeChecker const >',
+ [])
## address-utils.h (module 'network'): extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Address & ad, uint32_t len) [free function]
module.add_function('ReadFrom',
'void',
@@ -8664,10 +8842,18 @@
module.add_function('ReadFrom',
'void',
[param('ns3::Buffer::Iterator &', 'i'), param('ns3::Ipv6Address &', 'ad')])
+ ## address-utils.h (module 'network'): extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Mac16Address & ad) [free function]
+ module.add_function('ReadFrom',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac16Address &', 'ad')])
## address-utils.h (module 'network'): extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Mac48Address & ad) [free function]
module.add_function('ReadFrom',
'void',
[param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac48Address &', 'ad')])
+ ## address-utils.h (module 'network'): extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Mac64Address & ad) [free function]
+ module.add_function('ReadFrom',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac64Address &', 'ad')])
## address-utils.h (module 'network'): extern void ns3::WriteTo(ns3::Buffer::Iterator & i, ns3::Address const & ad) [free function]
module.add_function('WriteTo',
'void',
@@ -8680,10 +8866,18 @@
module.add_function('WriteTo',
'void',
[param('ns3::Buffer::Iterator &', 'i'), param('ns3::Ipv6Address', 'ad')])
+ ## address-utils.h (module 'network'): extern void ns3::WriteTo(ns3::Buffer::Iterator & i, ns3::Mac16Address ad) [free function]
+ module.add_function('WriteTo',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac16Address', 'ad')])
## address-utils.h (module 'network'): extern void ns3::WriteTo(ns3::Buffer::Iterator & i, ns3::Mac48Address ad) [free function]
module.add_function('WriteTo',
'void',
[param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac48Address', 'ad')])
+ ## address-utils.h (module 'network'): extern void ns3::WriteTo(ns3::Buffer::Iterator & i, ns3::Mac64Address ad) [free function]
+ module.add_function('WriteTo',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac64Address', 'ad')])
register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module)
register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module)
return
--- a/src/network/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/network/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -82,6 +82,10 @@
root_module['ns3::Ipv6Address'].implicitly_converts_to(root_module['ns3::Address'])
## ipv6-address.h (module 'network'): ns3::Ipv6Prefix [class]
module.add_class('Ipv6Prefix')
+ ## mac16-address.h (module 'network'): ns3::Mac16Address [class]
+ module.add_class('Mac16Address')
+ ## 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')
## mac48-address.h (module 'network'): ns3::Mac48Address [class]
@@ -124,6 +128,8 @@
module.add_class('PacketTagList')
## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData [struct]
module.add_class('TagData', 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'])
## packetbb.h (module 'network'): ns3::PbbAddressTlvBlock [class]
module.add_class('PbbAddressTlvBlock')
## packetbb.h (module 'network'): ns3::PbbTlvBlock [class]
@@ -336,10 +342,18 @@
module.add_class('ListErrorModel', 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', parent=root_module['ns3::AttributeChecker'])
+ ## mac16-address.h (module 'network'): ns3::Mac16AddressValue [class]
+ module.add_class('Mac16AddressValue', parent=root_module['ns3::AttributeValue'])
## mac48-address.h (module 'network'): ns3::Mac48AddressChecker [class]
module.add_class('Mac48AddressChecker', parent=root_module['ns3::AttributeChecker'])
## mac48-address.h (module 'network'): ns3::Mac48AddressValue [class]
module.add_class('Mac48AddressValue', parent=root_module['ns3::AttributeValue'])
+ ## mac64-address.h (module 'network'): ns3::Mac64AddressChecker [class]
+ module.add_class('Mac64AddressChecker', parent=root_module['ns3::AttributeChecker'])
+ ## mac64-address.h (module 'network'): ns3::Mac64AddressValue [class]
+ module.add_class('Mac64AddressValue', parent=root_module['ns3::AttributeValue'])
## net-device.h (module 'network'): ns3::NetDevice [class]
module.add_class('NetDevice', parent=root_module['ns3::Object'])
## net-device.h (module 'network'): ns3::NetDevice::PacketType [enumeration]
@@ -390,8 +404,6 @@
module.add_class('SimpleChannel', parent=root_module['ns3::Channel'])
## simple-net-device.h (module 'network'): ns3::SimpleNetDevice [class]
module.add_class('SimpleNetDevice', 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]
@@ -408,15 +420,9 @@
module.add_class('PbbAddressTlv', parent=root_module['ns3::PbbTlv'])
module.add_container('std::list< ns3::Ptr< ns3::Packet > >', 'ns3::Ptr< ns3::Packet >', container_type='list')
module.add_container('std::list< unsigned int >', 'unsigned int', container_type='list')
- 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&')
typehandlers.add_type_alias('ns3::SequenceNumber< unsigned short, short >', 'ns3::SequenceNumber16')
typehandlers.add_type_alias('ns3::SequenceNumber< unsigned short, short >*', 'ns3::SequenceNumber16*')
typehandlers.add_type_alias('ns3::SequenceNumber< unsigned short, short >&', 'ns3::SequenceNumber16&')
- 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::SequenceNumber< unsigned int, int >', 'ns3::SequenceNumber32')
typehandlers.add_type_alias('ns3::SequenceNumber< unsigned int, int >*', 'ns3::SequenceNumber32*')
typehandlers.add_type_alias('ns3::SequenceNumber< unsigned int, int >&', 'ns3::SequenceNumber32&')
@@ -426,9 +432,15 @@
typehandlers.add_type_alias('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ns3::GenericPhyRxEndErrorCallback')
typehandlers.add_type_alias('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >*', 'ns3::GenericPhyRxEndErrorCallback*')
typehandlers.add_type_alias('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >&', 'ns3::GenericPhyRxEndErrorCallback&')
+ 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&')
## Register a nested module for the namespace FatalImpl
@@ -475,6 +487,7 @@
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'])
@@ -588,8 +601,12 @@
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_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'])
@@ -613,7 +630,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'])
@@ -624,8 +640,8 @@
return
def register_Ns3Address_methods(root_module, cls):
+ cls.add_binary_comparison_operator('!=')
cls.add_binary_comparison_operator('<')
- cls.add_binary_comparison_operator('!=')
cls.add_output_stream_operator()
cls.add_binary_comparison_operator('==')
## address.h (module 'network'): ns3::Address::Address() [constructor]
@@ -1495,8 +1511,8 @@
return
def register_Ns3Ipv4Address_methods(root_module, cls):
+ cls.add_binary_comparison_operator('!=')
cls.add_binary_comparison_operator('<')
- cls.add_binary_comparison_operator('!=')
cls.add_output_stream_operator()
cls.add_binary_comparison_operator('==')
## ipv4-address.h (module 'network'): ns3::Ipv4Address::Ipv4Address(ns3::Ipv4Address const & arg0) [copy constructor]
@@ -1666,8 +1682,8 @@
return
def register_Ns3Ipv6Address_methods(root_module, cls):
+ cls.add_binary_comparison_operator('!=')
cls.add_binary_comparison_operator('<')
- cls.add_binary_comparison_operator('!=')
cls.add_output_stream_operator()
cls.add_binary_comparison_operator('==')
## ipv6-address.h (module 'network'): ns3::Ipv6Address::Ipv6Address() [constructor]
@@ -1759,6 +1775,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',
@@ -1798,16 +1819,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',
@@ -1896,9 +1937,46 @@
is_const=True)
return
-def register_Ns3Mac48Address_methods(root_module, cls):
+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('<')
cls.add_output_stream_operator()
cls.add_binary_comparison_operator('==')
## mac48-address.h (module 'network'): ns3::Mac48Address::Mac48Address(ns3::Mac48Address const & arg0) [copy constructor]
@@ -1970,6 +2048,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]
@@ -2499,6 +2578,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):
@@ -3133,8 +3216,8 @@
return
def register_Ns3TypeId_methods(root_module, cls):
+ cls.add_binary_comparison_operator('!=')
cls.add_binary_comparison_operator('<')
- cls.add_binary_comparison_operator('!=')
cls.add_output_stream_operator()
cls.add_binary_comparison_operator('==')
## type-id.h (module 'core'): ns3::TypeId::TypeId(char const * name) [constructor]
@@ -3314,6 +3397,8 @@
return
def register_Ns3Int64x64_t_methods(root_module, cls):
+ cls.add_binary_comparison_operator('!=')
+ cls.add_inplace_numeric_operator('+=', param('ns3::int64x64_t const &', 'right'))
cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right'))
cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right'))
cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right'))
@@ -3365,9 +3450,7 @@
cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', 'right'))
cls.add_binary_comparison_operator('<')
cls.add_binary_comparison_operator('>')
- cls.add_binary_comparison_operator('!=')
cls.add_inplace_numeric_operator('*=', param('ns3::int64x64_t const &', 'right'))
- cls.add_inplace_numeric_operator('+=', param('ns3::int64x64_t const &', 'right'))
cls.add_inplace_numeric_operator('-=', param('ns3::int64x64_t const &', 'right'))
cls.add_inplace_numeric_operator('/=', param('ns3::int64x64_t const &', 'right'))
cls.add_output_stream_operator()
@@ -4987,12 +5070,12 @@
return
def register_Ns3Time_methods(root_module, cls):
+ cls.add_binary_comparison_operator('!=')
+ cls.add_inplace_numeric_operator('+=', param('ns3::Time const &', 'right'))
cls.add_binary_numeric_operator('+', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right'))
cls.add_binary_numeric_operator('-', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right'))
cls.add_binary_comparison_operator('<')
cls.add_binary_comparison_operator('>')
- cls.add_binary_comparison_operator('!=')
- cls.add_inplace_numeric_operator('+=', param('ns3::Time const &', 'right'))
cls.add_inplace_numeric_operator('-=', param('ns3::Time const &', 'right'))
cls.add_output_stream_operator()
cls.add_binary_comparison_operator('<=')
@@ -5120,6 +5203,16 @@
'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',
@@ -6398,6 +6491,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::AttributeValue> 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<ns3::AttributeChecker const> 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<ns3::AttributeChecker const> 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([])
@@ -6438,6 +6571,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::AttributeValue> 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<ns3::AttributeChecker const> 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<ns3::AttributeChecker const> 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_Ns3NetDevice_methods(root_module, cls):
## net-device.h (module 'network'): ns3::NetDevice::NetDevice() [constructor]
cls.add_constructor([])
@@ -6965,6 +7138,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',
@@ -8415,13 +8592,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([])
@@ -8648,10 +8818,18 @@
module.add_function('MakeIpv6PrefixChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
[])
+ ## mac16-address.h (module 'network'): extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeMac16AddressChecker() [free function]
+ module.add_function('MakeMac16AddressChecker',
+ 'ns3::Ptr< ns3::AttributeChecker const >',
+ [])
## mac48-address.h (module 'network'): extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeMac48AddressChecker() [free function]
module.add_function('MakeMac48AddressChecker',
'ns3::Ptr< ns3::AttributeChecker const >',
[])
+ ## mac64-address.h (module 'network'): extern ns3::Ptr<ns3::AttributeChecker const> ns3::MakeMac64AddressChecker() [free function]
+ module.add_function('MakeMac64AddressChecker',
+ 'ns3::Ptr< ns3::AttributeChecker const >',
+ [])
## address-utils.h (module 'network'): extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Address & ad, uint32_t len) [free function]
module.add_function('ReadFrom',
'void',
@@ -8664,10 +8842,18 @@
module.add_function('ReadFrom',
'void',
[param('ns3::Buffer::Iterator &', 'i'), param('ns3::Ipv6Address &', 'ad')])
+ ## address-utils.h (module 'network'): extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Mac16Address & ad) [free function]
+ module.add_function('ReadFrom',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac16Address &', 'ad')])
## address-utils.h (module 'network'): extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Mac48Address & ad) [free function]
module.add_function('ReadFrom',
'void',
[param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac48Address &', 'ad')])
+ ## address-utils.h (module 'network'): extern void ns3::ReadFrom(ns3::Buffer::Iterator & i, ns3::Mac64Address & ad) [free function]
+ module.add_function('ReadFrom',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac64Address &', 'ad')])
## address-utils.h (module 'network'): extern void ns3::WriteTo(ns3::Buffer::Iterator & i, ns3::Address const & ad) [free function]
module.add_function('WriteTo',
'void',
@@ -8680,10 +8866,18 @@
module.add_function('WriteTo',
'void',
[param('ns3::Buffer::Iterator &', 'i'), param('ns3::Ipv6Address', 'ad')])
+ ## address-utils.h (module 'network'): extern void ns3::WriteTo(ns3::Buffer::Iterator & i, ns3::Mac16Address ad) [free function]
+ module.add_function('WriteTo',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac16Address', 'ad')])
## address-utils.h (module 'network'): extern void ns3::WriteTo(ns3::Buffer::Iterator & i, ns3::Mac48Address ad) [free function]
module.add_function('WriteTo',
'void',
[param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac48Address', 'ad')])
+ ## address-utils.h (module 'network'): extern void ns3::WriteTo(ns3::Buffer::Iterator & i, ns3::Mac64Address ad) [free function]
+ module.add_function('WriteTo',
+ 'void',
+ [param('ns3::Buffer::Iterator &', 'i'), param('ns3::Mac64Address', 'ad')])
register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module)
register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module)
return
--- a/src/network/model/packet.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/network/model/packet.cc Wed Jul 24 13:20:24 2013 +0200
@@ -584,7 +584,7 @@
}
//Tag size
- //XXX
+ /// \todo Serialze Tags size
//size += m_tags.GetSerializedSize ();
// increment total size by size of meta-data
@@ -658,7 +658,7 @@
}
// Serialize Tags
- // XXX
+ /// \todo Serialize Tags
// Serialize Metadata
uint32_t metaSize = m_metadata.GetSerializedSize ();
@@ -756,7 +756,7 @@
}
// read tags
- //XXX
+ /// \todo Deserialize Tags
//uint32_t tagsDeserialized = m_tags.Deserialize (buffer.Begin ());
//buffer.RemoveAtStart (tagsDeserialized);
--- a/src/network/model/packet.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/network/model/packet.h Wed Jul 24 13:20:24 2013 +0200
@@ -340,6 +340,8 @@
*
* If you try to change the content of the buffer
* returned by this method, you will die.
+ *
+ * \deprecated
* Note that this method is now deprecated and will be removed in
* a future version of ns-3. To get access to the content
* of the byte buffer of a packet, call CopyData"()" to perform
--- a/src/network/test/buffer-test.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/network/test/buffer-test.cc Wed Jul 24 13:20:24 2013 +0200
@@ -58,9 +58,8 @@
}
}
-/* Note: works only when variadic macros are
+/** \todo Works only when variadic macros are
* available which is the case for gcc.
- * XXX
*/
#define ENSURE_WRITTEN_BYTES(buffer, n, ...) \
{ \
--- a/src/network/utils/address-utils.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/network/utils/address-utils.cc Wed Jul 24 13:20:24 2013 +0200
@@ -44,6 +44,13 @@
ad.CopyTo (mac);
i.Write (mac, ad.GetLength ());
}
+void WriteTo (Buffer::Iterator &i, Mac64Address ad)
+{
+ NS_LOG_FUNCTION (&i << &ad);
+ uint8_t mac[8];
+ ad.CopyTo (mac);
+ i.Write (mac, 8);
+}
void WriteTo (Buffer::Iterator &i, Mac48Address ad)
{
NS_LOG_FUNCTION (&i << &ad);
@@ -51,6 +58,14 @@
ad.CopyTo (mac);
i.Write (mac, 6);
}
+void WriteTo (Buffer::Iterator &i, Mac16Address ad)
+{
+ NS_LOG_FUNCTION (&i << &ad);
+ uint8_t mac[2];
+ ad.CopyTo (mac);
+ i.Write (mac+1, 1);
+ i.Write (mac, 1);
+}
void ReadFrom (Buffer::Iterator &i, Ipv4Address &ad)
{
@@ -71,6 +86,13 @@
i.Read (mac, len);
ad.CopyFrom (mac, len);
}
+void ReadFrom (Buffer::Iterator &i, Mac64Address &ad)
+{
+ NS_LOG_FUNCTION (&i << &ad);
+ uint8_t mac[8];
+ i.Read (mac, 8);
+ ad.CopyFrom (mac);
+}
void ReadFrom (Buffer::Iterator &i, Mac48Address &ad)
{
NS_LOG_FUNCTION (&i << &ad);
@@ -78,6 +100,14 @@
i.Read (mac, 6);
ad.CopyFrom (mac);
}
+void ReadFrom (Buffer::Iterator &i, Mac16Address &ad)
+{
+ NS_LOG_FUNCTION (&i << &ad);
+ uint8_t mac[2];
+ i.Read (mac+1, 1);
+ i.Read (mac, 1);
+ ad.CopyFrom (mac);
+}
namespace addressUtils {
--- a/src/network/utils/address-utils.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/network/utils/address-utils.h Wed Jul 24 13:20:24 2013 +0200
@@ -24,19 +24,25 @@
#include "ipv4-address.h"
#include "ipv6-address.h"
#include "ns3/address.h"
+#include "mac64-address.h"
#include "mac48-address.h"
+#include "mac16-address.h"
namespace ns3 {
void WriteTo (Buffer::Iterator &i, Ipv4Address ad);
void WriteTo (Buffer::Iterator &i, Ipv6Address ad);
void WriteTo (Buffer::Iterator &i, const Address &ad);
+void WriteTo (Buffer::Iterator &i, Mac64Address ad);
void WriteTo (Buffer::Iterator &i, Mac48Address ad);
+void WriteTo (Buffer::Iterator &i, Mac16Address ad);
void ReadFrom (Buffer::Iterator &i, Ipv4Address &ad);
void ReadFrom (Buffer::Iterator &i, Ipv6Address &ad);
void ReadFrom (Buffer::Iterator &i, Address &ad, uint32_t len);
+void ReadFrom (Buffer::Iterator &i, Mac64Address &ad);
void ReadFrom (Buffer::Iterator &i, Mac48Address &ad);
+void ReadFrom (Buffer::Iterator &i, Mac16Address &ad);
namespace addressUtils {
--- a/src/network/utils/ipv4-address.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/network/utils/ipv4-address.h Wed Jul 24 13:20:24 2013 +0200
@@ -47,8 +47,8 @@
* \brief Constructs an Ipv4Address by parsing a the input C-string
*
* Input address is in format:
- * hhh.xxx.xxx.lll
- * where h is the high byte and l the
+ * \c hhh.xxx.xxx.lll
+ * where \c h is the high byte and \c l the
* low byte
* \param address C-string containing the address as described above
*/
@@ -67,8 +67,8 @@
* \brief Sets an Ipv4Address by parsing a the input C-string
*
* Input address is in format:
- * hhh.xxx.xxx.lll
- * where h is the high byte and l the
+ * \c hhh.xxx.xxx.lll
+ * where \c h is the high byte and \c l the
* low byte
* \param address C-string containing the address as described above
*/
--- a/src/network/utils/ipv6-address.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/network/utils/ipv6-address.cc Wed Jul 24 13:20:24 2013 +0200
@@ -24,7 +24,9 @@
#include "ns3/log.h"
#include "ns3/assert.h"
+#include "mac16-address.h"
#include "mac48-address.h"
+#include "mac64-address.h"
#include "ipv6-address.h"
NS_LOG_COMPONENT_DEFINE ("Ipv6Address");
@@ -194,7 +196,7 @@
continue;
}
- /* TODO Handle IPv4 mapped address (2001::192.168.0.1) */
+ /* \todo Handle IPv4 mapped address (2001::192.168.0.1) */
#if 0
if (ch == '.' && ((tp + 4 /*NS_INADDRSZ*/) <= endp) &&
inet_pton4 (curtok, tp) > 0)
@@ -332,6 +334,24 @@
return (v4Addr);
}
+Ipv6Address Ipv6Address::MakeAutoconfiguredAddress (Mac16Address addr, Ipv6Address prefix)
+{
+ NS_LOG_FUNCTION (addr << prefix);
+ Ipv6Address ret;
+ uint8_t buf[2];
+ uint8_t buf2[16];
+
+ addr.CopyTo (buf);
+ prefix.GetBytes (buf2);
+
+ memcpy (buf2 + 14, buf, 2);
+ buf2[11] = 0xff;
+ buf2[12] = 0xfe;
+
+ ret.Set (buf2);
+ return ret;
+}
+
Ipv6Address Ipv6Address::MakeAutoconfiguredAddress (Mac48Address addr, Ipv6Address prefix)
{
NS_LOG_FUNCTION (addr << prefix);
@@ -352,6 +372,42 @@
return ret;
}
+Ipv6Address Ipv6Address::MakeAutoconfiguredAddress (Mac64Address addr, Ipv6Address prefix)
+{
+ NS_LOG_FUNCTION (addr << prefix);
+ Ipv6Address ret;
+ uint8_t buf[8];
+ uint8_t buf2[16];
+
+ addr.CopyTo (buf);
+ prefix.GetBytes (buf2);
+
+ memcpy (buf2 + 8, buf, 8);
+
+ ret.Set (buf2);
+ return ret;
+}
+
+Ipv6Address Ipv6Address::MakeAutoconfiguredLinkLocalAddress (Mac16Address addr)
+{
+ NS_LOG_FUNCTION (addr);
+ Ipv6Address ret;
+ uint8_t buf[2];
+ uint8_t buf2[16];
+
+ addr.CopyTo (buf);
+
+ memset (buf2, 0x00, sizeof (buf2));
+ buf2[0] = 0xfe;
+ buf2[1] = 0x80;
+ memcpy (buf2 + 14, buf, 2);
+ buf2[11] = 0xff;
+ buf2[12] = 0xfe;
+
+ ret.Set (buf2);
+ return ret;
+}
+
Ipv6Address Ipv6Address::MakeAutoconfiguredLinkLocalAddress (Mac48Address addr)
{
NS_LOG_FUNCTION (addr);
@@ -374,6 +430,24 @@
return ret;
}
+Ipv6Address Ipv6Address::MakeAutoconfiguredLinkLocalAddress (Mac64Address addr)
+{
+ NS_LOG_FUNCTION (addr);
+ Ipv6Address ret;
+ uint8_t buf[8];
+ uint8_t buf2[16];
+
+ addr.CopyTo (buf);
+
+ memset (buf2, 0x00, sizeof (buf2));
+ buf2[0] = 0xfe;
+ buf2[1] = 0x80;
+ memcpy (buf2 + 8, buf, 8);
+
+ ret.Set (buf2);
+ return ret;
+}
+
Ipv6Address Ipv6Address::MakeSolicitedAddress (Ipv6Address addr)
{
NS_LOG_FUNCTION (addr);
@@ -522,6 +596,19 @@
return (*this == any);
}
+
+bool Ipv6Address::IsDocumentation () const
+{
+ NS_LOG_FUNCTION (this);
+ Ipv6Address documentation ("2001:db8::0");
+ if (((Ipv6Address*)this)->CombinePrefix (Ipv6Prefix (32)) == documentation)
+ {
+ return true;
+ }
+ return false;
+}
+
+
bool Ipv6Address::IsMatchingType (const Address& address)
{
NS_LOG_FUNCTION (address);
--- a/src/network/utils/ipv6-address.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/network/utils/ipv6-address.h Wed Jul 24 13:20:24 2013 +0200
@@ -33,7 +33,9 @@
namespace ns3 {
class Ipv6Prefix;
+class Mac16Address;
class Mac48Address;
+class Mac64Address;
/**
* \ingroup address
@@ -136,6 +138,14 @@
Ipv4Address GetIpv4MappedAddress () const;
/**
+ * \brief Make the autoconfigured IPv6 address with Mac16Address.
+ * \param addr the MAC address (16 bits).
+ * \param prefix the IPv6 prefix
+ * \return autoconfigured IPv6 address
+ */
+ static Ipv6Address MakeAutoconfiguredAddress (Mac16Address addr, Ipv6Address prefix);
+
+ /**
* \brief Make the autoconfigured IPv6 address with Mac48Address.
* \param addr the MAC address (48 bits).
* \param prefix the IPv6 prefix
@@ -144,6 +154,21 @@
static Ipv6Address MakeAutoconfiguredAddress (Mac48Address addr, Ipv6Address prefix);
/**
+ * \brief Make the autoconfigured IPv6 address with Mac48Address.
+ * \param addr the MAC address (64 bits).
+ * \param prefix the IPv6 prefix
+ * \return autoconfigured IPv6 address
+ */
+ static Ipv6Address MakeAutoconfiguredAddress (Mac64Address addr, Ipv6Address prefix);
+
+ /**
+ * \brief Make the autoconfigured link-local IPv6 address with Mac16Address.
+ * \param mac the MAC address (16 bits).
+ * \return autoconfigured link-local IPv6 address
+ */
+ static Ipv6Address MakeAutoconfiguredLinkLocalAddress (Mac16Address mac);
+
+ /**
* \brief Make the autoconfigured link-local IPv6 address with Mac48Address.
* \param mac the MAC address (48 bits).
* \return autoconfigured link-local IPv6 address
@@ -151,6 +176,13 @@
static Ipv6Address MakeAutoconfiguredLinkLocalAddress (Mac48Address mac);
/**
+ * \brief Make the autoconfigured link-local IPv6 address with Mac48Address.
+ * \param mac the MAC address (64 bits).
+ * \return autoconfigured link-local IPv6 address
+ */
+ static Ipv6Address MakeAutoconfiguredLinkLocalAddress (Mac64Address mac);
+
+ /**
* \brief Print this address to the given output stream.
*
* The print format is in the typical "2001:660:4701::1".
@@ -213,6 +245,12 @@
bool IsAny () const;
/**
+ * \brief If the IPv6 address is a documentation address (2001:DB8::/32).
+ * \return true if the address is documentation, false otherwise
+ */
+ bool IsDocumentation () const;
+
+ /**
* \brief Combine this address with a prefix.
* \param prefix a IPv6 prefix
* \return an IPv6 address that is this address combined
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/network/utils/mac16-address.cc Wed Jul 24 13:20:24 2013 +0200
@@ -0,0 +1,210 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2007 INRIA
+ * Copyright (c) 2011 The Boeing Company
+ *
+ * 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 "mac16-address.h"
+#include "ns3/address.h"
+#include "ns3/assert.h"
+#include "ns3/log.h"
+#include <iomanip>
+#include <iostream>
+#include <cstring>
+
+NS_LOG_COMPONENT_DEFINE ("Mac16Address");
+
+namespace ns3 {
+
+ATTRIBUTE_HELPER_CPP (Mac16Address);
+
+#define ASCII_a (0x41)
+#define ASCII_z (0x5a)
+#define ASCII_A (0x61)
+#define ASCII_Z (0x7a)
+#define ASCII_COLON (0x3a)
+#define ASCII_ZERO (0x30)
+
+static char
+AsciiToLowCase (char c)
+{
+ if (c >= ASCII_a && c <= ASCII_z) {
+ return c;
+ } else if (c >= ASCII_A && c <= ASCII_Z) {
+ return c + (ASCII_a - ASCII_A);
+ } else {
+ return c;
+ }
+}
+
+
+Mac16Address::Mac16Address ()
+{
+ NS_LOG_FUNCTION (this);
+ memset (m_address, 0, 2);
+}
+
+Mac16Address::Mac16Address (const char *str)
+{
+ NS_LOG_FUNCTION (this << str);
+ int i = 0;
+ while (*str != 0 && i < 2)
+ {
+ uint8_t byte = 0;
+ while (*str != ASCII_COLON && *str != 0)
+ {
+ byte <<= 4;
+ char low = AsciiToLowCase (*str);
+ if (low >= ASCII_a)
+ {
+ byte |= low - ASCII_a + 10;
+ }
+ else
+ {
+ byte |= low - ASCII_ZERO;
+ }
+ str++;
+ }
+ m_address[i] = byte;
+ i++;
+ if (*str == 0)
+ {
+ break;
+ }
+ str++;
+ }
+ NS_ASSERT (i == 2);
+}
+
+void
+Mac16Address::CopyFrom (const uint8_t buffer[2])
+{
+ NS_LOG_FUNCTION (this << &buffer);
+ memcpy (m_address, buffer, 2);
+}
+void
+Mac16Address::CopyTo (uint8_t buffer[2]) const
+{
+ NS_LOG_FUNCTION (this << &buffer);
+ memcpy (buffer, m_address, 2);
+}
+
+bool
+Mac16Address::IsMatchingType (const Address &address)
+{
+ NS_LOG_FUNCTION (&address);
+ return address.CheckCompatible (GetType (), 2);
+}
+
+Mac16Address::operator Address () const
+{
+ return ConvertTo ();
+}
+
+Mac16Address
+Mac16Address::ConvertFrom (const Address &address)
+{
+ NS_LOG_FUNCTION (address);
+ NS_ASSERT (address.CheckCompatible (GetType (), 2));
+ Mac16Address retval;
+ address.CopyTo (retval.m_address);
+ return retval;
+}
+Address
+Mac16Address::ConvertTo (void) const
+{
+ NS_LOG_FUNCTION (this);
+ return Address (GetType (), m_address, 2);
+}
+
+Mac16Address
+Mac16Address::Allocate (void)
+{
+ NS_LOG_FUNCTION_NOARGS ();
+ static uint64_t id = 0;
+ id++;
+ Mac16Address address;
+ address.m_address[0] = (id >> 8) & 0xff;
+ address.m_address[1] = (id >> 0) & 0xff;
+ return address;
+}
+
+uint8_t
+Mac16Address::GetType (void)
+{
+ NS_LOG_FUNCTION_NOARGS ();
+ static uint8_t type = Address::Register ();
+ return type;
+}
+
+std::ostream & operator<< (std::ostream& os, const Mac16Address & address)
+{
+ uint8_t ad[2];
+ address.CopyTo (ad);
+
+ os.setf (std::ios::hex, std::ios::basefield);
+ os.fill ('0');
+ for (uint8_t i = 0; i < 1; i++)
+ {
+ os << std::setw (2) << (uint32_t)ad[i] << ":";
+ }
+ // Final byte not suffixed by ":"
+ os << std::setw (2) << (uint32_t)ad[1];
+ os.setf (std::ios::dec, std::ios::basefield);
+ os.fill (' ');
+ return os;
+}
+
+static uint8_t
+AsInt (std::string v)
+{
+ NS_LOG_FUNCTION (v);
+ std::istringstream iss;
+ iss.str (v);
+ uint32_t retval;
+ iss >> std::hex >> retval >> std::dec;
+ return retval;
+}
+
+std::istream& operator>> (std::istream& is, Mac16Address & address)
+{
+ std::string v;
+ is >> v;
+
+ std::string::size_type col = 0;
+ for (uint8_t i = 0; i < 2; ++i)
+ {
+ std::string tmp;
+ std::string::size_type next;
+ next = v.find (":", col);
+ if (next == std::string::npos)
+ {
+ tmp = v.substr (col, v.size ()-col);
+ address.m_address[i] = AsInt (tmp);
+ break;
+ }
+ else
+ {
+ tmp = v.substr (col, next-col);
+ address.m_address[i] = AsInt (tmp);
+ col = next + 1;
+ }
+ }
+ return is;
+}
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/network/utils/mac16-address.h Wed Jul 24 13:20:24 2013 +0200
@@ -0,0 +1,127 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2007 INRIA
+ * Copyright (c) 2011 The Boeing Company
+ *
+ * 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 MAC16_ADDRESS_H
+#define MAC16_ADDRESS_H
+
+#include <stdint.h>
+#include <ostream>
+#include "ns3/attribute.h"
+#include "ns3/attribute-helper.h"
+#include "ipv4-address.h"
+#include "ipv6-address.h"
+
+namespace ns3 {
+
+class Address;
+
+/**
+ * \ingroup address
+ *
+ * This class can contain 16 bit addresses.
+ */
+class Mac16Address
+{
+public:
+ Mac16Address ();
+ /**
+ * \param str a string representing the new Mac16Address
+ *
+ */
+ Mac16Address (const char *str);
+
+ /**
+ * \param buffer address in network order
+ *
+ * Copy the input address to our internal buffer.
+ */
+ void CopyFrom (const uint8_t buffer[2]);
+ /**
+ * \param buffer address in network order
+ *
+ * Copy the internal address to the input buffer.
+ */
+ void CopyTo (uint8_t buffer[2]) const;
+ /**
+ * \returns a new Address instance
+ *
+ * Convert an instance of this class to a polymorphic Address instance.
+ */
+ operator Address () const;
+ /**
+ * \param address a polymorphic address
+ * \returns a new Mac16Address from the polymorphic address
+ *
+ * This function performs a type check and asserts if the
+ * type of the input address is not compatible with an
+ * Mac16Address.
+ */
+ static Mac16Address ConvertFrom (const Address &address);
+ /**
+ * \param address address to test
+ * \returns true if the address matches, false otherwise.
+ */
+ static bool IsMatchingType (const Address &address);
+ /**
+ * Allocate a new Mac16Address.
+ */
+ static Mac16Address Allocate (void);
+
+private:
+ /**
+ * \returns a new Address instance
+ *
+ * Convert an instance of this class to a polymorphic Address instance.
+ */
+ Address ConvertTo (void) const;
+ static uint8_t GetType (void);
+ friend bool operator < (const Mac16Address &a, const Mac16Address &b);
+ friend bool operator == (const Mac16Address &a, const Mac16Address &b);
+ friend bool operator != (const Mac16Address &a, const Mac16Address &b);
+ friend std::istream& operator>> (std::istream& is, Mac16Address & address);
+
+ uint8_t m_address[2];
+};
+
+/**
+ * \class ns3::Mac16AddressValue
+ * \brief hold objects of type ns3::Mac16Address
+ */
+
+ATTRIBUTE_HELPER_HEADER (Mac16Address);
+
+inline bool operator == (const Mac16Address &a, const Mac16Address &b)
+{
+ return memcmp (a.m_address, b.m_address, 2) == 0;
+}
+inline bool operator != (const Mac16Address &a, const Mac16Address &b)
+{
+ return memcmp (a.m_address, b.m_address, 2) != 0;
+}
+inline bool operator < (const Mac16Address &a, const Mac16Address &b)
+{
+ return memcmp (a.m_address, b.m_address, 2) < 0;
+}
+
+std::ostream& operator<< (std::ostream& os, const Mac16Address & address);
+std::istream& operator>> (std::istream& is, Mac16Address & address);
+
+} // namespace ns3
+
+#endif /* MAC16_ADDRESS_H */
--- a/src/network/utils/mac64-address.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/network/utils/mac64-address.cc Wed Jul 24 13:20:24 2013 +0200
@@ -29,6 +29,8 @@
namespace ns3 {
+ATTRIBUTE_HELPER_CPP (Mac64Address);
+
#define ASCII_a (0x41)
#define ASCII_z (0x5a)
#define ASCII_A (0x61)
@@ -84,7 +86,7 @@
}
str++;
}
- NS_ASSERT (i == 6);
+ NS_ASSERT (i == 8);
}
void
Mac64Address::CopyFrom (const uint8_t buffer[8])
@@ -151,19 +153,6 @@
return type;
}
-bool operator == (const Mac64Address &a, const Mac64Address &b)
-{
- uint8_t ada[8];
- uint8_t adb[8];
- a.CopyTo (ada);
- b.CopyTo (adb);
- return std::memcmp (ada, adb, 8) == 0;
-}
-bool operator != (const Mac64Address &a, const Mac64Address &b)
-{
- return !(a == b);
-}
-
std::ostream& operator<< (std::ostream& os, const Mac64Address & address)
{
uint8_t ad[8];
@@ -182,5 +171,42 @@
return os;
}
+static uint8_t
+AsInt (std::string v)
+{
+ NS_LOG_FUNCTION (v);
+ std::istringstream iss;
+ iss.str (v);
+ uint32_t retval;
+ iss >> std::hex >> retval >> std::dec;
+ return retval;
+}
+
+std::istream& operator>> (std::istream& is, Mac64Address & address)
+{
+ std::string v;
+ is >> v;
+
+ std::string::size_type col = 0;
+ for (uint8_t i = 0; i < 8; ++i)
+ {
+ std::string tmp;
+ std::string::size_type next;
+ next = v.find (":", col);
+ if (next == std::string::npos)
+ {
+ tmp = v.substr (col, v.size ()-col);
+ address.m_address[i] = AsInt (tmp);
+ break;
+ }
+ else
+ {
+ tmp = v.substr (col, next-col);
+ address.m_address[i] = AsInt (tmp);
+ col = next + 1;
+ }
+ }
+ return is;
+}
} // namespace ns3
--- a/src/network/utils/mac64-address.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/network/utils/mac64-address.h Wed Jul 24 13:20:24 2013 +0200
@@ -22,6 +22,10 @@
#include <stdint.h>
#include <ostream>
+#include "ns3/attribute.h"
+#include "ns3/attribute-helper.h"
+#include "ipv4-address.h"
+#include "ipv6-address.h"
namespace ns3 {
@@ -89,12 +93,36 @@
*/
Address ConvertTo (void) const;
static uint8_t GetType (void);
+ friend bool operator < (const Mac64Address &a, const Mac64Address &b);
+ friend bool operator == (const Mac64Address &a, const Mac64Address &b);
+ friend bool operator != (const Mac64Address &a, const Mac64Address &b);
+ friend std::istream& operator>> (std::istream& is, Mac64Address & address);
+
uint8_t m_address[8];
};
-bool operator == (const Mac64Address &a, const Mac64Address &b);
-bool operator != (const Mac64Address &a, const Mac64Address &b);
+/**
+ * \class ns3::Mac64AddressValue
+ * \brief hold objects of type ns3::Mac64Address
+ */
+
+ATTRIBUTE_HELPER_HEADER (Mac64Address);
+
+inline bool operator == (const Mac64Address &a, const Mac64Address &b)
+{
+ return memcmp (a.m_address, b.m_address, 8) == 0;
+}
+inline bool operator != (const Mac64Address &a, const Mac64Address &b)
+{
+ return memcmp (a.m_address, b.m_address, 8) != 0;
+}
+inline bool operator < (const Mac64Address &a, const Mac64Address &b)
+{
+ return memcmp (a.m_address, b.m_address, 8) < 0;
+}
+
std::ostream& operator<< (std::ostream& os, const Mac64Address & address);
+std::istream& operator>> (std::istream& is, Mac64Address & address);
} // namespace ns3
--- a/src/network/utils/pcap-test.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/network/utils/pcap-test.h Wed Jul 24 13:20:24 2013 +0200
@@ -22,7 +22,7 @@
std::string expected = CreateDataDirFilename (oss.str()); \
std::string got = CreateTempDirFilename (oss.str()); \
uint32_t sec(0), usec(0); \
- /* TODO support default PcapWriter snap length here */ \
+ /** \todo support default PcapWriter snap length here */ \
bool diff = PcapFile::Diff (got, expected, sec, usec); \
NS_TEST_EXPECT_MSG_EQ (diff, false, \
"PCAP traces " << got << " and " << expected \
--- a/src/network/utils/red-queue.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/network/utils/red-queue.cc Wed Jul 24 13:20:24 2013 +0200
@@ -404,7 +404,7 @@
m_qW = 1.0 - std::exp (-10.0 / m_ptc);
}
- // TODO: implement adaptive RED
+ /// \todo implement adaptive RED
NS_LOG_DEBUG ("\tm_delay " << m_linkDelay.GetSeconds () << "; m_isWait "
<< m_isWait << "; m_qW " << m_qW << "; m_ptc " << m_ptc
@@ -430,7 +430,7 @@
newAve *= 1.0 - qW;
newAve += qW * nQueued;
- // TODO: implement adaptive RED
+ // implement adaptive RED
return newAve;
}
@@ -488,7 +488,7 @@
// DROP or MARK
m_count = 0;
m_countBytes = 0;
- // TODO: Implement set bit to mark
+ /// \todo Implement set bit to mark
return 1; // drop
}
--- a/src/network/utils/sgi-hashmap.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/network/utils/sgi-hashmap.h Wed Jul 24 13:20:24 2013 +0200
@@ -21,6 +21,9 @@
#endif
#else // gcc 4.x and later
#if __GNUC_MINOR__ < 3
+ #ifdef __clang__
+ #undef __DEPRECATED
+ #endif
#include <ext/hash_map>
namespace sgi = ::__gnu_cxx;
#else
--- a/src/network/wscript Wed Jul 24 13:19:54 2013 +0200
+++ b/src/network/wscript Wed Jul 24 13:20:24 2013 +0200
@@ -35,6 +35,7 @@
'utils/inet6-socket-address.cc',
'utils/ipv4-address.cc',
'utils/ipv6-address.cc',
+ 'utils/mac16-address.cc',
'utils/mac48-address.cc',
'utils/mac64-address.cc',
'utils/llc-snap-header.cc',
@@ -109,6 +110,7 @@
'utils/ipv4-address.h',
'utils/ipv6-address.h',
'utils/llc-snap-header.h',
+ 'utils/mac16-address.h',
'utils/mac48-address.h',
'utils/mac64-address.h',
'utils/output-stream-wrapper.h',
--- a/src/nix-vector-routing/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/nix-vector-routing/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -138,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<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [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]
@@ -304,8 +306,6 @@
module.add_class('OutputStreamWrapper', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >'])
## 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<ns3::Packet> >'])
- ## 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]
@@ -454,7 +454,6 @@
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'])
@@ -2170,6 +2169,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):
@@ -4033,6 +4036,16 @@
'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',
@@ -5528,6 +5541,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',
@@ -5539,13 +5556,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([])
--- a/src/nix-vector-routing/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/nix-vector-routing/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -138,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<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [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]
@@ -304,8 +306,6 @@
module.add_class('OutputStreamWrapper', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >'])
## 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<ns3::Packet> >'])
- ## 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]
@@ -454,7 +454,6 @@
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'])
@@ -2170,6 +2169,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):
@@ -4033,6 +4036,16 @@
'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',
@@ -5528,6 +5541,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',
@@ -5539,13 +5556,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([])
--- a/src/olsr/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/olsr/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -44,8 +44,8 @@
module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::ByteTagList::Iterator'])
## callback.h (module 'core'): ns3::CallbackBase [class]
module.add_class('CallbackBase', import_from_module='ns.core')
- ## event-garbage-collector.h (module 'tools'): ns3::EventGarbageCollector [class]
- module.add_class('EventGarbageCollector', import_from_module='ns.tools')
+ ## event-garbage-collector.h (module 'core'): ns3::EventGarbageCollector [class]
+ module.add_class('EventGarbageCollector', import_from_module='ns.core')
## event-id.h (module 'core'): ns3::EventId [class]
module.add_class('EventId', import_from_module='ns.core')
## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress [class]
@@ -136,6 +136,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<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [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]
@@ -330,8 +332,6 @@
module.add_class('Packet', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >'])
## 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]
@@ -582,7 +582,6 @@
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'])
@@ -1088,11 +1087,11 @@
return
def register_Ns3EventGarbageCollector_methods(root_module, cls):
- ## event-garbage-collector.h (module 'tools'): ns3::EventGarbageCollector::EventGarbageCollector(ns3::EventGarbageCollector const & arg0) [copy constructor]
+ ## 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 'tools'): ns3::EventGarbageCollector::EventGarbageCollector() [constructor]
+ ## event-garbage-collector.h (module 'core'): ns3::EventGarbageCollector::EventGarbageCollector() [constructor]
cls.add_constructor([])
- ## event-garbage-collector.h (module 'tools'): void ns3::EventGarbageCollector::Track(ns3::EventId event) [member function]
+ ## event-garbage-collector.h (module 'core'): void ns3::EventGarbageCollector::Track(ns3::EventId event) [member function]
cls.add_method('Track',
'void',
[param('ns3::EventId', 'event')])
@@ -2433,6 +2432,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):
@@ -4392,6 +4395,16 @@
'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',
@@ -6429,6 +6442,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',
@@ -6483,13 +6500,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([])
--- a/src/olsr/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/olsr/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -44,8 +44,8 @@
module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::ByteTagList::Iterator'])
## callback.h (module 'core'): ns3::CallbackBase [class]
module.add_class('CallbackBase', import_from_module='ns.core')
- ## event-garbage-collector.h (module 'tools'): ns3::EventGarbageCollector [class]
- module.add_class('EventGarbageCollector', import_from_module='ns.tools')
+ ## event-garbage-collector.h (module 'core'): ns3::EventGarbageCollector [class]
+ module.add_class('EventGarbageCollector', import_from_module='ns.core')
## event-id.h (module 'core'): ns3::EventId [class]
module.add_class('EventId', import_from_module='ns.core')
## inet6-socket-address.h (module 'network'): ns3::Inet6SocketAddress [class]
@@ -136,6 +136,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<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [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]
@@ -330,8 +332,6 @@
module.add_class('Packet', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >'])
## 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]
@@ -582,7 +582,6 @@
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'])
@@ -1088,11 +1087,11 @@
return
def register_Ns3EventGarbageCollector_methods(root_module, cls):
- ## event-garbage-collector.h (module 'tools'): ns3::EventGarbageCollector::EventGarbageCollector(ns3::EventGarbageCollector const & arg0) [copy constructor]
+ ## 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 'tools'): ns3::EventGarbageCollector::EventGarbageCollector() [constructor]
+ ## event-garbage-collector.h (module 'core'): ns3::EventGarbageCollector::EventGarbageCollector() [constructor]
cls.add_constructor([])
- ## event-garbage-collector.h (module 'tools'): void ns3::EventGarbageCollector::Track(ns3::EventId event) [member function]
+ ## event-garbage-collector.h (module 'core'): void ns3::EventGarbageCollector::Track(ns3::EventId event) [member function]
cls.add_method('Track',
'void',
[param('ns3::EventId', 'event')])
@@ -2433,6 +2432,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):
@@ -4392,6 +4395,16 @@
'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',
@@ -6429,6 +6442,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',
@@ -6483,13 +6500,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([])
--- a/src/olsr/model/olsr-header.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/olsr/model/olsr-header.cc Wed Jul 24 13:20:24 2013 +0200
@@ -130,7 +130,7 @@
void
PacketHeader::Print (std::ostream &os) const
{
- // TODO
+ /// \todo
}
void
@@ -207,7 +207,7 @@
void
MessageHeader::Print (std::ostream &os) const
{
- // TODO
+ /// \todo
}
void
@@ -288,7 +288,7 @@
void
MessageHeader::Mid::Print (std::ostream &os) const
{
- // TODO
+ /// \todo
}
void
@@ -340,7 +340,7 @@
void
MessageHeader::Hello::Print (std::ostream &os) const
{
- // TODO
+ /// \todo
}
void
@@ -423,7 +423,7 @@
void
MessageHeader::Tc::Print (std::ostream &os) const
{
- // TODO
+ /// \todo
}
void
@@ -473,7 +473,7 @@
void
MessageHeader::Hna::Print (std::ostream &os) const
{
- // TODO
+ /// \todo
}
void
--- a/src/olsr/model/olsr-routing-protocol.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/olsr/model/olsr-routing-protocol.cc Wed Jul 24 13:20:24 2013 +0200
@@ -3085,6 +3085,7 @@
if (numOifAddresses == 1) {
ifAddr = m_ipv4->GetAddress (interfaceIdx, 0);
} else {
+ /// \todo Implment IP aliasing and OLSR
NS_FATAL_ERROR ("XXX Not implemented yet: IP aliasing and OLSR");
}
rtentry->SetSource (ifAddr.GetLocal ());
@@ -3178,6 +3179,7 @@
if (numOifAddresses == 1) {
ifAddr = m_ipv4->GetAddress (interfaceIdx, 0);
} else {
+ /// \todo Implment IP aliasing and OLSR
NS_FATAL_ERROR ("XXX Not implemented yet: IP aliasing and OLSR");
}
rtentry->SetSource (ifAddr.GetLocal ());
--- a/src/olsr/test/olsr-header-test-suite.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/olsr/test/olsr-header-test-suite.cc Wed Jul 24 13:20:24 2013 +0200
@@ -42,7 +42,7 @@
uint8_t emf = olsr::SecondsToEmf (time);
double seconds = olsr::EmfToSeconds (emf);
NS_TEST_ASSERT_MSG_EQ ((seconds < 0 || std::fabs (seconds - time) > 0.1), false,
- "XXX");
+ "100");
}
}
@@ -110,25 +110,25 @@
{
olsr::PacketHeader hdr;
packet.RemoveHeader (hdr);
- NS_TEST_ASSERT_MSG_EQ (hdr.GetPacketSequenceNumber (), 123, "XXX");
+ NS_TEST_ASSERT_MSG_EQ (hdr.GetPacketSequenceNumber (), 123, "200");
uint32_t sizeLeft = hdr.GetPacketLength () - hdr.GetSerializedSize ();
{
olsr::MessageHeader msg1;
packet.RemoveHeader (msg1);
- NS_TEST_ASSERT_MSG_EQ (msg1.GetTimeToLive (), 255, "XXX");
- NS_TEST_ASSERT_MSG_EQ (msg1.GetOriginatorAddress (), Ipv4Address ("11.22.33.44"), "XXX");
- NS_TEST_ASSERT_MSG_EQ (msg1.GetVTime (), Seconds (9), "XXX");
- NS_TEST_ASSERT_MSG_EQ (msg1.GetMessageType (), olsr::MessageHeader::MID_MESSAGE, "XXX");
- NS_TEST_ASSERT_MSG_EQ (msg1.GetMessageSequenceNumber (), 7, "XXX");
+ NS_TEST_ASSERT_MSG_EQ (msg1.GetTimeToLive (), 255, "201");
+ NS_TEST_ASSERT_MSG_EQ (msg1.GetOriginatorAddress (), Ipv4Address ("11.22.33.44"), "202");
+ NS_TEST_ASSERT_MSG_EQ (msg1.GetVTime (), Seconds (9), "203");
+ NS_TEST_ASSERT_MSG_EQ (msg1.GetMessageType (), olsr::MessageHeader::MID_MESSAGE, "204");
+ NS_TEST_ASSERT_MSG_EQ (msg1.GetMessageSequenceNumber (), 7, "205");
olsr::MessageHeader::Mid &mid1 = msg1.GetMid ();
- NS_TEST_ASSERT_MSG_EQ (mid1.interfaceAddresses.size (), 2, "XXX");
- NS_TEST_ASSERT_MSG_EQ (*mid1.interfaceAddresses.begin (), Ipv4Address ("1.2.3.4"), "XXX");
+ NS_TEST_ASSERT_MSG_EQ (mid1.interfaceAddresses.size (), 2, "206");
+ NS_TEST_ASSERT_MSG_EQ (*mid1.interfaceAddresses.begin (), Ipv4Address ("1.2.3.4"), "207");
sizeLeft -= msg1.GetSerializedSize ();
- NS_TEST_ASSERT_MSG_EQ ((sizeLeft > 0), true, "XXX");
+ NS_TEST_ASSERT_MSG_EQ ((sizeLeft > 0), true, "208");
}
{
// now read the second message
@@ -136,18 +136,18 @@
packet.RemoveHeader (msg2);
- NS_TEST_ASSERT_MSG_EQ (msg2.GetTimeToLive (), 254, "XXX");
- NS_TEST_ASSERT_MSG_EQ (msg2.GetOriginatorAddress (), Ipv4Address ("12.22.33.44"), "XXX");
- NS_TEST_ASSERT_MSG_EQ (msg2.GetVTime (), Seconds (10), "XXX");
- NS_TEST_ASSERT_MSG_EQ (msg2.GetMessageType (), olsr::MessageHeader::MID_MESSAGE, "XXX");
- NS_TEST_ASSERT_MSG_EQ (msg2.GetMessageSequenceNumber (), 7, "XXX");
+ NS_TEST_ASSERT_MSG_EQ (msg2.GetTimeToLive (), 254, "209");
+ NS_TEST_ASSERT_MSG_EQ (msg2.GetOriginatorAddress (), Ipv4Address ("12.22.33.44"), "210");
+ NS_TEST_ASSERT_MSG_EQ (msg2.GetVTime (), Seconds (10), "211");
+ NS_TEST_ASSERT_MSG_EQ (msg2.GetMessageType (), olsr::MessageHeader::MID_MESSAGE, "212");
+ NS_TEST_ASSERT_MSG_EQ (msg2.GetMessageSequenceNumber (), 7, "213");
olsr::MessageHeader::Mid mid2 = msg2.GetMid ();
- NS_TEST_ASSERT_MSG_EQ (mid2.interfaceAddresses.size (), 2, "XXX");
- NS_TEST_ASSERT_MSG_EQ (*mid2.interfaceAddresses.begin (), Ipv4Address ("2.2.3.4"), "XXX");
+ NS_TEST_ASSERT_MSG_EQ (mid2.interfaceAddresses.size (), 2, "214");
+ NS_TEST_ASSERT_MSG_EQ (*mid2.interfaceAddresses.begin (), Ipv4Address ("2.2.3.4"), "215");
sizeLeft -= msg2.GetSerializedSize ();
- NS_TEST_ASSERT_MSG_EQ (sizeLeft, 0, "XXX");
+ NS_TEST_ASSERT_MSG_EQ (sizeLeft, 0, "216");
}
}
}
@@ -193,21 +193,21 @@
packet.RemoveHeader (msgOut);
olsr::MessageHeader::Hello &helloOut = msgOut.GetHello ();
- NS_TEST_ASSERT_MSG_EQ (helloOut.GetHTime (), Seconds (7), "XXX");
- NS_TEST_ASSERT_MSG_EQ (helloOut.willingness, 66, "XXX");
- NS_TEST_ASSERT_MSG_EQ (helloOut.linkMessages.size (), 2, "XXX");
+ NS_TEST_ASSERT_MSG_EQ (helloOut.GetHTime (), Seconds (7), "300");
+ NS_TEST_ASSERT_MSG_EQ (helloOut.willingness, 66, "301");
+ NS_TEST_ASSERT_MSG_EQ (helloOut.linkMessages.size (), 2, "302");
- NS_TEST_ASSERT_MSG_EQ (helloOut.linkMessages[0].linkCode, 2, "XXX");
+ NS_TEST_ASSERT_MSG_EQ (helloOut.linkMessages[0].linkCode, 2, "303");
NS_TEST_ASSERT_MSG_EQ (helloOut.linkMessages[0].neighborInterfaceAddresses[0],
- Ipv4Address ("1.2.3.4"), "XXX");
+ Ipv4Address ("1.2.3.4"), "304");
NS_TEST_ASSERT_MSG_EQ (helloOut.linkMessages[0].neighborInterfaceAddresses[1],
- Ipv4Address ("1.2.3.5"), "XXX");
+ Ipv4Address ("1.2.3.5"), "305");
- NS_TEST_ASSERT_MSG_EQ (helloOut.linkMessages[1].linkCode, 3, "XXX");
+ NS_TEST_ASSERT_MSG_EQ (helloOut.linkMessages[1].linkCode, 3, "306");
NS_TEST_ASSERT_MSG_EQ (helloOut.linkMessages[1].neighborInterfaceAddresses[0],
- Ipv4Address ("2.2.3.4"), "XXX");
+ Ipv4Address ("2.2.3.4"), "307");
NS_TEST_ASSERT_MSG_EQ (helloOut.linkMessages[1].neighborInterfaceAddresses[1],
- Ipv4Address ("2.2.3.5"), "XXX");
+ Ipv4Address ("2.2.3.5"), "308");
NS_TEST_ASSERT_MSG_EQ (packet.GetSize (), 0, "All bytes in packet were not read");
@@ -239,15 +239,15 @@
packet.RemoveHeader (msgOut);
olsr::MessageHeader::Tc &tcOut = msgOut.GetTc ();
- NS_TEST_ASSERT_MSG_EQ (tcOut.ansn, 0x1234, "XXX");
- NS_TEST_ASSERT_MSG_EQ (tcOut.neighborAddresses.size (), 2, "XXX");
+ NS_TEST_ASSERT_MSG_EQ (tcOut.ansn, 0x1234, "400");
+ NS_TEST_ASSERT_MSG_EQ (tcOut.neighborAddresses.size (), 2, "401");
NS_TEST_ASSERT_MSG_EQ (tcOut.neighborAddresses[0],
- Ipv4Address ("1.2.3.4"), "XXX");
+ Ipv4Address ("1.2.3.4"), "402");
NS_TEST_ASSERT_MSG_EQ (tcOut.neighborAddresses[1],
- Ipv4Address ("1.2.3.5"), "XXX");
+ Ipv4Address ("1.2.3.5"), "403");
- NS_TEST_ASSERT_MSG_EQ (packet.GetSize (), 0, "XXX");
+ NS_TEST_ASSERT_MSG_EQ (packet.GetSize (), 0, "404");
}
@@ -279,17 +279,17 @@
packet.RemoveHeader (msgOut);
olsr::MessageHeader::Hna &hnaOut = msgOut.GetHna ();
- NS_TEST_ASSERT_MSG_EQ (hnaOut.associations.size (), 2, "XXX");
+ NS_TEST_ASSERT_MSG_EQ (hnaOut.associations.size (), 2, "500");
NS_TEST_ASSERT_MSG_EQ (hnaOut.associations[0].address,
- Ipv4Address ("1.2.3.4"), "XXX");
+ Ipv4Address ("1.2.3.4"), "501");
NS_TEST_ASSERT_MSG_EQ (hnaOut.associations[0].mask,
- Ipv4Mask ("255.255.255.0"), "XXX");
+ Ipv4Mask ("255.255.255.0"), "502");
NS_TEST_ASSERT_MSG_EQ (hnaOut.associations[1].address,
- Ipv4Address ("1.2.3.5"), "XXX");
+ Ipv4Address ("1.2.3.5"), "503");
NS_TEST_ASSERT_MSG_EQ (hnaOut.associations[1].mask,
- Ipv4Mask ("255.255.0.0"), "XXX");
+ Ipv4Mask ("255.255.0.0"), "504");
NS_TEST_ASSERT_MSG_EQ (packet.GetSize (), 0, "All bytes in packet were not read");
--- a/src/olsr/wscript Wed Jul 24 13:19:54 2013 +0200
+++ b/src/olsr/wscript Wed Jul 24 13:20:24 2013 +0200
@@ -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('olsr', ['internet', 'config-store', 'tools', 'point-to-point', 'wifi', 'mobility', 'applications', 'csma'])
+ module = bld.create_ns3_module('olsr', ['internet', 'config-store', 'point-to-point', 'wifi', 'mobility', 'applications', 'csma'])
module.includes = '.'
module.source = [
'model/olsr-header.cc',
--- a/src/openflow/model/openflow-switch-net-device.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/openflow/model/openflow-switch-net-device.cc Wed Jul 24 13:20:24 2013 +0200
@@ -846,7 +846,7 @@
desc->config = htonl (p.config);
desc->state = htonl (p.state);
- // TODO: This should probably be fixed eventually to specify different available features.
+ /// \todo This should probably be fixed eventually to specify different available features.
desc->curr = 0; // htonl(netdev_get_features(p->netdev, NETDEV_FEAT_CURRENT));
desc->supported = 0; // htonl(netdev_get_features(p->netdev, NETDEV_FEAT_SUPPORTED));
desc->advertised = 0; // htonl(netdev_get_features(p->netdev, NETDEV_FEAT_ADVERTISED));
@@ -1185,12 +1185,12 @@
if ((opm->config & htonl (OFPPC_PORT_DOWN)) && (p.config & OFPPC_PORT_DOWN) == 0)
{
p.config |= OFPPC_PORT_DOWN;
- // TODO: Possibly disable the Port's Net Device via the appropriate interface.
+ /// \todo Possibly disable the Port's Net Device via the appropriate interface.
}
else if ((opm->config & htonl (OFPPC_PORT_DOWN)) == 0 && (p.config & OFPPC_PORT_DOWN))
{
p.config &= ~OFPPC_PORT_DOWN;
- // TODO: Possibly enable the Port's Net Device via the appropriate interface.
+ /// \todo Possibly enable the Port's Net Device via the appropriate interface.
}
}
}
--- a/src/point-to-point-layout/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/point-to-point-layout/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -146,6 +146,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')
## pcap-file.h (module 'network'): ns3::PcapFile [class]
module.add_class('PcapFile', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
@@ -338,8 +340,6 @@
module.add_class('OutputStreamWrapper', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >'])
## 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<ns3::Packet> >'])
- ## 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]
@@ -492,7 +492,6 @@
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'])
@@ -2474,6 +2473,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):
@@ -4905,6 +4908,16 @@
'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',
@@ -6881,6 +6894,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',
@@ -6892,13 +6909,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([])
--- a/src/point-to-point-layout/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/point-to-point-layout/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -146,6 +146,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')
## pcap-file.h (module 'network'): ns3::PcapFile [class]
module.add_class('PcapFile', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
@@ -338,8 +340,6 @@
module.add_class('OutputStreamWrapper', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >'])
## 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<ns3::Packet> >'])
- ## 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]
@@ -492,7 +492,6 @@
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'])
@@ -2474,6 +2473,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):
@@ -4905,6 +4908,16 @@
'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',
@@ -6881,6 +6894,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',
@@ -6892,13 +6909,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([])
--- a/src/point-to-point/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/point-to-point/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -94,6 +94,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')
## pcap-file.h (module 'network'): ns3::PcapFile [class]
module.add_class('PcapFile', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
@@ -274,8 +276,6 @@
module.add_enum('ErrorUnit', ['ERROR_UNIT_BIT', 'ERROR_UNIT_BYTE', 'ERROR_UNIT_PACKET'], outer_class=root_module['ns3::RateErrorModel'], import_from_module='ns.network')
## error-model.h (module 'network'): ns3::ReceiveListErrorModel [class]
module.add_class('ReceiveListErrorModel', import_from_module='ns.network', parent=root_module['ns3::ErrorModel'])
- ## 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]
@@ -416,7 +416,6 @@
register_Ns3PointToPointRemoteChannel_methods(root_module, root_module['ns3::PointToPointRemoteChannel'])
register_Ns3RateErrorModel_methods(root_module, root_module['ns3::RateErrorModel'])
register_Ns3ReceiveListErrorModel_methods(root_module, root_module['ns3::ReceiveListErrorModel'])
- 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'])
@@ -1957,6 +1956,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):
@@ -3296,6 +3299,16 @@
'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',
@@ -4868,6 +4881,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',
@@ -5258,13 +5275,6 @@
visibility='private', 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([])
--- a/src/point-to-point/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/point-to-point/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -94,6 +94,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')
## pcap-file.h (module 'network'): ns3::PcapFile [class]
module.add_class('PcapFile', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
@@ -274,8 +276,6 @@
module.add_enum('ErrorUnit', ['ERROR_UNIT_BIT', 'ERROR_UNIT_BYTE', 'ERROR_UNIT_PACKET'], outer_class=root_module['ns3::RateErrorModel'], import_from_module='ns.network')
## error-model.h (module 'network'): ns3::ReceiveListErrorModel [class]
module.add_class('ReceiveListErrorModel', import_from_module='ns.network', parent=root_module['ns3::ErrorModel'])
- ## 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]
@@ -416,7 +416,6 @@
register_Ns3PointToPointRemoteChannel_methods(root_module, root_module['ns3::PointToPointRemoteChannel'])
register_Ns3RateErrorModel_methods(root_module, root_module['ns3::RateErrorModel'])
register_Ns3ReceiveListErrorModel_methods(root_module, root_module['ns3::ReceiveListErrorModel'])
- 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'])
@@ -1957,6 +1956,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):
@@ -3296,6 +3299,16 @@
'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',
@@ -4868,6 +4881,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',
@@ -5258,13 +5275,6 @@
visibility='private', 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([])
--- a/src/propagation/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/propagation/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -166,8 +166,6 @@
module.add_class('OkumuraHataPropagationLossModel', parent=root_module['ns3::PropagationLossModel'])
## 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]
@@ -273,7 +271,6 @@
register_Ns3NormalRandomVariable_methods(root_module, root_module['ns3::NormalRandomVariable'])
register_Ns3OkumuraHataPropagationLossModel_methods(root_module, root_module['ns3::OkumuraHataPropagationLossModel'])
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'])
@@ -1248,6 +1245,16 @@
'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',
@@ -2525,13 +2532,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([])
--- a/src/propagation/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/propagation/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -166,8 +166,6 @@
module.add_class('OkumuraHataPropagationLossModel', parent=root_module['ns3::PropagationLossModel'])
## 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]
@@ -273,7 +271,6 @@
register_Ns3NormalRandomVariable_methods(root_module, root_module['ns3::NormalRandomVariable'])
register_Ns3OkumuraHataPropagationLossModel_methods(root_module, root_module['ns3::OkumuraHataPropagationLossModel'])
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'])
@@ -1248,6 +1245,16 @@
'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',
@@ -2525,13 +2532,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([])
--- a/src/propagation/examples/wscript Wed Jul 24 13:19:54 2013 +0200
+++ b/src/propagation/examples/wscript Wed Jul 24 13:20:24 2013 +0200
@@ -5,7 +5,7 @@
return;
obj = bld.create_ns3_program('main-propagation-loss',
- ['core', 'mobility', 'config-store', 'tools', 'propagation'])
+ ['core', 'mobility', 'config-store', 'stats', 'propagation'])
obj.source = 'main-propagation-loss.cc'
obj = bld.create_ns3_program('jakes-propagation-model-example',
--- a/src/spectrum/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/spectrum/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -96,6 +96,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')
## multi-model-spectrum-channel.h (module 'spectrum'): ns3::RxSpectrumModelInfo [class]
module.add_class('RxSpectrumModelInfo')
## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [class]
@@ -336,8 +338,6 @@
module.add_class('SpectrumAnalyzer', parent=root_module['ns3::SpectrumPhy'])
## spectrum-channel.h (module 'spectrum'): ns3::SpectrumChannel [class]
module.add_class('SpectrumChannel', parent=root_module['ns3::Channel'])
- ## 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]
@@ -583,7 +583,6 @@
register_Ns3ShannonSpectrumErrorModel_methods(root_module, root_module['ns3::ShannonSpectrumErrorModel'])
register_Ns3SpectrumAnalyzer_methods(root_module, root_module['ns3::SpectrumAnalyzer'])
register_Ns3SpectrumChannel_methods(root_module, root_module['ns3::SpectrumChannel'])
- 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'])
@@ -2091,6 +2090,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):
@@ -3782,6 +3785,16 @@
'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',
@@ -3915,14 +3928,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',
- 'void',
- [param('double', 'lambda')])
+ ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetFrequency(double frequency) [member function]
+ cls.add_method('SetFrequency',
+ 'void',
+ [param('double', 'frequency')])
## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetSystemLoss(double systemLoss) [member function]
cls.add_method('SetSystemLoss',
'void',
@@ -3936,8 +3945,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)
@@ -4772,14 +4781,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',
- 'void',
- [param('double', 'lambda')])
+ ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetFrequency(double frequency) [member function]
+ cls.add_method('SetFrequency',
+ 'void',
+ [param('double', 'frequency')])
## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetSystemLoss(double systemLoss) [member function]
cls.add_method('SetSystemLoss',
'void',
@@ -4793,8 +4798,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)
@@ -6033,6 +6038,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',
@@ -6229,13 +6238,6 @@
is_pure_virtual=True, 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([])
--- a/src/spectrum/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/spectrum/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -96,6 +96,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')
## multi-model-spectrum-channel.h (module 'spectrum'): ns3::RxSpectrumModelInfo [class]
module.add_class('RxSpectrumModelInfo')
## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [class]
@@ -336,8 +338,6 @@
module.add_class('SpectrumAnalyzer', parent=root_module['ns3::SpectrumPhy'])
## spectrum-channel.h (module 'spectrum'): ns3::SpectrumChannel [class]
module.add_class('SpectrumChannel', parent=root_module['ns3::Channel'])
- ## 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]
@@ -583,7 +583,6 @@
register_Ns3ShannonSpectrumErrorModel_methods(root_module, root_module['ns3::ShannonSpectrumErrorModel'])
register_Ns3SpectrumAnalyzer_methods(root_module, root_module['ns3::SpectrumAnalyzer'])
register_Ns3SpectrumChannel_methods(root_module, root_module['ns3::SpectrumChannel'])
- 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'])
@@ -2091,6 +2090,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):
@@ -3782,6 +3785,16 @@
'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',
@@ -3915,14 +3928,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',
- 'void',
- [param('double', 'lambda')])
+ ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetFrequency(double frequency) [member function]
+ cls.add_method('SetFrequency',
+ 'void',
+ [param('double', 'frequency')])
## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetSystemLoss(double systemLoss) [member function]
cls.add_method('SetSystemLoss',
'void',
@@ -3936,8 +3945,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)
@@ -4772,14 +4781,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',
- 'void',
- [param('double', 'lambda')])
+ ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetFrequency(double frequency) [member function]
+ cls.add_method('SetFrequency',
+ 'void',
+ [param('double', 'frequency')])
## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetSystemLoss(double systemLoss) [member function]
cls.add_method('SetSystemLoss',
'void',
@@ -4793,8 +4798,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)
@@ -6033,6 +6038,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',
@@ -6229,13 +6238,6 @@
is_pure_virtual=True, 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([])
--- a/src/spectrum/test/spectrum-ideal-phy-test.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/spectrum/test/spectrum-ideal-phy-test.cc Wed Jul 24 13:20:24 2013 +0200
@@ -194,6 +194,8 @@
Simulator::Run ();
double throughputBps = (g_rxBytes * 8.0) / testDuration;
+ std::clog.unsetf(std::ios_base::floatfield);
+
if (m_rateIsAchievable)
{
NS_TEST_ASSERT_MSG_EQ_TOL (throughputBps, m_phyRate, m_phyRate*0.01, "throughput does not match PHY rate");
@@ -203,7 +205,6 @@
NS_TEST_ASSERT_MSG_EQ (throughputBps, 0.0, "PHY rate is not achievable but throughput is non-zero");
}
- std::clog.unsetf(std::ios_base::floatfield);
Simulator::Destroy ();
}
--- a/src/stats/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/stats/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -46,8 +46,16 @@
module.add_class('CallbackBase', import_from_module='ns.core')
## data-output-interface.h (module 'stats'): ns3::DataOutputCallback [class]
module.add_class('DataOutputCallback', allow_subclassing=True)
+ ## delay-jitter-estimation.h (module 'stats'): ns3::DelayJitterEstimation [class]
+ module.add_class('DelayJitterEstimation')
## event-id.h (module 'core'): ns3::EventId [class]
module.add_class('EventId', import_from_module='ns.core')
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot [class]
+ module.add_class('Gnuplot')
+ ## gnuplot.h (module 'stats'): ns3::GnuplotCollection [class]
+ module.add_class('GnuplotCollection')
+ ## gnuplot.h (module 'stats'): ns3::GnuplotDataset [class]
+ module.add_class('GnuplotDataset')
## 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]
@@ -86,6 +94,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<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [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]
@@ -110,6 +120,18 @@
module.add_class('int64x64_t', import_from_module='ns.core')
## chunk.h (module 'network'): ns3::Chunk [class]
module.add_class('Chunk', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot2dDataset [class]
+ module.add_class('Gnuplot2dDataset', parent=root_module['ns3::GnuplotDataset'])
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot2dDataset::Style [enumeration]
+ module.add_enum('Style', ['LINES', 'POINTS', 'LINES_POINTS', 'DOTS', 'IMPULSES', 'STEPS', 'FSTEPS', 'HISTEPS'], outer_class=root_module['ns3::Gnuplot2dDataset'])
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot2dDataset::ErrorBars [enumeration]
+ module.add_enum('ErrorBars', ['NONE', 'X', 'Y', 'XY'], outer_class=root_module['ns3::Gnuplot2dDataset'])
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot2dFunction [class]
+ module.add_class('Gnuplot2dFunction', parent=root_module['ns3::GnuplotDataset'])
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot3dDataset [class]
+ module.add_class('Gnuplot3dDataset', parent=root_module['ns3::GnuplotDataset'])
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot3dFunction [class]
+ module.add_class('Gnuplot3dFunction', parent=root_module['ns3::GnuplotDataset'])
## header.h (module 'network'): ns3::Header [class]
module.add_class('Header', import_from_module='ns.network', parent=root_module['ns3::Chunk'])
## object.h (module 'core'): ns3::Object [class]
@@ -184,6 +206,8 @@
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'])
+ ## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<double> [class]
+ module.add_class('MinMaxAvgTotalCalculator', template_parameters=['double'], parent=[root_module['ns3::DataCalculator'], root_module['ns3::StatisticalSummary']])
## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<unsigned int> [class]
module.add_class('MinMaxAvgTotalCalculator', template_parameters=['unsigned int'], parent=[root_module['ns3::DataCalculator'], root_module['ns3::StatisticalSummary']])
## nix-vector.h (module 'network'): ns3::NixVector [class]
@@ -200,8 +224,6 @@
module.add_class('PacketSizeMinMaxAvgTotalCalculator', parent=root_module['ns3::MinMaxAvgTotalCalculator< unsigned int >'])
## sqlite-data-output.h (module 'stats'): ns3::SqliteDataOutput [class]
module.add_class('SqliteDataOutput', parent=root_module['ns3::DataOutputInterface'])
- ## nstime.h (module 'core'): ns3::TimeChecker [class]
- module.add_class('TimeChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker'])
## time-data-calculators.h (module 'stats'): ns3::TimeMinMaxAvgTotalCalculator [class]
module.add_class('TimeMinMaxAvgTotalCalculator', parent=root_module['ns3::DataCalculator'])
## nstime.h (module 'core'): ns3::TimeValue [class]
@@ -218,12 +240,12 @@
module.add_class('CounterCalculator', template_parameters=['unsigned int'], parent=root_module['ns3::DataCalculator'])
## packet-data-calculators.h (module 'stats'): ns3::PacketCounterCalculator [class]
module.add_class('PacketCounterCalculator', parent=root_module['ns3::CounterCalculator< unsigned int >'])
+ typehandlers.add_type_alias('std::list< ns3::Ptr< ns3::DataCalculator >, std::allocator< ns3::Ptr< ns3::DataCalculator > > >', 'ns3::DataCalculatorList')
+ typehandlers.add_type_alias('std::list< ns3::Ptr< ns3::DataCalculator >, std::allocator< ns3::Ptr< ns3::DataCalculator > > >*', 'ns3::DataCalculatorList*')
+ typehandlers.add_type_alias('std::list< ns3::Ptr< ns3::DataCalculator >, std::allocator< ns3::Ptr< ns3::DataCalculator > > >&', 'ns3::DataCalculatorList&')
typehandlers.add_type_alias('std::list< std::pair< std::string, std::string >, std::allocator< std::pair< std::string, std::string > > >', 'ns3::MetadataList')
typehandlers.add_type_alias('std::list< std::pair< std::string, std::string >, std::allocator< std::pair< std::string, std::string > > >*', 'ns3::MetadataList*')
typehandlers.add_type_alias('std::list< std::pair< std::string, std::string >, std::allocator< std::pair< std::string, std::string > > >&', 'ns3::MetadataList&')
- typehandlers.add_type_alias('std::list< ns3::Ptr< ns3::DataCalculator >, std::allocator< ns3::Ptr< ns3::DataCalculator > > >', 'ns3::DataCalculatorList')
- typehandlers.add_type_alias('std::list< ns3::Ptr< ns3::DataCalculator >, std::allocator< ns3::Ptr< ns3::DataCalculator > > >*', 'ns3::DataCalculatorList*')
- typehandlers.add_type_alias('std::list< ns3::Ptr< ns3::DataCalculator >, std::allocator< ns3::Ptr< ns3::DataCalculator > > >&', 'ns3::DataCalculatorList&')
## Register a nested module for the namespace FatalImpl
@@ -248,7 +270,11 @@
register_Ns3ByteTagListIteratorItem_methods(root_module, root_module['ns3::ByteTagList::Iterator::Item'])
register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase'])
register_Ns3DataOutputCallback_methods(root_module, root_module['ns3::DataOutputCallback'])
+ register_Ns3DelayJitterEstimation_methods(root_module, root_module['ns3::DelayJitterEstimation'])
register_Ns3EventId_methods(root_module, root_module['ns3::EventId'])
+ register_Ns3Gnuplot_methods(root_module, root_module['ns3::Gnuplot'])
+ register_Ns3GnuplotCollection_methods(root_module, root_module['ns3::GnuplotCollection'])
+ register_Ns3GnuplotDataset_methods(root_module, root_module['ns3::GnuplotDataset'])
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'])
@@ -275,6 +301,10 @@
register_Ns3Empty_methods(root_module, root_module['ns3::empty'])
register_Ns3Int64x64_t_methods(root_module, root_module['ns3::int64x64_t'])
register_Ns3Chunk_methods(root_module, root_module['ns3::Chunk'])
+ register_Ns3Gnuplot2dDataset_methods(root_module, root_module['ns3::Gnuplot2dDataset'])
+ register_Ns3Gnuplot2dFunction_methods(root_module, root_module['ns3::Gnuplot2dFunction'])
+ register_Ns3Gnuplot3dDataset_methods(root_module, root_module['ns3::Gnuplot3dDataset'])
+ register_Ns3Gnuplot3dFunction_methods(root_module, root_module['ns3::Gnuplot3dFunction'])
register_Ns3Header_methods(root_module, root_module['ns3::Header'])
register_Ns3Object_methods(root_module, root_module['ns3::Object'])
register_Ns3ObjectAggregateIterator_methods(root_module, root_module['ns3::Object::AggregateIterator'])
@@ -310,6 +340,7 @@
register_Ns3Ipv6PrefixValue_methods(root_module, root_module['ns3::Ipv6PrefixValue'])
register_Ns3Mac48AddressChecker_methods(root_module, root_module['ns3::Mac48AddressChecker'])
register_Ns3Mac48AddressValue_methods(root_module, root_module['ns3::Mac48AddressValue'])
+ 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_Ns3NixVector_methods(root_module, root_module['ns3::NixVector'])
register_Ns3ObjectFactoryChecker_methods(root_module, root_module['ns3::ObjectFactoryChecker'])
@@ -318,7 +349,6 @@
register_Ns3Packet_methods(root_module, root_module['ns3::Packet'])
register_Ns3PacketSizeMinMaxAvgTotalCalculator_methods(root_module, root_module['ns3::PacketSizeMinMaxAvgTotalCalculator'])
register_Ns3SqliteDataOutput_methods(root_module, root_module['ns3::SqliteDataOutput'])
- register_Ns3TimeChecker_methods(root_module, root_module['ns3::TimeChecker'])
register_Ns3TimeMinMaxAvgTotalCalculator_methods(root_module, root_module['ns3::TimeMinMaxAvgTotalCalculator'])
register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue'])
register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker'])
@@ -844,6 +874,32 @@
is_pure_virtual=True, is_virtual=True)
return
+def register_Ns3DelayJitterEstimation_methods(root_module, cls):
+ ## delay-jitter-estimation.h (module 'stats'): ns3::DelayJitterEstimation::DelayJitterEstimation(ns3::DelayJitterEstimation const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::DelayJitterEstimation const &', 'arg0')])
+ ## delay-jitter-estimation.h (module 'stats'): ns3::DelayJitterEstimation::DelayJitterEstimation() [constructor]
+ cls.add_constructor([])
+ ## delay-jitter-estimation.h (module 'stats'): ns3::Time ns3::DelayJitterEstimation::GetLastDelay() const [member function]
+ cls.add_method('GetLastDelay',
+ 'ns3::Time',
+ [],
+ is_const=True)
+ ## delay-jitter-estimation.h (module 'stats'): uint64_t ns3::DelayJitterEstimation::GetLastJitter() const [member function]
+ cls.add_method('GetLastJitter',
+ 'uint64_t',
+ [],
+ is_const=True)
+ ## delay-jitter-estimation.h (module 'stats'): static void ns3::DelayJitterEstimation::PrepareTx(ns3::Ptr<const ns3::Packet> packet) [member function]
+ cls.add_method('PrepareTx',
+ 'void',
+ [param('ns3::Ptr< ns3::Packet const >', 'packet')],
+ is_static=True)
+ ## delay-jitter-estimation.h (module 'stats'): void ns3::DelayJitterEstimation::RecordRx(ns3::Ptr<const ns3::Packet> 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('==')
@@ -889,6 +945,92 @@
is_const=True)
return
+def register_Ns3Gnuplot_methods(root_module, cls):
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot::Gnuplot(ns3::Gnuplot const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Gnuplot const &', 'arg0')])
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot::Gnuplot(std::string const & outputFilename="", std::string const & title="") [constructor]
+ cls.add_constructor([param('std::string const &', 'outputFilename', default_value='""'), param('std::string const &', 'title', default_value='""')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot::AddDataset(ns3::GnuplotDataset const & dataset) [member function]
+ cls.add_method('AddDataset',
+ 'void',
+ [param('ns3::GnuplotDataset const &', 'dataset')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot::AppendExtra(std::string const & extra) [member function]
+ cls.add_method('AppendExtra',
+ 'void',
+ [param('std::string const &', 'extra')])
+ ## gnuplot.h (module 'stats'): static std::string ns3::Gnuplot::DetectTerminal(std::string const & filename) [member function]
+ cls.add_method('DetectTerminal',
+ 'std::string',
+ [param('std::string const &', 'filename')],
+ is_static=True)
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot::GenerateOutput(std::ostream & os) const [member function]
+ cls.add_method('GenerateOutput',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True)
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot::SetExtra(std::string const & extra) [member function]
+ cls.add_method('SetExtra',
+ 'void',
+ [param('std::string const &', 'extra')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot::SetLegend(std::string const & xLegend, std::string const & yLegend) [member function]
+ cls.add_method('SetLegend',
+ 'void',
+ [param('std::string const &', 'xLegend'), param('std::string const &', 'yLegend')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot::SetTerminal(std::string const & terminal) [member function]
+ cls.add_method('SetTerminal',
+ 'void',
+ [param('std::string const &', 'terminal')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot::SetTitle(std::string const & title) [member function]
+ cls.add_method('SetTitle',
+ 'void',
+ [param('std::string const &', 'title')])
+ return
+
+def register_Ns3GnuplotCollection_methods(root_module, cls):
+ ## gnuplot.h (module 'stats'): ns3::GnuplotCollection::GnuplotCollection(ns3::GnuplotCollection const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::GnuplotCollection const &', 'arg0')])
+ ## gnuplot.h (module 'stats'): ns3::GnuplotCollection::GnuplotCollection(std::string const & outputFilename) [constructor]
+ cls.add_constructor([param('std::string const &', 'outputFilename')])
+ ## gnuplot.h (module 'stats'): void ns3::GnuplotCollection::AddPlot(ns3::Gnuplot const & plot) [member function]
+ cls.add_method('AddPlot',
+ 'void',
+ [param('ns3::Gnuplot const &', 'plot')])
+ ## gnuplot.h (module 'stats'): void ns3::GnuplotCollection::GenerateOutput(std::ostream & os) const [member function]
+ cls.add_method('GenerateOutput',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True)
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot & ns3::GnuplotCollection::GetPlot(unsigned int id) [member function]
+ cls.add_method('GetPlot',
+ 'ns3::Gnuplot &',
+ [param('unsigned int', 'id')])
+ ## gnuplot.h (module 'stats'): void ns3::GnuplotCollection::SetTerminal(std::string const & terminal) [member function]
+ cls.add_method('SetTerminal',
+ 'void',
+ [param('std::string const &', 'terminal')])
+ return
+
+def register_Ns3GnuplotDataset_methods(root_module, cls):
+ ## gnuplot.h (module 'stats'): ns3::GnuplotDataset::GnuplotDataset(ns3::GnuplotDataset const & original) [copy constructor]
+ cls.add_constructor([param('ns3::GnuplotDataset const &', 'original')])
+ ## gnuplot.h (module 'stats'): static void ns3::GnuplotDataset::SetDefaultExtra(std::string const & extra) [member function]
+ cls.add_method('SetDefaultExtra',
+ 'void',
+ [param('std::string const &', 'extra')],
+ is_static=True)
+ ## gnuplot.h (module 'stats'): void ns3::GnuplotDataset::SetExtra(std::string const & extra) [member function]
+ cls.add_method('SetExtra',
+ 'void',
+ [param('std::string const &', 'extra')])
+ ## gnuplot.h (module 'stats'): void ns3::GnuplotDataset::SetTitle(std::string const & title) [member function]
+ cls.add_method('SetTitle',
+ 'void',
+ [param('std::string const &', 'title')])
+ ## gnuplot.h (module 'stats'): ns3::GnuplotDataset::GnuplotDataset(ns3::GnuplotDataset::Data * data) [constructor]
+ cls.add_constructor([param('ns3::GnuplotDataset::Data *', 'data')],
+ visibility='protected')
+ return
+
def register_Ns3Ipv4Address_methods(root_module, cls):
cls.add_binary_comparison_operator('<')
cls.add_binary_comparison_operator('!=')
@@ -1642,6 +1784,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):
@@ -2203,6 +2349,93 @@
is_pure_virtual=True, is_const=True, is_virtual=True)
return
+def register_Ns3Gnuplot2dDataset_methods(root_module, cls):
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot2dDataset::Gnuplot2dDataset(ns3::Gnuplot2dDataset const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Gnuplot2dDataset const &', 'arg0')])
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot2dDataset::Gnuplot2dDataset(std::string const & title="Untitled") [constructor]
+ cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot2dDataset::Add(double x, double y) [member function]
+ cls.add_method('Add',
+ 'void',
+ [param('double', 'x'), param('double', 'y')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot2dDataset::Add(double x, double y, double errorDelta) [member function]
+ cls.add_method('Add',
+ 'void',
+ [param('double', 'x'), param('double', 'y'), param('double', 'errorDelta')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot2dDataset::Add(double x, double y, double xErrorDelta, double yErrorDelta) [member function]
+ cls.add_method('Add',
+ 'void',
+ [param('double', 'x'), param('double', 'y'), param('double', 'xErrorDelta'), param('double', 'yErrorDelta')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot2dDataset::AddEmptyLine() [member function]
+ cls.add_method('AddEmptyLine',
+ 'void',
+ [])
+ ## gnuplot.h (module 'stats'): static void ns3::Gnuplot2dDataset::SetDefaultErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function]
+ cls.add_method('SetDefaultErrorBars',
+ 'void',
+ [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')],
+ is_static=True)
+ ## gnuplot.h (module 'stats'): static void ns3::Gnuplot2dDataset::SetDefaultStyle(ns3::Gnuplot2dDataset::Style style) [member function]
+ cls.add_method('SetDefaultStyle',
+ 'void',
+ [param('ns3::Gnuplot2dDataset::Style', 'style')],
+ is_static=True)
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot2dDataset::SetErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function]
+ cls.add_method('SetErrorBars',
+ 'void',
+ [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot2dDataset::SetStyle(ns3::Gnuplot2dDataset::Style style) [member function]
+ cls.add_method('SetStyle',
+ 'void',
+ [param('ns3::Gnuplot2dDataset::Style', 'style')])
+ return
+
+def register_Ns3Gnuplot2dFunction_methods(root_module, cls):
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot2dFunction::Gnuplot2dFunction(ns3::Gnuplot2dFunction const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Gnuplot2dFunction const &', 'arg0')])
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot2dFunction::Gnuplot2dFunction(std::string const & title="Untitled", std::string const & function="") [constructor]
+ cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"'), param('std::string const &', 'function', default_value='""')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot2dFunction::SetFunction(std::string const & function) [member function]
+ cls.add_method('SetFunction',
+ 'void',
+ [param('std::string const &', 'function')])
+ return
+
+def register_Ns3Gnuplot3dDataset_methods(root_module, cls):
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot3dDataset::Gnuplot3dDataset(ns3::Gnuplot3dDataset const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Gnuplot3dDataset const &', 'arg0')])
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot3dDataset::Gnuplot3dDataset(std::string const & title="Untitled") [constructor]
+ cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot3dDataset::Add(double x, double y, double z) [member function]
+ cls.add_method('Add',
+ 'void',
+ [param('double', 'x'), param('double', 'y'), param('double', 'z')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot3dDataset::AddEmptyLine() [member function]
+ cls.add_method('AddEmptyLine',
+ 'void',
+ [])
+ ## gnuplot.h (module 'stats'): static void ns3::Gnuplot3dDataset::SetDefaultStyle(std::string const & style) [member function]
+ cls.add_method('SetDefaultStyle',
+ 'void',
+ [param('std::string const &', 'style')],
+ is_static=True)
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot3dDataset::SetStyle(std::string const & style) [member function]
+ cls.add_method('SetStyle',
+ 'void',
+ [param('std::string const &', 'style')])
+ return
+
+def register_Ns3Gnuplot3dFunction_methods(root_module, cls):
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot3dFunction::Gnuplot3dFunction(ns3::Gnuplot3dFunction const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Gnuplot3dFunction const &', 'arg0')])
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot3dFunction::Gnuplot3dFunction(std::string const & title="Untitled", std::string const & function="") [constructor]
+ cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"'), param('std::string const &', 'function', default_value='""')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot3dFunction::SetFunction(std::string const & function) [member function]
+ cls.add_method('SetFunction',
+ 'void',
+ [param('std::string const &', 'function')])
+ return
+
def register_Ns3Header_methods(root_module, cls):
cls.add_output_stream_operator()
## header.h (module 'network'): ns3::Header::Header() [constructor]
@@ -2532,6 +2765,16 @@
'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',
@@ -3155,6 +3398,71 @@
[param('ns3::Mac48Address const &', 'value')])
return
+def register_Ns3MinMaxAvgTotalCalculator__Double_methods(root_module, cls):
+ ## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<double>::MinMaxAvgTotalCalculator(ns3::MinMaxAvgTotalCalculator<double> const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::MinMaxAvgTotalCalculator< double > const &', 'arg0')])
+ ## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<double>::MinMaxAvgTotalCalculator() [constructor]
+ cls.add_constructor([])
+ ## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator<double>::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<double>::Reset() [member function]
+ cls.add_method('Reset',
+ 'void',
+ [])
+ ## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator<double>::Update(double const i) [member function]
+ cls.add_method('Update',
+ 'void',
+ [param('double const', 'i')])
+ ## basic-data-calculators.h (module 'stats'): long int ns3::MinMaxAvgTotalCalculator<double>::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<double>::getMax() const [member function]
+ cls.add_method('getMax',
+ 'double',
+ [],
+ is_const=True, is_virtual=True)
+ ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getMean() const [member function]
+ cls.add_method('getMean',
+ 'double',
+ [],
+ is_const=True, is_virtual=True)
+ ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getMin() const [member function]
+ cls.add_method('getMin',
+ 'double',
+ [],
+ is_const=True, is_virtual=True)
+ ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getSqrSum() const [member function]
+ cls.add_method('getSqrSum',
+ 'double',
+ [],
+ is_const=True, is_virtual=True)
+ ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getStddev() const [member function]
+ cls.add_method('getStddev',
+ 'double',
+ [],
+ is_const=True, is_virtual=True)
+ ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getSum() const [member function]
+ cls.add_method('getSum',
+ 'double',
+ [],
+ is_const=True, is_virtual=True)
+ ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getVariance() const [member function]
+ cls.add_method('getVariance',
+ 'double',
+ [],
+ is_const=True, is_virtual=True)
+ ## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator<double>::DoDispose() [member function]
+ cls.add_method('DoDispose',
+ 'void',
+ [],
+ visibility='protected', is_virtual=True)
+ return
+
def register_Ns3MinMaxAvgTotalCalculator__Unsigned_int_methods(root_module, cls):
## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<unsigned int>::MinMaxAvgTotalCalculator(ns3::MinMaxAvgTotalCalculator<unsigned int> const & arg0) [copy constructor]
cls.add_constructor([param('ns3::MinMaxAvgTotalCalculator< unsigned int > const &', 'arg0')])
@@ -3491,6 +3799,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',
@@ -3539,13 +3851,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_Ns3TimeMinMaxAvgTotalCalculator_methods(root_module, cls):
## time-data-calculators.h (module 'stats'): ns3::TimeMinMaxAvgTotalCalculator::TimeMinMaxAvgTotalCalculator(ns3::TimeMinMaxAvgTotalCalculator const & arg0) [copy constructor]
cls.add_constructor([param('ns3::TimeMinMaxAvgTotalCalculator const &', 'arg0')])
--- a/src/stats/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/stats/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -46,8 +46,16 @@
module.add_class('CallbackBase', import_from_module='ns.core')
## data-output-interface.h (module 'stats'): ns3::DataOutputCallback [class]
module.add_class('DataOutputCallback', allow_subclassing=True)
+ ## delay-jitter-estimation.h (module 'stats'): ns3::DelayJitterEstimation [class]
+ module.add_class('DelayJitterEstimation')
## event-id.h (module 'core'): ns3::EventId [class]
module.add_class('EventId', import_from_module='ns.core')
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot [class]
+ module.add_class('Gnuplot')
+ ## gnuplot.h (module 'stats'): ns3::GnuplotCollection [class]
+ module.add_class('GnuplotCollection')
+ ## gnuplot.h (module 'stats'): ns3::GnuplotDataset [class]
+ module.add_class('GnuplotDataset')
## 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]
@@ -86,6 +94,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<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [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]
@@ -110,6 +120,18 @@
module.add_class('int64x64_t', import_from_module='ns.core')
## chunk.h (module 'network'): ns3::Chunk [class]
module.add_class('Chunk', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot2dDataset [class]
+ module.add_class('Gnuplot2dDataset', parent=root_module['ns3::GnuplotDataset'])
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot2dDataset::Style [enumeration]
+ module.add_enum('Style', ['LINES', 'POINTS', 'LINES_POINTS', 'DOTS', 'IMPULSES', 'STEPS', 'FSTEPS', 'HISTEPS'], outer_class=root_module['ns3::Gnuplot2dDataset'])
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot2dDataset::ErrorBars [enumeration]
+ module.add_enum('ErrorBars', ['NONE', 'X', 'Y', 'XY'], outer_class=root_module['ns3::Gnuplot2dDataset'])
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot2dFunction [class]
+ module.add_class('Gnuplot2dFunction', parent=root_module['ns3::GnuplotDataset'])
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot3dDataset [class]
+ module.add_class('Gnuplot3dDataset', parent=root_module['ns3::GnuplotDataset'])
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot3dFunction [class]
+ module.add_class('Gnuplot3dFunction', parent=root_module['ns3::GnuplotDataset'])
## header.h (module 'network'): ns3::Header [class]
module.add_class('Header', import_from_module='ns.network', parent=root_module['ns3::Chunk'])
## object.h (module 'core'): ns3::Object [class]
@@ -184,6 +206,8 @@
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'])
+ ## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<double> [class]
+ module.add_class('MinMaxAvgTotalCalculator', template_parameters=['double'], parent=[root_module['ns3::DataCalculator'], root_module['ns3::StatisticalSummary']])
## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<unsigned int> [class]
module.add_class('MinMaxAvgTotalCalculator', template_parameters=['unsigned int'], parent=[root_module['ns3::DataCalculator'], root_module['ns3::StatisticalSummary']])
## nix-vector.h (module 'network'): ns3::NixVector [class]
@@ -200,8 +224,6 @@
module.add_class('PacketSizeMinMaxAvgTotalCalculator', parent=root_module['ns3::MinMaxAvgTotalCalculator< unsigned int >'])
## sqlite-data-output.h (module 'stats'): ns3::SqliteDataOutput [class]
module.add_class('SqliteDataOutput', parent=root_module['ns3::DataOutputInterface'])
- ## nstime.h (module 'core'): ns3::TimeChecker [class]
- module.add_class('TimeChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker'])
## time-data-calculators.h (module 'stats'): ns3::TimeMinMaxAvgTotalCalculator [class]
module.add_class('TimeMinMaxAvgTotalCalculator', parent=root_module['ns3::DataCalculator'])
## nstime.h (module 'core'): ns3::TimeValue [class]
@@ -218,12 +240,12 @@
module.add_class('CounterCalculator', template_parameters=['unsigned int'], parent=root_module['ns3::DataCalculator'])
## packet-data-calculators.h (module 'stats'): ns3::PacketCounterCalculator [class]
module.add_class('PacketCounterCalculator', parent=root_module['ns3::CounterCalculator< unsigned int >'])
+ typehandlers.add_type_alias('std::list< ns3::Ptr< ns3::DataCalculator >, std::allocator< ns3::Ptr< ns3::DataCalculator > > >', 'ns3::DataCalculatorList')
+ typehandlers.add_type_alias('std::list< ns3::Ptr< ns3::DataCalculator >, std::allocator< ns3::Ptr< ns3::DataCalculator > > >*', 'ns3::DataCalculatorList*')
+ typehandlers.add_type_alias('std::list< ns3::Ptr< ns3::DataCalculator >, std::allocator< ns3::Ptr< ns3::DataCalculator > > >&', 'ns3::DataCalculatorList&')
typehandlers.add_type_alias('std::list< std::pair< std::string, std::string >, std::allocator< std::pair< std::string, std::string > > >', 'ns3::MetadataList')
typehandlers.add_type_alias('std::list< std::pair< std::string, std::string >, std::allocator< std::pair< std::string, std::string > > >*', 'ns3::MetadataList*')
typehandlers.add_type_alias('std::list< std::pair< std::string, std::string >, std::allocator< std::pair< std::string, std::string > > >&', 'ns3::MetadataList&')
- typehandlers.add_type_alias('std::list< ns3::Ptr< ns3::DataCalculator >, std::allocator< ns3::Ptr< ns3::DataCalculator > > >', 'ns3::DataCalculatorList')
- typehandlers.add_type_alias('std::list< ns3::Ptr< ns3::DataCalculator >, std::allocator< ns3::Ptr< ns3::DataCalculator > > >*', 'ns3::DataCalculatorList*')
- typehandlers.add_type_alias('std::list< ns3::Ptr< ns3::DataCalculator >, std::allocator< ns3::Ptr< ns3::DataCalculator > > >&', 'ns3::DataCalculatorList&')
## Register a nested module for the namespace FatalImpl
@@ -248,7 +270,11 @@
register_Ns3ByteTagListIteratorItem_methods(root_module, root_module['ns3::ByteTagList::Iterator::Item'])
register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase'])
register_Ns3DataOutputCallback_methods(root_module, root_module['ns3::DataOutputCallback'])
+ register_Ns3DelayJitterEstimation_methods(root_module, root_module['ns3::DelayJitterEstimation'])
register_Ns3EventId_methods(root_module, root_module['ns3::EventId'])
+ register_Ns3Gnuplot_methods(root_module, root_module['ns3::Gnuplot'])
+ register_Ns3GnuplotCollection_methods(root_module, root_module['ns3::GnuplotCollection'])
+ register_Ns3GnuplotDataset_methods(root_module, root_module['ns3::GnuplotDataset'])
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'])
@@ -275,6 +301,10 @@
register_Ns3Empty_methods(root_module, root_module['ns3::empty'])
register_Ns3Int64x64_t_methods(root_module, root_module['ns3::int64x64_t'])
register_Ns3Chunk_methods(root_module, root_module['ns3::Chunk'])
+ register_Ns3Gnuplot2dDataset_methods(root_module, root_module['ns3::Gnuplot2dDataset'])
+ register_Ns3Gnuplot2dFunction_methods(root_module, root_module['ns3::Gnuplot2dFunction'])
+ register_Ns3Gnuplot3dDataset_methods(root_module, root_module['ns3::Gnuplot3dDataset'])
+ register_Ns3Gnuplot3dFunction_methods(root_module, root_module['ns3::Gnuplot3dFunction'])
register_Ns3Header_methods(root_module, root_module['ns3::Header'])
register_Ns3Object_methods(root_module, root_module['ns3::Object'])
register_Ns3ObjectAggregateIterator_methods(root_module, root_module['ns3::Object::AggregateIterator'])
@@ -310,6 +340,7 @@
register_Ns3Ipv6PrefixValue_methods(root_module, root_module['ns3::Ipv6PrefixValue'])
register_Ns3Mac48AddressChecker_methods(root_module, root_module['ns3::Mac48AddressChecker'])
register_Ns3Mac48AddressValue_methods(root_module, root_module['ns3::Mac48AddressValue'])
+ 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_Ns3NixVector_methods(root_module, root_module['ns3::NixVector'])
register_Ns3ObjectFactoryChecker_methods(root_module, root_module['ns3::ObjectFactoryChecker'])
@@ -318,7 +349,6 @@
register_Ns3Packet_methods(root_module, root_module['ns3::Packet'])
register_Ns3PacketSizeMinMaxAvgTotalCalculator_methods(root_module, root_module['ns3::PacketSizeMinMaxAvgTotalCalculator'])
register_Ns3SqliteDataOutput_methods(root_module, root_module['ns3::SqliteDataOutput'])
- register_Ns3TimeChecker_methods(root_module, root_module['ns3::TimeChecker'])
register_Ns3TimeMinMaxAvgTotalCalculator_methods(root_module, root_module['ns3::TimeMinMaxAvgTotalCalculator'])
register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue'])
register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker'])
@@ -844,6 +874,32 @@
is_pure_virtual=True, is_virtual=True)
return
+def register_Ns3DelayJitterEstimation_methods(root_module, cls):
+ ## delay-jitter-estimation.h (module 'stats'): ns3::DelayJitterEstimation::DelayJitterEstimation(ns3::DelayJitterEstimation const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::DelayJitterEstimation const &', 'arg0')])
+ ## delay-jitter-estimation.h (module 'stats'): ns3::DelayJitterEstimation::DelayJitterEstimation() [constructor]
+ cls.add_constructor([])
+ ## delay-jitter-estimation.h (module 'stats'): ns3::Time ns3::DelayJitterEstimation::GetLastDelay() const [member function]
+ cls.add_method('GetLastDelay',
+ 'ns3::Time',
+ [],
+ is_const=True)
+ ## delay-jitter-estimation.h (module 'stats'): uint64_t ns3::DelayJitterEstimation::GetLastJitter() const [member function]
+ cls.add_method('GetLastJitter',
+ 'uint64_t',
+ [],
+ is_const=True)
+ ## delay-jitter-estimation.h (module 'stats'): static void ns3::DelayJitterEstimation::PrepareTx(ns3::Ptr<const ns3::Packet> packet) [member function]
+ cls.add_method('PrepareTx',
+ 'void',
+ [param('ns3::Ptr< ns3::Packet const >', 'packet')],
+ is_static=True)
+ ## delay-jitter-estimation.h (module 'stats'): void ns3::DelayJitterEstimation::RecordRx(ns3::Ptr<const ns3::Packet> 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('==')
@@ -889,6 +945,92 @@
is_const=True)
return
+def register_Ns3Gnuplot_methods(root_module, cls):
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot::Gnuplot(ns3::Gnuplot const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Gnuplot const &', 'arg0')])
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot::Gnuplot(std::string const & outputFilename="", std::string const & title="") [constructor]
+ cls.add_constructor([param('std::string const &', 'outputFilename', default_value='""'), param('std::string const &', 'title', default_value='""')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot::AddDataset(ns3::GnuplotDataset const & dataset) [member function]
+ cls.add_method('AddDataset',
+ 'void',
+ [param('ns3::GnuplotDataset const &', 'dataset')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot::AppendExtra(std::string const & extra) [member function]
+ cls.add_method('AppendExtra',
+ 'void',
+ [param('std::string const &', 'extra')])
+ ## gnuplot.h (module 'stats'): static std::string ns3::Gnuplot::DetectTerminal(std::string const & filename) [member function]
+ cls.add_method('DetectTerminal',
+ 'std::string',
+ [param('std::string const &', 'filename')],
+ is_static=True)
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot::GenerateOutput(std::ostream & os) const [member function]
+ cls.add_method('GenerateOutput',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True)
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot::SetExtra(std::string const & extra) [member function]
+ cls.add_method('SetExtra',
+ 'void',
+ [param('std::string const &', 'extra')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot::SetLegend(std::string const & xLegend, std::string const & yLegend) [member function]
+ cls.add_method('SetLegend',
+ 'void',
+ [param('std::string const &', 'xLegend'), param('std::string const &', 'yLegend')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot::SetTerminal(std::string const & terminal) [member function]
+ cls.add_method('SetTerminal',
+ 'void',
+ [param('std::string const &', 'terminal')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot::SetTitle(std::string const & title) [member function]
+ cls.add_method('SetTitle',
+ 'void',
+ [param('std::string const &', 'title')])
+ return
+
+def register_Ns3GnuplotCollection_methods(root_module, cls):
+ ## gnuplot.h (module 'stats'): ns3::GnuplotCollection::GnuplotCollection(ns3::GnuplotCollection const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::GnuplotCollection const &', 'arg0')])
+ ## gnuplot.h (module 'stats'): ns3::GnuplotCollection::GnuplotCollection(std::string const & outputFilename) [constructor]
+ cls.add_constructor([param('std::string const &', 'outputFilename')])
+ ## gnuplot.h (module 'stats'): void ns3::GnuplotCollection::AddPlot(ns3::Gnuplot const & plot) [member function]
+ cls.add_method('AddPlot',
+ 'void',
+ [param('ns3::Gnuplot const &', 'plot')])
+ ## gnuplot.h (module 'stats'): void ns3::GnuplotCollection::GenerateOutput(std::ostream & os) const [member function]
+ cls.add_method('GenerateOutput',
+ 'void',
+ [param('std::ostream &', 'os')],
+ is_const=True)
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot & ns3::GnuplotCollection::GetPlot(unsigned int id) [member function]
+ cls.add_method('GetPlot',
+ 'ns3::Gnuplot &',
+ [param('unsigned int', 'id')])
+ ## gnuplot.h (module 'stats'): void ns3::GnuplotCollection::SetTerminal(std::string const & terminal) [member function]
+ cls.add_method('SetTerminal',
+ 'void',
+ [param('std::string const &', 'terminal')])
+ return
+
+def register_Ns3GnuplotDataset_methods(root_module, cls):
+ ## gnuplot.h (module 'stats'): ns3::GnuplotDataset::GnuplotDataset(ns3::GnuplotDataset const & original) [copy constructor]
+ cls.add_constructor([param('ns3::GnuplotDataset const &', 'original')])
+ ## gnuplot.h (module 'stats'): static void ns3::GnuplotDataset::SetDefaultExtra(std::string const & extra) [member function]
+ cls.add_method('SetDefaultExtra',
+ 'void',
+ [param('std::string const &', 'extra')],
+ is_static=True)
+ ## gnuplot.h (module 'stats'): void ns3::GnuplotDataset::SetExtra(std::string const & extra) [member function]
+ cls.add_method('SetExtra',
+ 'void',
+ [param('std::string const &', 'extra')])
+ ## gnuplot.h (module 'stats'): void ns3::GnuplotDataset::SetTitle(std::string const & title) [member function]
+ cls.add_method('SetTitle',
+ 'void',
+ [param('std::string const &', 'title')])
+ ## gnuplot.h (module 'stats'): ns3::GnuplotDataset::GnuplotDataset(ns3::GnuplotDataset::Data * data) [constructor]
+ cls.add_constructor([param('ns3::GnuplotDataset::Data *', 'data')],
+ visibility='protected')
+ return
+
def register_Ns3Ipv4Address_methods(root_module, cls):
cls.add_binary_comparison_operator('<')
cls.add_binary_comparison_operator('!=')
@@ -1642,6 +1784,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):
@@ -2203,6 +2349,93 @@
is_pure_virtual=True, is_const=True, is_virtual=True)
return
+def register_Ns3Gnuplot2dDataset_methods(root_module, cls):
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot2dDataset::Gnuplot2dDataset(ns3::Gnuplot2dDataset const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Gnuplot2dDataset const &', 'arg0')])
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot2dDataset::Gnuplot2dDataset(std::string const & title="Untitled") [constructor]
+ cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot2dDataset::Add(double x, double y) [member function]
+ cls.add_method('Add',
+ 'void',
+ [param('double', 'x'), param('double', 'y')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot2dDataset::Add(double x, double y, double errorDelta) [member function]
+ cls.add_method('Add',
+ 'void',
+ [param('double', 'x'), param('double', 'y'), param('double', 'errorDelta')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot2dDataset::Add(double x, double y, double xErrorDelta, double yErrorDelta) [member function]
+ cls.add_method('Add',
+ 'void',
+ [param('double', 'x'), param('double', 'y'), param('double', 'xErrorDelta'), param('double', 'yErrorDelta')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot2dDataset::AddEmptyLine() [member function]
+ cls.add_method('AddEmptyLine',
+ 'void',
+ [])
+ ## gnuplot.h (module 'stats'): static void ns3::Gnuplot2dDataset::SetDefaultErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function]
+ cls.add_method('SetDefaultErrorBars',
+ 'void',
+ [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')],
+ is_static=True)
+ ## gnuplot.h (module 'stats'): static void ns3::Gnuplot2dDataset::SetDefaultStyle(ns3::Gnuplot2dDataset::Style style) [member function]
+ cls.add_method('SetDefaultStyle',
+ 'void',
+ [param('ns3::Gnuplot2dDataset::Style', 'style')],
+ is_static=True)
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot2dDataset::SetErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function]
+ cls.add_method('SetErrorBars',
+ 'void',
+ [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot2dDataset::SetStyle(ns3::Gnuplot2dDataset::Style style) [member function]
+ cls.add_method('SetStyle',
+ 'void',
+ [param('ns3::Gnuplot2dDataset::Style', 'style')])
+ return
+
+def register_Ns3Gnuplot2dFunction_methods(root_module, cls):
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot2dFunction::Gnuplot2dFunction(ns3::Gnuplot2dFunction const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Gnuplot2dFunction const &', 'arg0')])
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot2dFunction::Gnuplot2dFunction(std::string const & title="Untitled", std::string const & function="") [constructor]
+ cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"'), param('std::string const &', 'function', default_value='""')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot2dFunction::SetFunction(std::string const & function) [member function]
+ cls.add_method('SetFunction',
+ 'void',
+ [param('std::string const &', 'function')])
+ return
+
+def register_Ns3Gnuplot3dDataset_methods(root_module, cls):
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot3dDataset::Gnuplot3dDataset(ns3::Gnuplot3dDataset const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Gnuplot3dDataset const &', 'arg0')])
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot3dDataset::Gnuplot3dDataset(std::string const & title="Untitled") [constructor]
+ cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot3dDataset::Add(double x, double y, double z) [member function]
+ cls.add_method('Add',
+ 'void',
+ [param('double', 'x'), param('double', 'y'), param('double', 'z')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot3dDataset::AddEmptyLine() [member function]
+ cls.add_method('AddEmptyLine',
+ 'void',
+ [])
+ ## gnuplot.h (module 'stats'): static void ns3::Gnuplot3dDataset::SetDefaultStyle(std::string const & style) [member function]
+ cls.add_method('SetDefaultStyle',
+ 'void',
+ [param('std::string const &', 'style')],
+ is_static=True)
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot3dDataset::SetStyle(std::string const & style) [member function]
+ cls.add_method('SetStyle',
+ 'void',
+ [param('std::string const &', 'style')])
+ return
+
+def register_Ns3Gnuplot3dFunction_methods(root_module, cls):
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot3dFunction::Gnuplot3dFunction(ns3::Gnuplot3dFunction const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::Gnuplot3dFunction const &', 'arg0')])
+ ## gnuplot.h (module 'stats'): ns3::Gnuplot3dFunction::Gnuplot3dFunction(std::string const & title="Untitled", std::string const & function="") [constructor]
+ cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"'), param('std::string const &', 'function', default_value='""')])
+ ## gnuplot.h (module 'stats'): void ns3::Gnuplot3dFunction::SetFunction(std::string const & function) [member function]
+ cls.add_method('SetFunction',
+ 'void',
+ [param('std::string const &', 'function')])
+ return
+
def register_Ns3Header_methods(root_module, cls):
cls.add_output_stream_operator()
## header.h (module 'network'): ns3::Header::Header() [constructor]
@@ -2532,6 +2765,16 @@
'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',
@@ -3155,6 +3398,71 @@
[param('ns3::Mac48Address const &', 'value')])
return
+def register_Ns3MinMaxAvgTotalCalculator__Double_methods(root_module, cls):
+ ## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<double>::MinMaxAvgTotalCalculator(ns3::MinMaxAvgTotalCalculator<double> const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::MinMaxAvgTotalCalculator< double > const &', 'arg0')])
+ ## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<double>::MinMaxAvgTotalCalculator() [constructor]
+ cls.add_constructor([])
+ ## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator<double>::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<double>::Reset() [member function]
+ cls.add_method('Reset',
+ 'void',
+ [])
+ ## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator<double>::Update(double const i) [member function]
+ cls.add_method('Update',
+ 'void',
+ [param('double const', 'i')])
+ ## basic-data-calculators.h (module 'stats'): long int ns3::MinMaxAvgTotalCalculator<double>::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<double>::getMax() const [member function]
+ cls.add_method('getMax',
+ 'double',
+ [],
+ is_const=True, is_virtual=True)
+ ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getMean() const [member function]
+ cls.add_method('getMean',
+ 'double',
+ [],
+ is_const=True, is_virtual=True)
+ ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getMin() const [member function]
+ cls.add_method('getMin',
+ 'double',
+ [],
+ is_const=True, is_virtual=True)
+ ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getSqrSum() const [member function]
+ cls.add_method('getSqrSum',
+ 'double',
+ [],
+ is_const=True, is_virtual=True)
+ ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getStddev() const [member function]
+ cls.add_method('getStddev',
+ 'double',
+ [],
+ is_const=True, is_virtual=True)
+ ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getSum() const [member function]
+ cls.add_method('getSum',
+ 'double',
+ [],
+ is_const=True, is_virtual=True)
+ ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getVariance() const [member function]
+ cls.add_method('getVariance',
+ 'double',
+ [],
+ is_const=True, is_virtual=True)
+ ## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator<double>::DoDispose() [member function]
+ cls.add_method('DoDispose',
+ 'void',
+ [],
+ visibility='protected', is_virtual=True)
+ return
+
def register_Ns3MinMaxAvgTotalCalculator__Unsigned_int_methods(root_module, cls):
## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<unsigned int>::MinMaxAvgTotalCalculator(ns3::MinMaxAvgTotalCalculator<unsigned int> const & arg0) [copy constructor]
cls.add_constructor([param('ns3::MinMaxAvgTotalCalculator< unsigned int > const &', 'arg0')])
@@ -3491,6 +3799,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',
@@ -3539,13 +3851,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_Ns3TimeMinMaxAvgTotalCalculator_methods(root_module, cls):
## time-data-calculators.h (module 'stats'): ns3::TimeMinMaxAvgTotalCalculator::TimeMinMaxAvgTotalCalculator(ns3::TimeMinMaxAvgTotalCalculator const & arg0) [copy constructor]
cls.add_constructor([param('ns3::TimeMinMaxAvgTotalCalculator const &', 'arg0')])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/stats/examples/gnuplot-example.cc Wed Jul 24 13:20:24 2013 +0200
@@ -0,0 +1,271 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2011 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
+ *
+ * Author: Mitch Watrous (watrous@u.washington.edu)
+ */
+
+#include <fstream>
+
+#include "ns3/gnuplot.h"
+
+using namespace ns3;
+
+namespace {
+
+//===========================================================================
+// Function: Create2DPlotFile
+//
+//
+// This function creates a 2-D plot file.
+//===========================================================================
+
+void Create2DPlotFile ()
+{
+ std::string fileNameWithNoExtension = "plot-2d";
+ std::string graphicsFileName = fileNameWithNoExtension + ".png";
+ std::string plotFileName = fileNameWithNoExtension + ".plt";
+ std::string plotTitle = "2-D Plot";
+ std::string dataTitle = "2-D Data";
+
+ // Instantiate the plot and set its title.
+ Gnuplot plot (graphicsFileName);
+ plot.SetTitle (plotTitle);
+
+ // Make the graphics file, which the plot file will create when it
+ // is used with Gnuplot, be a PNG file.
+ plot.SetTerminal ("png");
+
+ // Set the labels for each axis.
+ plot.SetLegend ("X Values", "Y Values");
+
+ // Set the range for the x axis.
+ plot.AppendExtra ("set xrange [-6:+6]");
+
+ // Instantiate the dataset, set its title, and make the points be
+ // plotted along with connecting lines.
+ Gnuplot2dDataset dataset;
+ dataset.SetTitle (dataTitle);
+ dataset.SetStyle (Gnuplot2dDataset::LINES_POINTS);
+
+ double x;
+ double y;
+
+ // Create the 2-D dataset.
+ for (x = -5.0; x <= +5.0; x += 1.0)
+ {
+ // Calculate the 2-D curve
+ //
+ // 2
+ // y = x .
+ //
+ y = x * x;
+
+ // Add this point.
+ dataset.Add (x, y);
+ }
+
+ // Add the dataset to the plot.
+ plot.AddDataset (dataset);
+
+ // Open the plot file.
+ std::ofstream plotFile (plotFileName.c_str());
+
+ // Write the plot file.
+ plot.GenerateOutput (plotFile);
+
+ // Close the plot file.
+ plotFile.close ();
+}
+
+
+//===========================================================================
+// Function: Create2DPlotWithErrorBarsFile
+//
+//
+// This function creates a 2-D plot with error bars file.
+//===========================================================================
+
+void Create2DPlotWithErrorBarsFile ()
+{
+ std::string fileNameWithNoExtension = "plot-2d-with-error-bars";
+ std::string graphicsFileName = fileNameWithNoExtension + ".png";
+ std::string plotFileName = fileNameWithNoExtension + ".plt";
+ std::string plotTitle = "2-D Plot With Error Bars";
+ std::string dataTitle = "2-D Data With Error Bars";
+
+ // Instantiate the plot and set its title.
+ Gnuplot plot (graphicsFileName);
+ plot.SetTitle (plotTitle);
+
+ // Make the graphics file, which the plot file will create when it
+ // is used with Gnuplot, be a PNG file.
+ plot.SetTerminal ("png");
+
+ // Set the labels for each axis.
+ plot.SetLegend ("X Values", "Y Values");
+
+ // Set the range for the x axis.
+ plot.AppendExtra ("set xrange [-6:+6]");
+
+ // Instantiate the dataset, set its title, and make the points be
+ // plotted with no connecting lines.
+ Gnuplot2dDataset dataset;
+ dataset.SetTitle (dataTitle);
+ dataset.SetStyle (Gnuplot2dDataset::POINTS);
+
+ // Make the dataset have error bars in both the x and y directions.
+ dataset.SetErrorBars (Gnuplot2dDataset::XY);
+
+ double x;
+ double xErrorDelta;
+ double y;
+ double yErrorDelta;
+
+ // Create the 2-D dataset.
+ for (x = -5.0; x <= +5.0; x += 1.0)
+ {
+ // Calculate the 2-D curve
+ //
+ // 2
+ // y = x .
+ //
+ y = x * x;
+
+ // Make the uncertainty in the x direction be constant and make
+ // the uncertainty in the y direction be a constant fraction of
+ // y's value.
+ xErrorDelta = 0.25;
+ yErrorDelta = 0.1 * y;
+
+ // Add this point with uncertainties in both the x and y
+ // direction.
+ dataset.Add (x, y, xErrorDelta, yErrorDelta);
+ }
+
+ // Add the dataset to the plot.
+ plot.AddDataset (dataset);
+
+ // Open the plot file.
+ std::ofstream plotFile (plotFileName.c_str());
+
+ // Write the plot file.
+ plot.GenerateOutput (plotFile);
+
+ // Close the plot file.
+ plotFile.close ();
+}
+
+
+//===========================================================================
+// Function: Create3DPlotFile
+//
+//
+// This function creates a 3-D plot file.
+//===========================================================================
+
+void Create3DPlotFile ()
+{
+ std::string fileNameWithNoExtension = "plot-3d";
+ std::string graphicsFileName = fileNameWithNoExtension + ".png";
+ std::string plotFileName = fileNameWithNoExtension + ".plt";
+ std::string plotTitle = "3-D Plot";
+ std::string dataTitle = "3-D Data";
+
+ // Instantiate the plot and set its title.
+ Gnuplot plot (graphicsFileName);
+ plot.SetTitle (plotTitle);
+
+ // Make the graphics file, which the plot file will create when it
+ // is used with Gnuplot, be a PNG file.
+ plot.SetTerminal ("png");
+
+ // Rotate the plot 30 degrees around the x axis and then rotate the
+ // plot 120 degrees around the new z axis.
+ plot.AppendExtra ("set view 30, 120, 1.0, 1.0");
+
+ // Make the zero for the z-axis be in the x-axis and y-axis plane.
+ plot.AppendExtra ("set ticslevel 0");
+
+ // Set the labels for each axis.
+ plot.AppendExtra ("set xlabel 'X Values'");
+ plot.AppendExtra ("set ylabel 'Y Values'");
+ plot.AppendExtra ("set zlabel 'Z Values'");
+
+ // Set the ranges for the x and y axis.
+ plot.AppendExtra ("set xrange [-5:+5]");
+ plot.AppendExtra ("set yrange [-5:+5]");
+
+ // Instantiate the dataset, set its title, and make the points be
+ // connected by lines.
+ Gnuplot3dDataset dataset;
+ dataset.SetTitle (dataTitle);
+ dataset.SetStyle ("with lines");
+
+ double x;
+ double y;
+ double z;
+
+ // Create the 3-D dataset.
+ for (x = -5.0; x <= +5.0; x += 1.0)
+ {
+ for (y = -5.0; y <= +5.0; y += 1.0)
+ {
+ // Calculate the 3-D surface
+ //
+ // 2 2
+ // z = x * y .
+ //
+ z = x * x * y * y;
+
+ // Add this point.
+ dataset.Add (x, y, z);
+ }
+
+ // The blank line is necessary at the end of each x value's data
+ // points for the 3-D surface grid to work.
+ dataset.AddEmptyLine ();
+ }
+
+ // Add the dataset to the plot.
+ plot.AddDataset (dataset);
+
+ // Open the plot file.
+ std::ofstream plotFile (plotFileName.c_str());
+
+ // Write the plot file.
+ plot.GenerateOutput (plotFile);
+
+ // Close the plot file.
+ plotFile.close ();
+}
+
+} // anonymous namespace
+
+
+int main (int argc, char *argv[])
+{
+ // Create a 2-D plot file.
+ Create2DPlotFile();
+
+ // Create a 2-D plot with error bars file.
+ Create2DPlotWithErrorBarsFile();
+
+ // Create a 3-D plot file.
+ Create3DPlotFile();
+
+ return 0;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/stats/examples/wscript Wed Jul 24 13:20:24 2013 +0200
@@ -0,0 +1,10 @@
+## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+def build(bld):
+ if not bld.env['ENABLE_EXAMPLES']:
+ return;
+
+ obj = bld.create_ns3_program('gnuplot-example', ['stats'])
+ obj.source = 'gnuplot-example.cc'
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/stats/helper/delay-jitter-estimation.cc Wed Jul 24 13:20:24 2013 +0200
@@ -0,0 +1,139 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2007 INRIA
+ *
+ * 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: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
+ */
+
+#include "delay-jitter-estimation.h"
+#include "ns3/tag.h"
+#include "ns3/simulator.h"
+#include "ns3/string.h"
+
+namespace ns3 {
+
+class DelayJitterEstimationTimestampTag : public Tag
+{
+public:
+ DelayJitterEstimationTimestampTag ();
+ static TypeId GetTypeId (void);
+ virtual TypeId GetInstanceTypeId (void) const;
+
+ virtual uint32_t GetSerializedSize (void) const;
+ virtual void Serialize (TagBuffer i) const;
+ virtual void Deserialize (TagBuffer i);
+ virtual void Print (std::ostream &os) const;
+
+ Time GetTxTime (void) const;
+private:
+ uint64_t m_creationTime;
+};
+
+DelayJitterEstimationTimestampTag::DelayJitterEstimationTimestampTag ()
+ : m_creationTime (Simulator::Now ().GetTimeStep ())
+{
+}
+
+TypeId
+DelayJitterEstimationTimestampTag::GetTypeId (void)
+{
+ static TypeId tid = TypeId ("anon::DelayJitterEstimationTimestampTag")
+ .SetParent<Tag> ()
+ .AddConstructor<DelayJitterEstimationTimestampTag> ()
+ .AddAttribute ("CreationTime",
+ "The time at which the timestamp was created",
+ StringValue ("0.0s"),
+ MakeTimeAccessor (&DelayJitterEstimationTimestampTag::GetTxTime),
+ MakeTimeChecker ())
+ ;
+ return tid;
+}
+TypeId
+DelayJitterEstimationTimestampTag::GetInstanceTypeId (void) const
+{
+ return GetTypeId ();
+}
+
+uint32_t
+DelayJitterEstimationTimestampTag::GetSerializedSize (void) const
+{
+ return 8;
+}
+void
+DelayJitterEstimationTimestampTag::Serialize (TagBuffer i) const
+{
+ i.WriteU64 (m_creationTime);
+}
+void
+DelayJitterEstimationTimestampTag::Deserialize (TagBuffer i)
+{
+ m_creationTime = i.ReadU64 ();
+}
+void
+DelayJitterEstimationTimestampTag::Print (std::ostream &os) const
+{
+ os << "CreationTime=" << m_creationTime;
+}
+Time
+DelayJitterEstimationTimestampTag::GetTxTime (void) const
+{
+ return TimeStep (m_creationTime);
+}
+
+DelayJitterEstimation::DelayJitterEstimation ()
+ : m_previousRx (Simulator::Now ()),
+ m_previousRxTx (Simulator::Now ()),
+ m_jitter (0),
+ m_delay (Seconds (0.0))
+{
+}
+void
+DelayJitterEstimation::PrepareTx (Ptr<const Packet> packet)
+{
+ DelayJitterEstimationTimestampTag tag;
+ packet->AddByteTag (tag);
+}
+void
+DelayJitterEstimation::RecordRx (Ptr<const Packet> packet)
+{
+ DelayJitterEstimationTimestampTag tag;
+ bool found;
+ found = packet->FindFirstMatchingByteTag (tag);
+ if (!found)
+ {
+ return;
+ }
+ tag.GetTxTime ();
+
+ Time delta = (Simulator::Now () - m_previousRx) - (tag.GetTxTime () - m_previousRxTx);
+ m_jitter += (Abs (delta) - m_jitter) / 16;
+ m_previousRx = Simulator::Now ();
+ m_previousRxTx = tag.GetTxTime ();
+ m_delay = Simulator::Now () - tag.GetTxTime ();
+}
+
+Time
+DelayJitterEstimation::GetLastDelay (void) const
+{
+ return m_delay;
+}
+uint64_t
+DelayJitterEstimation::GetLastJitter (void) const
+{
+ return m_jitter.GetHigh ();
+}
+
+} // namespace ns3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/stats/helper/delay-jitter-estimation.h Wed Jul 24 13:20:24 2013 +0200
@@ -0,0 +1,80 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2007 INRIA
+ *
+ * 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: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
+ */
+#ifndef DELAY_JITTER_ESTIMATION_H
+#define DELAY_JITTER_ESTIMATION_H
+
+#include "ns3/nstime.h"
+#include "ns3/packet.h"
+
+namespace ns3 {
+
+/**
+ * \ingroup stats
+ *
+ * \brief quick and dirty delay and jitter estimation
+ *
+ */
+class DelayJitterEstimation
+{
+public:
+ DelayJitterEstimation ();
+
+ /**
+ * \param packet the packet to send over a wire
+ *
+ * This method should be invoked once on each packet to
+ * record within the packet the tx time which is used upon
+ * packet reception to calculate the delay and jitter. The
+ * tx time is stored in the packet as an ns3::Tag which means
+ * that it does not use any network resources and is not
+ * taken into account in transmission delay calculations.
+ */
+ static void PrepareTx (Ptr<const Packet> packet);
+ /**
+ * \param packet the packet received
+ *
+ * Invoke this method to update the delay and jitter calculations
+ * After a call to this method, \ref GetLastDelay and \ref GetLastJitter
+ * will return an updated delay and jitter.
+ */
+ void RecordRx (Ptr<const Packet> packet);
+
+ /**
+ * \returns the updated delay.
+ */
+ Time GetLastDelay (void) const;
+ /**
+ * The jitter is calculated using the RFC 1889 (RTP) jitter
+ * definition.
+ *
+ * \returns the updated jitter.
+ */
+ uint64_t GetLastJitter (void) const;
+
+private:
+ Time m_previousRx;
+ Time m_previousRxTx;
+ int64x64_t m_jitter;
+ Time m_delay;
+};
+
+} // namespace ns3
+
+#endif /* DELAY_JITTER_ESTIMATION_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/stats/model/average.h Wed Jul 24 13:20:24 2013 +0200
@@ -0,0 +1,125 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 IITP RAS
+ *
+ * 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: Pavel Boyko <boyko@iitp.ru>
+ * Corrections and extensions: Timo Bingmann <tbns@idlebox.net>
+ */
+
+#ifndef AVERAGE_H
+#define AVERAGE_H
+#include <cmath>
+#include <ostream>
+#include <limits>
+#include <stdint.h>
+#include "ns3/basic-data-calculators.h"
+
+namespace ns3 {
+
+/**
+ * \defgroup tools Tools
+ *
+ */
+
+/**
+ * \ingroup tools
+ *
+ * Simple average, min, max and std. deviation calculator
+ *
+ */
+
+template <typename T = double>
+class Average
+{
+public:
+ Average ()
+ : m_size (0), m_min (std::numeric_limits<T>::max ()), m_max (0)
+ {
+ }
+
+ /// Add new sample
+ void Update (T const & x)
+ {
+ // Give the variance calculator the next value.
+ m_varianceCalculator.Update (x);
+
+ m_min = std::min (x, m_min);
+ m_max = std::max (x, m_max);
+ m_size++;
+ }
+ /// Reset statistics
+ void Reset ()
+ {
+ m_varianceCalculator.Reset ();
+
+ m_size = 0;
+ m_min = std::numeric_limits<T>::max ();
+ m_max = 0;
+ }
+
+ ///\name Sample statistics
+ //\{
+ /// Sample size
+ uint32_t Count () const { return m_size; }
+ /// Minimum
+ T Min () const { return m_min; }
+ /// Maximum
+ T Max () const { return m_max; }
+ /// Sample average
+ double Avg () const { return m_varianceCalculator.getMean ();}
+ /// Estimate of mean, alias to Avg
+ double Mean () const { return Avg (); }
+ /// Unbiased estimate of variance
+ double Var () const { return m_varianceCalculator.getVariance ();}
+ /// Standard deviation
+ double Stddev () const { return std::sqrt (Var ()); }
+ //\}
+
+ /**
+ * \name Error of the mean estimates
+ *
+ * Note that estimates are valid for
+ * - uncorrelated measurements,
+ * - normal distribution and
+ * - large enough sample size.
+ */
+ //\{
+ /// Margin of error of the mean for 90% confidence level
+ double Error90 () const { return 1.645 * std::sqrt (Var () / Count ()); }
+ /// Margin of error of the mean for 95% confidence level
+ double Error95 () const { return 1.960 * std::sqrt (Var () / Count ()); }
+ /// Margin of error of the mean for 99% confidence level
+ double Error99 () const { return 2.576 * std::sqrt (Var () / Count ()); }
+ //\}
+
+private:
+ uint32_t m_size;
+ T m_min, m_max;
+ MinMaxAvgTotalCalculator<double> m_varianceCalculator;
+};
+
+/// Print avg (err) [min, max]
+template <typename T>
+std::ostream & operator<< (std::ostream & os, Average<T> const & x)
+{
+ if (x.Count () != 0)
+ os << x.Avg () << " (" << x.Stddev () << ") [" << x.Min () << ", " << x.Max () << "]";
+ else
+ os << "NA"; // not available
+ return os;
+}
+}
+#endif /* AVERAGE_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/stats/model/gnuplot.cc Wed Jul 24 13:20:24 2013 +0200
@@ -0,0 +1,732 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2007 INRIA, 2008 Timo Bingmann
+ *
+ * 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
+ *
+ * Original Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
+ * Enhancements: Timo Bingmann <timo.bingmann@student.kit.edu>
+ */
+#include "gnuplot.h"
+#include "ns3/assert.h"
+#include <ostream>
+#include <stdexcept>
+
+namespace ns3 {
+
+// --- GnuplotDataset::Data ------------------------------------------------ //
+
+struct GnuplotDataset::Data
+{
+ // *** Data Variables ***
+
+ unsigned int m_references;
+
+ std::string m_title;
+ std::string m_extra;
+
+ /**
+ * Initializes the reference counter to 1 and sets m_title and m_extra.
+ */
+ Data(const std::string& title);
+
+ /// Required.
+ virtual ~Data();
+
+ /**
+ * Returns "plot" or "splot".
+ */
+ virtual std::string GetCommand () const = 0;
+
+ /**
+ * Prints the plot description used as argument to (s)plot. Either the
+ * function expression or a datafile description. Should include m_title and
+ * m_extra in the output.
+ */
+ virtual void PrintExpression (std::ostream &os) const = 0;
+
+ /**
+ * Print the inline data file contents trailing the plot command. Empty for
+ * functions.
+ */
+ virtual void PrintDatafile (std::ostream &os) const = 0;
+};
+
+GnuplotDataset::Data::Data(const std::string& title)
+ : m_references (1),
+ m_title (title),
+ m_extra (m_defaultExtra)
+{
+}
+
+GnuplotDataset::Data::~Data()
+{
+}
+
+// --- GnuplotDataset ------------------------------------------------------ //
+
+std::string GnuplotDataset::m_defaultExtra = "";
+
+GnuplotDataset::GnuplotDataset (struct Data* data)
+ : m_data (data)
+{
+}
+
+GnuplotDataset::GnuplotDataset (const GnuplotDataset& original)
+ : m_data (original.m_data)
+{
+ ++m_data->m_references;
+}
+
+GnuplotDataset::~GnuplotDataset()
+{
+ if (--m_data->m_references == 0)
+ delete m_data;
+}
+
+GnuplotDataset& GnuplotDataset::operator= (const GnuplotDataset& original)
+{
+ if (this != &original)
+ {
+ if (--m_data->m_references == 0)
+ delete m_data;
+
+ m_data = original.m_data;
+ ++m_data->m_references;
+ }
+ return *this;
+}
+
+void
+GnuplotDataset::SetTitle (const std::string& title)
+{
+ m_data->m_title = title;
+}
+
+void
+GnuplotDataset::SetDefaultExtra (const std::string& extra)
+{
+ m_defaultExtra = extra;
+}
+void
+GnuplotDataset::SetExtra (const std::string& extra)
+{
+ m_data->m_extra = extra;
+}
+
+// --- Gnuplot2dDataset::Data2d -------------------------------------------- //
+
+struct Gnuplot2dDataset::Data2d : public GnuplotDataset::Data
+{
+ // *** Data Variables ***
+
+ enum Style m_style;
+ enum ErrorBars m_errorBars;
+
+ PointSet m_pointset;
+
+ /**
+ * Initializes with the values from m_defaultStyle and m_defaultErrorBars.
+ */
+ Data2d(const std::string& title);
+
+ virtual std::string GetCommand () const;
+ virtual void PrintExpression (std::ostream &os) const;
+ virtual void PrintDatafile (std::ostream &os) const;
+};
+
+Gnuplot2dDataset::Data2d::Data2d(const std::string& title)
+ : Data (title),
+ m_style (m_defaultStyle),
+ m_errorBars (m_defaultErrorBars)
+{
+}
+
+std::string
+Gnuplot2dDataset::Data2d::GetCommand () const
+{
+ return "plot";
+}
+
+void
+Gnuplot2dDataset::Data2d::PrintExpression (std::ostream &os) const
+{
+ os << "'-' ";
+
+ if (m_title.size ())
+ os << " title '" << m_title << "'";
+
+ switch (m_style) {
+ case LINES:
+ os << " with lines";
+ break;
+ case POINTS:
+ switch (m_errorBars)
+ {
+ case NONE:
+ os << " with points";
+ break;
+ case X:
+ os << " with xerrorbars";
+ break;
+ case Y:
+ os << " with yerrorbars";
+ break;
+ case XY:
+ os << " with xyerrorbars";
+ break;
+ }
+ break;
+ case LINES_POINTS:
+ switch (m_errorBars)
+ {
+ case NONE:
+ os << " with linespoints";
+ break;
+ case X:
+ os << " with errorlines";
+ break;
+ case Y:
+ os << " with yerrorlines";
+ break;
+ case XY:
+ os << " with xyerrorlines";
+ break;
+ }
+ break;
+ case DOTS:
+ os << " with dots";
+ break;
+ case IMPULSES:
+ os << " with impulses";
+ break;
+ case STEPS:
+ os << " with steps";
+ break;
+ case FSTEPS:
+ os << " with fsteps";
+ break;
+ case HISTEPS:
+ os << " with histeps";
+ break;
+ }
+
+ if (m_extra.size ())
+ os << " " << m_extra;
+}
+
+void
+Gnuplot2dDataset::Data2d::PrintDatafile (std::ostream &os) const
+{
+ for (PointSet::const_iterator i = m_pointset.begin ();
+ i != m_pointset.end (); ++i)
+ {
+ if (i->empty) {
+ os << std::endl;
+ continue;
+ }
+
+ switch (m_errorBars) {
+ case NONE:
+ os << i->x << " " << i->y << std::endl;
+ break;
+ case X:
+ os << i->x << " " << i->y << " " << i->dx << std::endl;
+ break;
+ case Y:
+ os << i->x << " " << i->y << " " << i->dy << std::endl;
+ break;
+ case XY:
+ os << i->x << " " << i->y << " " << i->dx << " " << i->dy << std::endl;
+ break;
+ }
+ }
+ os << "e" << std::endl;
+}
+
+// --- Gnuplot2dDataset ---------------------------------------------------- //
+
+enum Gnuplot2dDataset::Style Gnuplot2dDataset::m_defaultStyle = LINES;
+enum Gnuplot2dDataset::ErrorBars Gnuplot2dDataset::m_defaultErrorBars = NONE;
+
+Gnuplot2dDataset::Gnuplot2dDataset (const std::string& title)
+ : GnuplotDataset ( new Data2d (title) )
+{
+}
+
+void
+Gnuplot2dDataset::SetDefaultStyle (enum Style style)
+{
+ m_defaultStyle = style;
+}
+void
+Gnuplot2dDataset::SetStyle (enum Style style)
+{
+ reinterpret_cast<Data2d*>(m_data)->m_style = style;
+}
+
+void
+Gnuplot2dDataset::SetDefaultErrorBars (enum ErrorBars errorBars)
+{
+ m_defaultErrorBars = errorBars;
+}
+void
+Gnuplot2dDataset::SetErrorBars (enum ErrorBars errorBars)
+{
+ reinterpret_cast<Data2d*>(m_data)->m_errorBars = errorBars;
+}
+
+void
+Gnuplot2dDataset::Add (double x, double y)
+{
+ NS_ASSERT (reinterpret_cast<Data2d*>(m_data)->m_errorBars == NONE);
+
+ struct Point data;
+ data.empty = false;
+ data.x = x;
+ data.y = y;
+ data.dx = 0.0;
+ data.dy = 0.0;
+ reinterpret_cast<Data2d*>(m_data)->m_pointset.push_back (data);
+}
+
+void
+Gnuplot2dDataset::Add (double x, double y, double errorDelta)
+{
+ NS_ASSERT ( reinterpret_cast<Data2d*>(m_data)->m_errorBars == X ||
+ reinterpret_cast<Data2d*>(m_data)->m_errorBars == Y );
+
+ struct Point data;
+ data.empty = false;
+ data.x = x;
+ data.y = y;
+ data.dx = errorDelta;
+ data.dy = errorDelta;
+ reinterpret_cast<Data2d*>(m_data)->m_pointset.push_back (data);
+}
+
+void
+Gnuplot2dDataset::Add (double x, double y, double xErrorDelta, double yErrorDelta)
+{
+ NS_ASSERT ( reinterpret_cast<Data2d*>(m_data)->m_errorBars == XY );
+
+ struct Point data;
+ data.empty = false;
+ data.x = x;
+ data.y = y;
+ data.dx = xErrorDelta;
+ data.dy = yErrorDelta;
+ reinterpret_cast<Data2d*>(m_data)->m_pointset.push_back (data);
+}
+
+void
+Gnuplot2dDataset::AddEmptyLine ()
+{
+ struct Point data;
+ data.empty = true;
+ reinterpret_cast<Data2d*>(m_data)->m_pointset.push_back (data);
+}
+
+// --- Gnuplot2dFunction::Function2d --------------------------------------- //
+
+struct Gnuplot2dFunction::Function2d : public GnuplotDataset::Data
+{
+ // *** Data Variables ***
+
+ std::string m_function;
+
+ /**
+ * Initializes with the function and title.
+ */
+ Function2d(const std::string& title, const std::string& function);
+
+ virtual std::string GetCommand () const;
+ virtual void PrintExpression (std::ostream &os) const;
+ virtual void PrintDatafile (std::ostream &os) const;
+};
+
+Gnuplot2dFunction::Function2d::Function2d(const std::string& title, const std::string& function)
+ : Data (title),
+ m_function (function)
+{
+}
+
+std::string
+Gnuplot2dFunction::Function2d::GetCommand () const
+{
+ return "plot";
+}
+
+void
+Gnuplot2dFunction::Function2d::PrintExpression (std::ostream &os) const
+{
+ os << m_function;
+
+ if (m_title.size ())
+ os << " title '" << m_title << "'";
+
+ if (m_extra.size ())
+ os << " " << m_extra;
+}
+
+void
+Gnuplot2dFunction::Function2d::PrintDatafile (std::ostream &os) const
+{
+}
+
+// --- Gnuplot2dFunction --------------------------------------------------- //
+
+Gnuplot2dFunction::Gnuplot2dFunction (const std::string& title, const std::string& function)
+ : GnuplotDataset ( new Function2d (title, function) )
+{
+}
+
+void
+Gnuplot2dFunction::SetFunction (const std::string& function)
+{
+ reinterpret_cast<Function2d*>(m_data)->m_function = function;
+}
+
+// --- Gnuplot3dDataset::Data3d -------------------------------------------- //
+
+struct Gnuplot3dDataset::Data3d : public GnuplotDataset::Data
+{
+ // *** Data Variables ***
+
+ std::string m_style;
+
+ PointSet m_pointset;
+
+ /**
+ * Initializes with value from m_defaultStyle.
+ */
+ Data3d(const std::string& title);
+
+ virtual std::string GetCommand () const;
+ virtual void PrintExpression (std::ostream &os) const;
+ virtual void PrintDatafile (std::ostream &os) const;
+};
+
+Gnuplot3dDataset::Data3d::Data3d(const std::string& title)
+ : Data (title),
+ m_style (m_defaultStyle)
+{
+}
+
+std::string
+Gnuplot3dDataset::Data3d::GetCommand () const
+{
+ return "splot";
+}
+
+void
+Gnuplot3dDataset::Data3d::PrintExpression (std::ostream &os) const
+{
+ os << "'-' ";
+
+ if (m_style.size ())
+ os << " " << m_style;
+
+ if (m_title.size ())
+ os << " title '" << m_title << "'";
+
+ if (m_extra.size ())
+ os << " " << m_extra;
+}
+
+void
+Gnuplot3dDataset::Data3d::PrintDatafile (std::ostream &os) const
+{
+ for (PointSet::const_iterator i = m_pointset.begin ();
+ i != m_pointset.end (); ++i)
+ {
+ if (i->empty) {
+ os << std::endl;
+ continue;
+ }
+
+ os << i->x << " " << i->y << " " << i->z << std::endl;
+ }
+ os << "e" << std::endl;
+}
+
+// --- Gnuplot3dDataset ---------------------------------------------------- //
+
+std::string Gnuplot3dDataset::m_defaultStyle = "";
+
+Gnuplot3dDataset::Gnuplot3dDataset (const std::string& title)
+ : GnuplotDataset ( new Data3d (title) )
+{
+}
+
+void
+Gnuplot3dDataset::SetDefaultStyle (const std::string& style)
+{
+ m_defaultStyle = style;
+}
+void
+Gnuplot3dDataset::SetStyle (const std::string& style)
+{
+ reinterpret_cast<Data3d*>(m_data)->m_style = style;
+}
+
+void
+Gnuplot3dDataset::Add (double x, double y, double z)
+{
+ struct Point data;
+ data.empty = false;
+ data.x = x;
+ data.y = y;
+ data.z = z;
+ reinterpret_cast<Data3d*>(m_data)->m_pointset.push_back (data);
+}
+
+void
+Gnuplot3dDataset::AddEmptyLine ()
+{
+ struct Point data;
+ data.empty = true;
+ reinterpret_cast<Data3d*>(m_data)->m_pointset.push_back (data);
+}
+
+// --- Gnuplot3dFunction::Function3d --------------------------------------- //
+
+struct Gnuplot3dFunction::Function3d : public GnuplotDataset::Data
+{
+ // *** Data Variables ***
+
+ std::string m_function;
+
+ /**
+ * Initializes with the function and title.
+ */
+ Function3d(const std::string& title, const std::string& function);
+
+ virtual std::string GetCommand () const;
+ virtual void PrintExpression (std::ostream &os) const;
+ virtual void PrintDatafile (std::ostream &os) const;
+};
+
+Gnuplot3dFunction::Function3d::Function3d(const std::string& title, const std::string& function)
+ : Data (title),
+ m_function (function)
+{
+}
+
+std::string
+Gnuplot3dFunction::Function3d::GetCommand () const
+{
+ return "splot";
+}
+
+void
+Gnuplot3dFunction::Function3d::PrintExpression (std::ostream &os) const
+{
+ os << m_function;
+
+ if (m_title.size ())
+ os << " title '" << m_title << "'";
+
+ if (m_extra.size ())
+ os << " " << m_extra;
+}
+
+void
+Gnuplot3dFunction::Function3d::PrintDatafile (std::ostream &os) const
+{
+}
+
+// --- Gnuplot3dFunction --------------------------------------------------- //
+
+Gnuplot3dFunction::Gnuplot3dFunction (const std::string& title, const std::string& function)
+ : GnuplotDataset ( new Function3d (title, function) )
+{
+}
+
+void
+Gnuplot3dFunction::SetFunction (const std::string& function)
+{
+ reinterpret_cast<Function3d*>(m_data)->m_function = function;
+}
+
+// ------------------------------------------------------------------------- //
+
+Gnuplot::Gnuplot (const std::string& outputFilename, const std::string& title)
+ : m_outputFilename (outputFilename),
+ m_terminal ( DetectTerminal (outputFilename) ),
+ m_title (title)
+{
+}
+
+std::string Gnuplot::DetectTerminal (const std::string& filename)
+{
+ std::string::size_type dotpos = filename.rfind ('.');
+ if (dotpos == std::string::npos) return "";
+
+ if (filename.substr (dotpos) == ".png") {
+ return "png";
+ }
+ else if (filename.substr (dotpos) == ".pdf") {
+ return "pdf";
+ }
+
+ return "";
+}
+
+void
+Gnuplot::SetTerminal (const std::string& terminal)
+{
+ m_terminal = terminal;
+}
+
+void
+Gnuplot::SetTitle (const std::string& title)
+{
+ m_title = title;
+}
+
+void
+Gnuplot::SetLegend (const std::string& xLegend, const std::string& yLegend)
+{
+ m_xLegend = xLegend;
+ m_yLegend = yLegend;
+}
+
+void
+Gnuplot::SetExtra (const std::string& extra)
+{
+ m_extra = extra;
+}
+
+void
+Gnuplot::AppendExtra (const std::string& extra)
+{
+ m_extra += "\n";
+ m_extra += extra;
+}
+
+void
+Gnuplot::AddDataset (const GnuplotDataset& dataset)
+{
+ m_datasets.push_back (dataset);
+}
+
+void
+Gnuplot::GenerateOutput (std::ostream &os) const
+{
+ if (m_terminal.size ())
+ os << "set terminal " << m_terminal << std::endl;
+
+ if (m_outputFilename.size ())
+ os << "set output '" << m_outputFilename << "'" << std::endl;
+
+ if (m_title.size ())
+ os << "set title '" << m_title << "'" << std::endl;
+
+ if (m_xLegend.size ())
+ os << "set xlabel '" << m_xLegend << "'" << std::endl;
+
+ if (m_yLegend.size ())
+ os << "set ylabel '" << m_yLegend << "'" << std::endl;
+
+ if (m_extra.size ())
+ os << m_extra << std::endl;
+
+ if (m_datasets.empty ())
+ return;
+
+ // Determine the GetCommand() values of all datasets included. Check that all
+ // are equal and print the command.
+
+ std::string command = m_datasets.begin ()->m_data->GetCommand ();
+
+ for (Datasets::const_iterator i = m_datasets.begin () + 1;
+ i != m_datasets.end (); ++i)
+ {
+ NS_ASSERT_MSG (command == i->m_data->GetCommand (),
+ "Cannot mix 'plot' and 'splot' GnuplotDatasets.");
+ }
+
+ os << command << " ";
+
+ // Print all dataset expressions
+
+ for (Datasets::const_iterator i = m_datasets.begin (); i != m_datasets.end ();)
+ {
+ i->m_data->PrintExpression (os);
+
+ i++;
+
+ if (i != m_datasets.end ())
+ {
+ os << ", ";
+ }
+ }
+ os << std::endl;
+
+ // followed by the inline datafile.
+
+ for (Datasets::const_iterator i = m_datasets.begin (); i != m_datasets.end (); i++)
+ {
+ i->m_data->PrintDatafile (os);
+ }
+}
+
+// ------------------------------------------------------------------------- //
+
+GnuplotCollection::GnuplotCollection (const std::string& outputFilename)
+ : m_outputFilename (outputFilename),
+ m_terminal ( Gnuplot::DetectTerminal (outputFilename) )
+{
+}
+
+void
+GnuplotCollection::SetTerminal (const std::string& terminal)
+{
+ m_terminal = terminal;
+}
+
+void
+GnuplotCollection::AddPlot (const Gnuplot& plot)
+{
+ m_plots.push_back (plot);
+}
+
+Gnuplot&
+GnuplotCollection::GetPlot (unsigned int id)
+{
+ if (id >= m_plots.size ())
+ throw(std::range_error ("Gnuplot id is out of range"));
+ else
+ return m_plots[id];
+}
+
+void
+GnuplotCollection::GenerateOutput (std::ostream &os) const
+{
+ if (m_terminal.size ())
+ os << "set terminal " << m_terminal << std::endl;
+
+ if (m_outputFilename.size ())
+ os << "set output '" << m_outputFilename << "'" << std::endl;
+
+ for (Plots::const_iterator i = m_plots.begin (); i != m_plots.end (); ++i)
+ {
+ i->GenerateOutput (os);
+ }
+}
+
+// ------------------------------------------------------------------------- //
+
+} // namespace ns3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/stats/model/gnuplot.h Wed Jul 24 13:20:24 2013 +0200
@@ -0,0 +1,462 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2007 INRIA, 2008 Timo Bingmann
+ *
+ * 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
+ *
+ * Original Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
+ * Enhancements: Timo Bingmann <timo.bingmann@student.kit.edu>
+ */
+#ifndef GNUPLOT_H
+#define GNUPLOT_H
+
+#include <string>
+#include <vector>
+#include <utility>
+
+namespace ns3 {
+
+/**
+ * \ingroup tools
+ *
+ * \brief Abstract class to store a plot line to be used by ns3::Gnuplot.
+ *
+ * This class contains a reference counted data object in m_data. The data
+ * object contains different structs derived from struct Data by subclasses.
+ */
+class GnuplotDataset
+{
+public:
+
+ /**
+ * Reference-counting copy constructor.
+ */
+ GnuplotDataset (const GnuplotDataset& original);
+
+ /**
+ * Reference-counting destructor.
+ */
+ ~GnuplotDataset();
+
+ /**
+ * Reference-counting assignment operator.
+ */
+ GnuplotDataset& operator= (const GnuplotDataset& original);
+
+ /**
+ * \brief Change line title.
+ * \param title the new title string to use for this dataset.
+ */
+ void SetTitle (const std::string& title);
+
+ /**
+ * \brief Change extra formatting style parameters for newly created objects.
+ * \param extra extra formatting
+ */
+ static void SetDefaultExtra (const std::string& extra);
+
+ /**
+ * \brief Add extra formatting parameters to this dataset.
+ * \param extra extra formatting
+ */
+ void SetExtra (const std::string& extra);
+
+protected:
+
+ /// Friend because it accesses m_data and it's virtual functions directly in
+ /// GenerateOutput().
+ friend class Gnuplot;
+
+ /**
+ * \brief Extra gnuplot parameters set on every newly created dataset.
+ */
+ static std::string m_defaultExtra;
+
+ /**
+ * \brief Derived classes subclass this struct and add their own data fields.
+ */
+ struct Data;
+
+ /**
+ * Called by constructors of derived classes.
+ * \param data the reference counted data object representing this dataset.
+ */
+ GnuplotDataset (struct Data* data);
+
+ /**
+ * Reference counted data object.
+ */
+ struct Data* m_data;
+};
+
+/**
+ * \brief Class to represent a 2D points plot. Set the line or points style
+ * using SetStyle() and set points using Add().
+ */
+class Gnuplot2dDataset : public GnuplotDataset
+{
+public:
+ /**
+ * The plotting style to use for this dataset.
+ */
+ enum Style {
+ LINES,
+ POINTS,
+ LINES_POINTS,
+ DOTS,
+ IMPULSES,
+ STEPS,
+ FSTEPS,
+ HISTEPS,
+ };
+
+ /**
+ * Whether errorbars should be used for this dataset.
+ */
+ enum ErrorBars {
+ NONE,
+ X,
+ Y,
+ XY
+ };
+
+ /**
+ * \param title the title to be associated to this dataset.
+ *
+ * Create an empty dataset. Usually, the dataset's title is
+ * displayed in the legend box.
+ */
+ Gnuplot2dDataset (const std::string& title = "Untitled");
+
+ /**
+ * Change default style for all newly created objects.
+ * \param style the style of plotting to use for newly created datasets.
+ */
+ static void SetDefaultStyle (enum Style style);
+
+ /**
+ * \param style the style of plotting to use for this dataset.
+ */
+ void SetStyle (enum Style style);
+
+ /**
+ * Change default errorbars style for all newly created objects.
+ * \param errorBars the style of errorbars to use for newly created datasets.
+ */
+ static void SetDefaultErrorBars (enum ErrorBars errorBars);
+
+ /**
+ * \param errorBars the style of errorbars to display.
+ *
+ * If you use any style other than none, you need
+ * to make sure you store the delta information in
+ * this dataset with the right GnuplotDataset::Add
+ * method.
+ */
+ void SetErrorBars (enum ErrorBars errorBars);
+
+ /**
+ * \param x x coord to new data point
+ * \param y y coord to new data point
+ *
+ * Use this method with error bar style NONE.
+ */
+ void Add (double x, double y);
+
+ /**
+ * \param x x coord to new data point
+ * \param y y coord to new data point
+ * \param errorDelta x and y data point uncertainty
+ *
+ * Use this method with error bar style X or Y.
+ */
+ void Add (double x, double y, double errorDelta);
+
+ /**
+ * \param x x coord to new data point
+ * \param y y coord to new data point
+ * \param xErrorDelta x data point uncertainty
+ * \param yErrorDelta y data point uncertainty
+ *
+ * Use this method with error bar style XY.
+ */
+ void Add (double x, double y, double xErrorDelta, double yErrorDelta);
+
+ /**
+ * Add an empty line in the data output sequence. Empty lines in the plot
+ * data break continuous lines and do other things in the output.
+ */
+ void AddEmptyLine ();
+
+private:
+
+ struct Point {
+ bool empty;
+ double x;
+ double y;
+ double dx;
+ double dy;
+ };
+
+ typedef std::vector<struct Point> PointSet;
+
+ static enum Style m_defaultStyle;
+ static enum ErrorBars m_defaultErrorBars;
+
+ /// Forward declaration of the internal data class.
+ struct Data2d;
+};
+
+/**
+ * \brief Class to represent a 2D function expression plot.
+ *
+ * Since the function expression is not escaped, styles and extras could just
+ * as well be included in the expression string.
+ */
+class Gnuplot2dFunction : public GnuplotDataset
+{
+public:
+ /**
+ * \param title the title to be associated to this dataset.
+ * \param function function to plot
+ *
+ * Create an function dataset. Usually, the dataset's title is displayed in
+ * the legend box.
+ */
+ Gnuplot2dFunction (const std::string& title = "Untitled", const std::string& function = "");
+
+ /**
+ * \param function new function string to set
+ */
+ void SetFunction (const std::string& function);
+
+private:
+
+ /// Forward declaration of the internal data class.
+ struct Function2d;
+};
+
+/**
+ * \brief Class to represent a 3D points plot. Set the line or points style
+ * using SetStyle() and set points using Add().
+ */
+class Gnuplot3dDataset : public GnuplotDataset
+{
+public:
+ /**
+ * \param title the title to be associated to this dataset.
+ *
+ * Create an empty dataset. Usually, the dataset's title is
+ * displayed in the legend box.
+ */
+ Gnuplot3dDataset (const std::string& title = "Untitled");
+
+ /**
+ * Change default style for all newly created objects.
+ * \param style the style of plotting to use for newly created datasets.
+ */
+ static void SetDefaultStyle (const std::string& style);
+
+ /**
+ * \param style the style of plotting to use for this dataset.
+ */
+ void SetStyle (const std::string& style);
+
+ /**
+ * \param x x coord to new data point
+ * \param y y coord to new data point
+ * \param z z coord to new data point
+ *
+ * Use this method to add a new 3D point
+ */
+ void Add (double x, double y, double z);
+
+ /**
+ * Add an empty line in the data output sequence. Empty lines in the plot
+ * data break continuous lines and do other things in the output.
+ */
+ void AddEmptyLine ();
+
+private:
+
+ struct Point {
+ bool empty;
+ double x, y, z;
+ };
+
+ typedef std::vector<struct Point> PointSet;
+
+ static std::string m_defaultStyle;
+
+ /// Forward declaration of the internal data class.
+ struct Data3d;
+};
+
+/**
+ * \brief Class to represent a 3D function expression plot.
+ *
+ * Since the function expression is not escaped, styles and extras could just as
+ * well be included in the expression string. The only difference to
+ * Gnuplot2dFunction is the splot command string.
+ */
+class Gnuplot3dFunction : public GnuplotDataset
+{
+public:
+ /**
+ * \param title the title to be associated to this dataset.
+ * \param function function to plot
+ *
+ * Create an function dataset. Usually, the dataset's title is displayed in
+ * the legend box.
+ */
+ Gnuplot3dFunction (const std::string& title = "Untitled", const std::string& function = "");
+
+ /**
+ * \param function new function string to set
+ */
+ void SetFunction (const std::string& function);
+
+private:
+
+ /// Forward declaration of the internal data class.
+ struct Function3d;
+};
+
+/**
+ * \brief a simple class to generate gnuplot-ready plotting commands
+ * from a set of datasets.
+ *
+ * This class really represents a single graph on which multiple datasets
+ * can be plotted.
+ */
+class Gnuplot
+{
+public:
+ /**
+ * \param outputFilename the name of the file where the rendering of the
+ * graph will be generated if you feed the command stream output by
+ * Gnuplot::GenerateOutput to the gnuplot program.
+ * \param title title line of the plot page
+ */
+ Gnuplot (const std::string& outputFilename="", const std::string& title = "");
+
+ /**
+ * Crude attempt to auto-detect the correct terminal setting by inspecting
+ * the filename's extension.
+ * \param filename output file name
+ */
+ static std::string DetectTerminal (const std::string& filename);
+
+ /**
+ * \param terminal terminal setting string for output. The default terminal
+ * string is "png"
+ */
+ void SetTerminal (const std::string& terminal);
+
+ /**
+ * \param title set new plot title string to use for this plot.
+ */
+ void SetTitle (const std::string& title);
+
+ /**
+ * \param xLegend the legend for the x horizontal axis
+ * \param yLegend the legend for the y vertical axis
+ */
+ void SetLegend (const std::string& xLegend, const std::string& yLegend);
+
+ /**
+ * \param extra set extra gnuplot directive for output.
+ */
+ void SetExtra (const std::string& extra);
+
+ /**
+ * \param extra append extra gnuplot directive for output.
+ */
+ void AppendExtra (const std::string& extra);
+
+ /**
+ * \param dataset add a dataset to the graph to be plotted.
+ */
+ void AddDataset (const GnuplotDataset& dataset);
+
+ /**
+ * \param os the output stream on which the relevant gnuplot commands should
+ * be generated. Including output file and terminal headers.
+ */
+ void GenerateOutput (std::ostream &os) const;
+
+private:
+ typedef std::vector<GnuplotDataset> Datasets;
+
+ std::string m_outputFilename;
+ std::string m_terminal;
+
+ Datasets m_datasets;
+
+ std::string m_title;
+ std::string m_xLegend;
+ std::string m_yLegend;
+ std::string m_extra;
+};
+
+/**
+ * \brief a simple class to group together multiple gnuplots into one file,
+ * e.g. for PDF multi-page output terminals.
+ */
+class GnuplotCollection
+{
+public:
+ /**
+ * \param outputFilename the name of the file where the rendering of the
+ * graph will be generated if you feed the command stream output by
+ * GnuplotCollection::GenerateOutput to the gnuplot program.
+ */
+ GnuplotCollection (const std::string& outputFilename);
+
+ /**
+ * \param terminal terminal setting string for output. The default terminal
+ * string is guessed from the output filename's extension.
+ */
+ void SetTerminal (const std::string& terminal);
+
+ /**
+ * \param plot add a plot to the collection to be plotted.
+ */
+ void AddPlot (const Gnuplot& plot);
+
+ /**
+ * Return a pointer to one of the added plots.
+ * \param id index of plot to return
+ * \return reference to plot, throws std::range_error if it does not exist.
+ */
+ Gnuplot& GetPlot (unsigned int id);
+
+ /**
+ * \param os the output stream on which the relevant gnuplot commands should
+ * be generated.
+ */
+ void GenerateOutput (std::ostream &os) const;
+
+private:
+ typedef std::vector<Gnuplot> Plots;
+
+ std::string m_outputFilename;
+ std::string m_terminal;
+
+ Plots m_plots;
+};
+
+} // namespace ns3
+
+#endif /* GNUPLOT_H */
--- a/src/stats/model/omnet-data-output.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/stats/model/omnet-data-output.cc Wed Jul 24 13:20:24 2013 +0200
@@ -90,7 +90,7 @@
std::string fn = m_filePrefix +"-"+dc.GetRunLabel ()+ ".sca";
scalarFile.open (fn.c_str (), std::ios_base::out);
- // TODO add timestamp to the runlevel
+ /// \todo add timestamp to the runlevel
scalarFile << "run " << dc.GetRunLabel () << std::endl;
scalarFile << "attr experiment \"" << dc.GetExperimentLabel ()
<< "\"" << std::endl;
--- a/src/stats/model/sqlite-data-output.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/stats/model/sqlite-data-output.cc Wed Jul 24 13:20:24 2013 +0200
@@ -106,7 +106,7 @@
NS_LOG_ERROR ("Could not open sqlite3 database \"" << m_dbFile << "\"");
NS_LOG_ERROR ("sqlite3 error \"" << sqlite3_errmsg (m_db) << "\"");
sqlite3_close (m_db);
- // TODO: Better error reporting, management!
+ /// \todo Better error reporting, management!
return;
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/stats/test/average-test-suite.cc Wed Jul 24 13:20:24 2013 +0200
@@ -0,0 +1,251 @@
+/* -*- 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
+ *
+ * Author: Mitch Watrous (watrous@u.washington.edu)
+ */
+
+#include <cmath>
+
+#include "ns3/test.h"
+#include "ns3/average.h"
+
+using namespace ns3;
+
+const double TOLERANCE = 1e-14;
+
+// ===========================================================================
+// Test case for a single integer.
+// ===========================================================================
+
+class OneIntegerAverageTestCase : public TestCase
+{
+public:
+ OneIntegerAverageTestCase ();
+ virtual ~OneIntegerAverageTestCase ();
+
+private:
+ virtual void DoRun (void);
+};
+
+OneIntegerAverageTestCase::OneIntegerAverageTestCase ()
+ : TestCase ("Average Object Test using One Integer")
+
+{
+}
+
+OneIntegerAverageTestCase::~OneIntegerAverageTestCase ()
+{
+}
+
+void
+OneIntegerAverageTestCase::DoRun (void)
+{
+ Average<int> calculator;
+
+ long count = 1;
+
+ double sum = 0;
+ double sqrSum = 0;
+ double min;
+ double max;
+ double mean;
+ double stddev;
+ double variance;
+
+ // Put all of the values into the calculator.
+ int multiple = 5;
+ int value;
+ for (long i = 0; i < count; i++)
+ {
+ value = multiple * (i + 1);
+
+ calculator.Update (value);
+
+ sum += value;
+ sqrSum += value * value;
+ }
+
+ // Calculate the expected values for the statistical functions.
+ min = multiple;
+ max = multiple * count;
+ mean = sum / count;
+ variance = 0;
+ stddev = std::sqrt (variance);
+
+ // Test the calculator.
+ NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Count (), count, TOLERANCE, "Count value wrong");
+ NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Min (), min, TOLERANCE, "Min value wrong");
+ NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Max (), max, TOLERANCE, "Max value wrong");
+ NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Mean (), mean, TOLERANCE, "Mean value wrong");
+ NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Stddev (), stddev, TOLERANCE, "Stddev value wrong");
+ NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Var (), variance, TOLERANCE, "Variance value wrong");
+}
+
+
+// ===========================================================================
+// Test case for five integers.
+// ===========================================================================
+
+class FiveIntegersAverageTestCase : public TestCase
+{
+public:
+ FiveIntegersAverageTestCase ();
+ virtual ~FiveIntegersAverageTestCase ();
+
+private:
+ virtual void DoRun (void);
+};
+
+FiveIntegersAverageTestCase::FiveIntegersAverageTestCase ()
+ : TestCase ("Average Object Test using Five Integers")
+
+{
+}
+
+FiveIntegersAverageTestCase::~FiveIntegersAverageTestCase ()
+{
+}
+
+void
+FiveIntegersAverageTestCase::DoRun (void)
+{
+ Average<int> calculator;
+
+ long count = 5;
+
+ double sum = 0;
+ double sqrSum = 0;
+ double min;
+ double max;
+ double mean;
+ double stddev;
+ double variance;
+
+ // Put all of the values into the calculator.
+ int multiple = 5;
+ int value;
+ for (long i = 0; i < count; i++)
+ {
+ value = multiple * (i + 1);
+
+ calculator.Update (value);
+
+ sum += value;
+ sqrSum += value * value;
+ }
+
+ // Calculate the expected values for the statistical functions.
+ min = multiple;
+ max = multiple * count;
+ mean = sum / count;
+ variance = (count * sqrSum - sum * sum) / (count * (count - 1));
+ stddev = std::sqrt (variance);
+
+ // Test the calculator.
+ NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Count (), count, TOLERANCE, "Count value wrong");
+ NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Min (), min, TOLERANCE, "Min value wrong");
+ NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Max (), max, TOLERANCE, "Max value wrong");
+ NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Mean (), mean, TOLERANCE, "Mean value wrong");
+ NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Stddev (), stddev, TOLERANCE, "Stddev value wrong");
+ NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Var (), variance, TOLERANCE, "Variance value wrong");
+}
+
+
+// ===========================================================================
+// Test case for five double values.
+// ===========================================================================
+
+class FiveDoublesAverageTestCase : public TestCase
+{
+public:
+ FiveDoublesAverageTestCase ();
+ virtual ~FiveDoublesAverageTestCase ();
+
+private:
+ virtual void DoRun (void);
+};
+
+FiveDoublesAverageTestCase::FiveDoublesAverageTestCase ()
+ : TestCase ("Average Object Test using Five Double Values")
+
+{
+}
+
+FiveDoublesAverageTestCase::~FiveDoublesAverageTestCase ()
+{
+}
+
+void
+FiveDoublesAverageTestCase::DoRun (void)
+{
+ Average<double> calculator;
+
+ long count = 5;
+
+ double sum = 0;
+ double sqrSum = 0;
+ double min;
+ double max;
+ double mean;
+ double stddev;
+ double variance;
+
+ // Put all of the values into the calculator.
+ double multiple = 3.14;
+ double value;
+ for (long i = 0; i < count; i++)
+ {
+ value = multiple * (i + 1);
+
+ calculator.Update (value);
+
+ sum += value;
+ sqrSum += value * value;
+ }
+
+ // Calculate the expected values for the statistical functions.
+ min = multiple;
+ max = multiple * count;
+ mean = sum / count;
+ variance = (count * sqrSum - sum * sum) / (count * (count - 1));
+ stddev = std::sqrt (variance);
+
+ // Test the calculator.
+ NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Count (), count, TOLERANCE, "Count value wrong");
+ NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Min (), min, TOLERANCE, "Min value wrong");
+ NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Max (), max, TOLERANCE, "Max value wrong");
+ NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Mean (), mean, TOLERANCE, "Mean value wrong");
+ NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Stddev (), stddev, TOLERANCE, "Stddev value wrong");
+ NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Var (), variance, TOLERANCE, "Variance value wrong");
+}
+
+
+class AverageTestSuite : public TestSuite
+{
+public:
+ AverageTestSuite ();
+};
+
+AverageTestSuite::AverageTestSuite ()
+ : TestSuite ("average", UNIT)
+{
+ AddTestCase (new OneIntegerAverageTestCase, TestCase::QUICK);
+ AddTestCase (new FiveIntegersAverageTestCase, TestCase::QUICK);
+ AddTestCase (new FiveDoublesAverageTestCase, TestCase::QUICK);
+}
+
+static AverageTestSuite averageTestSuite;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/stats/test/examples-to-run.py Wed Jul 24 13:20:24 2013 +0200
@@ -0,0 +1,20 @@
+#! /usr/bin/env python
+## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+# 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
+#
+# (example_name, do_run, do_valgrind_run).
+#
+# See test.py for more information.
+cpp_examples = [
+ ("gnuplot-example", "False", "False"),
+]
+
+# A list of Python examples to run in order to ensure that they remain
+# runnable over time. Each tuple in the list contains
+#
+# (example_name, do_run).
+#
+# See test.py for more information.
+python_examples = []
--- a/src/stats/wscript Wed Jul 24 13:19:54 2013 +0200
+++ b/src/stats/wscript Wed Jul 24 13:20:24 2013 +0200
@@ -19,11 +19,14 @@
'model/data-output-interface.cc',
'model/omnet-data-output.cc',
'model/data-collector.cc',
+ 'model/gnuplot.cc',
+ 'helper/delay-jitter-estimation.cc',
]
module_test = bld.create_ns3_module_test_library('stats')
module_test.source = [
'test/basic-data-calculators-test-suite.cc',
+ 'test/average-test-suite.cc',
]
headers = bld(features='ns3header')
@@ -36,6 +39,9 @@
'model/data-output-interface.h',
'model/omnet-data-output.h',
'model/data-collector.h',
+ 'model/gnuplot.h',
+ 'model/average.h',
+ 'helper/delay-jitter-estimation.h',
]
if bld.env['SQLITE_STATS']:
@@ -43,4 +49,7 @@
obj.source.append('model/sqlite-data-output.cc')
obj.use.append('SQLITE3')
+ if (bld.env['ENABLE_EXAMPLES']):
+ bld.recurse('examples')
+
bld.ns3_python_bindings()
--- a/src/tap-bridge/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/tap-bridge/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -88,6 +88,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<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [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'))
## tag.h (module 'network'): ns3::Tag [class]
@@ -210,8 +212,6 @@
module.add_enum('Mode', ['ILLEGAL', 'CONFIGURE_LOCAL', 'USE_LOCAL', 'USE_BRIDGE'], outer_class=root_module['ns3::TapBridge'])
## tap-bridge.h (module 'tap-bridge'): ns3::TapBridgeFdReader [class]
module.add_class('TapBridgeFdReader', parent=root_module['ns3::FdReader'])
- ## 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]
@@ -319,7 +319,6 @@
register_Ns3Packet_methods(root_module, root_module['ns3::Packet'])
register_Ns3TapBridge_methods(root_module, root_module['ns3::TapBridge'])
register_Ns3TapBridgeFdReader_methods(root_module, root_module['ns3::TapBridgeFdReader'])
- 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'])
@@ -1676,6 +1675,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):
@@ -2521,6 +2524,16 @@
'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',
@@ -3516,6 +3529,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',
@@ -3710,13 +3727,6 @@
visibility='private', 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([])
--- a/src/tap-bridge/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/tap-bridge/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -88,6 +88,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<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [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'))
## tag.h (module 'network'): ns3::Tag [class]
@@ -210,8 +212,6 @@
module.add_enum('Mode', ['ILLEGAL', 'CONFIGURE_LOCAL', 'USE_LOCAL', 'USE_BRIDGE'], outer_class=root_module['ns3::TapBridge'])
## tap-bridge.h (module 'tap-bridge'): ns3::TapBridgeFdReader [class]
module.add_class('TapBridgeFdReader', parent=root_module['ns3::FdReader'])
- ## 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]
@@ -319,7 +319,6 @@
register_Ns3Packet_methods(root_module, root_module['ns3::Packet'])
register_Ns3TapBridge_methods(root_module, root_module['ns3::TapBridge'])
register_Ns3TapBridgeFdReader_methods(root_module, root_module['ns3::TapBridgeFdReader'])
- 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'])
@@ -1676,6 +1675,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):
@@ -2521,6 +2524,16 @@
'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',
@@ -3516,6 +3529,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',
@@ -3710,13 +3727,6 @@
visibility='private', 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([])
--- a/src/test/wscript Wed Jul 24 13:19:54 2013 +0200
+++ b/src/test/wscript Wed Jul 24 13:20:24 2013 +0200
@@ -15,7 +15,7 @@
if 'test' in bld.env['MODULES_NOT_BUILT']:
return
- test = bld.create_ns3_module('test', ['internet', 'mobility', 'applications', 'csma', 'bridge', 'config-store', 'tools', 'point-to-point', 'csma-layout', 'flow-monitor', 'wifi'])
+ test = bld.create_ns3_module('test', ['internet', 'mobility', 'applications', 'csma', 'bridge', 'config-store', 'point-to-point', 'csma-layout', 'flow-monitor', 'wifi'])
headers = bld(features='ns3header')
headers.module = 'test'
--- a/src/tools/bindings/callbacks_list.py Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-callback_classes = [
-]
--- a/src/tools/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2921 +0,0 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
-
-
-import pybindgen.settings
-import warnings
-
-class ErrorHandler(pybindgen.settings.ErrorHandler):
- def handle_error(self, wrapper, exception, traceback_):
- warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
- return True
-pybindgen.settings.error_handler = ErrorHandler()
-
-
-import sys
-
-def module_init():
- root_module = Module('ns.tools', cpp_namespace='::ns3')
- return root_module
-
-def register_types(module):
- root_module = module.get_root()
-
- ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList [class]
- 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'])
- ## buffer.h (module 'network'): ns3::Buffer [class]
- module.add_class('Buffer', import_from_module='ns.network')
- ## buffer.h (module 'network'): ns3::Buffer::Iterator [class]
- module.add_class('Iterator', import_from_module='ns.network', outer_class=root_module['ns3::Buffer'])
- ## packet.h (module 'network'): ns3::ByteTagIterator [class]
- module.add_class('ByteTagIterator', import_from_module='ns.network')
- ## packet.h (module 'network'): ns3::ByteTagIterator::Item [class]
- module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::ByteTagIterator'])
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList [class]
- module.add_class('ByteTagList', import_from_module='ns.network')
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator [class]
- module.add_class('Iterator', import_from_module='ns.network', outer_class=root_module['ns3::ByteTagList'])
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item [struct]
- module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::ByteTagList::Iterator'])
- ## callback.h (module 'core'): ns3::CallbackBase [class]
- module.add_class('CallbackBase', import_from_module='ns.core')
- ## data-output-interface.h (module 'stats'): ns3::DataOutputCallback [class]
- module.add_class('DataOutputCallback', allow_subclassing=True, import_from_module='ns.stats')
- ## delay-jitter-estimation.h (module 'tools'): ns3::DelayJitterEstimation [class]
- module.add_class('DelayJitterEstimation')
- ## event-garbage-collector.h (module 'tools'): ns3::EventGarbageCollector [class]
- module.add_class('EventGarbageCollector')
- ## event-id.h (module 'core'): ns3::EventId [class]
- module.add_class('EventId', import_from_module='ns.core')
- ## gnuplot.h (module 'tools'): ns3::Gnuplot [class]
- module.add_class('Gnuplot')
- ## gnuplot.h (module 'tools'): ns3::GnuplotCollection [class]
- module.add_class('GnuplotCollection')
- ## gnuplot.h (module 'tools'): ns3::GnuplotDataset [class]
- module.add_class('GnuplotDataset')
- ## 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]
- module.add_class('ObjectDeleter', import_from_module='ns.core')
- ## object-factory.h (module 'core'): ns3::ObjectFactory [class]
- module.add_class('ObjectFactory', import_from_module='ns.core')
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata [class]
- module.add_class('PacketMetadata', import_from_module='ns.network')
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item [struct]
- module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::PacketMetadata'])
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item [enumeration]
- module.add_enum('', ['PAYLOAD', 'HEADER', 'TRAILER'], outer_class=root_module['ns3::PacketMetadata::Item'], import_from_module='ns.network')
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator [class]
- module.add_class('ItemIterator', import_from_module='ns.network', outer_class=root_module['ns3::PacketMetadata'])
- ## packet.h (module 'network'): ns3::PacketTagIterator [class]
- module.add_class('PacketTagIterator', import_from_module='ns.network')
- ## packet.h (module 'network'): ns3::PacketTagIterator::Item [class]
- module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::PacketTagIterator'])
- ## packet-tag-list.h (module 'network'): ns3::PacketTagList [class]
- 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'])
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [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]
- module.add_class('Simulator', destructor_visibility='private', import_from_module='ns.core')
- ## data-calculator.h (module 'stats'): ns3::StatisticalSummary [class]
- module.add_class('StatisticalSummary', allow_subclassing=True, import_from_module='ns.stats')
- ## tag.h (module 'network'): ns3::Tag [class]
- module.add_class('Tag', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
- ## tag-buffer.h (module 'network'): ns3::TagBuffer [class]
- module.add_class('TagBuffer', import_from_module='ns.network')
- ## type-id.h (module 'core'): ns3::TypeId [class]
- module.add_class('TypeId', import_from_module='ns.core')
- ## type-id.h (module 'core'): ns3::TypeId::AttributeFlag [enumeration]
- module.add_enum('AttributeFlag', ['ATTR_GET', 'ATTR_SET', 'ATTR_CONSTRUCT', 'ATTR_SGC'], outer_class=root_module['ns3::TypeId'], import_from_module='ns.core')
- ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation [struct]
- module.add_class('AttributeInformation', import_from_module='ns.core', outer_class=root_module['ns3::TypeId'])
- ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation [struct]
- module.add_class('TraceSourceInformation', import_from_module='ns.core', outer_class=root_module['ns3::TypeId'])
- ## empty.h (module 'core'): ns3::empty [class]
- module.add_class('empty', import_from_module='ns.core')
- ## int64x64-double.h (module 'core'): ns3::int64x64_t [class]
- module.add_class('int64x64_t', import_from_module='ns.core')
- ## chunk.h (module 'network'): ns3::Chunk [class]
- module.add_class('Chunk', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
- ## gnuplot.h (module 'tools'): ns3::Gnuplot2dDataset [class]
- module.add_class('Gnuplot2dDataset', parent=root_module['ns3::GnuplotDataset'])
- ## gnuplot.h (module 'tools'): ns3::Gnuplot2dDataset::Style [enumeration]
- module.add_enum('Style', ['LINES', 'POINTS', 'LINES_POINTS', 'DOTS', 'IMPULSES', 'STEPS', 'FSTEPS', 'HISTEPS'], outer_class=root_module['ns3::Gnuplot2dDataset'])
- ## gnuplot.h (module 'tools'): ns3::Gnuplot2dDataset::ErrorBars [enumeration]
- module.add_enum('ErrorBars', ['NONE', 'X', 'Y', 'XY'], outer_class=root_module['ns3::Gnuplot2dDataset'])
- ## gnuplot.h (module 'tools'): ns3::Gnuplot2dFunction [class]
- module.add_class('Gnuplot2dFunction', parent=root_module['ns3::GnuplotDataset'])
- ## gnuplot.h (module 'tools'): ns3::Gnuplot3dDataset [class]
- module.add_class('Gnuplot3dDataset', parent=root_module['ns3::GnuplotDataset'])
- ## gnuplot.h (module 'tools'): ns3::Gnuplot3dFunction [class]
- module.add_class('Gnuplot3dFunction', parent=root_module['ns3::GnuplotDataset'])
- ## header.h (module 'network'): ns3::Header [class]
- module.add_class('Header', import_from_module='ns.network', parent=root_module['ns3::Chunk'])
- ## object.h (module 'core'): ns3::Object [class]
- module.add_class('Object', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter >'])
- ## object.h (module 'core'): ns3::Object::AggregateIterator [class]
- module.add_class('AggregateIterator', import_from_module='ns.core', outer_class=root_module['ns3::Object'])
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> > [class]
- module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeAccessor', 'ns3::empty', 'ns3::DefaultDeleter<ns3::AttributeAccessor>'], 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<ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> > [class]
- module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeChecker', 'ns3::empty', 'ns3::DefaultDeleter<ns3::AttributeChecker>'], 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<ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> > [class]
- module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeValue', 'ns3::empty', 'ns3::DefaultDeleter<ns3::AttributeValue>'], 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<ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> > [class]
- module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::CallbackImplBase', 'ns3::empty', 'ns3::DefaultDeleter<ns3::CallbackImplBase>'], 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<ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> > [class]
- module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::EventImpl', 'ns3::empty', 'ns3::DefaultDeleter<ns3::EventImpl>'], 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<ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> > [class]
- module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::NixVector', 'ns3::empty', 'ns3::DefaultDeleter<ns3::NixVector>'], 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<ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> > [class]
- module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Packet', 'ns3::empty', 'ns3::DefaultDeleter<ns3::Packet>'], 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<ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> > [class]
- module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::TraceSourceAccessor', 'ns3::empty', 'ns3::DefaultDeleter<ns3::TraceSourceAccessor>'], 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]
- module.add_class('Time', import_from_module='ns.core')
- ## nstime.h (module 'core'): ns3::Time::Unit [enumeration]
- module.add_enum('Unit', ['S', 'MS', 'US', 'NS', 'PS', 'FS', 'LAST'], outer_class=root_module['ns3::Time'], import_from_module='ns.core')
- ## nstime.h (module 'core'): ns3::Time [class]
- root_module['ns3::Time'].implicitly_converts_to(root_module['ns3::int64x64_t'])
- ## trace-source-accessor.h (module 'core'): ns3::TraceSourceAccessor [class]
- module.add_class('TraceSourceAccessor', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> >'])
- ## trailer.h (module 'network'): ns3::Trailer [class]
- module.add_class('Trailer', import_from_module='ns.network', parent=root_module['ns3::Chunk'])
- ## attribute.h (module 'core'): ns3::AttributeAccessor [class]
- module.add_class('AttributeAccessor', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> >'])
- ## attribute.h (module 'core'): ns3::AttributeChecker [class]
- module.add_class('AttributeChecker', allow_subclassing=False, automatic_type_narrowing=True, import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> >'])
- ## attribute.h (module 'core'): ns3::AttributeValue [class]
- module.add_class('AttributeValue', allow_subclassing=False, automatic_type_narrowing=True, import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> >'])
- ## callback.h (module 'core'): ns3::CallbackChecker [class]
- module.add_class('CallbackChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker'])
- ## callback.h (module 'core'): ns3::CallbackImplBase [class]
- module.add_class('CallbackImplBase', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >'])
- ## callback.h (module 'core'): ns3::CallbackValue [class]
- module.add_class('CallbackValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue'])
- ## data-calculator.h (module 'stats'): ns3::DataCalculator [class]
- module.add_class('DataCalculator', 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'])
- ## attribute.h (module 'core'): ns3::EmptyAttributeValue [class]
- module.add_class('EmptyAttributeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue'])
- ## event-impl.h (module 'core'): ns3::EventImpl [class]
- module.add_class('EventImpl', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> >'])
- ## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<double> [class]
- module.add_class('MinMaxAvgTotalCalculator', import_from_module='ns.stats', template_parameters=['double'], parent=[root_module['ns3::DataCalculator'], root_module['ns3::StatisticalSummary']])
- ## nix-vector.h (module 'network'): ns3::NixVector [class]
- module.add_class('NixVector', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> >'])
- ## object-factory.h (module 'core'): ns3::ObjectFactoryChecker [class]
- 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'])
- ## 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<ns3::Packet> >'])
- ## 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]
- module.add_class('TypeIdChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker'])
- ## type-id.h (module 'core'): ns3::TypeIdValue [class]
- module.add_class('TypeIdValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue'])
-
- ## Register a nested module for the namespace FatalImpl
-
- nested_module = module.add_cpp_namespace('FatalImpl')
- register_types_ns3_FatalImpl(nested_module)
-
-
-def register_types_ns3_FatalImpl(module):
- root_module = module.get_root()
-
-
-def register_methods(root_module):
- register_Ns3AttributeConstructionList_methods(root_module, root_module['ns3::AttributeConstructionList'])
- register_Ns3AttributeConstructionListItem_methods(root_module, root_module['ns3::AttributeConstructionList::Item'])
- register_Ns3Buffer_methods(root_module, root_module['ns3::Buffer'])
- register_Ns3BufferIterator_methods(root_module, root_module['ns3::Buffer::Iterator'])
- register_Ns3ByteTagIterator_methods(root_module, root_module['ns3::ByteTagIterator'])
- register_Ns3ByteTagIteratorItem_methods(root_module, root_module['ns3::ByteTagIterator::Item'])
- register_Ns3ByteTagList_methods(root_module, root_module['ns3::ByteTagList'])
- register_Ns3ByteTagListIterator_methods(root_module, root_module['ns3::ByteTagList::Iterator'])
- register_Ns3ByteTagListIteratorItem_methods(root_module, root_module['ns3::ByteTagList::Iterator::Item'])
- register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase'])
- register_Ns3DataOutputCallback_methods(root_module, root_module['ns3::DataOutputCallback'])
- register_Ns3DelayJitterEstimation_methods(root_module, root_module['ns3::DelayJitterEstimation'])
- register_Ns3EventGarbageCollector_methods(root_module, root_module['ns3::EventGarbageCollector'])
- register_Ns3EventId_methods(root_module, root_module['ns3::EventId'])
- register_Ns3Gnuplot_methods(root_module, root_module['ns3::Gnuplot'])
- register_Ns3GnuplotCollection_methods(root_module, root_module['ns3::GnuplotCollection'])
- register_Ns3GnuplotDataset_methods(root_module, root_module['ns3::GnuplotDataset'])
- register_Ns3ObjectBase_methods(root_module, root_module['ns3::ObjectBase'])
- register_Ns3ObjectDeleter_methods(root_module, root_module['ns3::ObjectDeleter'])
- register_Ns3ObjectFactory_methods(root_module, root_module['ns3::ObjectFactory'])
- register_Ns3PacketMetadata_methods(root_module, root_module['ns3::PacketMetadata'])
- register_Ns3PacketMetadataItem_methods(root_module, root_module['ns3::PacketMetadata::Item'])
- register_Ns3PacketMetadataItemIterator_methods(root_module, root_module['ns3::PacketMetadata::ItemIterator'])
- register_Ns3PacketTagIterator_methods(root_module, root_module['ns3::PacketTagIterator'])
- register_Ns3PacketTagIteratorItem_methods(root_module, root_module['ns3::PacketTagIterator::Item'])
- register_Ns3PacketTagList_methods(root_module, root_module['ns3::PacketTagList'])
- register_Ns3PacketTagListTagData_methods(root_module, root_module['ns3::PacketTagList::TagData'])
- 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'])
- register_Ns3Tag_methods(root_module, root_module['ns3::Tag'])
- register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
- register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId'])
- register_Ns3TypeIdAttributeInformation_methods(root_module, root_module['ns3::TypeId::AttributeInformation'])
- register_Ns3TypeIdTraceSourceInformation_methods(root_module, root_module['ns3::TypeId::TraceSourceInformation'])
- register_Ns3Empty_methods(root_module, root_module['ns3::empty'])
- register_Ns3Int64x64_t_methods(root_module, root_module['ns3::int64x64_t'])
- register_Ns3Chunk_methods(root_module, root_module['ns3::Chunk'])
- register_Ns3Gnuplot2dDataset_methods(root_module, root_module['ns3::Gnuplot2dDataset'])
- register_Ns3Gnuplot2dFunction_methods(root_module, root_module['ns3::Gnuplot2dFunction'])
- register_Ns3Gnuplot3dDataset_methods(root_module, root_module['ns3::Gnuplot3dDataset'])
- register_Ns3Gnuplot3dFunction_methods(root_module, root_module['ns3::Gnuplot3dFunction'])
- register_Ns3Header_methods(root_module, root_module['ns3::Header'])
- register_Ns3Object_methods(root_module, root_module['ns3::Object'])
- register_Ns3ObjectAggregateIterator_methods(root_module, root_module['ns3::Object::AggregateIterator'])
- register_Ns3SimpleRefCount__Ns3AttributeAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> >'])
- register_Ns3SimpleRefCount__Ns3AttributeChecker_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeChecker__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> >'])
- register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> >'])
- register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >'])
- register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> >'])
- register_Ns3SimpleRefCount__Ns3NixVector_Ns3Empty_Ns3DefaultDeleter__lt__ns3NixVector__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> >'])
- register_Ns3SimpleRefCount__Ns3Packet_Ns3Empty_Ns3DefaultDeleter__lt__ns3Packet__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >'])
- register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> >'])
- register_Ns3Time_methods(root_module, root_module['ns3::Time'])
- register_Ns3TraceSourceAccessor_methods(root_module, root_module['ns3::TraceSourceAccessor'])
- register_Ns3Trailer_methods(root_module, root_module['ns3::Trailer'])
- register_Ns3AttributeAccessor_methods(root_module, root_module['ns3::AttributeAccessor'])
- register_Ns3AttributeChecker_methods(root_module, root_module['ns3::AttributeChecker'])
- register_Ns3AttributeValue_methods(root_module, root_module['ns3::AttributeValue'])
- register_Ns3CallbackChecker_methods(root_module, root_module['ns3::CallbackChecker'])
- register_Ns3CallbackImplBase_methods(root_module, root_module['ns3::CallbackImplBase'])
- register_Ns3CallbackValue_methods(root_module, root_module['ns3::CallbackValue'])
- register_Ns3DataCalculator_methods(root_module, root_module['ns3::DataCalculator'])
- register_Ns3DataOutputInterface_methods(root_module, root_module['ns3::DataOutputInterface'])
- register_Ns3EmptyAttributeValue_methods(root_module, root_module['ns3::EmptyAttributeValue'])
- register_Ns3EventImpl_methods(root_module, root_module['ns3::EventImpl'])
- register_Ns3MinMaxAvgTotalCalculator__Double_methods(root_module, root_module['ns3::MinMaxAvgTotalCalculator< double >'])
- register_Ns3NixVector_methods(root_module, root_module['ns3::NixVector'])
- register_Ns3ObjectFactoryChecker_methods(root_module, root_module['ns3::ObjectFactoryChecker'])
- register_Ns3ObjectFactoryValue_methods(root_module, root_module['ns3::ObjectFactoryValue'])
- 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'])
- return
-
-def register_Ns3AttributeConstructionList_methods(root_module, cls):
- ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::AttributeConstructionList(ns3::AttributeConstructionList const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::AttributeConstructionList const &', 'arg0')])
- ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::AttributeConstructionList() [constructor]
- cls.add_constructor([])
- ## attribute-construction-list.h (module 'core'): void ns3::AttributeConstructionList::Add(std::string name, ns3::Ptr<ns3::AttributeChecker const> checker, ns3::Ptr<ns3::AttributeValue> value) [member function]
- cls.add_method('Add',
- 'void',
- [param('std::string', 'name'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker'), param('ns3::Ptr< ns3::AttributeValue >', 'value')])
- ## attribute-construction-list.h (module 'core'): std::_List_const_iterator<ns3::AttributeConstructionList::Item> ns3::AttributeConstructionList::Begin() const [member function]
- cls.add_method('Begin',
- 'std::_List_const_iterator< ns3::AttributeConstructionList::Item >',
- [],
- is_const=True)
- ## attribute-construction-list.h (module 'core'): std::_List_const_iterator<ns3::AttributeConstructionList::Item> ns3::AttributeConstructionList::End() const [member function]
- cls.add_method('End',
- 'std::_List_const_iterator< ns3::AttributeConstructionList::Item >',
- [],
- is_const=True)
- ## attribute-construction-list.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::AttributeConstructionList::Find(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function]
- cls.add_method('Find',
- 'ns3::Ptr< ns3::AttributeValue >',
- [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_const=True)
- return
-
-def register_Ns3AttributeConstructionListItem_methods(root_module, cls):
- ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::Item::Item() [constructor]
- cls.add_constructor([])
- ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::Item::Item(ns3::AttributeConstructionList::Item const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::AttributeConstructionList::Item const &', 'arg0')])
- ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::Item::checker [variable]
- cls.add_instance_attribute('checker', 'ns3::Ptr< ns3::AttributeChecker const >', is_const=False)
- ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::Item::name [variable]
- cls.add_instance_attribute('name', 'std::string', is_const=False)
- ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::Item::value [variable]
- cls.add_instance_attribute('value', 'ns3::Ptr< ns3::AttributeValue >', is_const=False)
- return
-
-def register_Ns3Buffer_methods(root_module, cls):
- ## buffer.h (module 'network'): ns3::Buffer::Buffer() [constructor]
- cls.add_constructor([])
- ## buffer.h (module 'network'): ns3::Buffer::Buffer(uint32_t dataSize) [constructor]
- cls.add_constructor([param('uint32_t', 'dataSize')])
- ## buffer.h (module 'network'): ns3::Buffer::Buffer(uint32_t dataSize, bool initialize) [constructor]
- cls.add_constructor([param('uint32_t', 'dataSize'), param('bool', 'initialize')])
- ## buffer.h (module 'network'): ns3::Buffer::Buffer(ns3::Buffer const & o) [copy constructor]
- cls.add_constructor([param('ns3::Buffer const &', 'o')])
- ## buffer.h (module 'network'): bool ns3::Buffer::AddAtEnd(uint32_t end) [member function]
- cls.add_method('AddAtEnd',
- 'bool',
- [param('uint32_t', 'end')])
- ## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(ns3::Buffer const & o) [member function]
- cls.add_method('AddAtEnd',
- 'void',
- [param('ns3::Buffer const &', 'o')])
- ## buffer.h (module 'network'): bool ns3::Buffer::AddAtStart(uint32_t start) [member function]
- cls.add_method('AddAtStart',
- 'bool',
- [param('uint32_t', 'start')])
- ## buffer.h (module 'network'): ns3::Buffer::Iterator ns3::Buffer::Begin() const [member function]
- cls.add_method('Begin',
- 'ns3::Buffer::Iterator',
- [],
- is_const=True)
- ## buffer.h (module 'network'): void ns3::Buffer::CopyData(std::ostream * os, uint32_t size) const [member function]
- cls.add_method('CopyData',
- 'void',
- [param('std::ostream *', 'os'), param('uint32_t', 'size')],
- is_const=True)
- ## buffer.h (module 'network'): uint32_t ns3::Buffer::CopyData(uint8_t * buffer, uint32_t size) const [member function]
- cls.add_method('CopyData',
- 'uint32_t',
- [param('uint8_t *', 'buffer'), param('uint32_t', 'size')],
- is_const=True)
- ## buffer.h (module 'network'): ns3::Buffer ns3::Buffer::CreateFragment(uint32_t start, uint32_t length) const [member function]
- cls.add_method('CreateFragment',
- 'ns3::Buffer',
- [param('uint32_t', 'start'), param('uint32_t', 'length')],
- is_const=True)
- ## buffer.h (module 'network'): ns3::Buffer ns3::Buffer::CreateFullCopy() const [member function]
- cls.add_method('CreateFullCopy',
- 'ns3::Buffer',
- [],
- is_const=True)
- ## buffer.h (module 'network'): uint32_t ns3::Buffer::Deserialize(uint8_t const * buffer, uint32_t size) [member function]
- cls.add_method('Deserialize',
- 'uint32_t',
- [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')])
- ## buffer.h (module 'network'): ns3::Buffer::Iterator ns3::Buffer::End() const [member function]
- cls.add_method('End',
- 'ns3::Buffer::Iterator',
- [],
- is_const=True)
- ## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentEndOffset() const [member function]
- cls.add_method('GetCurrentEndOffset',
- 'int32_t',
- [],
- is_const=True)
- ## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentStartOffset() const [member function]
- cls.add_method('GetCurrentStartOffset',
- 'int32_t',
- [],
- is_const=True)
- ## buffer.h (module 'network'): uint32_t ns3::Buffer::GetSerializedSize() const [member function]
- cls.add_method('GetSerializedSize',
- 'uint32_t',
- [],
- is_const=True)
- ## buffer.h (module 'network'): uint32_t ns3::Buffer::GetSize() const [member function]
- cls.add_method('GetSize',
- 'uint32_t',
- [],
- is_const=True)
- ## buffer.h (module 'network'): uint8_t const * ns3::Buffer::PeekData() const [member function]
- cls.add_method('PeekData',
- 'uint8_t const *',
- [],
- is_const=True)
- ## buffer.h (module 'network'): void ns3::Buffer::RemoveAtEnd(uint32_t end) [member function]
- cls.add_method('RemoveAtEnd',
- 'void',
- [param('uint32_t', 'end')])
- ## buffer.h (module 'network'): void ns3::Buffer::RemoveAtStart(uint32_t start) [member function]
- cls.add_method('RemoveAtStart',
- 'void',
- [param('uint32_t', 'start')])
- ## buffer.h (module 'network'): uint32_t ns3::Buffer::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function]
- cls.add_method('Serialize',
- 'uint32_t',
- [param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')],
- is_const=True)
- return
-
-def register_Ns3BufferIterator_methods(root_module, cls):
- ## buffer.h (module 'network'): ns3::Buffer::Iterator::Iterator(ns3::Buffer::Iterator const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Buffer::Iterator const &', 'arg0')])
- ## buffer.h (module 'network'): ns3::Buffer::Iterator::Iterator() [constructor]
- cls.add_constructor([])
- ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::CalculateIpChecksum(uint16_t size) [member function]
- cls.add_method('CalculateIpChecksum',
- 'uint16_t',
- [param('uint16_t', 'size')])
- ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::CalculateIpChecksum(uint16_t size, uint32_t initialChecksum) [member function]
- cls.add_method('CalculateIpChecksum',
- 'uint16_t',
- [param('uint16_t', 'size'), param('uint32_t', 'initialChecksum')])
- ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::GetDistanceFrom(ns3::Buffer::Iterator const & o) const [member function]
- cls.add_method('GetDistanceFrom',
- 'uint32_t',
- [param('ns3::Buffer::Iterator const &', 'o')],
- is_const=True)
- ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::GetSize() const [member function]
- cls.add_method('GetSize',
- 'uint32_t',
- [],
- is_const=True)
- ## buffer.h (module 'network'): bool ns3::Buffer::Iterator::IsEnd() const [member function]
- cls.add_method('IsEnd',
- 'bool',
- [],
- is_const=True)
- ## buffer.h (module 'network'): bool ns3::Buffer::Iterator::IsStart() const [member function]
- cls.add_method('IsStart',
- 'bool',
- [],
- is_const=True)
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Next() [member function]
- cls.add_method('Next',
- 'void',
- [])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Next(uint32_t delta) [member function]
- cls.add_method('Next',
- 'void',
- [param('uint32_t', 'delta')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Prev() [member function]
- cls.add_method('Prev',
- 'void',
- [])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Prev(uint32_t delta) [member function]
- cls.add_method('Prev',
- 'void',
- [param('uint32_t', 'delta')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Read(uint8_t * buffer, uint32_t size) [member function]
- cls.add_method('Read',
- 'void',
- [param('uint8_t *', 'buffer'), param('uint32_t', 'size')])
- ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::ReadLsbtohU16() [member function]
- cls.add_method('ReadLsbtohU16',
- 'uint16_t',
- [])
- ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::ReadLsbtohU32() [member function]
- cls.add_method('ReadLsbtohU32',
- 'uint32_t',
- [])
- ## buffer.h (module 'network'): uint64_t ns3::Buffer::Iterator::ReadLsbtohU64() [member function]
- cls.add_method('ReadLsbtohU64',
- 'uint64_t',
- [])
- ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::ReadNtohU16() [member function]
- cls.add_method('ReadNtohU16',
- 'uint16_t',
- [])
- ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::ReadNtohU32() [member function]
- cls.add_method('ReadNtohU32',
- 'uint32_t',
- [])
- ## buffer.h (module 'network'): uint64_t ns3::Buffer::Iterator::ReadNtohU64() [member function]
- cls.add_method('ReadNtohU64',
- 'uint64_t',
- [])
- ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::ReadU16() [member function]
- cls.add_method('ReadU16',
- 'uint16_t',
- [])
- ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::ReadU32() [member function]
- cls.add_method('ReadU32',
- 'uint32_t',
- [])
- ## buffer.h (module 'network'): uint64_t ns3::Buffer::Iterator::ReadU64() [member function]
- cls.add_method('ReadU64',
- 'uint64_t',
- [])
- ## buffer.h (module 'network'): uint8_t ns3::Buffer::Iterator::ReadU8() [member function]
- cls.add_method('ReadU8',
- 'uint8_t',
- [])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Write(uint8_t const * buffer, uint32_t size) [member function]
- cls.add_method('Write',
- 'void',
- [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Write(ns3::Buffer::Iterator start, ns3::Buffer::Iterator end) [member function]
- cls.add_method('Write',
- 'void',
- [param('ns3::Buffer::Iterator', 'start'), param('ns3::Buffer::Iterator', 'end')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtolsbU16(uint16_t data) [member function]
- cls.add_method('WriteHtolsbU16',
- 'void',
- [param('uint16_t', 'data')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtolsbU32(uint32_t data) [member function]
- cls.add_method('WriteHtolsbU32',
- 'void',
- [param('uint32_t', 'data')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtolsbU64(uint64_t data) [member function]
- cls.add_method('WriteHtolsbU64',
- 'void',
- [param('uint64_t', 'data')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtonU16(uint16_t data) [member function]
- cls.add_method('WriteHtonU16',
- 'void',
- [param('uint16_t', 'data')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtonU32(uint32_t data) [member function]
- cls.add_method('WriteHtonU32',
- 'void',
- [param('uint32_t', 'data')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtonU64(uint64_t data) [member function]
- cls.add_method('WriteHtonU64',
- 'void',
- [param('uint64_t', 'data')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU16(uint16_t data) [member function]
- cls.add_method('WriteU16',
- 'void',
- [param('uint16_t', 'data')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU32(uint32_t data) [member function]
- cls.add_method('WriteU32',
- 'void',
- [param('uint32_t', 'data')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU64(uint64_t data) [member function]
- cls.add_method('WriteU64',
- 'void',
- [param('uint64_t', 'data')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU8(uint8_t data) [member function]
- cls.add_method('WriteU8',
- 'void',
- [param('uint8_t', 'data')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU8(uint8_t data, uint32_t len) [member function]
- cls.add_method('WriteU8',
- 'void',
- [param('uint8_t', 'data'), param('uint32_t', 'len')])
- return
-
-def register_Ns3ByteTagIterator_methods(root_module, cls):
- ## packet.h (module 'network'): ns3::ByteTagIterator::ByteTagIterator(ns3::ByteTagIterator const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::ByteTagIterator const &', 'arg0')])
- ## packet.h (module 'network'): bool ns3::ByteTagIterator::HasNext() const [member function]
- cls.add_method('HasNext',
- 'bool',
- [],
- is_const=True)
- ## packet.h (module 'network'): ns3::ByteTagIterator::Item ns3::ByteTagIterator::Next() [member function]
- cls.add_method('Next',
- 'ns3::ByteTagIterator::Item',
- [])
- return
-
-def register_Ns3ByteTagIteratorItem_methods(root_module, cls):
- ## packet.h (module 'network'): ns3::ByteTagIterator::Item::Item(ns3::ByteTagIterator::Item const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::ByteTagIterator::Item const &', 'arg0')])
- ## packet.h (module 'network'): uint32_t ns3::ByteTagIterator::Item::GetEnd() const [member function]
- cls.add_method('GetEnd',
- 'uint32_t',
- [],
- is_const=True)
- ## packet.h (module 'network'): uint32_t ns3::ByteTagIterator::Item::GetStart() const [member function]
- cls.add_method('GetStart',
- 'uint32_t',
- [],
- is_const=True)
- ## packet.h (module 'network'): void ns3::ByteTagIterator::Item::GetTag(ns3::Tag & tag) const [member function]
- cls.add_method('GetTag',
- 'void',
- [param('ns3::Tag &', 'tag')],
- is_const=True)
- ## packet.h (module 'network'): ns3::TypeId ns3::ByteTagIterator::Item::GetTypeId() const [member function]
- cls.add_method('GetTypeId',
- 'ns3::TypeId',
- [],
- is_const=True)
- return
-
-def register_Ns3ByteTagList_methods(root_module, cls):
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::ByteTagList() [constructor]
- cls.add_constructor([])
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::ByteTagList(ns3::ByteTagList const & o) [copy constructor]
- cls.add_constructor([param('ns3::ByteTagList const &', 'o')])
- ## byte-tag-list.h (module 'network'): ns3::TagBuffer ns3::ByteTagList::Add(ns3::TypeId tid, uint32_t bufferSize, int32_t start, int32_t end) [member function]
- cls.add_method('Add',
- 'ns3::TagBuffer',
- [param('ns3::TypeId', 'tid'), param('uint32_t', 'bufferSize'), param('int32_t', 'start'), param('int32_t', 'end')])
- ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::Add(ns3::ByteTagList const & o) [member function]
- cls.add_method('Add',
- 'void',
- [param('ns3::ByteTagList const &', 'o')])
- ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtEnd(int32_t adjustment, int32_t appendOffset) [member function]
- cls.add_method('AddAtEnd',
- 'void',
- [param('int32_t', 'adjustment'), param('int32_t', 'appendOffset')])
- ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t adjustment, int32_t prependOffset) [member function]
- cls.add_method('AddAtStart',
- 'void',
- [param('int32_t', 'adjustment'), param('int32_t', 'prependOffset')])
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator ns3::ByteTagList::Begin(int32_t offsetStart, int32_t offsetEnd) const [member function]
- cls.add_method('Begin',
- 'ns3::ByteTagList::Iterator',
- [param('int32_t', 'offsetStart'), param('int32_t', 'offsetEnd')],
- is_const=True)
- ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::RemoveAll() [member function]
- cls.add_method('RemoveAll',
- 'void',
- [])
- return
-
-def register_Ns3ByteTagListIterator_methods(root_module, cls):
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Iterator(ns3::ByteTagList::Iterator const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::ByteTagList::Iterator const &', 'arg0')])
- ## byte-tag-list.h (module 'network'): uint32_t ns3::ByteTagList::Iterator::GetOffsetStart() const [member function]
- cls.add_method('GetOffsetStart',
- 'uint32_t',
- [],
- is_const=True)
- ## byte-tag-list.h (module 'network'): bool ns3::ByteTagList::Iterator::HasNext() const [member function]
- cls.add_method('HasNext',
- 'bool',
- [],
- is_const=True)
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item ns3::ByteTagList::Iterator::Next() [member function]
- cls.add_method('Next',
- 'ns3::ByteTagList::Iterator::Item',
- [])
- return
-
-def register_Ns3ByteTagListIteratorItem_methods(root_module, cls):
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::Item(ns3::ByteTagList::Iterator::Item const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::ByteTagList::Iterator::Item const &', 'arg0')])
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::Item(ns3::TagBuffer buf) [constructor]
- cls.add_constructor([param('ns3::TagBuffer', 'buf')])
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::buf [variable]
- cls.add_instance_attribute('buf', 'ns3::TagBuffer', is_const=False)
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::end [variable]
- cls.add_instance_attribute('end', 'int32_t', is_const=False)
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::size [variable]
- cls.add_instance_attribute('size', 'uint32_t', is_const=False)
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::start [variable]
- cls.add_instance_attribute('start', 'int32_t', is_const=False)
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::tid [variable]
- cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False)
- return
-
-def register_Ns3CallbackBase_methods(root_module, cls):
- ## callback.h (module 'core'): ns3::CallbackBase::CallbackBase(ns3::CallbackBase const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::CallbackBase const &', 'arg0')])
- ## callback.h (module 'core'): ns3::CallbackBase::CallbackBase() [constructor]
- cls.add_constructor([])
- ## callback.h (module 'core'): ns3::Ptr<ns3::CallbackImplBase> ns3::CallbackBase::GetImpl() const [member function]
- cls.add_method('GetImpl',
- 'ns3::Ptr< ns3::CallbackImplBase >',
- [],
- is_const=True)
- ## callback.h (module 'core'): ns3::CallbackBase::CallbackBase(ns3::Ptr<ns3::CallbackImplBase> impl) [constructor]
- cls.add_constructor([param('ns3::Ptr< ns3::CallbackImplBase >', 'impl')],
- visibility='protected')
- ## callback.h (module 'core'): static std::string ns3::CallbackBase::Demangle(std::string const & mangled) [member function]
- cls.add_method('Demangle',
- 'std::string',
- [param('std::string const &', 'mangled')],
- is_static=True, visibility='protected')
- return
-
-def register_Ns3DataOutputCallback_methods(root_module, cls):
- ## data-output-interface.h (module 'stats'): ns3::DataOutputCallback::DataOutputCallback() [constructor]
- cls.add_constructor([])
- ## data-output-interface.h (module 'stats'): ns3::DataOutputCallback::DataOutputCallback(ns3::DataOutputCallback const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::DataOutputCallback const &', 'arg0')])
- ## data-output-interface.h (module 'stats'): void ns3::DataOutputCallback::OutputSingleton(std::string key, std::string variable, int val) [member function]
- cls.add_method('OutputSingleton',
- 'void',
- [param('std::string', 'key'), param('std::string', 'variable'), param('int', 'val')],
- is_pure_virtual=True, is_virtual=True)
- ## data-output-interface.h (module 'stats'): void ns3::DataOutputCallback::OutputSingleton(std::string key, std::string variable, uint32_t val) [member function]
- cls.add_method('OutputSingleton',
- 'void',
- [param('std::string', 'key'), param('std::string', 'variable'), param('uint32_t', 'val')],
- is_pure_virtual=True, is_virtual=True)
- ## data-output-interface.h (module 'stats'): void ns3::DataOutputCallback::OutputSingleton(std::string key, std::string variable, double val) [member function]
- cls.add_method('OutputSingleton',
- 'void',
- [param('std::string', 'key'), param('std::string', 'variable'), param('double', 'val')],
- is_pure_virtual=True, is_virtual=True)
- ## data-output-interface.h (module 'stats'): void ns3::DataOutputCallback::OutputSingleton(std::string key, std::string variable, std::string val) [member function]
- cls.add_method('OutputSingleton',
- 'void',
- [param('std::string', 'key'), param('std::string', 'variable'), param('std::string', 'val')],
- is_pure_virtual=True, is_virtual=True)
- ## data-output-interface.h (module 'stats'): void ns3::DataOutputCallback::OutputSingleton(std::string key, std::string variable, ns3::Time val) [member function]
- cls.add_method('OutputSingleton',
- 'void',
- [param('std::string', 'key'), param('std::string', 'variable'), param('ns3::Time', 'val')],
- is_pure_virtual=True, is_virtual=True)
- ## data-output-interface.h (module 'stats'): void ns3::DataOutputCallback::OutputStatistic(std::string key, std::string variable, ns3::StatisticalSummary const * statSum) [member function]
- cls.add_method('OutputStatistic',
- 'void',
- [param('std::string', 'key'), param('std::string', 'variable'), param('ns3::StatisticalSummary const *', 'statSum')],
- is_pure_virtual=True, is_virtual=True)
- return
-
-def register_Ns3DelayJitterEstimation_methods(root_module, cls):
- ## delay-jitter-estimation.h (module 'tools'): ns3::DelayJitterEstimation::DelayJitterEstimation(ns3::DelayJitterEstimation const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::DelayJitterEstimation const &', 'arg0')])
- ## delay-jitter-estimation.h (module 'tools'): ns3::DelayJitterEstimation::DelayJitterEstimation() [constructor]
- cls.add_constructor([])
- ## delay-jitter-estimation.h (module 'tools'): ns3::Time ns3::DelayJitterEstimation::GetLastDelay() const [member function]
- cls.add_method('GetLastDelay',
- 'ns3::Time',
- [],
- is_const=True)
- ## delay-jitter-estimation.h (module 'tools'): uint64_t ns3::DelayJitterEstimation::GetLastJitter() const [member function]
- cls.add_method('GetLastJitter',
- 'uint64_t',
- [],
- is_const=True)
- ## delay-jitter-estimation.h (module 'tools'): static void ns3::DelayJitterEstimation::PrepareTx(ns3::Ptr<const ns3::Packet> packet) [member function]
- cls.add_method('PrepareTx',
- 'void',
- [param('ns3::Ptr< ns3::Packet const >', 'packet')],
- is_static=True)
- ## delay-jitter-estimation.h (module 'tools'): void ns3::DelayJitterEstimation::RecordRx(ns3::Ptr<const ns3::Packet> packet) [member function]
- cls.add_method('RecordRx',
- 'void',
- [param('ns3::Ptr< ns3::Packet const >', 'packet')])
- return
-
-def register_Ns3EventGarbageCollector_methods(root_module, cls):
- ## event-garbage-collector.h (module 'tools'): ns3::EventGarbageCollector::EventGarbageCollector(ns3::EventGarbageCollector const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::EventGarbageCollector const &', 'arg0')])
- ## event-garbage-collector.h (module 'tools'): ns3::EventGarbageCollector::EventGarbageCollector() [constructor]
- cls.add_constructor([])
- ## event-garbage-collector.h (module 'tools'): 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('==')
- ## event-id.h (module 'core'): ns3::EventId::EventId(ns3::EventId const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::EventId const &', 'arg0')])
- ## event-id.h (module 'core'): ns3::EventId::EventId() [constructor]
- cls.add_constructor([])
- ## event-id.h (module 'core'): ns3::EventId::EventId(ns3::Ptr<ns3::EventImpl> const & impl, uint64_t ts, uint32_t context, uint32_t uid) [constructor]
- cls.add_constructor([param('ns3::Ptr< ns3::EventImpl > const &', 'impl'), param('uint64_t', 'ts'), param('uint32_t', 'context'), param('uint32_t', 'uid')])
- ## event-id.h (module 'core'): void ns3::EventId::Cancel() [member function]
- cls.add_method('Cancel',
- 'void',
- [])
- ## event-id.h (module 'core'): uint32_t ns3::EventId::GetContext() const [member function]
- cls.add_method('GetContext',
- 'uint32_t',
- [],
- is_const=True)
- ## event-id.h (module 'core'): uint64_t ns3::EventId::GetTs() const [member function]
- cls.add_method('GetTs',
- 'uint64_t',
- [],
- is_const=True)
- ## event-id.h (module 'core'): uint32_t ns3::EventId::GetUid() const [member function]
- cls.add_method('GetUid',
- 'uint32_t',
- [],
- is_const=True)
- ## event-id.h (module 'core'): bool ns3::EventId::IsExpired() const [member function]
- cls.add_method('IsExpired',
- 'bool',
- [],
- is_const=True)
- ## event-id.h (module 'core'): bool ns3::EventId::IsRunning() const [member function]
- cls.add_method('IsRunning',
- 'bool',
- [],
- is_const=True)
- ## event-id.h (module 'core'): ns3::EventImpl * ns3::EventId::PeekEventImpl() const [member function]
- cls.add_method('PeekEventImpl',
- 'ns3::EventImpl *',
- [],
- is_const=True)
- return
-
-def register_Ns3Gnuplot_methods(root_module, cls):
- ## gnuplot.h (module 'tools'): ns3::Gnuplot::Gnuplot(ns3::Gnuplot const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Gnuplot const &', 'arg0')])
- ## gnuplot.h (module 'tools'): ns3::Gnuplot::Gnuplot(std::string const & outputFilename="", std::string const & title="") [constructor]
- cls.add_constructor([param('std::string const &', 'outputFilename', default_value='""'), param('std::string const &', 'title', default_value='""')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot::AddDataset(ns3::GnuplotDataset const & dataset) [member function]
- cls.add_method('AddDataset',
- 'void',
- [param('ns3::GnuplotDataset const &', 'dataset')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot::AppendExtra(std::string const & extra) [member function]
- cls.add_method('AppendExtra',
- 'void',
- [param('std::string const &', 'extra')])
- ## gnuplot.h (module 'tools'): static std::string ns3::Gnuplot::DetectTerminal(std::string const & filename) [member function]
- cls.add_method('DetectTerminal',
- 'std::string',
- [param('std::string const &', 'filename')],
- is_static=True)
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot::GenerateOutput(std::ostream & os) const [member function]
- cls.add_method('GenerateOutput',
- 'void',
- [param('std::ostream &', 'os')],
- is_const=True)
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot::SetExtra(std::string const & extra) [member function]
- cls.add_method('SetExtra',
- 'void',
- [param('std::string const &', 'extra')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot::SetLegend(std::string const & xLegend, std::string const & yLegend) [member function]
- cls.add_method('SetLegend',
- 'void',
- [param('std::string const &', 'xLegend'), param('std::string const &', 'yLegend')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot::SetTerminal(std::string const & terminal) [member function]
- cls.add_method('SetTerminal',
- 'void',
- [param('std::string const &', 'terminal')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot::SetTitle(std::string const & title) [member function]
- cls.add_method('SetTitle',
- 'void',
- [param('std::string const &', 'title')])
- return
-
-def register_Ns3GnuplotCollection_methods(root_module, cls):
- ## gnuplot.h (module 'tools'): ns3::GnuplotCollection::GnuplotCollection(ns3::GnuplotCollection const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::GnuplotCollection const &', 'arg0')])
- ## gnuplot.h (module 'tools'): ns3::GnuplotCollection::GnuplotCollection(std::string const & outputFilename) [constructor]
- cls.add_constructor([param('std::string const &', 'outputFilename')])
- ## gnuplot.h (module 'tools'): void ns3::GnuplotCollection::AddPlot(ns3::Gnuplot const & plot) [member function]
- cls.add_method('AddPlot',
- 'void',
- [param('ns3::Gnuplot const &', 'plot')])
- ## gnuplot.h (module 'tools'): void ns3::GnuplotCollection::GenerateOutput(std::ostream & os) const [member function]
- cls.add_method('GenerateOutput',
- 'void',
- [param('std::ostream &', 'os')],
- is_const=True)
- ## gnuplot.h (module 'tools'): ns3::Gnuplot & ns3::GnuplotCollection::GetPlot(unsigned int id) [member function]
- cls.add_method('GetPlot',
- 'ns3::Gnuplot &',
- [param('unsigned int', 'id')])
- ## gnuplot.h (module 'tools'): void ns3::GnuplotCollection::SetTerminal(std::string const & terminal) [member function]
- cls.add_method('SetTerminal',
- 'void',
- [param('std::string const &', 'terminal')])
- return
-
-def register_Ns3GnuplotDataset_methods(root_module, cls):
- ## gnuplot.h (module 'tools'): ns3::GnuplotDataset::GnuplotDataset(ns3::GnuplotDataset const & original) [copy constructor]
- cls.add_constructor([param('ns3::GnuplotDataset const &', 'original')])
- ## gnuplot.h (module 'tools'): static void ns3::GnuplotDataset::SetDefaultExtra(std::string const & extra) [member function]
- cls.add_method('SetDefaultExtra',
- 'void',
- [param('std::string const &', 'extra')],
- is_static=True)
- ## gnuplot.h (module 'tools'): void ns3::GnuplotDataset::SetExtra(std::string const & extra) [member function]
- cls.add_method('SetExtra',
- 'void',
- [param('std::string const &', 'extra')])
- ## gnuplot.h (module 'tools'): void ns3::GnuplotDataset::SetTitle(std::string const & title) [member function]
- cls.add_method('SetTitle',
- 'void',
- [param('std::string const &', 'title')])
- ## gnuplot.h (module 'tools'): ns3::GnuplotDataset::GnuplotDataset(ns3::GnuplotDataset::Data * data) [constructor]
- cls.add_constructor([param('ns3::GnuplotDataset::Data *', 'data')],
- visibility='protected')
- return
-
-def register_Ns3ObjectBase_methods(root_module, cls):
- ## object-base.h (module 'core'): ns3::ObjectBase::ObjectBase() [constructor]
- cls.add_constructor([])
- ## object-base.h (module 'core'): ns3::ObjectBase::ObjectBase(ns3::ObjectBase const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::ObjectBase const &', 'arg0')])
- ## object-base.h (module 'core'): void ns3::ObjectBase::GetAttribute(std::string name, ns3::AttributeValue & value) const [member function]
- cls.add_method('GetAttribute',
- 'void',
- [param('std::string', 'name'), param('ns3::AttributeValue &', 'value')],
- is_const=True)
- ## object-base.h (module 'core'): bool ns3::ObjectBase::GetAttributeFailSafe(std::string name, ns3::AttributeValue & attribute) const [member function]
- cls.add_method('GetAttributeFailSafe',
- 'bool',
- [param('std::string', 'name'), param('ns3::AttributeValue &', 'attribute')],
- is_const=True)
- ## object-base.h (module 'core'): ns3::TypeId ns3::ObjectBase::GetInstanceTypeId() const [member function]
- cls.add_method('GetInstanceTypeId',
- 'ns3::TypeId',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## object-base.h (module 'core'): static ns3::TypeId ns3::ObjectBase::GetTypeId() [member function]
- cls.add_method('GetTypeId',
- 'ns3::TypeId',
- [],
- is_static=True)
- ## object-base.h (module 'core'): void ns3::ObjectBase::SetAttribute(std::string name, ns3::AttributeValue const & value) [member function]
- cls.add_method('SetAttribute',
- 'void',
- [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
- ## object-base.h (module 'core'): bool ns3::ObjectBase::SetAttributeFailSafe(std::string name, ns3::AttributeValue const & value) [member function]
- cls.add_method('SetAttributeFailSafe',
- 'bool',
- [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
- ## object-base.h (module 'core'): bool ns3::ObjectBase::TraceConnect(std::string name, std::string context, ns3::CallbackBase const & cb) [member function]
- cls.add_method('TraceConnect',
- 'bool',
- [param('std::string', 'name'), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')])
- ## object-base.h (module 'core'): bool ns3::ObjectBase::TraceConnectWithoutContext(std::string name, ns3::CallbackBase const & cb) [member function]
- cls.add_method('TraceConnectWithoutContext',
- 'bool',
- [param('std::string', 'name'), param('ns3::CallbackBase const &', 'cb')])
- ## object-base.h (module 'core'): bool ns3::ObjectBase::TraceDisconnect(std::string name, std::string context, ns3::CallbackBase const & cb) [member function]
- cls.add_method('TraceDisconnect',
- 'bool',
- [param('std::string', 'name'), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')])
- ## object-base.h (module 'core'): bool ns3::ObjectBase::TraceDisconnectWithoutContext(std::string name, ns3::CallbackBase const & cb) [member function]
- cls.add_method('TraceDisconnectWithoutContext',
- 'bool',
- [param('std::string', 'name'), param('ns3::CallbackBase const &', 'cb')])
- ## object-base.h (module 'core'): void ns3::ObjectBase::ConstructSelf(ns3::AttributeConstructionList const & attributes) [member function]
- cls.add_method('ConstructSelf',
- 'void',
- [param('ns3::AttributeConstructionList const &', 'attributes')],
- visibility='protected')
- ## object-base.h (module 'core'): void ns3::ObjectBase::NotifyConstructionCompleted() [member function]
- cls.add_method('NotifyConstructionCompleted',
- 'void',
- [],
- visibility='protected', is_virtual=True)
- return
-
-def register_Ns3ObjectDeleter_methods(root_module, cls):
- ## object.h (module 'core'): ns3::ObjectDeleter::ObjectDeleter() [constructor]
- cls.add_constructor([])
- ## object.h (module 'core'): ns3::ObjectDeleter::ObjectDeleter(ns3::ObjectDeleter const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::ObjectDeleter const &', 'arg0')])
- ## object.h (module 'core'): static void ns3::ObjectDeleter::Delete(ns3::Object * object) [member function]
- cls.add_method('Delete',
- 'void',
- [param('ns3::Object *', 'object')],
- is_static=True)
- return
-
-def register_Ns3ObjectFactory_methods(root_module, cls):
- cls.add_output_stream_operator()
- ## object-factory.h (module 'core'): ns3::ObjectFactory::ObjectFactory(ns3::ObjectFactory const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::ObjectFactory const &', 'arg0')])
- ## object-factory.h (module 'core'): ns3::ObjectFactory::ObjectFactory() [constructor]
- cls.add_constructor([])
- ## object-factory.h (module 'core'): ns3::ObjectFactory::ObjectFactory(std::string typeId) [constructor]
- cls.add_constructor([param('std::string', 'typeId')])
- ## object-factory.h (module 'core'): ns3::Ptr<ns3::Object> ns3::ObjectFactory::Create() const [member function]
- cls.add_method('Create',
- 'ns3::Ptr< ns3::Object >',
- [],
- is_const=True)
- ## object-factory.h (module 'core'): ns3::TypeId ns3::ObjectFactory::GetTypeId() const [member function]
- cls.add_method('GetTypeId',
- 'ns3::TypeId',
- [],
- is_const=True)
- ## object-factory.h (module 'core'): void ns3::ObjectFactory::Set(std::string name, ns3::AttributeValue const & value) [member function]
- cls.add_method('Set',
- 'void',
- [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
- ## object-factory.h (module 'core'): void ns3::ObjectFactory::SetTypeId(ns3::TypeId tid) [member function]
- cls.add_method('SetTypeId',
- 'void',
- [param('ns3::TypeId', 'tid')])
- ## object-factory.h (module 'core'): void ns3::ObjectFactory::SetTypeId(char const * tid) [member function]
- cls.add_method('SetTypeId',
- 'void',
- [param('char const *', 'tid')])
- ## object-factory.h (module 'core'): void ns3::ObjectFactory::SetTypeId(std::string tid) [member function]
- cls.add_method('SetTypeId',
- 'void',
- [param('std::string', 'tid')])
- return
-
-def register_Ns3PacketMetadata_methods(root_module, cls):
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::PacketMetadata(uint64_t uid, uint32_t size) [constructor]
- cls.add_constructor([param('uint64_t', 'uid'), param('uint32_t', 'size')])
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::PacketMetadata(ns3::PacketMetadata const & o) [copy constructor]
- cls.add_constructor([param('ns3::PacketMetadata const &', 'o')])
- ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddAtEnd(ns3::PacketMetadata const & o) [member function]
- cls.add_method('AddAtEnd',
- 'void',
- [param('ns3::PacketMetadata const &', 'o')])
- ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddHeader(ns3::Header const & header, uint32_t size) [member function]
- cls.add_method('AddHeader',
- 'void',
- [param('ns3::Header const &', 'header'), param('uint32_t', 'size')])
- ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddPaddingAtEnd(uint32_t end) [member function]
- cls.add_method('AddPaddingAtEnd',
- 'void',
- [param('uint32_t', 'end')])
- ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddTrailer(ns3::Trailer const & trailer, uint32_t size) [member function]
- cls.add_method('AddTrailer',
- 'void',
- [param('ns3::Trailer const &', 'trailer'), param('uint32_t', 'size')])
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator ns3::PacketMetadata::BeginItem(ns3::Buffer buffer) const [member function]
- cls.add_method('BeginItem',
- 'ns3::PacketMetadata::ItemIterator',
- [param('ns3::Buffer', 'buffer')],
- is_const=True)
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata ns3::PacketMetadata::CreateFragment(uint32_t start, uint32_t end) const [member function]
- cls.add_method('CreateFragment',
- 'ns3::PacketMetadata',
- [param('uint32_t', 'start'), param('uint32_t', 'end')],
- is_const=True)
- ## packet-metadata.h (module 'network'): uint32_t ns3::PacketMetadata::Deserialize(uint8_t const * buffer, uint32_t size) [member function]
- cls.add_method('Deserialize',
- 'uint32_t',
- [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')])
- ## packet-metadata.h (module 'network'): static void ns3::PacketMetadata::Enable() [member function]
- cls.add_method('Enable',
- 'void',
- [],
- is_static=True)
- ## packet-metadata.h (module 'network'): static void ns3::PacketMetadata::EnableChecking() [member function]
- cls.add_method('EnableChecking',
- 'void',
- [],
- is_static=True)
- ## packet-metadata.h (module 'network'): uint32_t ns3::PacketMetadata::GetSerializedSize() const [member function]
- cls.add_method('GetSerializedSize',
- 'uint32_t',
- [],
- is_const=True)
- ## packet-metadata.h (module 'network'): uint64_t ns3::PacketMetadata::GetUid() const [member function]
- cls.add_method('GetUid',
- 'uint64_t',
- [],
- is_const=True)
- ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveAtEnd(uint32_t end) [member function]
- cls.add_method('RemoveAtEnd',
- 'void',
- [param('uint32_t', 'end')])
- ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveAtStart(uint32_t start) [member function]
- cls.add_method('RemoveAtStart',
- 'void',
- [param('uint32_t', 'start')])
- ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveHeader(ns3::Header const & header, uint32_t size) [member function]
- cls.add_method('RemoveHeader',
- 'void',
- [param('ns3::Header const &', 'header'), param('uint32_t', 'size')])
- ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveTrailer(ns3::Trailer const & trailer, uint32_t size) [member function]
- cls.add_method('RemoveTrailer',
- 'void',
- [param('ns3::Trailer const &', 'trailer'), param('uint32_t', 'size')])
- ## packet-metadata.h (module 'network'): uint32_t ns3::PacketMetadata::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function]
- cls.add_method('Serialize',
- 'uint32_t',
- [param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')],
- is_const=True)
- return
-
-def register_Ns3PacketMetadataItem_methods(root_module, cls):
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::Item() [constructor]
- cls.add_constructor([])
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::Item(ns3::PacketMetadata::Item const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::PacketMetadata::Item const &', 'arg0')])
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::current [variable]
- cls.add_instance_attribute('current', 'ns3::Buffer::Iterator', is_const=False)
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::currentSize [variable]
- cls.add_instance_attribute('currentSize', 'uint32_t', is_const=False)
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::currentTrimedFromEnd [variable]
- cls.add_instance_attribute('currentTrimedFromEnd', 'uint32_t', is_const=False)
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::currentTrimedFromStart [variable]
- cls.add_instance_attribute('currentTrimedFromStart', 'uint32_t', is_const=False)
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::isFragment [variable]
- cls.add_instance_attribute('isFragment', 'bool', is_const=False)
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::tid [variable]
- cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False)
- return
-
-def register_Ns3PacketMetadataItemIterator_methods(root_module, cls):
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator::ItemIterator(ns3::PacketMetadata::ItemIterator const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::PacketMetadata::ItemIterator const &', 'arg0')])
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator::ItemIterator(ns3::PacketMetadata const * metadata, ns3::Buffer buffer) [constructor]
- cls.add_constructor([param('ns3::PacketMetadata const *', 'metadata'), param('ns3::Buffer', 'buffer')])
- ## packet-metadata.h (module 'network'): bool ns3::PacketMetadata::ItemIterator::HasNext() const [member function]
- cls.add_method('HasNext',
- 'bool',
- [],
- is_const=True)
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item ns3::PacketMetadata::ItemIterator::Next() [member function]
- cls.add_method('Next',
- 'ns3::PacketMetadata::Item',
- [])
- return
-
-def register_Ns3PacketTagIterator_methods(root_module, cls):
- ## packet.h (module 'network'): ns3::PacketTagIterator::PacketTagIterator(ns3::PacketTagIterator const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::PacketTagIterator const &', 'arg0')])
- ## packet.h (module 'network'): bool ns3::PacketTagIterator::HasNext() const [member function]
- cls.add_method('HasNext',
- 'bool',
- [],
- is_const=True)
- ## packet.h (module 'network'): ns3::PacketTagIterator::Item ns3::PacketTagIterator::Next() [member function]
- cls.add_method('Next',
- 'ns3::PacketTagIterator::Item',
- [])
- return
-
-def register_Ns3PacketTagIteratorItem_methods(root_module, cls):
- ## packet.h (module 'network'): ns3::PacketTagIterator::Item::Item(ns3::PacketTagIterator::Item const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::PacketTagIterator::Item const &', 'arg0')])
- ## packet.h (module 'network'): void ns3::PacketTagIterator::Item::GetTag(ns3::Tag & tag) const [member function]
- cls.add_method('GetTag',
- 'void',
- [param('ns3::Tag &', 'tag')],
- is_const=True)
- ## packet.h (module 'network'): ns3::TypeId ns3::PacketTagIterator::Item::GetTypeId() const [member function]
- cls.add_method('GetTypeId',
- 'ns3::TypeId',
- [],
- is_const=True)
- return
-
-def register_Ns3PacketTagList_methods(root_module, cls):
- ## packet-tag-list.h (module 'network'): ns3::PacketTagList::PacketTagList() [constructor]
- cls.add_constructor([])
- ## packet-tag-list.h (module 'network'): ns3::PacketTagList::PacketTagList(ns3::PacketTagList const & o) [copy constructor]
- cls.add_constructor([param('ns3::PacketTagList const &', 'o')])
- ## packet-tag-list.h (module 'network'): void ns3::PacketTagList::Add(ns3::Tag const & tag) const [member function]
- cls.add_method('Add',
- 'void',
- [param('ns3::Tag const &', 'tag')],
- is_const=True)
- ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData const * ns3::PacketTagList::Head() const [member function]
- cls.add_method('Head',
- 'ns3::PacketTagList::TagData const *',
- [],
- is_const=True)
- ## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Peek(ns3::Tag & tag) const [member function]
- cls.add_method('Peek',
- 'bool',
- [param('ns3::Tag &', 'tag')],
- is_const=True)
- ## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Remove(ns3::Tag & tag) [member function]
- cls.add_method('Remove',
- 'bool',
- [param('ns3::Tag &', 'tag')])
- ## packet-tag-list.h (module 'network'): void ns3::PacketTagList::RemoveAll() [member function]
- cls.add_method('RemoveAll',
- 'void',
- [])
- return
-
-def register_Ns3PacketTagListTagData_methods(root_module, cls):
- ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData() [constructor]
- cls.add_constructor([])
- ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData(ns3::PacketTagList::TagData const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::PacketTagList::TagData const &', 'arg0')])
- ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::count [variable]
- cls.add_instance_attribute('count', 'uint32_t', is_const=False)
- ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::data [variable]
- cls.add_instance_attribute('data', 'uint8_t [ 20 ]', is_const=False)
- ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::next [variable]
- cls.add_instance_attribute('next', 'ns3::PacketTagList::TagData *', is_const=False)
- ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::tid [variable]
- cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False)
- return
-
-def register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, cls):
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter>::SimpleRefCount() [constructor]
- cls.add_constructor([])
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter>::SimpleRefCount(ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> const & o) [copy constructor]
- cls.add_constructor([param('ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter > const &', 'o')])
- ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter>::Cleanup() [member function]
- cls.add_method('Cleanup',
- 'void',
- [],
- is_static=True)
- return
-
-def register_Ns3Simulator_methods(root_module, cls):
- ## simulator.h (module 'core'): ns3::Simulator::Simulator(ns3::Simulator const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Simulator const &', 'arg0')])
- ## simulator.h (module 'core'): static void ns3::Simulator::Cancel(ns3::EventId const & id) [member function]
- cls.add_method('Cancel',
- 'void',
- [param('ns3::EventId const &', 'id')],
- is_static=True)
- ## simulator.h (module 'core'): static void ns3::Simulator::Destroy() [member function]
- cls.add_method('Destroy',
- 'void',
- [],
- is_static=True)
- ## simulator.h (module 'core'): static uint32_t ns3::Simulator::GetContext() [member function]
- cls.add_method('GetContext',
- 'uint32_t',
- [],
- is_static=True)
- ## simulator.h (module 'core'): static ns3::Time ns3::Simulator::GetDelayLeft(ns3::EventId const & id) [member function]
- cls.add_method('GetDelayLeft',
- 'ns3::Time',
- [param('ns3::EventId const &', 'id')],
- is_static=True)
- ## simulator.h (module 'core'): static ns3::Ptr<ns3::SimulatorImpl> ns3::Simulator::GetImplementation() [member function]
- cls.add_method('GetImplementation',
- 'ns3::Ptr< ns3::SimulatorImpl >',
- [],
- is_static=True)
- ## simulator.h (module 'core'): static ns3::Time ns3::Simulator::GetMaximumSimulationTime() [member function]
- cls.add_method('GetMaximumSimulationTime',
- 'ns3::Time',
- [],
- is_static=True)
- ## simulator.h (module 'core'): static uint32_t ns3::Simulator::GetSystemId() [member function]
- cls.add_method('GetSystemId',
- 'uint32_t',
- [],
- is_static=True)
- ## simulator.h (module 'core'): static bool ns3::Simulator::IsExpired(ns3::EventId const & id) [member function]
- cls.add_method('IsExpired',
- 'bool',
- [param('ns3::EventId const &', 'id')],
- is_static=True)
- ## simulator.h (module 'core'): static bool ns3::Simulator::IsFinished() [member function]
- cls.add_method('IsFinished',
- 'bool',
- [],
- is_static=True)
- ## simulator.h (module 'core'): static ns3::Time ns3::Simulator::Now() [member function]
- cls.add_method('Now',
- 'ns3::Time',
- [],
- is_static=True)
- ## simulator.h (module 'core'): static void ns3::Simulator::Remove(ns3::EventId const & id) [member function]
- cls.add_method('Remove',
- 'void',
- [param('ns3::EventId const &', 'id')],
- is_static=True)
- ## simulator.h (module 'core'): static void ns3::Simulator::SetImplementation(ns3::Ptr<ns3::SimulatorImpl> impl) [member function]
- cls.add_method('SetImplementation',
- 'void',
- [param('ns3::Ptr< ns3::SimulatorImpl >', 'impl')],
- is_static=True)
- ## simulator.h (module 'core'): static void ns3::Simulator::SetScheduler(ns3::ObjectFactory schedulerFactory) [member function]
- cls.add_method('SetScheduler',
- 'void',
- [param('ns3::ObjectFactory', 'schedulerFactory')],
- is_static=True)
- ## simulator.h (module 'core'): static void ns3::Simulator::Stop() [member function]
- cls.add_method('Stop',
- 'void',
- [],
- is_static=True)
- ## simulator.h (module 'core'): static void ns3::Simulator::Stop(ns3::Time const & time) [member function]
- cls.add_method('Stop',
- 'void',
- [param('ns3::Time const &', 'time')],
- is_static=True)
- return
-
-def register_Ns3StatisticalSummary_methods(root_module, cls):
- ## data-calculator.h (module 'stats'): ns3::StatisticalSummary::StatisticalSummary() [constructor]
- cls.add_constructor([])
- ## data-calculator.h (module 'stats'): ns3::StatisticalSummary::StatisticalSummary(ns3::StatisticalSummary const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::StatisticalSummary const &', 'arg0')])
- ## data-calculator.h (module 'stats'): long int ns3::StatisticalSummary::getCount() const [member function]
- cls.add_method('getCount',
- 'long int',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## data-calculator.h (module 'stats'): double ns3::StatisticalSummary::getMax() const [member function]
- cls.add_method('getMax',
- 'double',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## data-calculator.h (module 'stats'): double ns3::StatisticalSummary::getMean() const [member function]
- cls.add_method('getMean',
- 'double',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## data-calculator.h (module 'stats'): double ns3::StatisticalSummary::getMin() const [member function]
- cls.add_method('getMin',
- 'double',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## data-calculator.h (module 'stats'): double ns3::StatisticalSummary::getSqrSum() const [member function]
- cls.add_method('getSqrSum',
- 'double',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## data-calculator.h (module 'stats'): double ns3::StatisticalSummary::getStddev() const [member function]
- cls.add_method('getStddev',
- 'double',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## data-calculator.h (module 'stats'): double ns3::StatisticalSummary::getSum() const [member function]
- cls.add_method('getSum',
- 'double',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## data-calculator.h (module 'stats'): double ns3::StatisticalSummary::getVariance() const [member function]
- cls.add_method('getVariance',
- 'double',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- return
-
-def register_Ns3Tag_methods(root_module, cls):
- ## tag.h (module 'network'): ns3::Tag::Tag() [constructor]
- cls.add_constructor([])
- ## tag.h (module 'network'): ns3::Tag::Tag(ns3::Tag const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Tag const &', 'arg0')])
- ## tag.h (module 'network'): void ns3::Tag::Deserialize(ns3::TagBuffer i) [member function]
- cls.add_method('Deserialize',
- 'void',
- [param('ns3::TagBuffer', 'i')],
- is_pure_virtual=True, is_virtual=True)
- ## tag.h (module 'network'): uint32_t ns3::Tag::GetSerializedSize() const [member function]
- cls.add_method('GetSerializedSize',
- 'uint32_t',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## tag.h (module 'network'): static ns3::TypeId ns3::Tag::GetTypeId() [member function]
- cls.add_method('GetTypeId',
- 'ns3::TypeId',
- [],
- is_static=True)
- ## tag.h (module 'network'): void ns3::Tag::Print(std::ostream & os) const [member function]
- cls.add_method('Print',
- 'void',
- [param('std::ostream &', 'os')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## tag.h (module 'network'): void ns3::Tag::Serialize(ns3::TagBuffer i) const [member function]
- cls.add_method('Serialize',
- 'void',
- [param('ns3::TagBuffer', 'i')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- return
-
-def register_Ns3TagBuffer_methods(root_module, cls):
- ## tag-buffer.h (module 'network'): ns3::TagBuffer::TagBuffer(ns3::TagBuffer const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::TagBuffer const &', 'arg0')])
- ## tag-buffer.h (module 'network'): ns3::TagBuffer::TagBuffer(uint8_t * start, uint8_t * end) [constructor]
- cls.add_constructor([param('uint8_t *', 'start'), param('uint8_t *', 'end')])
- ## tag-buffer.h (module 'network'): void ns3::TagBuffer::CopyFrom(ns3::TagBuffer o) [member function]
- cls.add_method('CopyFrom',
- 'void',
- [param('ns3::TagBuffer', 'o')])
- ## tag-buffer.h (module 'network'): void ns3::TagBuffer::Read(uint8_t * buffer, uint32_t size) [member function]
- cls.add_method('Read',
- 'void',
- [param('uint8_t *', 'buffer'), param('uint32_t', 'size')])
- ## tag-buffer.h (module 'network'): double ns3::TagBuffer::ReadDouble() [member function]
- cls.add_method('ReadDouble',
- 'double',
- [])
- ## tag-buffer.h (module 'network'): uint16_t ns3::TagBuffer::ReadU16() [member function]
- cls.add_method('ReadU16',
- 'uint16_t',
- [])
- ## tag-buffer.h (module 'network'): uint32_t ns3::TagBuffer::ReadU32() [member function]
- cls.add_method('ReadU32',
- 'uint32_t',
- [])
- ## tag-buffer.h (module 'network'): uint64_t ns3::TagBuffer::ReadU64() [member function]
- cls.add_method('ReadU64',
- 'uint64_t',
- [])
- ## tag-buffer.h (module 'network'): uint8_t ns3::TagBuffer::ReadU8() [member function]
- cls.add_method('ReadU8',
- 'uint8_t',
- [])
- ## tag-buffer.h (module 'network'): void ns3::TagBuffer::TrimAtEnd(uint32_t trim) [member function]
- cls.add_method('TrimAtEnd',
- 'void',
- [param('uint32_t', 'trim')])
- ## tag-buffer.h (module 'network'): void ns3::TagBuffer::Write(uint8_t const * buffer, uint32_t size) [member function]
- cls.add_method('Write',
- 'void',
- [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')])
- ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteDouble(double v) [member function]
- cls.add_method('WriteDouble',
- 'void',
- [param('double', 'v')])
- ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU16(uint16_t data) [member function]
- cls.add_method('WriteU16',
- 'void',
- [param('uint16_t', 'data')])
- ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU32(uint32_t data) [member function]
- cls.add_method('WriteU32',
- 'void',
- [param('uint32_t', 'data')])
- ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU64(uint64_t v) [member function]
- cls.add_method('WriteU64',
- 'void',
- [param('uint64_t', 'v')])
- ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU8(uint8_t v) [member function]
- cls.add_method('WriteU8',
- 'void',
- [param('uint8_t', 'v')])
- return
-
-def register_Ns3TypeId_methods(root_module, cls):
- cls.add_binary_comparison_operator('<')
- cls.add_binary_comparison_operator('!=')
- cls.add_output_stream_operator()
- cls.add_binary_comparison_operator('==')
- ## type-id.h (module 'core'): ns3::TypeId::TypeId(char const * name) [constructor]
- cls.add_constructor([param('char const *', 'name')])
- ## type-id.h (module 'core'): ns3::TypeId::TypeId() [constructor]
- cls.add_constructor([])
- ## type-id.h (module 'core'): ns3::TypeId::TypeId(ns3::TypeId const & o) [copy constructor]
- cls.add_constructor([param('ns3::TypeId const &', 'o')])
- ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddAttribute(std::string name, std::string help, ns3::AttributeValue const & initialValue, ns3::Ptr<ns3::AttributeAccessor const> accessor, ns3::Ptr<ns3::AttributeChecker const> checker) [member function]
- cls.add_method('AddAttribute',
- 'ns3::TypeId',
- [param('std::string', 'name'), param('std::string', 'help'), param('ns3::AttributeValue const &', 'initialValue'), param('ns3::Ptr< ns3::AttributeAccessor const >', 'accessor'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')])
- ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddAttribute(std::string name, std::string help, uint32_t flags, ns3::AttributeValue const & initialValue, ns3::Ptr<ns3::AttributeAccessor const> accessor, ns3::Ptr<ns3::AttributeChecker const> checker) [member function]
- cls.add_method('AddAttribute',
- 'ns3::TypeId',
- [param('std::string', 'name'), param('std::string', 'help'), param('uint32_t', 'flags'), param('ns3::AttributeValue const &', 'initialValue'), param('ns3::Ptr< ns3::AttributeAccessor const >', 'accessor'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')])
- ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddTraceSource(std::string name, std::string help, ns3::Ptr<ns3::TraceSourceAccessor const> accessor) [member function]
- cls.add_method('AddTraceSource',
- 'ns3::TypeId',
- [param('std::string', 'name'), param('std::string', 'help'), param('ns3::Ptr< ns3::TraceSourceAccessor const >', 'accessor')])
- ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation ns3::TypeId::GetAttribute(uint32_t i) const [member function]
- cls.add_method('GetAttribute',
- 'ns3::TypeId::AttributeInformation',
- [param('uint32_t', 'i')],
- is_const=True)
- ## type-id.h (module 'core'): std::string ns3::TypeId::GetAttributeFullName(uint32_t i) const [member function]
- cls.add_method('GetAttributeFullName',
- 'std::string',
- [param('uint32_t', 'i')],
- is_const=True)
- ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetAttributeN() const [member function]
- cls.add_method('GetAttributeN',
- 'uint32_t',
- [],
- is_const=True)
- ## type-id.h (module 'core'): ns3::Callback<ns3::ObjectBase*,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ns3::TypeId::GetConstructor() const [member function]
- cls.add_method('GetConstructor',
- 'ns3::Callback< ns3::ObjectBase *, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >',
- [],
- is_const=True)
- ## type-id.h (module 'core'): std::string ns3::TypeId::GetGroupName() const [member function]
- cls.add_method('GetGroupName',
- 'std::string',
- [],
- is_const=True)
- ## type-id.h (module 'core'): std::string ns3::TypeId::GetName() const [member function]
- cls.add_method('GetName',
- 'std::string',
- [],
- is_const=True)
- ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::GetParent() const [member function]
- cls.add_method('GetParent',
- 'ns3::TypeId',
- [],
- is_const=True)
- ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::GetRegistered(uint32_t i) [member function]
- cls.add_method('GetRegistered',
- 'ns3::TypeId',
- [param('uint32_t', 'i')],
- is_static=True)
- ## type-id.h (module 'core'): static uint32_t ns3::TypeId::GetRegisteredN() [member function]
- cls.add_method('GetRegisteredN',
- 'uint32_t',
- [],
- is_static=True)
- ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation ns3::TypeId::GetTraceSource(uint32_t i) const [member function]
- cls.add_method('GetTraceSource',
- 'ns3::TypeId::TraceSourceInformation',
- [param('uint32_t', 'i')],
- is_const=True)
- ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetTraceSourceN() const [member function]
- cls.add_method('GetTraceSourceN',
- 'uint32_t',
- [],
- is_const=True)
- ## type-id.h (module 'core'): uint16_t ns3::TypeId::GetUid() const [member function]
- cls.add_method('GetUid',
- 'uint16_t',
- [],
- is_const=True)
- ## type-id.h (module 'core'): bool ns3::TypeId::HasConstructor() const [member function]
- cls.add_method('HasConstructor',
- 'bool',
- [],
- is_const=True)
- ## type-id.h (module 'core'): bool ns3::TypeId::HasParent() const [member function]
- cls.add_method('HasParent',
- 'bool',
- [],
- is_const=True)
- ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::HideFromDocumentation() [member function]
- cls.add_method('HideFromDocumentation',
- 'ns3::TypeId',
- [])
- ## type-id.h (module 'core'): bool ns3::TypeId::IsChildOf(ns3::TypeId other) const [member function]
- cls.add_method('IsChildOf',
- 'bool',
- [param('ns3::TypeId', 'other')],
- is_const=True)
- ## type-id.h (module 'core'): bool ns3::TypeId::LookupAttributeByName(std::string name, ns3::TypeId::AttributeInformation * info) const [member function]
- cls.add_method('LookupAttributeByName',
- '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::LookupByName(std::string name) [member function]
- cls.add_method('LookupByName',
- 'ns3::TypeId',
- [param('std::string', 'name')],
- is_static=True)
- ## type-id.h (module 'core'): ns3::Ptr<ns3::TraceSourceAccessor const> ns3::TypeId::LookupTraceSourceByName(std::string name) const [member function]
- cls.add_method('LookupTraceSourceByName',
- 'ns3::Ptr< ns3::TraceSourceAccessor const >',
- [param('std::string', 'name')],
- is_const=True)
- ## type-id.h (module 'core'): bool ns3::TypeId::MustHideFromDocumentation() const [member function]
- cls.add_method('MustHideFromDocumentation',
- 'bool',
- [],
- is_const=True)
- ## type-id.h (module 'core'): bool ns3::TypeId::SetAttributeInitialValue(uint32_t i, ns3::Ptr<ns3::AttributeValue const> initialValue) [member function]
- cls.add_method('SetAttributeInitialValue',
- 'bool',
- [param('uint32_t', 'i'), param('ns3::Ptr< ns3::AttributeValue const >', 'initialValue')])
- ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetGroupName(std::string groupName) [member function]
- cls.add_method('SetGroupName',
- 'ns3::TypeId',
- [param('std::string', 'groupName')])
- ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetParent(ns3::TypeId tid) [member function]
- cls.add_method('SetParent',
- 'ns3::TypeId',
- [param('ns3::TypeId', 'tid')])
- ## type-id.h (module 'core'): void ns3::TypeId::SetUid(uint16_t tid) [member function]
- cls.add_method('SetUid',
- 'void',
- [param('uint16_t', 'tid')])
- return
-
-def register_Ns3TypeIdAttributeInformation_methods(root_module, cls):
- ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::AttributeInformation() [constructor]
- cls.add_constructor([])
- ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::AttributeInformation(ns3::TypeId::AttributeInformation const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::TypeId::AttributeInformation const &', 'arg0')])
- ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::accessor [variable]
- cls.add_instance_attribute('accessor', 'ns3::Ptr< ns3::AttributeAccessor const >', is_const=False)
- ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::checker [variable]
- cls.add_instance_attribute('checker', 'ns3::Ptr< ns3::AttributeChecker const >', is_const=False)
- ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::flags [variable]
- cls.add_instance_attribute('flags', 'uint32_t', is_const=False)
- ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::help [variable]
- cls.add_instance_attribute('help', 'std::string', is_const=False)
- ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::initialValue [variable]
- cls.add_instance_attribute('initialValue', 'ns3::Ptr< ns3::AttributeValue const >', is_const=False)
- ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::name [variable]
- cls.add_instance_attribute('name', 'std::string', is_const=False)
- ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::originalInitialValue [variable]
- cls.add_instance_attribute('originalInitialValue', 'ns3::Ptr< ns3::AttributeValue const >', is_const=False)
- return
-
-def register_Ns3TypeIdTraceSourceInformation_methods(root_module, cls):
- ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::TraceSourceInformation() [constructor]
- cls.add_constructor([])
- ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::TraceSourceInformation(ns3::TypeId::TraceSourceInformation const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::TypeId::TraceSourceInformation const &', 'arg0')])
- ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::accessor [variable]
- cls.add_instance_attribute('accessor', 'ns3::Ptr< ns3::TraceSourceAccessor const >', is_const=False)
- ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::help [variable]
- cls.add_instance_attribute('help', 'std::string', is_const=False)
- ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::name [variable]
- cls.add_instance_attribute('name', 'std::string', is_const=False)
- return
-
-def register_Ns3Empty_methods(root_module, cls):
- ## empty.h (module 'core'): ns3::empty::empty() [constructor]
- cls.add_constructor([])
- ## empty.h (module 'core'): ns3::empty::empty(ns3::empty const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::empty const &', 'arg0')])
- return
-
-def register_Ns3Int64x64_t_methods(root_module, cls):
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right'))
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right'))
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right'))
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short unsigned int const', 'right'))
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned char const', 'right'))
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long int const', 'right'))
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long int const', 'right'))
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('int const', 'right'))
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short int const', 'right'))
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('signed char const', 'right'))
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('double const', 'right'))
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short unsigned int const', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned char const', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long int const', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long int const', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('int const', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short int const', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('signed char const', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('double const', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short unsigned int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned char const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('signed char const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('double const', 'right'))
- cls.add_unary_numeric_operator('-')
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short unsigned int const', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned char const', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long int const', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long int const', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('int const', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short int const', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('signed char const', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('double const', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', 'right'))
- cls.add_binary_comparison_operator('<')
- cls.add_binary_comparison_operator('>')
- cls.add_binary_comparison_operator('!=')
- cls.add_inplace_numeric_operator('*=', param('ns3::int64x64_t const &', 'right'))
- cls.add_inplace_numeric_operator('+=', param('ns3::int64x64_t const &', 'right'))
- cls.add_inplace_numeric_operator('-=', param('ns3::int64x64_t const &', 'right'))
- cls.add_inplace_numeric_operator('/=', param('ns3::int64x64_t const &', 'right'))
- cls.add_output_stream_operator()
- cls.add_binary_comparison_operator('<=')
- cls.add_binary_comparison_operator('==')
- cls.add_binary_comparison_operator('>=')
- ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t() [constructor]
- cls.add_constructor([])
- ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(double v) [constructor]
- cls.add_constructor([param('double', 'v')])
- ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(int v) [constructor]
- cls.add_constructor([param('int', 'v')])
- ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(long int v) [constructor]
- cls.add_constructor([param('long int', 'v')])
- ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(long long int v) [constructor]
- cls.add_constructor([param('long long int', 'v')])
- ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(unsigned int v) [constructor]
- cls.add_constructor([param('unsigned int', 'v')])
- ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(long unsigned int v) [constructor]
- cls.add_constructor([param('long unsigned int', 'v')])
- ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(long long unsigned int v) [constructor]
- cls.add_constructor([param('long long unsigned int', 'v')])
- ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(int64_t hi, uint64_t lo) [constructor]
- cls.add_constructor([param('int64_t', 'hi'), param('uint64_t', 'lo')])
- ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(ns3::int64x64_t const & o) [copy constructor]
- cls.add_constructor([param('ns3::int64x64_t const &', 'o')])
- ## int64x64-double.h (module 'core'): double ns3::int64x64_t::GetDouble() const [member function]
- cls.add_method('GetDouble',
- 'double',
- [],
- is_const=True)
- ## int64x64-double.h (module 'core'): int64_t ns3::int64x64_t::GetHigh() const [member function]
- cls.add_method('GetHigh',
- 'int64_t',
- [],
- is_const=True)
- ## int64x64-double.h (module 'core'): uint64_t ns3::int64x64_t::GetLow() const [member function]
- cls.add_method('GetLow',
- 'uint64_t',
- [],
- is_const=True)
- ## int64x64-double.h (module 'core'): static ns3::int64x64_t ns3::int64x64_t::Invert(uint64_t v) [member function]
- cls.add_method('Invert',
- 'ns3::int64x64_t',
- [param('uint64_t', 'v')],
- is_static=True)
- ## int64x64-double.h (module 'core'): void ns3::int64x64_t::MulByInvert(ns3::int64x64_t const & o) [member function]
- cls.add_method('MulByInvert',
- 'void',
- [param('ns3::int64x64_t const &', 'o')])
- return
-
-def register_Ns3Chunk_methods(root_module, cls):
- ## chunk.h (module 'network'): ns3::Chunk::Chunk() [constructor]
- cls.add_constructor([])
- ## chunk.h (module 'network'): ns3::Chunk::Chunk(ns3::Chunk const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Chunk const &', 'arg0')])
- ## chunk.h (module 'network'): uint32_t ns3::Chunk::Deserialize(ns3::Buffer::Iterator start) [member function]
- cls.add_method('Deserialize',
- 'uint32_t',
- [param('ns3::Buffer::Iterator', 'start')],
- is_pure_virtual=True, is_virtual=True)
- ## chunk.h (module 'network'): static ns3::TypeId ns3::Chunk::GetTypeId() [member function]
- cls.add_method('GetTypeId',
- 'ns3::TypeId',
- [],
- is_static=True)
- ## chunk.h (module 'network'): void ns3::Chunk::Print(std::ostream & os) const [member function]
- cls.add_method('Print',
- 'void',
- [param('std::ostream &', 'os')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- return
-
-def register_Ns3Gnuplot2dDataset_methods(root_module, cls):
- ## gnuplot.h (module 'tools'): ns3::Gnuplot2dDataset::Gnuplot2dDataset(ns3::Gnuplot2dDataset const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Gnuplot2dDataset const &', 'arg0')])
- ## gnuplot.h (module 'tools'): ns3::Gnuplot2dDataset::Gnuplot2dDataset(std::string const & title="Untitled") [constructor]
- cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot2dDataset::Add(double x, double y) [member function]
- cls.add_method('Add',
- 'void',
- [param('double', 'x'), param('double', 'y')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot2dDataset::Add(double x, double y, double errorDelta) [member function]
- cls.add_method('Add',
- 'void',
- [param('double', 'x'), param('double', 'y'), param('double', 'errorDelta')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot2dDataset::Add(double x, double y, double xErrorDelta, double yErrorDelta) [member function]
- cls.add_method('Add',
- 'void',
- [param('double', 'x'), param('double', 'y'), param('double', 'xErrorDelta'), param('double', 'yErrorDelta')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot2dDataset::AddEmptyLine() [member function]
- cls.add_method('AddEmptyLine',
- 'void',
- [])
- ## gnuplot.h (module 'tools'): static void ns3::Gnuplot2dDataset::SetDefaultErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function]
- cls.add_method('SetDefaultErrorBars',
- 'void',
- [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')],
- is_static=True)
- ## gnuplot.h (module 'tools'): static void ns3::Gnuplot2dDataset::SetDefaultStyle(ns3::Gnuplot2dDataset::Style style) [member function]
- cls.add_method('SetDefaultStyle',
- 'void',
- [param('ns3::Gnuplot2dDataset::Style', 'style')],
- is_static=True)
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot2dDataset::SetErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function]
- cls.add_method('SetErrorBars',
- 'void',
- [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot2dDataset::SetStyle(ns3::Gnuplot2dDataset::Style style) [member function]
- cls.add_method('SetStyle',
- 'void',
- [param('ns3::Gnuplot2dDataset::Style', 'style')])
- return
-
-def register_Ns3Gnuplot2dFunction_methods(root_module, cls):
- ## gnuplot.h (module 'tools'): ns3::Gnuplot2dFunction::Gnuplot2dFunction(ns3::Gnuplot2dFunction const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Gnuplot2dFunction const &', 'arg0')])
- ## gnuplot.h (module 'tools'): ns3::Gnuplot2dFunction::Gnuplot2dFunction(std::string const & title="Untitled", std::string const & function="") [constructor]
- cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"'), param('std::string const &', 'function', default_value='""')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot2dFunction::SetFunction(std::string const & function) [member function]
- cls.add_method('SetFunction',
- 'void',
- [param('std::string const &', 'function')])
- return
-
-def register_Ns3Gnuplot3dDataset_methods(root_module, cls):
- ## gnuplot.h (module 'tools'): ns3::Gnuplot3dDataset::Gnuplot3dDataset(ns3::Gnuplot3dDataset const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Gnuplot3dDataset const &', 'arg0')])
- ## gnuplot.h (module 'tools'): ns3::Gnuplot3dDataset::Gnuplot3dDataset(std::string const & title="Untitled") [constructor]
- cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot3dDataset::Add(double x, double y, double z) [member function]
- cls.add_method('Add',
- 'void',
- [param('double', 'x'), param('double', 'y'), param('double', 'z')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot3dDataset::AddEmptyLine() [member function]
- cls.add_method('AddEmptyLine',
- 'void',
- [])
- ## gnuplot.h (module 'tools'): static void ns3::Gnuplot3dDataset::SetDefaultStyle(std::string const & style) [member function]
- cls.add_method('SetDefaultStyle',
- 'void',
- [param('std::string const &', 'style')],
- is_static=True)
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot3dDataset::SetStyle(std::string const & style) [member function]
- cls.add_method('SetStyle',
- 'void',
- [param('std::string const &', 'style')])
- return
-
-def register_Ns3Gnuplot3dFunction_methods(root_module, cls):
- ## gnuplot.h (module 'tools'): ns3::Gnuplot3dFunction::Gnuplot3dFunction(ns3::Gnuplot3dFunction const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Gnuplot3dFunction const &', 'arg0')])
- ## gnuplot.h (module 'tools'): ns3::Gnuplot3dFunction::Gnuplot3dFunction(std::string const & title="Untitled", std::string const & function="") [constructor]
- cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"'), param('std::string const &', 'function', default_value='""')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot3dFunction::SetFunction(std::string const & function) [member function]
- cls.add_method('SetFunction',
- 'void',
- [param('std::string const &', 'function')])
- return
-
-def register_Ns3Header_methods(root_module, cls):
- cls.add_output_stream_operator()
- ## header.h (module 'network'): ns3::Header::Header() [constructor]
- cls.add_constructor([])
- ## header.h (module 'network'): ns3::Header::Header(ns3::Header const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Header const &', 'arg0')])
- ## header.h (module 'network'): uint32_t ns3::Header::Deserialize(ns3::Buffer::Iterator start) [member function]
- cls.add_method('Deserialize',
- 'uint32_t',
- [param('ns3::Buffer::Iterator', 'start')],
- is_pure_virtual=True, is_virtual=True)
- ## header.h (module 'network'): uint32_t ns3::Header::GetSerializedSize() const [member function]
- cls.add_method('GetSerializedSize',
- 'uint32_t',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## header.h (module 'network'): static ns3::TypeId ns3::Header::GetTypeId() [member function]
- cls.add_method('GetTypeId',
- 'ns3::TypeId',
- [],
- is_static=True)
- ## header.h (module 'network'): void ns3::Header::Print(std::ostream & os) const [member function]
- cls.add_method('Print',
- 'void',
- [param('std::ostream &', 'os')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## header.h (module 'network'): void ns3::Header::Serialize(ns3::Buffer::Iterator start) const [member function]
- cls.add_method('Serialize',
- 'void',
- [param('ns3::Buffer::Iterator', 'start')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- return
-
-def register_Ns3Object_methods(root_module, cls):
- ## object.h (module 'core'): ns3::Object::Object() [constructor]
- cls.add_constructor([])
- ## object.h (module 'core'): void ns3::Object::AggregateObject(ns3::Ptr<ns3::Object> other) [member function]
- cls.add_method('AggregateObject',
- 'void',
- [param('ns3::Ptr< ns3::Object >', 'other')])
- ## object.h (module 'core'): void ns3::Object::Dispose() [member function]
- cls.add_method('Dispose',
- 'void',
- [])
- ## object.h (module 'core'): ns3::Object::AggregateIterator ns3::Object::GetAggregateIterator() const [member function]
- cls.add_method('GetAggregateIterator',
- 'ns3::Object::AggregateIterator',
- [],
- is_const=True)
- ## object.h (module 'core'): ns3::TypeId ns3::Object::GetInstanceTypeId() const [member function]
- cls.add_method('GetInstanceTypeId',
- 'ns3::TypeId',
- [],
- is_const=True, is_virtual=True)
- ## object.h (module 'core'): static ns3::TypeId ns3::Object::GetTypeId() [member function]
- cls.add_method('GetTypeId',
- 'ns3::TypeId',
- [],
- is_static=True)
- ## 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]
- cls.add_constructor([param('ns3::Object const &', 'o')],
- visibility='protected')
- ## object.h (module 'core'): void ns3::Object::DoDispose() [member function]
- cls.add_method('DoDispose',
- 'void',
- [],
- visibility='protected', is_virtual=True)
- ## object.h (module 'core'): void ns3::Object::DoInitialize() [member function]
- cls.add_method('DoInitialize',
- 'void',
- [],
- visibility='protected', is_virtual=True)
- ## object.h (module 'core'): void ns3::Object::NotifyNewAggregate() [member function]
- cls.add_method('NotifyNewAggregate',
- 'void',
- [],
- visibility='protected', is_virtual=True)
- return
-
-def register_Ns3ObjectAggregateIterator_methods(root_module, cls):
- ## object.h (module 'core'): ns3::Object::AggregateIterator::AggregateIterator(ns3::Object::AggregateIterator const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Object::AggregateIterator const &', 'arg0')])
- ## object.h (module 'core'): ns3::Object::AggregateIterator::AggregateIterator() [constructor]
- cls.add_constructor([])
- ## object.h (module 'core'): bool ns3::Object::AggregateIterator::HasNext() const [member function]
- cls.add_method('HasNext',
- 'bool',
- [],
- is_const=True)
- ## object.h (module 'core'): ns3::Ptr<ns3::Object const> ns3::Object::AggregateIterator::Next() [member function]
- cls.add_method('Next',
- 'ns3::Ptr< ns3::Object const >',
- [])
- return
-
-def register_Ns3SimpleRefCount__Ns3AttributeAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeAccessor__gt___methods(root_module, cls):
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> >::SimpleRefCount() [constructor]
- cls.add_constructor([])
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> >::SimpleRefCount(ns3::SimpleRefCount<ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> > const & o) [copy constructor]
- cls.add_constructor([param('ns3::SimpleRefCount< ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter< ns3::AttributeAccessor > > const &', 'o')])
- ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> >::Cleanup() [member function]
- cls.add_method('Cleanup',
- 'void',
- [],
- is_static=True)
- return
-
-def register_Ns3SimpleRefCount__Ns3AttributeChecker_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeChecker__gt___methods(root_module, cls):
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> >::SimpleRefCount() [constructor]
- cls.add_constructor([])
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> >::SimpleRefCount(ns3::SimpleRefCount<ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> > const & o) [copy constructor]
- cls.add_constructor([param('ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter< ns3::AttributeChecker > > const &', 'o')])
- ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> >::Cleanup() [member function]
- cls.add_method('Cleanup',
- 'void',
- [],
- is_static=True)
- return
-
-def register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, cls):
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> >::SimpleRefCount() [constructor]
- cls.add_constructor([])
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> >::SimpleRefCount(ns3::SimpleRefCount<ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> > const & o) [copy constructor]
- cls.add_constructor([param('ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter< ns3::AttributeValue > > const &', 'o')])
- ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> >::Cleanup() [member function]
- cls.add_method('Cleanup',
- 'void',
- [],
- is_static=True)
- return
-
-def register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, cls):
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >::SimpleRefCount() [constructor]
- cls.add_constructor([])
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >::SimpleRefCount(ns3::SimpleRefCount<ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> > const & o) [copy constructor]
- cls.add_constructor([param('ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter< ns3::CallbackImplBase > > const &', 'o')])
- ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >::Cleanup() [member function]
- cls.add_method('Cleanup',
- 'void',
- [],
- is_static=True)
- return
-
-def register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, cls):
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> >::SimpleRefCount() [constructor]
- cls.add_constructor([])
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> >::SimpleRefCount(ns3::SimpleRefCount<ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> > const & o) [copy constructor]
- cls.add_constructor([param('ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter< ns3::EventImpl > > const &', 'o')])
- ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> >::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<ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> >::SimpleRefCount() [constructor]
- cls.add_constructor([])
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> >::SimpleRefCount(ns3::SimpleRefCount<ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> > const & o) [copy constructor]
- cls.add_constructor([param('ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter< ns3::NixVector > > const &', 'o')])
- ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> >::Cleanup() [member function]
- cls.add_method('Cleanup',
- 'void',
- [],
- is_static=True)
- return
-
-def register_Ns3SimpleRefCount__Ns3Packet_Ns3Empty_Ns3DefaultDeleter__lt__ns3Packet__gt___methods(root_module, cls):
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >::SimpleRefCount() [constructor]
- cls.add_constructor([])
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >::SimpleRefCount(ns3::SimpleRefCount<ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> > const & o) [copy constructor]
- cls.add_constructor([param('ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter< ns3::Packet > > const &', 'o')])
- ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >::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<ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> >::SimpleRefCount() [constructor]
- cls.add_constructor([])
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> >::SimpleRefCount(ns3::SimpleRefCount<ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> > const & o) [copy constructor]
- cls.add_constructor([param('ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter< ns3::TraceSourceAccessor > > const &', 'o')])
- ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> >::Cleanup() [member function]
- cls.add_method('Cleanup',
- 'void',
- [],
- is_static=True)
- return
-
-def register_Ns3Time_methods(root_module, cls):
- cls.add_binary_numeric_operator('+', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right'))
- cls.add_binary_comparison_operator('<')
- cls.add_binary_comparison_operator('>')
- cls.add_binary_comparison_operator('!=')
- cls.add_inplace_numeric_operator('+=', param('ns3::Time const &', 'right'))
- cls.add_inplace_numeric_operator('-=', param('ns3::Time const &', 'right'))
- cls.add_output_stream_operator()
- cls.add_binary_comparison_operator('<=')
- cls.add_binary_comparison_operator('==')
- cls.add_binary_comparison_operator('>=')
- ## nstime.h (module 'core'): ns3::Time::Time() [constructor]
- cls.add_constructor([])
- ## nstime.h (module 'core'): ns3::Time::Time(ns3::Time const & o) [copy constructor]
- cls.add_constructor([param('ns3::Time const &', 'o')])
- ## nstime.h (module 'core'): ns3::Time::Time(double v) [constructor]
- cls.add_constructor([param('double', 'v')])
- ## nstime.h (module 'core'): ns3::Time::Time(int v) [constructor]
- cls.add_constructor([param('int', 'v')])
- ## nstime.h (module 'core'): ns3::Time::Time(long int v) [constructor]
- cls.add_constructor([param('long int', 'v')])
- ## nstime.h (module 'core'): ns3::Time::Time(long long int v) [constructor]
- cls.add_constructor([param('long long int', 'v')])
- ## nstime.h (module 'core'): ns3::Time::Time(unsigned int v) [constructor]
- cls.add_constructor([param('unsigned int', 'v')])
- ## nstime.h (module 'core'): ns3::Time::Time(long unsigned int v) [constructor]
- cls.add_constructor([param('long unsigned int', 'v')])
- ## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor]
- cls.add_constructor([param('long long unsigned int', 'v')])
- ## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor]
- cls.add_constructor([param('std::string const &', 's')])
- ## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor]
- cls.add_constructor([param('ns3::int64x64_t const &', 'value')])
- ## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function]
- cls.add_method('Compare',
- 'int',
- [param('ns3::Time const &', 'o')],
- is_const=True)
- ## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function]
- cls.add_method('From',
- 'ns3::Time',
- [param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')],
- is_static=True)
- ## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function]
- cls.add_method('From',
- 'ns3::Time',
- [param('ns3::int64x64_t const &', 'value')],
- is_static=True)
- ## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function]
- cls.add_method('FromDouble',
- 'ns3::Time',
- [param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')],
- is_static=True)
- ## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function]
- cls.add_method('FromInteger',
- 'ns3::Time',
- [param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')],
- is_static=True)
- ## nstime.h (module 'core'): double ns3::Time::GetDouble() const [member function]
- cls.add_method('GetDouble',
- 'double',
- [],
- is_const=True)
- ## nstime.h (module 'core'): int64_t ns3::Time::GetFemtoSeconds() const [member function]
- cls.add_method('GetFemtoSeconds',
- 'int64_t',
- [],
- is_const=True)
- ## nstime.h (module 'core'): int64_t ns3::Time::GetInteger() const [member function]
- cls.add_method('GetInteger',
- 'int64_t',
- [],
- is_const=True)
- ## nstime.h (module 'core'): int64_t ns3::Time::GetMicroSeconds() const [member function]
- cls.add_method('GetMicroSeconds',
- 'int64_t',
- [],
- is_const=True)
- ## nstime.h (module 'core'): int64_t ns3::Time::GetMilliSeconds() const [member function]
- cls.add_method('GetMilliSeconds',
- 'int64_t',
- [],
- is_const=True)
- ## nstime.h (module 'core'): int64_t ns3::Time::GetNanoSeconds() const [member function]
- cls.add_method('GetNanoSeconds',
- 'int64_t',
- [],
- is_const=True)
- ## nstime.h (module 'core'): int64_t ns3::Time::GetPicoSeconds() const [member function]
- cls.add_method('GetPicoSeconds',
- 'int64_t',
- [],
- is_const=True)
- ## nstime.h (module 'core'): static ns3::Time::Unit ns3::Time::GetResolution() [member function]
- cls.add_method('GetResolution',
- 'ns3::Time::Unit',
- [],
- is_static=True)
- ## nstime.h (module 'core'): double ns3::Time::GetSeconds() const [member function]
- cls.add_method('GetSeconds',
- 'double',
- [],
- is_const=True)
- ## nstime.h (module 'core'): int64_t ns3::Time::GetTimeStep() const [member function]
- cls.add_method('GetTimeStep',
- 'int64_t',
- [],
- is_const=True)
- ## nstime.h (module 'core'): bool ns3::Time::IsNegative() const [member function]
- cls.add_method('IsNegative',
- 'bool',
- [],
- is_const=True)
- ## nstime.h (module 'core'): bool ns3::Time::IsPositive() const [member function]
- cls.add_method('IsPositive',
- 'bool',
- [],
- is_const=True)
- ## nstime.h (module 'core'): bool ns3::Time::IsStrictlyNegative() const [member function]
- cls.add_method('IsStrictlyNegative',
- 'bool',
- [],
- is_const=True)
- ## nstime.h (module 'core'): bool ns3::Time::IsStrictlyPositive() const [member function]
- cls.add_method('IsStrictlyPositive',
- 'bool',
- [],
- is_const=True)
- ## nstime.h (module 'core'): bool ns3::Time::IsZero() const [member function]
- cls.add_method('IsZero',
- 'bool',
- [],
- is_const=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'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function]
- cls.add_method('To',
- 'ns3::int64x64_t',
- [param('ns3::Time::Unit', 'timeUnit')],
- is_const=True)
- ## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function]
- cls.add_method('ToDouble',
- 'double',
- [param('ns3::Time::Unit', 'timeUnit')],
- is_const=True)
- ## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function]
- cls.add_method('ToInteger',
- 'int64_t',
- [param('ns3::Time::Unit', 'timeUnit')],
- is_const=True)
- return
-
-def register_Ns3TraceSourceAccessor_methods(root_module, cls):
- ## trace-source-accessor.h (module 'core'): ns3::TraceSourceAccessor::TraceSourceAccessor(ns3::TraceSourceAccessor const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::TraceSourceAccessor const &', 'arg0')])
- ## trace-source-accessor.h (module 'core'): ns3::TraceSourceAccessor::TraceSourceAccessor() [constructor]
- cls.add_constructor([])
- ## trace-source-accessor.h (module 'core'): bool ns3::TraceSourceAccessor::Connect(ns3::ObjectBase * obj, std::string context, ns3::CallbackBase const & cb) const [member function]
- cls.add_method('Connect',
- 'bool',
- [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## trace-source-accessor.h (module 'core'): bool ns3::TraceSourceAccessor::ConnectWithoutContext(ns3::ObjectBase * obj, ns3::CallbackBase const & cb) const [member function]
- cls.add_method('ConnectWithoutContext',
- 'bool',
- [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('ns3::CallbackBase const &', 'cb')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## trace-source-accessor.h (module 'core'): bool ns3::TraceSourceAccessor::Disconnect(ns3::ObjectBase * obj, std::string context, ns3::CallbackBase const & cb) const [member function]
- cls.add_method('Disconnect',
- 'bool',
- [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## trace-source-accessor.h (module 'core'): bool ns3::TraceSourceAccessor::DisconnectWithoutContext(ns3::ObjectBase * obj, ns3::CallbackBase const & cb) const [member function]
- cls.add_method('DisconnectWithoutContext',
- 'bool',
- [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('ns3::CallbackBase const &', 'cb')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- return
-
-def register_Ns3Trailer_methods(root_module, cls):
- cls.add_output_stream_operator()
- ## trailer.h (module 'network'): ns3::Trailer::Trailer() [constructor]
- cls.add_constructor([])
- ## trailer.h (module 'network'): ns3::Trailer::Trailer(ns3::Trailer const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Trailer const &', 'arg0')])
- ## trailer.h (module 'network'): uint32_t ns3::Trailer::Deserialize(ns3::Buffer::Iterator end) [member function]
- cls.add_method('Deserialize',
- 'uint32_t',
- [param('ns3::Buffer::Iterator', 'end')],
- is_pure_virtual=True, is_virtual=True)
- ## trailer.h (module 'network'): uint32_t ns3::Trailer::GetSerializedSize() const [member function]
- cls.add_method('GetSerializedSize',
- 'uint32_t',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## trailer.h (module 'network'): static ns3::TypeId ns3::Trailer::GetTypeId() [member function]
- cls.add_method('GetTypeId',
- 'ns3::TypeId',
- [],
- is_static=True)
- ## trailer.h (module 'network'): void ns3::Trailer::Print(std::ostream & os) const [member function]
- cls.add_method('Print',
- 'void',
- [param('std::ostream &', 'os')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## trailer.h (module 'network'): void ns3::Trailer::Serialize(ns3::Buffer::Iterator start) const [member function]
- cls.add_method('Serialize',
- 'void',
- [param('ns3::Buffer::Iterator', 'start')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- return
-
-def register_Ns3AttributeAccessor_methods(root_module, cls):
- ## attribute.h (module 'core'): ns3::AttributeAccessor::AttributeAccessor(ns3::AttributeAccessor const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::AttributeAccessor const &', 'arg0')])
- ## attribute.h (module 'core'): ns3::AttributeAccessor::AttributeAccessor() [constructor]
- cls.add_constructor([])
- ## attribute.h (module 'core'): bool ns3::AttributeAccessor::Get(ns3::ObjectBase const * object, ns3::AttributeValue & attribute) const [member function]
- cls.add_method('Get',
- 'bool',
- [param('ns3::ObjectBase const *', 'object'), param('ns3::AttributeValue &', 'attribute')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## attribute.h (module 'core'): bool ns3::AttributeAccessor::HasGetter() const [member function]
- cls.add_method('HasGetter',
- 'bool',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## attribute.h (module 'core'): bool ns3::AttributeAccessor::HasSetter() const [member function]
- cls.add_method('HasSetter',
- 'bool',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## attribute.h (module 'core'): bool ns3::AttributeAccessor::Set(ns3::ObjectBase * object, ns3::AttributeValue const & value) const [member function]
- cls.add_method('Set',
- 'bool',
- [param('ns3::ObjectBase *', 'object', transfer_ownership=False), param('ns3::AttributeValue const &', 'value')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- return
-
-def register_Ns3AttributeChecker_methods(root_module, cls):
- ## attribute.h (module 'core'): ns3::AttributeChecker::AttributeChecker(ns3::AttributeChecker const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::AttributeChecker const &', 'arg0')])
- ## attribute.h (module 'core'): ns3::AttributeChecker::AttributeChecker() [constructor]
- cls.add_constructor([])
- ## attribute.h (module 'core'): bool ns3::AttributeChecker::Check(ns3::AttributeValue const & value) const [member function]
- cls.add_method('Check',
- 'bool',
- [param('ns3::AttributeValue const &', 'value')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## attribute.h (module 'core'): bool ns3::AttributeChecker::Copy(ns3::AttributeValue const & source, ns3::AttributeValue & destination) const [member function]
- cls.add_method('Copy',
- 'bool',
- [param('ns3::AttributeValue const &', 'source'), param('ns3::AttributeValue &', 'destination')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## attribute.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::AttributeChecker::Create() const [member function]
- cls.add_method('Create',
- 'ns3::Ptr< ns3::AttributeValue >',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## attribute.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::AttributeChecker::CreateValidValue(ns3::AttributeValue const & value) const [member function]
- cls.add_method('CreateValidValue',
- 'ns3::Ptr< ns3::AttributeValue >',
- [param('ns3::AttributeValue const &', 'value')],
- is_const=True)
- ## attribute.h (module 'core'): std::string ns3::AttributeChecker::GetUnderlyingTypeInformation() const [member function]
- cls.add_method('GetUnderlyingTypeInformation',
- 'std::string',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## attribute.h (module 'core'): std::string ns3::AttributeChecker::GetValueTypeName() const [member function]
- cls.add_method('GetValueTypeName',
- 'std::string',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## attribute.h (module 'core'): bool ns3::AttributeChecker::HasUnderlyingTypeInformation() const [member function]
- cls.add_method('HasUnderlyingTypeInformation',
- 'bool',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- return
-
-def register_Ns3AttributeValue_methods(root_module, cls):
- ## attribute.h (module 'core'): ns3::AttributeValue::AttributeValue(ns3::AttributeValue const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::AttributeValue const &', 'arg0')])
- ## attribute.h (module 'core'): ns3::AttributeValue::AttributeValue() [constructor]
- cls.add_constructor([])
- ## attribute.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::AttributeValue::Copy() const [member function]
- cls.add_method('Copy',
- 'ns3::Ptr< ns3::AttributeValue >',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## attribute.h (module 'core'): bool ns3::AttributeValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function]
- cls.add_method('DeserializeFromString',
- 'bool',
- [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_pure_virtual=True, is_virtual=True)
- ## attribute.h (module 'core'): std::string ns3::AttributeValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function]
- cls.add_method('SerializeToString',
- 'std::string',
- [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- return
-
-def register_Ns3CallbackChecker_methods(root_module, cls):
- ## callback.h (module 'core'): ns3::CallbackChecker::CallbackChecker() [constructor]
- cls.add_constructor([])
- ## callback.h (module 'core'): ns3::CallbackChecker::CallbackChecker(ns3::CallbackChecker const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::CallbackChecker const &', 'arg0')])
- return
-
-def register_Ns3CallbackImplBase_methods(root_module, cls):
- ## callback.h (module 'core'): ns3::CallbackImplBase::CallbackImplBase() [constructor]
- cls.add_constructor([])
- ## callback.h (module 'core'): ns3::CallbackImplBase::CallbackImplBase(ns3::CallbackImplBase const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::CallbackImplBase const &', 'arg0')])
- ## callback.h (module 'core'): bool ns3::CallbackImplBase::IsEqual(ns3::Ptr<ns3::CallbackImplBase const> other) const [member function]
- cls.add_method('IsEqual',
- 'bool',
- [param('ns3::Ptr< ns3::CallbackImplBase const >', 'other')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- return
-
-def register_Ns3CallbackValue_methods(root_module, cls):
- ## callback.h (module 'core'): ns3::CallbackValue::CallbackValue(ns3::CallbackValue const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::CallbackValue const &', 'arg0')])
- ## callback.h (module 'core'): ns3::CallbackValue::CallbackValue() [constructor]
- cls.add_constructor([])
- ## callback.h (module 'core'): ns3::CallbackValue::CallbackValue(ns3::CallbackBase const & base) [constructor]
- cls.add_constructor([param('ns3::CallbackBase const &', 'base')])
- ## callback.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::CallbackValue::Copy() const [member function]
- cls.add_method('Copy',
- 'ns3::Ptr< ns3::AttributeValue >',
- [],
- is_const=True, is_virtual=True)
- ## callback.h (module 'core'): bool ns3::CallbackValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function]
- cls.add_method('DeserializeFromString',
- 'bool',
- [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_virtual=True)
- ## callback.h (module 'core'): std::string ns3::CallbackValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function]
- cls.add_method('SerializeToString',
- 'std::string',
- [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_const=True, is_virtual=True)
- ## callback.h (module 'core'): void ns3::CallbackValue::Set(ns3::CallbackBase base) [member function]
- cls.add_method('Set',
- 'void',
- [param('ns3::CallbackBase', 'base')])
- return
-
-def register_Ns3DataCalculator_methods(root_module, cls):
- ## data-calculator.h (module 'stats'): ns3::DataCalculator::DataCalculator(ns3::DataCalculator const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::DataCalculator const &', 'arg0')])
- ## data-calculator.h (module 'stats'): ns3::DataCalculator::DataCalculator() [constructor]
- cls.add_constructor([])
- ## data-calculator.h (module 'stats'): void ns3::DataCalculator::Disable() [member function]
- cls.add_method('Disable',
- 'void',
- [])
- ## data-calculator.h (module 'stats'): void ns3::DataCalculator::Enable() [member function]
- cls.add_method('Enable',
- 'void',
- [])
- ## data-calculator.h (module 'stats'): std::string ns3::DataCalculator::GetContext() const [member function]
- cls.add_method('GetContext',
- 'std::string',
- [],
- is_const=True)
- ## data-calculator.h (module 'stats'): bool ns3::DataCalculator::GetEnabled() const [member function]
- cls.add_method('GetEnabled',
- 'bool',
- [],
- is_const=True)
- ## data-calculator.h (module 'stats'): std::string ns3::DataCalculator::GetKey() const [member function]
- cls.add_method('GetKey',
- 'std::string',
- [],
- is_const=True)
- ## data-calculator.h (module 'stats'): void ns3::DataCalculator::Output(ns3::DataOutputCallback & callback) const [member function]
- cls.add_method('Output',
- 'void',
- [param('ns3::DataOutputCallback &', 'callback')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## data-calculator.h (module 'stats'): void ns3::DataCalculator::SetContext(std::string const context) [member function]
- cls.add_method('SetContext',
- 'void',
- [param('std::string const', 'context')])
- ## data-calculator.h (module 'stats'): void ns3::DataCalculator::SetKey(std::string const key) [member function]
- cls.add_method('SetKey',
- 'void',
- [param('std::string const', 'key')])
- ## data-calculator.h (module 'stats'): void ns3::DataCalculator::Start(ns3::Time const & startTime) [member function]
- cls.add_method('Start',
- 'void',
- [param('ns3::Time const &', 'startTime')],
- is_virtual=True)
- ## data-calculator.h (module 'stats'): void ns3::DataCalculator::Stop(ns3::Time const & stopTime) [member function]
- cls.add_method('Stop',
- 'void',
- [param('ns3::Time const &', 'stopTime')],
- is_virtual=True)
- ## data-calculator.h (module 'stats'): void ns3::DataCalculator::DoDispose() [member function]
- cls.add_method('DoDispose',
- 'void',
- [],
- visibility='protected', is_virtual=True)
- 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')])
- ## data-output-interface.h (module 'stats'): ns3::DataOutputInterface::DataOutputInterface() [constructor]
- cls.add_constructor([])
- ## data-output-interface.h (module 'stats'): std::string ns3::DataOutputInterface::GetFilePrefix() const [member function]
- cls.add_method('GetFilePrefix',
- 'std::string',
- [],
- is_const=True)
- ## data-output-interface.h (module 'stats'): void ns3::DataOutputInterface::Output(ns3::DataCollector & dc) [member function]
- cls.add_method('Output',
- 'void',
- [param('ns3::DataCollector &', 'dc')],
- is_pure_virtual=True, is_virtual=True)
- ## data-output-interface.h (module 'stats'): void ns3::DataOutputInterface::SetFilePrefix(std::string const prefix) [member function]
- cls.add_method('SetFilePrefix',
- 'void',
- [param('std::string const', 'prefix')])
- ## data-output-interface.h (module 'stats'): void ns3::DataOutputInterface::DoDispose() [member function]
- cls.add_method('DoDispose',
- 'void',
- [],
- visibility='protected', is_virtual=True)
- return
-
-def register_Ns3EmptyAttributeValue_methods(root_module, cls):
- ## attribute.h (module 'core'): ns3::EmptyAttributeValue::EmptyAttributeValue(ns3::EmptyAttributeValue const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::EmptyAttributeValue const &', 'arg0')])
- ## attribute.h (module 'core'): ns3::EmptyAttributeValue::EmptyAttributeValue() [constructor]
- cls.add_constructor([])
- ## attribute.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::EmptyAttributeValue::Copy() const [member function]
- cls.add_method('Copy',
- 'ns3::Ptr< ns3::AttributeValue >',
- [],
- is_const=True, visibility='private', is_virtual=True)
- ## attribute.h (module 'core'): bool ns3::EmptyAttributeValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function]
- cls.add_method('DeserializeFromString',
- 'bool',
- [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- visibility='private', is_virtual=True)
- ## attribute.h (module 'core'): std::string ns3::EmptyAttributeValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function]
- cls.add_method('SerializeToString',
- 'std::string',
- [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_const=True, visibility='private', is_virtual=True)
- return
-
-def register_Ns3EventImpl_methods(root_module, cls):
- ## event-impl.h (module 'core'): ns3::EventImpl::EventImpl(ns3::EventImpl const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::EventImpl const &', 'arg0')])
- ## event-impl.h (module 'core'): ns3::EventImpl::EventImpl() [constructor]
- cls.add_constructor([])
- ## event-impl.h (module 'core'): void ns3::EventImpl::Cancel() [member function]
- cls.add_method('Cancel',
- 'void',
- [])
- ## event-impl.h (module 'core'): void ns3::EventImpl::Invoke() [member function]
- cls.add_method('Invoke',
- 'void',
- [])
- ## event-impl.h (module 'core'): bool ns3::EventImpl::IsCancelled() [member function]
- cls.add_method('IsCancelled',
- 'bool',
- [])
- ## event-impl.h (module 'core'): void ns3::EventImpl::Notify() [member function]
- cls.add_method('Notify',
- 'void',
- [],
- is_pure_virtual=True, visibility='protected', is_virtual=True)
- return
-
-def register_Ns3MinMaxAvgTotalCalculator__Double_methods(root_module, cls):
- ## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<double>::MinMaxAvgTotalCalculator(ns3::MinMaxAvgTotalCalculator<double> const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::MinMaxAvgTotalCalculator< double > const &', 'arg0')])
- ## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<double>::MinMaxAvgTotalCalculator() [constructor]
- cls.add_constructor([])
- ## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator<double>::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<double>::Reset() [member function]
- cls.add_method('Reset',
- 'void',
- [])
- ## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator<double>::Update(double const i) [member function]
- cls.add_method('Update',
- 'void',
- [param('double const', 'i')])
- ## basic-data-calculators.h (module 'stats'): long int ns3::MinMaxAvgTotalCalculator<double>::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<double>::getMax() const [member function]
- cls.add_method('getMax',
- 'double',
- [],
- is_const=True, is_virtual=True)
- ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getMean() const [member function]
- cls.add_method('getMean',
- 'double',
- [],
- is_const=True, is_virtual=True)
- ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getMin() const [member function]
- cls.add_method('getMin',
- 'double',
- [],
- is_const=True, is_virtual=True)
- ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getSqrSum() const [member function]
- cls.add_method('getSqrSum',
- 'double',
- [],
- is_const=True, is_virtual=True)
- ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getStddev() const [member function]
- cls.add_method('getStddev',
- 'double',
- [],
- is_const=True, is_virtual=True)
- ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getSum() const [member function]
- cls.add_method('getSum',
- 'double',
- [],
- is_const=True, is_virtual=True)
- ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getVariance() const [member function]
- cls.add_method('getVariance',
- 'double',
- [],
- is_const=True, is_virtual=True)
- ## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator<double>::DoDispose() [member function]
- cls.add_method('DoDispose',
- 'void',
- [],
- visibility='protected', is_virtual=True)
- return
-
-def register_Ns3NixVector_methods(root_module, cls):
- cls.add_output_stream_operator()
- ## nix-vector.h (module 'network'): ns3::NixVector::NixVector() [constructor]
- cls.add_constructor([])
- ## nix-vector.h (module 'network'): ns3::NixVector::NixVector(ns3::NixVector const & o) [copy constructor]
- cls.add_constructor([param('ns3::NixVector const &', 'o')])
- ## nix-vector.h (module 'network'): void ns3::NixVector::AddNeighborIndex(uint32_t newBits, uint32_t numberOfBits) [member function]
- cls.add_method('AddNeighborIndex',
- 'void',
- [param('uint32_t', 'newBits'), param('uint32_t', 'numberOfBits')])
- ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::BitCount(uint32_t numberOfNeighbors) const [member function]
- cls.add_method('BitCount',
- 'uint32_t',
- [param('uint32_t', 'numberOfNeighbors')],
- is_const=True)
- ## nix-vector.h (module 'network'): ns3::Ptr<ns3::NixVector> ns3::NixVector::Copy() const [member function]
- cls.add_method('Copy',
- 'ns3::Ptr< ns3::NixVector >',
- [],
- is_const=True)
- ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::Deserialize(uint32_t const * buffer, uint32_t size) [member function]
- cls.add_method('Deserialize',
- 'uint32_t',
- [param('uint32_t const *', 'buffer'), param('uint32_t', 'size')])
- ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::ExtractNeighborIndex(uint32_t numberOfBits) [member function]
- cls.add_method('ExtractNeighborIndex',
- 'uint32_t',
- [param('uint32_t', 'numberOfBits')])
- ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::GetRemainingBits() [member function]
- cls.add_method('GetRemainingBits',
- 'uint32_t',
- [])
- ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::GetSerializedSize() const [member function]
- cls.add_method('GetSerializedSize',
- 'uint32_t',
- [],
- is_const=True)
- ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::Serialize(uint32_t * buffer, uint32_t maxSize) const [member function]
- cls.add_method('Serialize',
- 'uint32_t',
- [param('uint32_t *', 'buffer'), param('uint32_t', 'maxSize')],
- is_const=True)
- return
-
-def register_Ns3ObjectFactoryChecker_methods(root_module, cls):
- ## object-factory.h (module 'core'): ns3::ObjectFactoryChecker::ObjectFactoryChecker() [constructor]
- cls.add_constructor([])
- ## object-factory.h (module 'core'): ns3::ObjectFactoryChecker::ObjectFactoryChecker(ns3::ObjectFactoryChecker const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::ObjectFactoryChecker const &', 'arg0')])
- return
-
-def register_Ns3ObjectFactoryValue_methods(root_module, cls):
- ## object-factory.h (module 'core'): ns3::ObjectFactoryValue::ObjectFactoryValue() [constructor]
- cls.add_constructor([])
- ## object-factory.h (module 'core'): ns3::ObjectFactoryValue::ObjectFactoryValue(ns3::ObjectFactoryValue const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::ObjectFactoryValue const &', 'arg0')])
- ## object-factory.h (module 'core'): ns3::ObjectFactoryValue::ObjectFactoryValue(ns3::ObjectFactory const & value) [constructor]
- cls.add_constructor([param('ns3::ObjectFactory const &', 'value')])
- ## object-factory.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::ObjectFactoryValue::Copy() const [member function]
- cls.add_method('Copy',
- 'ns3::Ptr< ns3::AttributeValue >',
- [],
- is_const=True, is_virtual=True)
- ## object-factory.h (module 'core'): bool ns3::ObjectFactoryValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function]
- cls.add_method('DeserializeFromString',
- 'bool',
- [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_virtual=True)
- ## object-factory.h (module 'core'): ns3::ObjectFactory ns3::ObjectFactoryValue::Get() const [member function]
- cls.add_method('Get',
- 'ns3::ObjectFactory',
- [],
- is_const=True)
- ## object-factory.h (module 'core'): std::string ns3::ObjectFactoryValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function]
- cls.add_method('SerializeToString',
- 'std::string',
- [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_const=True, is_virtual=True)
- ## object-factory.h (module 'core'): void ns3::ObjectFactoryValue::Set(ns3::ObjectFactory const & value) [member function]
- cls.add_method('Set',
- 'void',
- [param('ns3::ObjectFactory const &', 'value')])
- return
-
-def register_Ns3Packet_methods(root_module, cls):
- cls.add_output_stream_operator()
- ## packet.h (module 'network'): ns3::Packet::Packet() [constructor]
- cls.add_constructor([])
- ## packet.h (module 'network'): ns3::Packet::Packet(ns3::Packet const & o) [copy constructor]
- cls.add_constructor([param('ns3::Packet const &', 'o')])
- ## packet.h (module 'network'): ns3::Packet::Packet(uint32_t size) [constructor]
- cls.add_constructor([param('uint32_t', 'size')])
- ## packet.h (module 'network'): ns3::Packet::Packet(uint8_t const * buffer, uint32_t size, bool magic) [constructor]
- 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<const ns3::Packet> packet) [member function]
- cls.add_method('AddAtEnd',
- 'void',
- [param('ns3::Ptr< ns3::Packet const >', 'packet')])
- ## packet.h (module 'network'): void ns3::Packet::AddByteTag(ns3::Tag const & tag) const [member function]
- cls.add_method('AddByteTag',
- 'void',
- [param('ns3::Tag const &', 'tag')],
- is_const=True)
- ## packet.h (module 'network'): void ns3::Packet::AddHeader(ns3::Header const & header) [member function]
- cls.add_method('AddHeader',
- 'void',
- [param('ns3::Header const &', 'header')])
- ## packet.h (module 'network'): void ns3::Packet::AddPacketTag(ns3::Tag const & tag) const [member function]
- cls.add_method('AddPacketTag',
- 'void',
- [param('ns3::Tag const &', 'tag')],
- is_const=True)
- ## packet.h (module 'network'): void ns3::Packet::AddPaddingAtEnd(uint32_t size) [member function]
- cls.add_method('AddPaddingAtEnd',
- 'void',
- [param('uint32_t', 'size')])
- ## packet.h (module 'network'): void ns3::Packet::AddTrailer(ns3::Trailer const & trailer) [member function]
- cls.add_method('AddTrailer',
- 'void',
- [param('ns3::Trailer const &', 'trailer')])
- ## packet.h (module 'network'): ns3::PacketMetadata::ItemIterator ns3::Packet::BeginItem() const [member function]
- cls.add_method('BeginItem',
- 'ns3::PacketMetadata::ItemIterator',
- [],
- is_const=True)
- ## packet.h (module 'network'): ns3::Ptr<ns3::Packet> ns3::Packet::Copy() const [member function]
- cls.add_method('Copy',
- 'ns3::Ptr< ns3::Packet >',
- [],
- is_const=True)
- ## packet.h (module 'network'): uint32_t ns3::Packet::CopyData(uint8_t * buffer, uint32_t size) const [member function]
- cls.add_method('CopyData',
- 'uint32_t',
- [param('uint8_t *', 'buffer'), param('uint32_t', 'size')],
- is_const=True)
- ## packet.h (module 'network'): void ns3::Packet::CopyData(std::ostream * os, uint32_t size) const [member function]
- cls.add_method('CopyData',
- 'void',
- [param('std::ostream *', 'os'), param('uint32_t', 'size')],
- is_const=True)
- ## packet.h (module 'network'): ns3::Ptr<ns3::Packet> ns3::Packet::CreateFragment(uint32_t start, uint32_t length) const [member function]
- cls.add_method('CreateFragment',
- 'ns3::Ptr< ns3::Packet >',
- [param('uint32_t', 'start'), param('uint32_t', 'length')],
- is_const=True)
- ## packet.h (module 'network'): static void ns3::Packet::EnableChecking() [member function]
- cls.add_method('EnableChecking',
- 'void',
- [],
- is_static=True)
- ## packet.h (module 'network'): static void ns3::Packet::EnablePrinting() [member function]
- cls.add_method('EnablePrinting',
- 'void',
- [],
- is_static=True)
- ## packet.h (module 'network'): bool ns3::Packet::FindFirstMatchingByteTag(ns3::Tag & tag) const [member function]
- cls.add_method('FindFirstMatchingByteTag',
- 'bool',
- [param('ns3::Tag &', 'tag')],
- is_const=True)
- ## packet.h (module 'network'): ns3::ByteTagIterator ns3::Packet::GetByteTagIterator() const [member function]
- cls.add_method('GetByteTagIterator',
- 'ns3::ByteTagIterator',
- [],
- is_const=True)
- ## packet.h (module 'network'): ns3::Ptr<ns3::NixVector> ns3::Packet::GetNixVector() const [member function]
- cls.add_method('GetNixVector',
- 'ns3::Ptr< ns3::NixVector >',
- [],
- is_const=True)
- ## packet.h (module 'network'): ns3::PacketTagIterator ns3::Packet::GetPacketTagIterator() const [member function]
- cls.add_method('GetPacketTagIterator',
- 'ns3::PacketTagIterator',
- [],
- is_const=True)
- ## packet.h (module 'network'): uint32_t ns3::Packet::GetSerializedSize() const [member function]
- cls.add_method('GetSerializedSize',
- 'uint32_t',
- [],
- is_const=True)
- ## packet.h (module 'network'): uint32_t ns3::Packet::GetSize() const [member function]
- cls.add_method('GetSize',
- 'uint32_t',
- [],
- is_const=True)
- ## packet.h (module 'network'): uint64_t ns3::Packet::GetUid() const [member function]
- cls.add_method('GetUid',
- 'uint64_t',
- [],
- is_const=True)
- ## packet.h (module 'network'): uint8_t const * ns3::Packet::PeekData() const [member function]
- cls.add_method('PeekData',
- 'uint8_t const *',
- [],
- deprecated=True, is_const=True)
- ## packet.h (module 'network'): uint32_t ns3::Packet::PeekHeader(ns3::Header & header) const [member function]
- cls.add_method('PeekHeader',
- 'uint32_t',
- [param('ns3::Header &', 'header')],
- is_const=True)
- ## packet.h (module 'network'): bool ns3::Packet::PeekPacketTag(ns3::Tag & tag) const [member function]
- cls.add_method('PeekPacketTag',
- 'bool',
- [param('ns3::Tag &', 'tag')],
- is_const=True)
- ## packet.h (module 'network'): uint32_t ns3::Packet::PeekTrailer(ns3::Trailer & trailer) [member function]
- cls.add_method('PeekTrailer',
- 'uint32_t',
- [param('ns3::Trailer &', 'trailer')])
- ## packet.h (module 'network'): void ns3::Packet::Print(std::ostream & os) const [member function]
- cls.add_method('Print',
- 'void',
- [param('std::ostream &', 'os')],
- is_const=True)
- ## packet.h (module 'network'): void ns3::Packet::PrintByteTags(std::ostream & os) const [member function]
- cls.add_method('PrintByteTags',
- 'void',
- [param('std::ostream &', 'os')],
- is_const=True)
- ## packet.h (module 'network'): void ns3::Packet::PrintPacketTags(std::ostream & os) const [member function]
- cls.add_method('PrintPacketTags',
- 'void',
- [param('std::ostream &', 'os')],
- is_const=True)
- ## packet.h (module 'network'): void ns3::Packet::RemoveAllByteTags() [member function]
- cls.add_method('RemoveAllByteTags',
- 'void',
- [])
- ## packet.h (module 'network'): void ns3::Packet::RemoveAllPacketTags() [member function]
- cls.add_method('RemoveAllPacketTags',
- 'void',
- [])
- ## packet.h (module 'network'): void ns3::Packet::RemoveAtEnd(uint32_t size) [member function]
- cls.add_method('RemoveAtEnd',
- 'void',
- [param('uint32_t', 'size')])
- ## packet.h (module 'network'): void ns3::Packet::RemoveAtStart(uint32_t size) [member function]
- cls.add_method('RemoveAtStart',
- 'void',
- [param('uint32_t', 'size')])
- ## packet.h (module 'network'): uint32_t ns3::Packet::RemoveHeader(ns3::Header & header) [member function]
- cls.add_method('RemoveHeader',
- 'uint32_t',
- [param('ns3::Header &', 'header')])
- ## packet.h (module 'network'): bool ns3::Packet::RemovePacketTag(ns3::Tag & tag) [member function]
- cls.add_method('RemovePacketTag',
- 'bool',
- [param('ns3::Tag &', 'tag')])
- ## packet.h (module 'network'): uint32_t ns3::Packet::RemoveTrailer(ns3::Trailer & trailer) [member function]
- cls.add_method('RemoveTrailer',
- 'uint32_t',
- [param('ns3::Trailer &', 'trailer')])
- ## packet.h (module 'network'): uint32_t ns3::Packet::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function]
- cls.add_method('Serialize',
- 'uint32_t',
- [param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')],
- is_const=True)
- ## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> arg0) [member function]
- cls.add_method('SetNixVector',
- 'void',
- [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([])
- ## nstime.h (module 'core'): ns3::TimeValue::TimeValue(ns3::TimeValue const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::TimeValue const &', 'arg0')])
- ## nstime.h (module 'core'): ns3::TimeValue::TimeValue(ns3::Time const & value) [constructor]
- cls.add_constructor([param('ns3::Time const &', 'value')])
- ## nstime.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::TimeValue::Copy() const [member function]
- cls.add_method('Copy',
- 'ns3::Ptr< ns3::AttributeValue >',
- [],
- is_const=True, is_virtual=True)
- ## nstime.h (module 'core'): bool ns3::TimeValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function]
- cls.add_method('DeserializeFromString',
- 'bool',
- [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_virtual=True)
- ## nstime.h (module 'core'): ns3::Time ns3::TimeValue::Get() const [member function]
- cls.add_method('Get',
- 'ns3::Time',
- [],
- is_const=True)
- ## nstime.h (module 'core'): std::string ns3::TimeValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function]
- cls.add_method('SerializeToString',
- 'std::string',
- [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_const=True, is_virtual=True)
- ## nstime.h (module 'core'): void ns3::TimeValue::Set(ns3::Time const & value) [member function]
- cls.add_method('Set',
- 'void',
- [param('ns3::Time const &', 'value')])
- return
-
-def register_Ns3TypeIdChecker_methods(root_module, cls):
- ## type-id.h (module 'core'): ns3::TypeIdChecker::TypeIdChecker() [constructor]
- cls.add_constructor([])
- ## type-id.h (module 'core'): ns3::TypeIdChecker::TypeIdChecker(ns3::TypeIdChecker const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::TypeIdChecker const &', 'arg0')])
- return
-
-def register_Ns3TypeIdValue_methods(root_module, cls):
- ## type-id.h (module 'core'): ns3::TypeIdValue::TypeIdValue() [constructor]
- cls.add_constructor([])
- ## type-id.h (module 'core'): ns3::TypeIdValue::TypeIdValue(ns3::TypeIdValue const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::TypeIdValue const &', 'arg0')])
- ## type-id.h (module 'core'): ns3::TypeIdValue::TypeIdValue(ns3::TypeId const & value) [constructor]
- cls.add_constructor([param('ns3::TypeId const &', 'value')])
- ## type-id.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::TypeIdValue::Copy() const [member function]
- cls.add_method('Copy',
- 'ns3::Ptr< ns3::AttributeValue >',
- [],
- is_const=True, is_virtual=True)
- ## type-id.h (module 'core'): bool ns3::TypeIdValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function]
- cls.add_method('DeserializeFromString',
- 'bool',
- [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_virtual=True)
- ## type-id.h (module 'core'): ns3::TypeId ns3::TypeIdValue::Get() const [member function]
- cls.add_method('Get',
- 'ns3::TypeId',
- [],
- is_const=True)
- ## type-id.h (module 'core'): std::string ns3::TypeIdValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function]
- cls.add_method('SerializeToString',
- 'std::string',
- [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_const=True, is_virtual=True)
- ## type-id.h (module 'core'): void ns3::TypeIdValue::Set(ns3::TypeId const & value) [member function]
- cls.add_method('Set',
- 'void',
- [param('ns3::TypeId const &', 'value')])
- return
-
-def register_functions(root_module):
- module = root_module
- register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module)
- return
-
-def register_functions_ns3_FatalImpl(module, root_module):
- return
-
-def main():
- out = FileCodeSink(sys.stdout)
- root_module = module_init()
- register_types(root_module)
- register_methods(root_module)
- register_functions(root_module)
- root_module.generate(out)
-
-if __name__ == '__main__':
- main()
-
--- a/src/tools/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2921 +0,0 @@
-from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
-
-
-import pybindgen.settings
-import warnings
-
-class ErrorHandler(pybindgen.settings.ErrorHandler):
- def handle_error(self, wrapper, exception, traceback_):
- warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
- return True
-pybindgen.settings.error_handler = ErrorHandler()
-
-
-import sys
-
-def module_init():
- root_module = Module('ns.tools', cpp_namespace='::ns3')
- return root_module
-
-def register_types(module):
- root_module = module.get_root()
-
- ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList [class]
- 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'])
- ## buffer.h (module 'network'): ns3::Buffer [class]
- module.add_class('Buffer', import_from_module='ns.network')
- ## buffer.h (module 'network'): ns3::Buffer::Iterator [class]
- module.add_class('Iterator', import_from_module='ns.network', outer_class=root_module['ns3::Buffer'])
- ## packet.h (module 'network'): ns3::ByteTagIterator [class]
- module.add_class('ByteTagIterator', import_from_module='ns.network')
- ## packet.h (module 'network'): ns3::ByteTagIterator::Item [class]
- module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::ByteTagIterator'])
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList [class]
- module.add_class('ByteTagList', import_from_module='ns.network')
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator [class]
- module.add_class('Iterator', import_from_module='ns.network', outer_class=root_module['ns3::ByteTagList'])
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item [struct]
- module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::ByteTagList::Iterator'])
- ## callback.h (module 'core'): ns3::CallbackBase [class]
- module.add_class('CallbackBase', import_from_module='ns.core')
- ## data-output-interface.h (module 'stats'): ns3::DataOutputCallback [class]
- module.add_class('DataOutputCallback', allow_subclassing=True, import_from_module='ns.stats')
- ## delay-jitter-estimation.h (module 'tools'): ns3::DelayJitterEstimation [class]
- module.add_class('DelayJitterEstimation')
- ## event-garbage-collector.h (module 'tools'): ns3::EventGarbageCollector [class]
- module.add_class('EventGarbageCollector')
- ## event-id.h (module 'core'): ns3::EventId [class]
- module.add_class('EventId', import_from_module='ns.core')
- ## gnuplot.h (module 'tools'): ns3::Gnuplot [class]
- module.add_class('Gnuplot')
- ## gnuplot.h (module 'tools'): ns3::GnuplotCollection [class]
- module.add_class('GnuplotCollection')
- ## gnuplot.h (module 'tools'): ns3::GnuplotDataset [class]
- module.add_class('GnuplotDataset')
- ## 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]
- module.add_class('ObjectDeleter', import_from_module='ns.core')
- ## object-factory.h (module 'core'): ns3::ObjectFactory [class]
- module.add_class('ObjectFactory', import_from_module='ns.core')
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata [class]
- module.add_class('PacketMetadata', import_from_module='ns.network')
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item [struct]
- module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::PacketMetadata'])
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item [enumeration]
- module.add_enum('', ['PAYLOAD', 'HEADER', 'TRAILER'], outer_class=root_module['ns3::PacketMetadata::Item'], import_from_module='ns.network')
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator [class]
- module.add_class('ItemIterator', import_from_module='ns.network', outer_class=root_module['ns3::PacketMetadata'])
- ## packet.h (module 'network'): ns3::PacketTagIterator [class]
- module.add_class('PacketTagIterator', import_from_module='ns.network')
- ## packet.h (module 'network'): ns3::PacketTagIterator::Item [class]
- module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::PacketTagIterator'])
- ## packet-tag-list.h (module 'network'): ns3::PacketTagList [class]
- 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'])
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [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]
- module.add_class('Simulator', destructor_visibility='private', import_from_module='ns.core')
- ## data-calculator.h (module 'stats'): ns3::StatisticalSummary [class]
- module.add_class('StatisticalSummary', allow_subclassing=True, import_from_module='ns.stats')
- ## tag.h (module 'network'): ns3::Tag [class]
- module.add_class('Tag', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
- ## tag-buffer.h (module 'network'): ns3::TagBuffer [class]
- module.add_class('TagBuffer', import_from_module='ns.network')
- ## type-id.h (module 'core'): ns3::TypeId [class]
- module.add_class('TypeId', import_from_module='ns.core')
- ## type-id.h (module 'core'): ns3::TypeId::AttributeFlag [enumeration]
- module.add_enum('AttributeFlag', ['ATTR_GET', 'ATTR_SET', 'ATTR_CONSTRUCT', 'ATTR_SGC'], outer_class=root_module['ns3::TypeId'], import_from_module='ns.core')
- ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation [struct]
- module.add_class('AttributeInformation', import_from_module='ns.core', outer_class=root_module['ns3::TypeId'])
- ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation [struct]
- module.add_class('TraceSourceInformation', import_from_module='ns.core', outer_class=root_module['ns3::TypeId'])
- ## empty.h (module 'core'): ns3::empty [class]
- module.add_class('empty', import_from_module='ns.core')
- ## int64x64-double.h (module 'core'): ns3::int64x64_t [class]
- module.add_class('int64x64_t', import_from_module='ns.core')
- ## chunk.h (module 'network'): ns3::Chunk [class]
- module.add_class('Chunk', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
- ## gnuplot.h (module 'tools'): ns3::Gnuplot2dDataset [class]
- module.add_class('Gnuplot2dDataset', parent=root_module['ns3::GnuplotDataset'])
- ## gnuplot.h (module 'tools'): ns3::Gnuplot2dDataset::Style [enumeration]
- module.add_enum('Style', ['LINES', 'POINTS', 'LINES_POINTS', 'DOTS', 'IMPULSES', 'STEPS', 'FSTEPS', 'HISTEPS'], outer_class=root_module['ns3::Gnuplot2dDataset'])
- ## gnuplot.h (module 'tools'): ns3::Gnuplot2dDataset::ErrorBars [enumeration]
- module.add_enum('ErrorBars', ['NONE', 'X', 'Y', 'XY'], outer_class=root_module['ns3::Gnuplot2dDataset'])
- ## gnuplot.h (module 'tools'): ns3::Gnuplot2dFunction [class]
- module.add_class('Gnuplot2dFunction', parent=root_module['ns3::GnuplotDataset'])
- ## gnuplot.h (module 'tools'): ns3::Gnuplot3dDataset [class]
- module.add_class('Gnuplot3dDataset', parent=root_module['ns3::GnuplotDataset'])
- ## gnuplot.h (module 'tools'): ns3::Gnuplot3dFunction [class]
- module.add_class('Gnuplot3dFunction', parent=root_module['ns3::GnuplotDataset'])
- ## header.h (module 'network'): ns3::Header [class]
- module.add_class('Header', import_from_module='ns.network', parent=root_module['ns3::Chunk'])
- ## object.h (module 'core'): ns3::Object [class]
- module.add_class('Object', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter >'])
- ## object.h (module 'core'): ns3::Object::AggregateIterator [class]
- module.add_class('AggregateIterator', import_from_module='ns.core', outer_class=root_module['ns3::Object'])
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> > [class]
- module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeAccessor', 'ns3::empty', 'ns3::DefaultDeleter<ns3::AttributeAccessor>'], 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<ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> > [class]
- module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeChecker', 'ns3::empty', 'ns3::DefaultDeleter<ns3::AttributeChecker>'], 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<ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> > [class]
- module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeValue', 'ns3::empty', 'ns3::DefaultDeleter<ns3::AttributeValue>'], 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<ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> > [class]
- module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::CallbackImplBase', 'ns3::empty', 'ns3::DefaultDeleter<ns3::CallbackImplBase>'], 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<ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> > [class]
- module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::EventImpl', 'ns3::empty', 'ns3::DefaultDeleter<ns3::EventImpl>'], 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<ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> > [class]
- module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::NixVector', 'ns3::empty', 'ns3::DefaultDeleter<ns3::NixVector>'], 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<ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> > [class]
- module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Packet', 'ns3::empty', 'ns3::DefaultDeleter<ns3::Packet>'], 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<ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> > [class]
- module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::TraceSourceAccessor', 'ns3::empty', 'ns3::DefaultDeleter<ns3::TraceSourceAccessor>'], 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]
- module.add_class('Time', import_from_module='ns.core')
- ## nstime.h (module 'core'): ns3::Time::Unit [enumeration]
- module.add_enum('Unit', ['S', 'MS', 'US', 'NS', 'PS', 'FS', 'LAST'], outer_class=root_module['ns3::Time'], import_from_module='ns.core')
- ## nstime.h (module 'core'): ns3::Time [class]
- root_module['ns3::Time'].implicitly_converts_to(root_module['ns3::int64x64_t'])
- ## trace-source-accessor.h (module 'core'): ns3::TraceSourceAccessor [class]
- module.add_class('TraceSourceAccessor', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> >'])
- ## trailer.h (module 'network'): ns3::Trailer [class]
- module.add_class('Trailer', import_from_module='ns.network', parent=root_module['ns3::Chunk'])
- ## attribute.h (module 'core'): ns3::AttributeAccessor [class]
- module.add_class('AttributeAccessor', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> >'])
- ## attribute.h (module 'core'): ns3::AttributeChecker [class]
- module.add_class('AttributeChecker', allow_subclassing=False, automatic_type_narrowing=True, import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> >'])
- ## attribute.h (module 'core'): ns3::AttributeValue [class]
- module.add_class('AttributeValue', allow_subclassing=False, automatic_type_narrowing=True, import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> >'])
- ## callback.h (module 'core'): ns3::CallbackChecker [class]
- module.add_class('CallbackChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker'])
- ## callback.h (module 'core'): ns3::CallbackImplBase [class]
- module.add_class('CallbackImplBase', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >'])
- ## callback.h (module 'core'): ns3::CallbackValue [class]
- module.add_class('CallbackValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue'])
- ## data-calculator.h (module 'stats'): ns3::DataCalculator [class]
- module.add_class('DataCalculator', 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'])
- ## attribute.h (module 'core'): ns3::EmptyAttributeValue [class]
- module.add_class('EmptyAttributeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue'])
- ## event-impl.h (module 'core'): ns3::EventImpl [class]
- module.add_class('EventImpl', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> >'])
- ## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<double> [class]
- module.add_class('MinMaxAvgTotalCalculator', import_from_module='ns.stats', template_parameters=['double'], parent=[root_module['ns3::DataCalculator'], root_module['ns3::StatisticalSummary']])
- ## nix-vector.h (module 'network'): ns3::NixVector [class]
- module.add_class('NixVector', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> >'])
- ## object-factory.h (module 'core'): ns3::ObjectFactoryChecker [class]
- 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'])
- ## 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<ns3::Packet> >'])
- ## 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]
- module.add_class('TypeIdChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker'])
- ## type-id.h (module 'core'): ns3::TypeIdValue [class]
- module.add_class('TypeIdValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue'])
-
- ## Register a nested module for the namespace FatalImpl
-
- nested_module = module.add_cpp_namespace('FatalImpl')
- register_types_ns3_FatalImpl(nested_module)
-
-
-def register_types_ns3_FatalImpl(module):
- root_module = module.get_root()
-
-
-def register_methods(root_module):
- register_Ns3AttributeConstructionList_methods(root_module, root_module['ns3::AttributeConstructionList'])
- register_Ns3AttributeConstructionListItem_methods(root_module, root_module['ns3::AttributeConstructionList::Item'])
- register_Ns3Buffer_methods(root_module, root_module['ns3::Buffer'])
- register_Ns3BufferIterator_methods(root_module, root_module['ns3::Buffer::Iterator'])
- register_Ns3ByteTagIterator_methods(root_module, root_module['ns3::ByteTagIterator'])
- register_Ns3ByteTagIteratorItem_methods(root_module, root_module['ns3::ByteTagIterator::Item'])
- register_Ns3ByteTagList_methods(root_module, root_module['ns3::ByteTagList'])
- register_Ns3ByteTagListIterator_methods(root_module, root_module['ns3::ByteTagList::Iterator'])
- register_Ns3ByteTagListIteratorItem_methods(root_module, root_module['ns3::ByteTagList::Iterator::Item'])
- register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase'])
- register_Ns3DataOutputCallback_methods(root_module, root_module['ns3::DataOutputCallback'])
- register_Ns3DelayJitterEstimation_methods(root_module, root_module['ns3::DelayJitterEstimation'])
- register_Ns3EventGarbageCollector_methods(root_module, root_module['ns3::EventGarbageCollector'])
- register_Ns3EventId_methods(root_module, root_module['ns3::EventId'])
- register_Ns3Gnuplot_methods(root_module, root_module['ns3::Gnuplot'])
- register_Ns3GnuplotCollection_methods(root_module, root_module['ns3::GnuplotCollection'])
- register_Ns3GnuplotDataset_methods(root_module, root_module['ns3::GnuplotDataset'])
- register_Ns3ObjectBase_methods(root_module, root_module['ns3::ObjectBase'])
- register_Ns3ObjectDeleter_methods(root_module, root_module['ns3::ObjectDeleter'])
- register_Ns3ObjectFactory_methods(root_module, root_module['ns3::ObjectFactory'])
- register_Ns3PacketMetadata_methods(root_module, root_module['ns3::PacketMetadata'])
- register_Ns3PacketMetadataItem_methods(root_module, root_module['ns3::PacketMetadata::Item'])
- register_Ns3PacketMetadataItemIterator_methods(root_module, root_module['ns3::PacketMetadata::ItemIterator'])
- register_Ns3PacketTagIterator_methods(root_module, root_module['ns3::PacketTagIterator'])
- register_Ns3PacketTagIteratorItem_methods(root_module, root_module['ns3::PacketTagIterator::Item'])
- register_Ns3PacketTagList_methods(root_module, root_module['ns3::PacketTagList'])
- register_Ns3PacketTagListTagData_methods(root_module, root_module['ns3::PacketTagList::TagData'])
- 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'])
- register_Ns3Tag_methods(root_module, root_module['ns3::Tag'])
- register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
- register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId'])
- register_Ns3TypeIdAttributeInformation_methods(root_module, root_module['ns3::TypeId::AttributeInformation'])
- register_Ns3TypeIdTraceSourceInformation_methods(root_module, root_module['ns3::TypeId::TraceSourceInformation'])
- register_Ns3Empty_methods(root_module, root_module['ns3::empty'])
- register_Ns3Int64x64_t_methods(root_module, root_module['ns3::int64x64_t'])
- register_Ns3Chunk_methods(root_module, root_module['ns3::Chunk'])
- register_Ns3Gnuplot2dDataset_methods(root_module, root_module['ns3::Gnuplot2dDataset'])
- register_Ns3Gnuplot2dFunction_methods(root_module, root_module['ns3::Gnuplot2dFunction'])
- register_Ns3Gnuplot3dDataset_methods(root_module, root_module['ns3::Gnuplot3dDataset'])
- register_Ns3Gnuplot3dFunction_methods(root_module, root_module['ns3::Gnuplot3dFunction'])
- register_Ns3Header_methods(root_module, root_module['ns3::Header'])
- register_Ns3Object_methods(root_module, root_module['ns3::Object'])
- register_Ns3ObjectAggregateIterator_methods(root_module, root_module['ns3::Object::AggregateIterator'])
- register_Ns3SimpleRefCount__Ns3AttributeAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> >'])
- register_Ns3SimpleRefCount__Ns3AttributeChecker_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeChecker__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> >'])
- register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> >'])
- register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >'])
- register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> >'])
- register_Ns3SimpleRefCount__Ns3NixVector_Ns3Empty_Ns3DefaultDeleter__lt__ns3NixVector__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> >'])
- register_Ns3SimpleRefCount__Ns3Packet_Ns3Empty_Ns3DefaultDeleter__lt__ns3Packet__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >'])
- register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> >'])
- register_Ns3Time_methods(root_module, root_module['ns3::Time'])
- register_Ns3TraceSourceAccessor_methods(root_module, root_module['ns3::TraceSourceAccessor'])
- register_Ns3Trailer_methods(root_module, root_module['ns3::Trailer'])
- register_Ns3AttributeAccessor_methods(root_module, root_module['ns3::AttributeAccessor'])
- register_Ns3AttributeChecker_methods(root_module, root_module['ns3::AttributeChecker'])
- register_Ns3AttributeValue_methods(root_module, root_module['ns3::AttributeValue'])
- register_Ns3CallbackChecker_methods(root_module, root_module['ns3::CallbackChecker'])
- register_Ns3CallbackImplBase_methods(root_module, root_module['ns3::CallbackImplBase'])
- register_Ns3CallbackValue_methods(root_module, root_module['ns3::CallbackValue'])
- register_Ns3DataCalculator_methods(root_module, root_module['ns3::DataCalculator'])
- register_Ns3DataOutputInterface_methods(root_module, root_module['ns3::DataOutputInterface'])
- register_Ns3EmptyAttributeValue_methods(root_module, root_module['ns3::EmptyAttributeValue'])
- register_Ns3EventImpl_methods(root_module, root_module['ns3::EventImpl'])
- register_Ns3MinMaxAvgTotalCalculator__Double_methods(root_module, root_module['ns3::MinMaxAvgTotalCalculator< double >'])
- register_Ns3NixVector_methods(root_module, root_module['ns3::NixVector'])
- register_Ns3ObjectFactoryChecker_methods(root_module, root_module['ns3::ObjectFactoryChecker'])
- register_Ns3ObjectFactoryValue_methods(root_module, root_module['ns3::ObjectFactoryValue'])
- 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'])
- return
-
-def register_Ns3AttributeConstructionList_methods(root_module, cls):
- ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::AttributeConstructionList(ns3::AttributeConstructionList const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::AttributeConstructionList const &', 'arg0')])
- ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::AttributeConstructionList() [constructor]
- cls.add_constructor([])
- ## attribute-construction-list.h (module 'core'): void ns3::AttributeConstructionList::Add(std::string name, ns3::Ptr<ns3::AttributeChecker const> checker, ns3::Ptr<ns3::AttributeValue> value) [member function]
- cls.add_method('Add',
- 'void',
- [param('std::string', 'name'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker'), param('ns3::Ptr< ns3::AttributeValue >', 'value')])
- ## attribute-construction-list.h (module 'core'): std::_List_const_iterator<ns3::AttributeConstructionList::Item> ns3::AttributeConstructionList::Begin() const [member function]
- cls.add_method('Begin',
- 'std::_List_const_iterator< ns3::AttributeConstructionList::Item >',
- [],
- is_const=True)
- ## attribute-construction-list.h (module 'core'): std::_List_const_iterator<ns3::AttributeConstructionList::Item> ns3::AttributeConstructionList::End() const [member function]
- cls.add_method('End',
- 'std::_List_const_iterator< ns3::AttributeConstructionList::Item >',
- [],
- is_const=True)
- ## attribute-construction-list.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::AttributeConstructionList::Find(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function]
- cls.add_method('Find',
- 'ns3::Ptr< ns3::AttributeValue >',
- [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_const=True)
- return
-
-def register_Ns3AttributeConstructionListItem_methods(root_module, cls):
- ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::Item::Item() [constructor]
- cls.add_constructor([])
- ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::Item::Item(ns3::AttributeConstructionList::Item const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::AttributeConstructionList::Item const &', 'arg0')])
- ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::Item::checker [variable]
- cls.add_instance_attribute('checker', 'ns3::Ptr< ns3::AttributeChecker const >', is_const=False)
- ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::Item::name [variable]
- cls.add_instance_attribute('name', 'std::string', is_const=False)
- ## attribute-construction-list.h (module 'core'): ns3::AttributeConstructionList::Item::value [variable]
- cls.add_instance_attribute('value', 'ns3::Ptr< ns3::AttributeValue >', is_const=False)
- return
-
-def register_Ns3Buffer_methods(root_module, cls):
- ## buffer.h (module 'network'): ns3::Buffer::Buffer() [constructor]
- cls.add_constructor([])
- ## buffer.h (module 'network'): ns3::Buffer::Buffer(uint32_t dataSize) [constructor]
- cls.add_constructor([param('uint32_t', 'dataSize')])
- ## buffer.h (module 'network'): ns3::Buffer::Buffer(uint32_t dataSize, bool initialize) [constructor]
- cls.add_constructor([param('uint32_t', 'dataSize'), param('bool', 'initialize')])
- ## buffer.h (module 'network'): ns3::Buffer::Buffer(ns3::Buffer const & o) [copy constructor]
- cls.add_constructor([param('ns3::Buffer const &', 'o')])
- ## buffer.h (module 'network'): bool ns3::Buffer::AddAtEnd(uint32_t end) [member function]
- cls.add_method('AddAtEnd',
- 'bool',
- [param('uint32_t', 'end')])
- ## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(ns3::Buffer const & o) [member function]
- cls.add_method('AddAtEnd',
- 'void',
- [param('ns3::Buffer const &', 'o')])
- ## buffer.h (module 'network'): bool ns3::Buffer::AddAtStart(uint32_t start) [member function]
- cls.add_method('AddAtStart',
- 'bool',
- [param('uint32_t', 'start')])
- ## buffer.h (module 'network'): ns3::Buffer::Iterator ns3::Buffer::Begin() const [member function]
- cls.add_method('Begin',
- 'ns3::Buffer::Iterator',
- [],
- is_const=True)
- ## buffer.h (module 'network'): void ns3::Buffer::CopyData(std::ostream * os, uint32_t size) const [member function]
- cls.add_method('CopyData',
- 'void',
- [param('std::ostream *', 'os'), param('uint32_t', 'size')],
- is_const=True)
- ## buffer.h (module 'network'): uint32_t ns3::Buffer::CopyData(uint8_t * buffer, uint32_t size) const [member function]
- cls.add_method('CopyData',
- 'uint32_t',
- [param('uint8_t *', 'buffer'), param('uint32_t', 'size')],
- is_const=True)
- ## buffer.h (module 'network'): ns3::Buffer ns3::Buffer::CreateFragment(uint32_t start, uint32_t length) const [member function]
- cls.add_method('CreateFragment',
- 'ns3::Buffer',
- [param('uint32_t', 'start'), param('uint32_t', 'length')],
- is_const=True)
- ## buffer.h (module 'network'): ns3::Buffer ns3::Buffer::CreateFullCopy() const [member function]
- cls.add_method('CreateFullCopy',
- 'ns3::Buffer',
- [],
- is_const=True)
- ## buffer.h (module 'network'): uint32_t ns3::Buffer::Deserialize(uint8_t const * buffer, uint32_t size) [member function]
- cls.add_method('Deserialize',
- 'uint32_t',
- [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')])
- ## buffer.h (module 'network'): ns3::Buffer::Iterator ns3::Buffer::End() const [member function]
- cls.add_method('End',
- 'ns3::Buffer::Iterator',
- [],
- is_const=True)
- ## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentEndOffset() const [member function]
- cls.add_method('GetCurrentEndOffset',
- 'int32_t',
- [],
- is_const=True)
- ## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentStartOffset() const [member function]
- cls.add_method('GetCurrentStartOffset',
- 'int32_t',
- [],
- is_const=True)
- ## buffer.h (module 'network'): uint32_t ns3::Buffer::GetSerializedSize() const [member function]
- cls.add_method('GetSerializedSize',
- 'uint32_t',
- [],
- is_const=True)
- ## buffer.h (module 'network'): uint32_t ns3::Buffer::GetSize() const [member function]
- cls.add_method('GetSize',
- 'uint32_t',
- [],
- is_const=True)
- ## buffer.h (module 'network'): uint8_t const * ns3::Buffer::PeekData() const [member function]
- cls.add_method('PeekData',
- 'uint8_t const *',
- [],
- is_const=True)
- ## buffer.h (module 'network'): void ns3::Buffer::RemoveAtEnd(uint32_t end) [member function]
- cls.add_method('RemoveAtEnd',
- 'void',
- [param('uint32_t', 'end')])
- ## buffer.h (module 'network'): void ns3::Buffer::RemoveAtStart(uint32_t start) [member function]
- cls.add_method('RemoveAtStart',
- 'void',
- [param('uint32_t', 'start')])
- ## buffer.h (module 'network'): uint32_t ns3::Buffer::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function]
- cls.add_method('Serialize',
- 'uint32_t',
- [param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')],
- is_const=True)
- return
-
-def register_Ns3BufferIterator_methods(root_module, cls):
- ## buffer.h (module 'network'): ns3::Buffer::Iterator::Iterator(ns3::Buffer::Iterator const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Buffer::Iterator const &', 'arg0')])
- ## buffer.h (module 'network'): ns3::Buffer::Iterator::Iterator() [constructor]
- cls.add_constructor([])
- ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::CalculateIpChecksum(uint16_t size) [member function]
- cls.add_method('CalculateIpChecksum',
- 'uint16_t',
- [param('uint16_t', 'size')])
- ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::CalculateIpChecksum(uint16_t size, uint32_t initialChecksum) [member function]
- cls.add_method('CalculateIpChecksum',
- 'uint16_t',
- [param('uint16_t', 'size'), param('uint32_t', 'initialChecksum')])
- ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::GetDistanceFrom(ns3::Buffer::Iterator const & o) const [member function]
- cls.add_method('GetDistanceFrom',
- 'uint32_t',
- [param('ns3::Buffer::Iterator const &', 'o')],
- is_const=True)
- ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::GetSize() const [member function]
- cls.add_method('GetSize',
- 'uint32_t',
- [],
- is_const=True)
- ## buffer.h (module 'network'): bool ns3::Buffer::Iterator::IsEnd() const [member function]
- cls.add_method('IsEnd',
- 'bool',
- [],
- is_const=True)
- ## buffer.h (module 'network'): bool ns3::Buffer::Iterator::IsStart() const [member function]
- cls.add_method('IsStart',
- 'bool',
- [],
- is_const=True)
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Next() [member function]
- cls.add_method('Next',
- 'void',
- [])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Next(uint32_t delta) [member function]
- cls.add_method('Next',
- 'void',
- [param('uint32_t', 'delta')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Prev() [member function]
- cls.add_method('Prev',
- 'void',
- [])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Prev(uint32_t delta) [member function]
- cls.add_method('Prev',
- 'void',
- [param('uint32_t', 'delta')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Read(uint8_t * buffer, uint32_t size) [member function]
- cls.add_method('Read',
- 'void',
- [param('uint8_t *', 'buffer'), param('uint32_t', 'size')])
- ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::ReadLsbtohU16() [member function]
- cls.add_method('ReadLsbtohU16',
- 'uint16_t',
- [])
- ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::ReadLsbtohU32() [member function]
- cls.add_method('ReadLsbtohU32',
- 'uint32_t',
- [])
- ## buffer.h (module 'network'): uint64_t ns3::Buffer::Iterator::ReadLsbtohU64() [member function]
- cls.add_method('ReadLsbtohU64',
- 'uint64_t',
- [])
- ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::ReadNtohU16() [member function]
- cls.add_method('ReadNtohU16',
- 'uint16_t',
- [])
- ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::ReadNtohU32() [member function]
- cls.add_method('ReadNtohU32',
- 'uint32_t',
- [])
- ## buffer.h (module 'network'): uint64_t ns3::Buffer::Iterator::ReadNtohU64() [member function]
- cls.add_method('ReadNtohU64',
- 'uint64_t',
- [])
- ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::ReadU16() [member function]
- cls.add_method('ReadU16',
- 'uint16_t',
- [])
- ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::ReadU32() [member function]
- cls.add_method('ReadU32',
- 'uint32_t',
- [])
- ## buffer.h (module 'network'): uint64_t ns3::Buffer::Iterator::ReadU64() [member function]
- cls.add_method('ReadU64',
- 'uint64_t',
- [])
- ## buffer.h (module 'network'): uint8_t ns3::Buffer::Iterator::ReadU8() [member function]
- cls.add_method('ReadU8',
- 'uint8_t',
- [])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Write(uint8_t const * buffer, uint32_t size) [member function]
- cls.add_method('Write',
- 'void',
- [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Write(ns3::Buffer::Iterator start, ns3::Buffer::Iterator end) [member function]
- cls.add_method('Write',
- 'void',
- [param('ns3::Buffer::Iterator', 'start'), param('ns3::Buffer::Iterator', 'end')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtolsbU16(uint16_t data) [member function]
- cls.add_method('WriteHtolsbU16',
- 'void',
- [param('uint16_t', 'data')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtolsbU32(uint32_t data) [member function]
- cls.add_method('WriteHtolsbU32',
- 'void',
- [param('uint32_t', 'data')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtolsbU64(uint64_t data) [member function]
- cls.add_method('WriteHtolsbU64',
- 'void',
- [param('uint64_t', 'data')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtonU16(uint16_t data) [member function]
- cls.add_method('WriteHtonU16',
- 'void',
- [param('uint16_t', 'data')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtonU32(uint32_t data) [member function]
- cls.add_method('WriteHtonU32',
- 'void',
- [param('uint32_t', 'data')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtonU64(uint64_t data) [member function]
- cls.add_method('WriteHtonU64',
- 'void',
- [param('uint64_t', 'data')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU16(uint16_t data) [member function]
- cls.add_method('WriteU16',
- 'void',
- [param('uint16_t', 'data')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU32(uint32_t data) [member function]
- cls.add_method('WriteU32',
- 'void',
- [param('uint32_t', 'data')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU64(uint64_t data) [member function]
- cls.add_method('WriteU64',
- 'void',
- [param('uint64_t', 'data')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU8(uint8_t data) [member function]
- cls.add_method('WriteU8',
- 'void',
- [param('uint8_t', 'data')])
- ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU8(uint8_t data, uint32_t len) [member function]
- cls.add_method('WriteU8',
- 'void',
- [param('uint8_t', 'data'), param('uint32_t', 'len')])
- return
-
-def register_Ns3ByteTagIterator_methods(root_module, cls):
- ## packet.h (module 'network'): ns3::ByteTagIterator::ByteTagIterator(ns3::ByteTagIterator const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::ByteTagIterator const &', 'arg0')])
- ## packet.h (module 'network'): bool ns3::ByteTagIterator::HasNext() const [member function]
- cls.add_method('HasNext',
- 'bool',
- [],
- is_const=True)
- ## packet.h (module 'network'): ns3::ByteTagIterator::Item ns3::ByteTagIterator::Next() [member function]
- cls.add_method('Next',
- 'ns3::ByteTagIterator::Item',
- [])
- return
-
-def register_Ns3ByteTagIteratorItem_methods(root_module, cls):
- ## packet.h (module 'network'): ns3::ByteTagIterator::Item::Item(ns3::ByteTagIterator::Item const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::ByteTagIterator::Item const &', 'arg0')])
- ## packet.h (module 'network'): uint32_t ns3::ByteTagIterator::Item::GetEnd() const [member function]
- cls.add_method('GetEnd',
- 'uint32_t',
- [],
- is_const=True)
- ## packet.h (module 'network'): uint32_t ns3::ByteTagIterator::Item::GetStart() const [member function]
- cls.add_method('GetStart',
- 'uint32_t',
- [],
- is_const=True)
- ## packet.h (module 'network'): void ns3::ByteTagIterator::Item::GetTag(ns3::Tag & tag) const [member function]
- cls.add_method('GetTag',
- 'void',
- [param('ns3::Tag &', 'tag')],
- is_const=True)
- ## packet.h (module 'network'): ns3::TypeId ns3::ByteTagIterator::Item::GetTypeId() const [member function]
- cls.add_method('GetTypeId',
- 'ns3::TypeId',
- [],
- is_const=True)
- return
-
-def register_Ns3ByteTagList_methods(root_module, cls):
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::ByteTagList() [constructor]
- cls.add_constructor([])
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::ByteTagList(ns3::ByteTagList const & o) [copy constructor]
- cls.add_constructor([param('ns3::ByteTagList const &', 'o')])
- ## byte-tag-list.h (module 'network'): ns3::TagBuffer ns3::ByteTagList::Add(ns3::TypeId tid, uint32_t bufferSize, int32_t start, int32_t end) [member function]
- cls.add_method('Add',
- 'ns3::TagBuffer',
- [param('ns3::TypeId', 'tid'), param('uint32_t', 'bufferSize'), param('int32_t', 'start'), param('int32_t', 'end')])
- ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::Add(ns3::ByteTagList const & o) [member function]
- cls.add_method('Add',
- 'void',
- [param('ns3::ByteTagList const &', 'o')])
- ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtEnd(int32_t adjustment, int32_t appendOffset) [member function]
- cls.add_method('AddAtEnd',
- 'void',
- [param('int32_t', 'adjustment'), param('int32_t', 'appendOffset')])
- ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t adjustment, int32_t prependOffset) [member function]
- cls.add_method('AddAtStart',
- 'void',
- [param('int32_t', 'adjustment'), param('int32_t', 'prependOffset')])
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator ns3::ByteTagList::Begin(int32_t offsetStart, int32_t offsetEnd) const [member function]
- cls.add_method('Begin',
- 'ns3::ByteTagList::Iterator',
- [param('int32_t', 'offsetStart'), param('int32_t', 'offsetEnd')],
- is_const=True)
- ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::RemoveAll() [member function]
- cls.add_method('RemoveAll',
- 'void',
- [])
- return
-
-def register_Ns3ByteTagListIterator_methods(root_module, cls):
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Iterator(ns3::ByteTagList::Iterator const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::ByteTagList::Iterator const &', 'arg0')])
- ## byte-tag-list.h (module 'network'): uint32_t ns3::ByteTagList::Iterator::GetOffsetStart() const [member function]
- cls.add_method('GetOffsetStart',
- 'uint32_t',
- [],
- is_const=True)
- ## byte-tag-list.h (module 'network'): bool ns3::ByteTagList::Iterator::HasNext() const [member function]
- cls.add_method('HasNext',
- 'bool',
- [],
- is_const=True)
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item ns3::ByteTagList::Iterator::Next() [member function]
- cls.add_method('Next',
- 'ns3::ByteTagList::Iterator::Item',
- [])
- return
-
-def register_Ns3ByteTagListIteratorItem_methods(root_module, cls):
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::Item(ns3::ByteTagList::Iterator::Item const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::ByteTagList::Iterator::Item const &', 'arg0')])
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::Item(ns3::TagBuffer buf) [constructor]
- cls.add_constructor([param('ns3::TagBuffer', 'buf')])
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::buf [variable]
- cls.add_instance_attribute('buf', 'ns3::TagBuffer', is_const=False)
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::end [variable]
- cls.add_instance_attribute('end', 'int32_t', is_const=False)
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::size [variable]
- cls.add_instance_attribute('size', 'uint32_t', is_const=False)
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::start [variable]
- cls.add_instance_attribute('start', 'int32_t', is_const=False)
- ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::tid [variable]
- cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False)
- return
-
-def register_Ns3CallbackBase_methods(root_module, cls):
- ## callback.h (module 'core'): ns3::CallbackBase::CallbackBase(ns3::CallbackBase const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::CallbackBase const &', 'arg0')])
- ## callback.h (module 'core'): ns3::CallbackBase::CallbackBase() [constructor]
- cls.add_constructor([])
- ## callback.h (module 'core'): ns3::Ptr<ns3::CallbackImplBase> ns3::CallbackBase::GetImpl() const [member function]
- cls.add_method('GetImpl',
- 'ns3::Ptr< ns3::CallbackImplBase >',
- [],
- is_const=True)
- ## callback.h (module 'core'): ns3::CallbackBase::CallbackBase(ns3::Ptr<ns3::CallbackImplBase> impl) [constructor]
- cls.add_constructor([param('ns3::Ptr< ns3::CallbackImplBase >', 'impl')],
- visibility='protected')
- ## callback.h (module 'core'): static std::string ns3::CallbackBase::Demangle(std::string const & mangled) [member function]
- cls.add_method('Demangle',
- 'std::string',
- [param('std::string const &', 'mangled')],
- is_static=True, visibility='protected')
- return
-
-def register_Ns3DataOutputCallback_methods(root_module, cls):
- ## data-output-interface.h (module 'stats'): ns3::DataOutputCallback::DataOutputCallback() [constructor]
- cls.add_constructor([])
- ## data-output-interface.h (module 'stats'): ns3::DataOutputCallback::DataOutputCallback(ns3::DataOutputCallback const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::DataOutputCallback const &', 'arg0')])
- ## data-output-interface.h (module 'stats'): void ns3::DataOutputCallback::OutputSingleton(std::string key, std::string variable, int val) [member function]
- cls.add_method('OutputSingleton',
- 'void',
- [param('std::string', 'key'), param('std::string', 'variable'), param('int', 'val')],
- is_pure_virtual=True, is_virtual=True)
- ## data-output-interface.h (module 'stats'): void ns3::DataOutputCallback::OutputSingleton(std::string key, std::string variable, uint32_t val) [member function]
- cls.add_method('OutputSingleton',
- 'void',
- [param('std::string', 'key'), param('std::string', 'variable'), param('uint32_t', 'val')],
- is_pure_virtual=True, is_virtual=True)
- ## data-output-interface.h (module 'stats'): void ns3::DataOutputCallback::OutputSingleton(std::string key, std::string variable, double val) [member function]
- cls.add_method('OutputSingleton',
- 'void',
- [param('std::string', 'key'), param('std::string', 'variable'), param('double', 'val')],
- is_pure_virtual=True, is_virtual=True)
- ## data-output-interface.h (module 'stats'): void ns3::DataOutputCallback::OutputSingleton(std::string key, std::string variable, std::string val) [member function]
- cls.add_method('OutputSingleton',
- 'void',
- [param('std::string', 'key'), param('std::string', 'variable'), param('std::string', 'val')],
- is_pure_virtual=True, is_virtual=True)
- ## data-output-interface.h (module 'stats'): void ns3::DataOutputCallback::OutputSingleton(std::string key, std::string variable, ns3::Time val) [member function]
- cls.add_method('OutputSingleton',
- 'void',
- [param('std::string', 'key'), param('std::string', 'variable'), param('ns3::Time', 'val')],
- is_pure_virtual=True, is_virtual=True)
- ## data-output-interface.h (module 'stats'): void ns3::DataOutputCallback::OutputStatistic(std::string key, std::string variable, ns3::StatisticalSummary const * statSum) [member function]
- cls.add_method('OutputStatistic',
- 'void',
- [param('std::string', 'key'), param('std::string', 'variable'), param('ns3::StatisticalSummary const *', 'statSum')],
- is_pure_virtual=True, is_virtual=True)
- return
-
-def register_Ns3DelayJitterEstimation_methods(root_module, cls):
- ## delay-jitter-estimation.h (module 'tools'): ns3::DelayJitterEstimation::DelayJitterEstimation(ns3::DelayJitterEstimation const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::DelayJitterEstimation const &', 'arg0')])
- ## delay-jitter-estimation.h (module 'tools'): ns3::DelayJitterEstimation::DelayJitterEstimation() [constructor]
- cls.add_constructor([])
- ## delay-jitter-estimation.h (module 'tools'): ns3::Time ns3::DelayJitterEstimation::GetLastDelay() const [member function]
- cls.add_method('GetLastDelay',
- 'ns3::Time',
- [],
- is_const=True)
- ## delay-jitter-estimation.h (module 'tools'): uint64_t ns3::DelayJitterEstimation::GetLastJitter() const [member function]
- cls.add_method('GetLastJitter',
- 'uint64_t',
- [],
- is_const=True)
- ## delay-jitter-estimation.h (module 'tools'): static void ns3::DelayJitterEstimation::PrepareTx(ns3::Ptr<const ns3::Packet> packet) [member function]
- cls.add_method('PrepareTx',
- 'void',
- [param('ns3::Ptr< ns3::Packet const >', 'packet')],
- is_static=True)
- ## delay-jitter-estimation.h (module 'tools'): void ns3::DelayJitterEstimation::RecordRx(ns3::Ptr<const ns3::Packet> packet) [member function]
- cls.add_method('RecordRx',
- 'void',
- [param('ns3::Ptr< ns3::Packet const >', 'packet')])
- return
-
-def register_Ns3EventGarbageCollector_methods(root_module, cls):
- ## event-garbage-collector.h (module 'tools'): ns3::EventGarbageCollector::EventGarbageCollector(ns3::EventGarbageCollector const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::EventGarbageCollector const &', 'arg0')])
- ## event-garbage-collector.h (module 'tools'): ns3::EventGarbageCollector::EventGarbageCollector() [constructor]
- cls.add_constructor([])
- ## event-garbage-collector.h (module 'tools'): 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('==')
- ## event-id.h (module 'core'): ns3::EventId::EventId(ns3::EventId const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::EventId const &', 'arg0')])
- ## event-id.h (module 'core'): ns3::EventId::EventId() [constructor]
- cls.add_constructor([])
- ## event-id.h (module 'core'): ns3::EventId::EventId(ns3::Ptr<ns3::EventImpl> const & impl, uint64_t ts, uint32_t context, uint32_t uid) [constructor]
- cls.add_constructor([param('ns3::Ptr< ns3::EventImpl > const &', 'impl'), param('uint64_t', 'ts'), param('uint32_t', 'context'), param('uint32_t', 'uid')])
- ## event-id.h (module 'core'): void ns3::EventId::Cancel() [member function]
- cls.add_method('Cancel',
- 'void',
- [])
- ## event-id.h (module 'core'): uint32_t ns3::EventId::GetContext() const [member function]
- cls.add_method('GetContext',
- 'uint32_t',
- [],
- is_const=True)
- ## event-id.h (module 'core'): uint64_t ns3::EventId::GetTs() const [member function]
- cls.add_method('GetTs',
- 'uint64_t',
- [],
- is_const=True)
- ## event-id.h (module 'core'): uint32_t ns3::EventId::GetUid() const [member function]
- cls.add_method('GetUid',
- 'uint32_t',
- [],
- is_const=True)
- ## event-id.h (module 'core'): bool ns3::EventId::IsExpired() const [member function]
- cls.add_method('IsExpired',
- 'bool',
- [],
- is_const=True)
- ## event-id.h (module 'core'): bool ns3::EventId::IsRunning() const [member function]
- cls.add_method('IsRunning',
- 'bool',
- [],
- is_const=True)
- ## event-id.h (module 'core'): ns3::EventImpl * ns3::EventId::PeekEventImpl() const [member function]
- cls.add_method('PeekEventImpl',
- 'ns3::EventImpl *',
- [],
- is_const=True)
- return
-
-def register_Ns3Gnuplot_methods(root_module, cls):
- ## gnuplot.h (module 'tools'): ns3::Gnuplot::Gnuplot(ns3::Gnuplot const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Gnuplot const &', 'arg0')])
- ## gnuplot.h (module 'tools'): ns3::Gnuplot::Gnuplot(std::string const & outputFilename="", std::string const & title="") [constructor]
- cls.add_constructor([param('std::string const &', 'outputFilename', default_value='""'), param('std::string const &', 'title', default_value='""')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot::AddDataset(ns3::GnuplotDataset const & dataset) [member function]
- cls.add_method('AddDataset',
- 'void',
- [param('ns3::GnuplotDataset const &', 'dataset')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot::AppendExtra(std::string const & extra) [member function]
- cls.add_method('AppendExtra',
- 'void',
- [param('std::string const &', 'extra')])
- ## gnuplot.h (module 'tools'): static std::string ns3::Gnuplot::DetectTerminal(std::string const & filename) [member function]
- cls.add_method('DetectTerminal',
- 'std::string',
- [param('std::string const &', 'filename')],
- is_static=True)
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot::GenerateOutput(std::ostream & os) const [member function]
- cls.add_method('GenerateOutput',
- 'void',
- [param('std::ostream &', 'os')],
- is_const=True)
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot::SetExtra(std::string const & extra) [member function]
- cls.add_method('SetExtra',
- 'void',
- [param('std::string const &', 'extra')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot::SetLegend(std::string const & xLegend, std::string const & yLegend) [member function]
- cls.add_method('SetLegend',
- 'void',
- [param('std::string const &', 'xLegend'), param('std::string const &', 'yLegend')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot::SetTerminal(std::string const & terminal) [member function]
- cls.add_method('SetTerminal',
- 'void',
- [param('std::string const &', 'terminal')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot::SetTitle(std::string const & title) [member function]
- cls.add_method('SetTitle',
- 'void',
- [param('std::string const &', 'title')])
- return
-
-def register_Ns3GnuplotCollection_methods(root_module, cls):
- ## gnuplot.h (module 'tools'): ns3::GnuplotCollection::GnuplotCollection(ns3::GnuplotCollection const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::GnuplotCollection const &', 'arg0')])
- ## gnuplot.h (module 'tools'): ns3::GnuplotCollection::GnuplotCollection(std::string const & outputFilename) [constructor]
- cls.add_constructor([param('std::string const &', 'outputFilename')])
- ## gnuplot.h (module 'tools'): void ns3::GnuplotCollection::AddPlot(ns3::Gnuplot const & plot) [member function]
- cls.add_method('AddPlot',
- 'void',
- [param('ns3::Gnuplot const &', 'plot')])
- ## gnuplot.h (module 'tools'): void ns3::GnuplotCollection::GenerateOutput(std::ostream & os) const [member function]
- cls.add_method('GenerateOutput',
- 'void',
- [param('std::ostream &', 'os')],
- is_const=True)
- ## gnuplot.h (module 'tools'): ns3::Gnuplot & ns3::GnuplotCollection::GetPlot(unsigned int id) [member function]
- cls.add_method('GetPlot',
- 'ns3::Gnuplot &',
- [param('unsigned int', 'id')])
- ## gnuplot.h (module 'tools'): void ns3::GnuplotCollection::SetTerminal(std::string const & terminal) [member function]
- cls.add_method('SetTerminal',
- 'void',
- [param('std::string const &', 'terminal')])
- return
-
-def register_Ns3GnuplotDataset_methods(root_module, cls):
- ## gnuplot.h (module 'tools'): ns3::GnuplotDataset::GnuplotDataset(ns3::GnuplotDataset const & original) [copy constructor]
- cls.add_constructor([param('ns3::GnuplotDataset const &', 'original')])
- ## gnuplot.h (module 'tools'): static void ns3::GnuplotDataset::SetDefaultExtra(std::string const & extra) [member function]
- cls.add_method('SetDefaultExtra',
- 'void',
- [param('std::string const &', 'extra')],
- is_static=True)
- ## gnuplot.h (module 'tools'): void ns3::GnuplotDataset::SetExtra(std::string const & extra) [member function]
- cls.add_method('SetExtra',
- 'void',
- [param('std::string const &', 'extra')])
- ## gnuplot.h (module 'tools'): void ns3::GnuplotDataset::SetTitle(std::string const & title) [member function]
- cls.add_method('SetTitle',
- 'void',
- [param('std::string const &', 'title')])
- ## gnuplot.h (module 'tools'): ns3::GnuplotDataset::GnuplotDataset(ns3::GnuplotDataset::Data * data) [constructor]
- cls.add_constructor([param('ns3::GnuplotDataset::Data *', 'data')],
- visibility='protected')
- return
-
-def register_Ns3ObjectBase_methods(root_module, cls):
- ## object-base.h (module 'core'): ns3::ObjectBase::ObjectBase() [constructor]
- cls.add_constructor([])
- ## object-base.h (module 'core'): ns3::ObjectBase::ObjectBase(ns3::ObjectBase const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::ObjectBase const &', 'arg0')])
- ## object-base.h (module 'core'): void ns3::ObjectBase::GetAttribute(std::string name, ns3::AttributeValue & value) const [member function]
- cls.add_method('GetAttribute',
- 'void',
- [param('std::string', 'name'), param('ns3::AttributeValue &', 'value')],
- is_const=True)
- ## object-base.h (module 'core'): bool ns3::ObjectBase::GetAttributeFailSafe(std::string name, ns3::AttributeValue & attribute) const [member function]
- cls.add_method('GetAttributeFailSafe',
- 'bool',
- [param('std::string', 'name'), param('ns3::AttributeValue &', 'attribute')],
- is_const=True)
- ## object-base.h (module 'core'): ns3::TypeId ns3::ObjectBase::GetInstanceTypeId() const [member function]
- cls.add_method('GetInstanceTypeId',
- 'ns3::TypeId',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## object-base.h (module 'core'): static ns3::TypeId ns3::ObjectBase::GetTypeId() [member function]
- cls.add_method('GetTypeId',
- 'ns3::TypeId',
- [],
- is_static=True)
- ## object-base.h (module 'core'): void ns3::ObjectBase::SetAttribute(std::string name, ns3::AttributeValue const & value) [member function]
- cls.add_method('SetAttribute',
- 'void',
- [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
- ## object-base.h (module 'core'): bool ns3::ObjectBase::SetAttributeFailSafe(std::string name, ns3::AttributeValue const & value) [member function]
- cls.add_method('SetAttributeFailSafe',
- 'bool',
- [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
- ## object-base.h (module 'core'): bool ns3::ObjectBase::TraceConnect(std::string name, std::string context, ns3::CallbackBase const & cb) [member function]
- cls.add_method('TraceConnect',
- 'bool',
- [param('std::string', 'name'), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')])
- ## object-base.h (module 'core'): bool ns3::ObjectBase::TraceConnectWithoutContext(std::string name, ns3::CallbackBase const & cb) [member function]
- cls.add_method('TraceConnectWithoutContext',
- 'bool',
- [param('std::string', 'name'), param('ns3::CallbackBase const &', 'cb')])
- ## object-base.h (module 'core'): bool ns3::ObjectBase::TraceDisconnect(std::string name, std::string context, ns3::CallbackBase const & cb) [member function]
- cls.add_method('TraceDisconnect',
- 'bool',
- [param('std::string', 'name'), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')])
- ## object-base.h (module 'core'): bool ns3::ObjectBase::TraceDisconnectWithoutContext(std::string name, ns3::CallbackBase const & cb) [member function]
- cls.add_method('TraceDisconnectWithoutContext',
- 'bool',
- [param('std::string', 'name'), param('ns3::CallbackBase const &', 'cb')])
- ## object-base.h (module 'core'): void ns3::ObjectBase::ConstructSelf(ns3::AttributeConstructionList const & attributes) [member function]
- cls.add_method('ConstructSelf',
- 'void',
- [param('ns3::AttributeConstructionList const &', 'attributes')],
- visibility='protected')
- ## object-base.h (module 'core'): void ns3::ObjectBase::NotifyConstructionCompleted() [member function]
- cls.add_method('NotifyConstructionCompleted',
- 'void',
- [],
- visibility='protected', is_virtual=True)
- return
-
-def register_Ns3ObjectDeleter_methods(root_module, cls):
- ## object.h (module 'core'): ns3::ObjectDeleter::ObjectDeleter() [constructor]
- cls.add_constructor([])
- ## object.h (module 'core'): ns3::ObjectDeleter::ObjectDeleter(ns3::ObjectDeleter const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::ObjectDeleter const &', 'arg0')])
- ## object.h (module 'core'): static void ns3::ObjectDeleter::Delete(ns3::Object * object) [member function]
- cls.add_method('Delete',
- 'void',
- [param('ns3::Object *', 'object')],
- is_static=True)
- return
-
-def register_Ns3ObjectFactory_methods(root_module, cls):
- cls.add_output_stream_operator()
- ## object-factory.h (module 'core'): ns3::ObjectFactory::ObjectFactory(ns3::ObjectFactory const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::ObjectFactory const &', 'arg0')])
- ## object-factory.h (module 'core'): ns3::ObjectFactory::ObjectFactory() [constructor]
- cls.add_constructor([])
- ## object-factory.h (module 'core'): ns3::ObjectFactory::ObjectFactory(std::string typeId) [constructor]
- cls.add_constructor([param('std::string', 'typeId')])
- ## object-factory.h (module 'core'): ns3::Ptr<ns3::Object> ns3::ObjectFactory::Create() const [member function]
- cls.add_method('Create',
- 'ns3::Ptr< ns3::Object >',
- [],
- is_const=True)
- ## object-factory.h (module 'core'): ns3::TypeId ns3::ObjectFactory::GetTypeId() const [member function]
- cls.add_method('GetTypeId',
- 'ns3::TypeId',
- [],
- is_const=True)
- ## object-factory.h (module 'core'): void ns3::ObjectFactory::Set(std::string name, ns3::AttributeValue const & value) [member function]
- cls.add_method('Set',
- 'void',
- [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
- ## object-factory.h (module 'core'): void ns3::ObjectFactory::SetTypeId(ns3::TypeId tid) [member function]
- cls.add_method('SetTypeId',
- 'void',
- [param('ns3::TypeId', 'tid')])
- ## object-factory.h (module 'core'): void ns3::ObjectFactory::SetTypeId(char const * tid) [member function]
- cls.add_method('SetTypeId',
- 'void',
- [param('char const *', 'tid')])
- ## object-factory.h (module 'core'): void ns3::ObjectFactory::SetTypeId(std::string tid) [member function]
- cls.add_method('SetTypeId',
- 'void',
- [param('std::string', 'tid')])
- return
-
-def register_Ns3PacketMetadata_methods(root_module, cls):
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::PacketMetadata(uint64_t uid, uint32_t size) [constructor]
- cls.add_constructor([param('uint64_t', 'uid'), param('uint32_t', 'size')])
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::PacketMetadata(ns3::PacketMetadata const & o) [copy constructor]
- cls.add_constructor([param('ns3::PacketMetadata const &', 'o')])
- ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddAtEnd(ns3::PacketMetadata const & o) [member function]
- cls.add_method('AddAtEnd',
- 'void',
- [param('ns3::PacketMetadata const &', 'o')])
- ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddHeader(ns3::Header const & header, uint32_t size) [member function]
- cls.add_method('AddHeader',
- 'void',
- [param('ns3::Header const &', 'header'), param('uint32_t', 'size')])
- ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddPaddingAtEnd(uint32_t end) [member function]
- cls.add_method('AddPaddingAtEnd',
- 'void',
- [param('uint32_t', 'end')])
- ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddTrailer(ns3::Trailer const & trailer, uint32_t size) [member function]
- cls.add_method('AddTrailer',
- 'void',
- [param('ns3::Trailer const &', 'trailer'), param('uint32_t', 'size')])
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator ns3::PacketMetadata::BeginItem(ns3::Buffer buffer) const [member function]
- cls.add_method('BeginItem',
- 'ns3::PacketMetadata::ItemIterator',
- [param('ns3::Buffer', 'buffer')],
- is_const=True)
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata ns3::PacketMetadata::CreateFragment(uint32_t start, uint32_t end) const [member function]
- cls.add_method('CreateFragment',
- 'ns3::PacketMetadata',
- [param('uint32_t', 'start'), param('uint32_t', 'end')],
- is_const=True)
- ## packet-metadata.h (module 'network'): uint32_t ns3::PacketMetadata::Deserialize(uint8_t const * buffer, uint32_t size) [member function]
- cls.add_method('Deserialize',
- 'uint32_t',
- [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')])
- ## packet-metadata.h (module 'network'): static void ns3::PacketMetadata::Enable() [member function]
- cls.add_method('Enable',
- 'void',
- [],
- is_static=True)
- ## packet-metadata.h (module 'network'): static void ns3::PacketMetadata::EnableChecking() [member function]
- cls.add_method('EnableChecking',
- 'void',
- [],
- is_static=True)
- ## packet-metadata.h (module 'network'): uint32_t ns3::PacketMetadata::GetSerializedSize() const [member function]
- cls.add_method('GetSerializedSize',
- 'uint32_t',
- [],
- is_const=True)
- ## packet-metadata.h (module 'network'): uint64_t ns3::PacketMetadata::GetUid() const [member function]
- cls.add_method('GetUid',
- 'uint64_t',
- [],
- is_const=True)
- ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveAtEnd(uint32_t end) [member function]
- cls.add_method('RemoveAtEnd',
- 'void',
- [param('uint32_t', 'end')])
- ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveAtStart(uint32_t start) [member function]
- cls.add_method('RemoveAtStart',
- 'void',
- [param('uint32_t', 'start')])
- ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveHeader(ns3::Header const & header, uint32_t size) [member function]
- cls.add_method('RemoveHeader',
- 'void',
- [param('ns3::Header const &', 'header'), param('uint32_t', 'size')])
- ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveTrailer(ns3::Trailer const & trailer, uint32_t size) [member function]
- cls.add_method('RemoveTrailer',
- 'void',
- [param('ns3::Trailer const &', 'trailer'), param('uint32_t', 'size')])
- ## packet-metadata.h (module 'network'): uint32_t ns3::PacketMetadata::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function]
- cls.add_method('Serialize',
- 'uint32_t',
- [param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')],
- is_const=True)
- return
-
-def register_Ns3PacketMetadataItem_methods(root_module, cls):
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::Item() [constructor]
- cls.add_constructor([])
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::Item(ns3::PacketMetadata::Item const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::PacketMetadata::Item const &', 'arg0')])
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::current [variable]
- cls.add_instance_attribute('current', 'ns3::Buffer::Iterator', is_const=False)
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::currentSize [variable]
- cls.add_instance_attribute('currentSize', 'uint32_t', is_const=False)
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::currentTrimedFromEnd [variable]
- cls.add_instance_attribute('currentTrimedFromEnd', 'uint32_t', is_const=False)
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::currentTrimedFromStart [variable]
- cls.add_instance_attribute('currentTrimedFromStart', 'uint32_t', is_const=False)
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::isFragment [variable]
- cls.add_instance_attribute('isFragment', 'bool', is_const=False)
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::tid [variable]
- cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False)
- return
-
-def register_Ns3PacketMetadataItemIterator_methods(root_module, cls):
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator::ItemIterator(ns3::PacketMetadata::ItemIterator const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::PacketMetadata::ItemIterator const &', 'arg0')])
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator::ItemIterator(ns3::PacketMetadata const * metadata, ns3::Buffer buffer) [constructor]
- cls.add_constructor([param('ns3::PacketMetadata const *', 'metadata'), param('ns3::Buffer', 'buffer')])
- ## packet-metadata.h (module 'network'): bool ns3::PacketMetadata::ItemIterator::HasNext() const [member function]
- cls.add_method('HasNext',
- 'bool',
- [],
- is_const=True)
- ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item ns3::PacketMetadata::ItemIterator::Next() [member function]
- cls.add_method('Next',
- 'ns3::PacketMetadata::Item',
- [])
- return
-
-def register_Ns3PacketTagIterator_methods(root_module, cls):
- ## packet.h (module 'network'): ns3::PacketTagIterator::PacketTagIterator(ns3::PacketTagIterator const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::PacketTagIterator const &', 'arg0')])
- ## packet.h (module 'network'): bool ns3::PacketTagIterator::HasNext() const [member function]
- cls.add_method('HasNext',
- 'bool',
- [],
- is_const=True)
- ## packet.h (module 'network'): ns3::PacketTagIterator::Item ns3::PacketTagIterator::Next() [member function]
- cls.add_method('Next',
- 'ns3::PacketTagIterator::Item',
- [])
- return
-
-def register_Ns3PacketTagIteratorItem_methods(root_module, cls):
- ## packet.h (module 'network'): ns3::PacketTagIterator::Item::Item(ns3::PacketTagIterator::Item const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::PacketTagIterator::Item const &', 'arg0')])
- ## packet.h (module 'network'): void ns3::PacketTagIterator::Item::GetTag(ns3::Tag & tag) const [member function]
- cls.add_method('GetTag',
- 'void',
- [param('ns3::Tag &', 'tag')],
- is_const=True)
- ## packet.h (module 'network'): ns3::TypeId ns3::PacketTagIterator::Item::GetTypeId() const [member function]
- cls.add_method('GetTypeId',
- 'ns3::TypeId',
- [],
- is_const=True)
- return
-
-def register_Ns3PacketTagList_methods(root_module, cls):
- ## packet-tag-list.h (module 'network'): ns3::PacketTagList::PacketTagList() [constructor]
- cls.add_constructor([])
- ## packet-tag-list.h (module 'network'): ns3::PacketTagList::PacketTagList(ns3::PacketTagList const & o) [copy constructor]
- cls.add_constructor([param('ns3::PacketTagList const &', 'o')])
- ## packet-tag-list.h (module 'network'): void ns3::PacketTagList::Add(ns3::Tag const & tag) const [member function]
- cls.add_method('Add',
- 'void',
- [param('ns3::Tag const &', 'tag')],
- is_const=True)
- ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData const * ns3::PacketTagList::Head() const [member function]
- cls.add_method('Head',
- 'ns3::PacketTagList::TagData const *',
- [],
- is_const=True)
- ## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Peek(ns3::Tag & tag) const [member function]
- cls.add_method('Peek',
- 'bool',
- [param('ns3::Tag &', 'tag')],
- is_const=True)
- ## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Remove(ns3::Tag & tag) [member function]
- cls.add_method('Remove',
- 'bool',
- [param('ns3::Tag &', 'tag')])
- ## packet-tag-list.h (module 'network'): void ns3::PacketTagList::RemoveAll() [member function]
- cls.add_method('RemoveAll',
- 'void',
- [])
- return
-
-def register_Ns3PacketTagListTagData_methods(root_module, cls):
- ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData() [constructor]
- cls.add_constructor([])
- ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData(ns3::PacketTagList::TagData const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::PacketTagList::TagData const &', 'arg0')])
- ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::count [variable]
- cls.add_instance_attribute('count', 'uint32_t', is_const=False)
- ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::data [variable]
- cls.add_instance_attribute('data', 'uint8_t [ 20 ]', is_const=False)
- ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::next [variable]
- cls.add_instance_attribute('next', 'ns3::PacketTagList::TagData *', is_const=False)
- ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::tid [variable]
- cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False)
- return
-
-def register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, cls):
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter>::SimpleRefCount() [constructor]
- cls.add_constructor([])
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter>::SimpleRefCount(ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> const & o) [copy constructor]
- cls.add_constructor([param('ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter > const &', 'o')])
- ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter>::Cleanup() [member function]
- cls.add_method('Cleanup',
- 'void',
- [],
- is_static=True)
- return
-
-def register_Ns3Simulator_methods(root_module, cls):
- ## simulator.h (module 'core'): ns3::Simulator::Simulator(ns3::Simulator const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Simulator const &', 'arg0')])
- ## simulator.h (module 'core'): static void ns3::Simulator::Cancel(ns3::EventId const & id) [member function]
- cls.add_method('Cancel',
- 'void',
- [param('ns3::EventId const &', 'id')],
- is_static=True)
- ## simulator.h (module 'core'): static void ns3::Simulator::Destroy() [member function]
- cls.add_method('Destroy',
- 'void',
- [],
- is_static=True)
- ## simulator.h (module 'core'): static uint32_t ns3::Simulator::GetContext() [member function]
- cls.add_method('GetContext',
- 'uint32_t',
- [],
- is_static=True)
- ## simulator.h (module 'core'): static ns3::Time ns3::Simulator::GetDelayLeft(ns3::EventId const & id) [member function]
- cls.add_method('GetDelayLeft',
- 'ns3::Time',
- [param('ns3::EventId const &', 'id')],
- is_static=True)
- ## simulator.h (module 'core'): static ns3::Ptr<ns3::SimulatorImpl> ns3::Simulator::GetImplementation() [member function]
- cls.add_method('GetImplementation',
- 'ns3::Ptr< ns3::SimulatorImpl >',
- [],
- is_static=True)
- ## simulator.h (module 'core'): static ns3::Time ns3::Simulator::GetMaximumSimulationTime() [member function]
- cls.add_method('GetMaximumSimulationTime',
- 'ns3::Time',
- [],
- is_static=True)
- ## simulator.h (module 'core'): static uint32_t ns3::Simulator::GetSystemId() [member function]
- cls.add_method('GetSystemId',
- 'uint32_t',
- [],
- is_static=True)
- ## simulator.h (module 'core'): static bool ns3::Simulator::IsExpired(ns3::EventId const & id) [member function]
- cls.add_method('IsExpired',
- 'bool',
- [param('ns3::EventId const &', 'id')],
- is_static=True)
- ## simulator.h (module 'core'): static bool ns3::Simulator::IsFinished() [member function]
- cls.add_method('IsFinished',
- 'bool',
- [],
- is_static=True)
- ## simulator.h (module 'core'): static ns3::Time ns3::Simulator::Now() [member function]
- cls.add_method('Now',
- 'ns3::Time',
- [],
- is_static=True)
- ## simulator.h (module 'core'): static void ns3::Simulator::Remove(ns3::EventId const & id) [member function]
- cls.add_method('Remove',
- 'void',
- [param('ns3::EventId const &', 'id')],
- is_static=True)
- ## simulator.h (module 'core'): static void ns3::Simulator::SetImplementation(ns3::Ptr<ns3::SimulatorImpl> impl) [member function]
- cls.add_method('SetImplementation',
- 'void',
- [param('ns3::Ptr< ns3::SimulatorImpl >', 'impl')],
- is_static=True)
- ## simulator.h (module 'core'): static void ns3::Simulator::SetScheduler(ns3::ObjectFactory schedulerFactory) [member function]
- cls.add_method('SetScheduler',
- 'void',
- [param('ns3::ObjectFactory', 'schedulerFactory')],
- is_static=True)
- ## simulator.h (module 'core'): static void ns3::Simulator::Stop() [member function]
- cls.add_method('Stop',
- 'void',
- [],
- is_static=True)
- ## simulator.h (module 'core'): static void ns3::Simulator::Stop(ns3::Time const & time) [member function]
- cls.add_method('Stop',
- 'void',
- [param('ns3::Time const &', 'time')],
- is_static=True)
- return
-
-def register_Ns3StatisticalSummary_methods(root_module, cls):
- ## data-calculator.h (module 'stats'): ns3::StatisticalSummary::StatisticalSummary() [constructor]
- cls.add_constructor([])
- ## data-calculator.h (module 'stats'): ns3::StatisticalSummary::StatisticalSummary(ns3::StatisticalSummary const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::StatisticalSummary const &', 'arg0')])
- ## data-calculator.h (module 'stats'): long int ns3::StatisticalSummary::getCount() const [member function]
- cls.add_method('getCount',
- 'long int',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## data-calculator.h (module 'stats'): double ns3::StatisticalSummary::getMax() const [member function]
- cls.add_method('getMax',
- 'double',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## data-calculator.h (module 'stats'): double ns3::StatisticalSummary::getMean() const [member function]
- cls.add_method('getMean',
- 'double',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## data-calculator.h (module 'stats'): double ns3::StatisticalSummary::getMin() const [member function]
- cls.add_method('getMin',
- 'double',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## data-calculator.h (module 'stats'): double ns3::StatisticalSummary::getSqrSum() const [member function]
- cls.add_method('getSqrSum',
- 'double',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## data-calculator.h (module 'stats'): double ns3::StatisticalSummary::getStddev() const [member function]
- cls.add_method('getStddev',
- 'double',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## data-calculator.h (module 'stats'): double ns3::StatisticalSummary::getSum() const [member function]
- cls.add_method('getSum',
- 'double',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## data-calculator.h (module 'stats'): double ns3::StatisticalSummary::getVariance() const [member function]
- cls.add_method('getVariance',
- 'double',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- return
-
-def register_Ns3Tag_methods(root_module, cls):
- ## tag.h (module 'network'): ns3::Tag::Tag() [constructor]
- cls.add_constructor([])
- ## tag.h (module 'network'): ns3::Tag::Tag(ns3::Tag const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Tag const &', 'arg0')])
- ## tag.h (module 'network'): void ns3::Tag::Deserialize(ns3::TagBuffer i) [member function]
- cls.add_method('Deserialize',
- 'void',
- [param('ns3::TagBuffer', 'i')],
- is_pure_virtual=True, is_virtual=True)
- ## tag.h (module 'network'): uint32_t ns3::Tag::GetSerializedSize() const [member function]
- cls.add_method('GetSerializedSize',
- 'uint32_t',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## tag.h (module 'network'): static ns3::TypeId ns3::Tag::GetTypeId() [member function]
- cls.add_method('GetTypeId',
- 'ns3::TypeId',
- [],
- is_static=True)
- ## tag.h (module 'network'): void ns3::Tag::Print(std::ostream & os) const [member function]
- cls.add_method('Print',
- 'void',
- [param('std::ostream &', 'os')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## tag.h (module 'network'): void ns3::Tag::Serialize(ns3::TagBuffer i) const [member function]
- cls.add_method('Serialize',
- 'void',
- [param('ns3::TagBuffer', 'i')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- return
-
-def register_Ns3TagBuffer_methods(root_module, cls):
- ## tag-buffer.h (module 'network'): ns3::TagBuffer::TagBuffer(ns3::TagBuffer const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::TagBuffer const &', 'arg0')])
- ## tag-buffer.h (module 'network'): ns3::TagBuffer::TagBuffer(uint8_t * start, uint8_t * end) [constructor]
- cls.add_constructor([param('uint8_t *', 'start'), param('uint8_t *', 'end')])
- ## tag-buffer.h (module 'network'): void ns3::TagBuffer::CopyFrom(ns3::TagBuffer o) [member function]
- cls.add_method('CopyFrom',
- 'void',
- [param('ns3::TagBuffer', 'o')])
- ## tag-buffer.h (module 'network'): void ns3::TagBuffer::Read(uint8_t * buffer, uint32_t size) [member function]
- cls.add_method('Read',
- 'void',
- [param('uint8_t *', 'buffer'), param('uint32_t', 'size')])
- ## tag-buffer.h (module 'network'): double ns3::TagBuffer::ReadDouble() [member function]
- cls.add_method('ReadDouble',
- 'double',
- [])
- ## tag-buffer.h (module 'network'): uint16_t ns3::TagBuffer::ReadU16() [member function]
- cls.add_method('ReadU16',
- 'uint16_t',
- [])
- ## tag-buffer.h (module 'network'): uint32_t ns3::TagBuffer::ReadU32() [member function]
- cls.add_method('ReadU32',
- 'uint32_t',
- [])
- ## tag-buffer.h (module 'network'): uint64_t ns3::TagBuffer::ReadU64() [member function]
- cls.add_method('ReadU64',
- 'uint64_t',
- [])
- ## tag-buffer.h (module 'network'): uint8_t ns3::TagBuffer::ReadU8() [member function]
- cls.add_method('ReadU8',
- 'uint8_t',
- [])
- ## tag-buffer.h (module 'network'): void ns3::TagBuffer::TrimAtEnd(uint32_t trim) [member function]
- cls.add_method('TrimAtEnd',
- 'void',
- [param('uint32_t', 'trim')])
- ## tag-buffer.h (module 'network'): void ns3::TagBuffer::Write(uint8_t const * buffer, uint32_t size) [member function]
- cls.add_method('Write',
- 'void',
- [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')])
- ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteDouble(double v) [member function]
- cls.add_method('WriteDouble',
- 'void',
- [param('double', 'v')])
- ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU16(uint16_t data) [member function]
- cls.add_method('WriteU16',
- 'void',
- [param('uint16_t', 'data')])
- ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU32(uint32_t data) [member function]
- cls.add_method('WriteU32',
- 'void',
- [param('uint32_t', 'data')])
- ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU64(uint64_t v) [member function]
- cls.add_method('WriteU64',
- 'void',
- [param('uint64_t', 'v')])
- ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU8(uint8_t v) [member function]
- cls.add_method('WriteU8',
- 'void',
- [param('uint8_t', 'v')])
- return
-
-def register_Ns3TypeId_methods(root_module, cls):
- cls.add_binary_comparison_operator('<')
- cls.add_binary_comparison_operator('!=')
- cls.add_output_stream_operator()
- cls.add_binary_comparison_operator('==')
- ## type-id.h (module 'core'): ns3::TypeId::TypeId(char const * name) [constructor]
- cls.add_constructor([param('char const *', 'name')])
- ## type-id.h (module 'core'): ns3::TypeId::TypeId() [constructor]
- cls.add_constructor([])
- ## type-id.h (module 'core'): ns3::TypeId::TypeId(ns3::TypeId const & o) [copy constructor]
- cls.add_constructor([param('ns3::TypeId const &', 'o')])
- ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddAttribute(std::string name, std::string help, ns3::AttributeValue const & initialValue, ns3::Ptr<ns3::AttributeAccessor const> accessor, ns3::Ptr<ns3::AttributeChecker const> checker) [member function]
- cls.add_method('AddAttribute',
- 'ns3::TypeId',
- [param('std::string', 'name'), param('std::string', 'help'), param('ns3::AttributeValue const &', 'initialValue'), param('ns3::Ptr< ns3::AttributeAccessor const >', 'accessor'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')])
- ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddAttribute(std::string name, std::string help, uint32_t flags, ns3::AttributeValue const & initialValue, ns3::Ptr<ns3::AttributeAccessor const> accessor, ns3::Ptr<ns3::AttributeChecker const> checker) [member function]
- cls.add_method('AddAttribute',
- 'ns3::TypeId',
- [param('std::string', 'name'), param('std::string', 'help'), param('uint32_t', 'flags'), param('ns3::AttributeValue const &', 'initialValue'), param('ns3::Ptr< ns3::AttributeAccessor const >', 'accessor'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')])
- ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddTraceSource(std::string name, std::string help, ns3::Ptr<ns3::TraceSourceAccessor const> accessor) [member function]
- cls.add_method('AddTraceSource',
- 'ns3::TypeId',
- [param('std::string', 'name'), param('std::string', 'help'), param('ns3::Ptr< ns3::TraceSourceAccessor const >', 'accessor')])
- ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation ns3::TypeId::GetAttribute(uint32_t i) const [member function]
- cls.add_method('GetAttribute',
- 'ns3::TypeId::AttributeInformation',
- [param('uint32_t', 'i')],
- is_const=True)
- ## type-id.h (module 'core'): std::string ns3::TypeId::GetAttributeFullName(uint32_t i) const [member function]
- cls.add_method('GetAttributeFullName',
- 'std::string',
- [param('uint32_t', 'i')],
- is_const=True)
- ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetAttributeN() const [member function]
- cls.add_method('GetAttributeN',
- 'uint32_t',
- [],
- is_const=True)
- ## type-id.h (module 'core'): ns3::Callback<ns3::ObjectBase*,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ns3::TypeId::GetConstructor() const [member function]
- cls.add_method('GetConstructor',
- 'ns3::Callback< ns3::ObjectBase *, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >',
- [],
- is_const=True)
- ## type-id.h (module 'core'): std::string ns3::TypeId::GetGroupName() const [member function]
- cls.add_method('GetGroupName',
- 'std::string',
- [],
- is_const=True)
- ## type-id.h (module 'core'): std::string ns3::TypeId::GetName() const [member function]
- cls.add_method('GetName',
- 'std::string',
- [],
- is_const=True)
- ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::GetParent() const [member function]
- cls.add_method('GetParent',
- 'ns3::TypeId',
- [],
- is_const=True)
- ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::GetRegistered(uint32_t i) [member function]
- cls.add_method('GetRegistered',
- 'ns3::TypeId',
- [param('uint32_t', 'i')],
- is_static=True)
- ## type-id.h (module 'core'): static uint32_t ns3::TypeId::GetRegisteredN() [member function]
- cls.add_method('GetRegisteredN',
- 'uint32_t',
- [],
- is_static=True)
- ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation ns3::TypeId::GetTraceSource(uint32_t i) const [member function]
- cls.add_method('GetTraceSource',
- 'ns3::TypeId::TraceSourceInformation',
- [param('uint32_t', 'i')],
- is_const=True)
- ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetTraceSourceN() const [member function]
- cls.add_method('GetTraceSourceN',
- 'uint32_t',
- [],
- is_const=True)
- ## type-id.h (module 'core'): uint16_t ns3::TypeId::GetUid() const [member function]
- cls.add_method('GetUid',
- 'uint16_t',
- [],
- is_const=True)
- ## type-id.h (module 'core'): bool ns3::TypeId::HasConstructor() const [member function]
- cls.add_method('HasConstructor',
- 'bool',
- [],
- is_const=True)
- ## type-id.h (module 'core'): bool ns3::TypeId::HasParent() const [member function]
- cls.add_method('HasParent',
- 'bool',
- [],
- is_const=True)
- ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::HideFromDocumentation() [member function]
- cls.add_method('HideFromDocumentation',
- 'ns3::TypeId',
- [])
- ## type-id.h (module 'core'): bool ns3::TypeId::IsChildOf(ns3::TypeId other) const [member function]
- cls.add_method('IsChildOf',
- 'bool',
- [param('ns3::TypeId', 'other')],
- is_const=True)
- ## type-id.h (module 'core'): bool ns3::TypeId::LookupAttributeByName(std::string name, ns3::TypeId::AttributeInformation * info) const [member function]
- cls.add_method('LookupAttributeByName',
- '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::LookupByName(std::string name) [member function]
- cls.add_method('LookupByName',
- 'ns3::TypeId',
- [param('std::string', 'name')],
- is_static=True)
- ## type-id.h (module 'core'): ns3::Ptr<ns3::TraceSourceAccessor const> ns3::TypeId::LookupTraceSourceByName(std::string name) const [member function]
- cls.add_method('LookupTraceSourceByName',
- 'ns3::Ptr< ns3::TraceSourceAccessor const >',
- [param('std::string', 'name')],
- is_const=True)
- ## type-id.h (module 'core'): bool ns3::TypeId::MustHideFromDocumentation() const [member function]
- cls.add_method('MustHideFromDocumentation',
- 'bool',
- [],
- is_const=True)
- ## type-id.h (module 'core'): bool ns3::TypeId::SetAttributeInitialValue(uint32_t i, ns3::Ptr<ns3::AttributeValue const> initialValue) [member function]
- cls.add_method('SetAttributeInitialValue',
- 'bool',
- [param('uint32_t', 'i'), param('ns3::Ptr< ns3::AttributeValue const >', 'initialValue')])
- ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetGroupName(std::string groupName) [member function]
- cls.add_method('SetGroupName',
- 'ns3::TypeId',
- [param('std::string', 'groupName')])
- ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetParent(ns3::TypeId tid) [member function]
- cls.add_method('SetParent',
- 'ns3::TypeId',
- [param('ns3::TypeId', 'tid')])
- ## type-id.h (module 'core'): void ns3::TypeId::SetUid(uint16_t tid) [member function]
- cls.add_method('SetUid',
- 'void',
- [param('uint16_t', 'tid')])
- return
-
-def register_Ns3TypeIdAttributeInformation_methods(root_module, cls):
- ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::AttributeInformation() [constructor]
- cls.add_constructor([])
- ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::AttributeInformation(ns3::TypeId::AttributeInformation const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::TypeId::AttributeInformation const &', 'arg0')])
- ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::accessor [variable]
- cls.add_instance_attribute('accessor', 'ns3::Ptr< ns3::AttributeAccessor const >', is_const=False)
- ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::checker [variable]
- cls.add_instance_attribute('checker', 'ns3::Ptr< ns3::AttributeChecker const >', is_const=False)
- ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::flags [variable]
- cls.add_instance_attribute('flags', 'uint32_t', is_const=False)
- ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::help [variable]
- cls.add_instance_attribute('help', 'std::string', is_const=False)
- ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::initialValue [variable]
- cls.add_instance_attribute('initialValue', 'ns3::Ptr< ns3::AttributeValue const >', is_const=False)
- ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::name [variable]
- cls.add_instance_attribute('name', 'std::string', is_const=False)
- ## type-id.h (module 'core'): ns3::TypeId::AttributeInformation::originalInitialValue [variable]
- cls.add_instance_attribute('originalInitialValue', 'ns3::Ptr< ns3::AttributeValue const >', is_const=False)
- return
-
-def register_Ns3TypeIdTraceSourceInformation_methods(root_module, cls):
- ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::TraceSourceInformation() [constructor]
- cls.add_constructor([])
- ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::TraceSourceInformation(ns3::TypeId::TraceSourceInformation const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::TypeId::TraceSourceInformation const &', 'arg0')])
- ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::accessor [variable]
- cls.add_instance_attribute('accessor', 'ns3::Ptr< ns3::TraceSourceAccessor const >', is_const=False)
- ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::help [variable]
- cls.add_instance_attribute('help', 'std::string', is_const=False)
- ## type-id.h (module 'core'): ns3::TypeId::TraceSourceInformation::name [variable]
- cls.add_instance_attribute('name', 'std::string', is_const=False)
- return
-
-def register_Ns3Empty_methods(root_module, cls):
- ## empty.h (module 'core'): ns3::empty::empty() [constructor]
- cls.add_constructor([])
- ## empty.h (module 'core'): ns3::empty::empty(ns3::empty const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::empty const &', 'arg0')])
- return
-
-def register_Ns3Int64x64_t_methods(root_module, cls):
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right'))
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right'))
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right'))
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short unsigned int const', 'right'))
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned char const', 'right'))
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long int const', 'right'))
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long int const', 'right'))
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('int const', 'right'))
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short int const', 'right'))
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('signed char const', 'right'))
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('double const', 'right'))
- cls.add_binary_numeric_operator('*', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short unsigned int const', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned char const', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long int const', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long int const', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('int const', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short int const', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('signed char const', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('double const', 'right'))
- cls.add_binary_numeric_operator('+', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short unsigned int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned char const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short int const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('signed char const', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('double const', 'right'))
- cls.add_unary_numeric_operator('-')
- cls.add_binary_numeric_operator('-', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long unsigned int const', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long unsigned int const', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned int const', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short unsigned int const', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('unsigned char const', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long long int const', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('long int const', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('int const', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('short int const', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('signed char const', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('double const', 'right'))
- cls.add_binary_numeric_operator('/', root_module['ns3::int64x64_t'], root_module['ns3::int64x64_t'], param('ns3::int64x64_t const &', 'right'))
- cls.add_binary_comparison_operator('<')
- cls.add_binary_comparison_operator('>')
- cls.add_binary_comparison_operator('!=')
- cls.add_inplace_numeric_operator('*=', param('ns3::int64x64_t const &', 'right'))
- cls.add_inplace_numeric_operator('+=', param('ns3::int64x64_t const &', 'right'))
- cls.add_inplace_numeric_operator('-=', param('ns3::int64x64_t const &', 'right'))
- cls.add_inplace_numeric_operator('/=', param('ns3::int64x64_t const &', 'right'))
- cls.add_output_stream_operator()
- cls.add_binary_comparison_operator('<=')
- cls.add_binary_comparison_operator('==')
- cls.add_binary_comparison_operator('>=')
- ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t() [constructor]
- cls.add_constructor([])
- ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(double v) [constructor]
- cls.add_constructor([param('double', 'v')])
- ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(int v) [constructor]
- cls.add_constructor([param('int', 'v')])
- ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(long int v) [constructor]
- cls.add_constructor([param('long int', 'v')])
- ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(long long int v) [constructor]
- cls.add_constructor([param('long long int', 'v')])
- ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(unsigned int v) [constructor]
- cls.add_constructor([param('unsigned int', 'v')])
- ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(long unsigned int v) [constructor]
- cls.add_constructor([param('long unsigned int', 'v')])
- ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(long long unsigned int v) [constructor]
- cls.add_constructor([param('long long unsigned int', 'v')])
- ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(int64_t hi, uint64_t lo) [constructor]
- cls.add_constructor([param('int64_t', 'hi'), param('uint64_t', 'lo')])
- ## int64x64-double.h (module 'core'): ns3::int64x64_t::int64x64_t(ns3::int64x64_t const & o) [copy constructor]
- cls.add_constructor([param('ns3::int64x64_t const &', 'o')])
- ## int64x64-double.h (module 'core'): double ns3::int64x64_t::GetDouble() const [member function]
- cls.add_method('GetDouble',
- 'double',
- [],
- is_const=True)
- ## int64x64-double.h (module 'core'): int64_t ns3::int64x64_t::GetHigh() const [member function]
- cls.add_method('GetHigh',
- 'int64_t',
- [],
- is_const=True)
- ## int64x64-double.h (module 'core'): uint64_t ns3::int64x64_t::GetLow() const [member function]
- cls.add_method('GetLow',
- 'uint64_t',
- [],
- is_const=True)
- ## int64x64-double.h (module 'core'): static ns3::int64x64_t ns3::int64x64_t::Invert(uint64_t v) [member function]
- cls.add_method('Invert',
- 'ns3::int64x64_t',
- [param('uint64_t', 'v')],
- is_static=True)
- ## int64x64-double.h (module 'core'): void ns3::int64x64_t::MulByInvert(ns3::int64x64_t const & o) [member function]
- cls.add_method('MulByInvert',
- 'void',
- [param('ns3::int64x64_t const &', 'o')])
- return
-
-def register_Ns3Chunk_methods(root_module, cls):
- ## chunk.h (module 'network'): ns3::Chunk::Chunk() [constructor]
- cls.add_constructor([])
- ## chunk.h (module 'network'): ns3::Chunk::Chunk(ns3::Chunk const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Chunk const &', 'arg0')])
- ## chunk.h (module 'network'): uint32_t ns3::Chunk::Deserialize(ns3::Buffer::Iterator start) [member function]
- cls.add_method('Deserialize',
- 'uint32_t',
- [param('ns3::Buffer::Iterator', 'start')],
- is_pure_virtual=True, is_virtual=True)
- ## chunk.h (module 'network'): static ns3::TypeId ns3::Chunk::GetTypeId() [member function]
- cls.add_method('GetTypeId',
- 'ns3::TypeId',
- [],
- is_static=True)
- ## chunk.h (module 'network'): void ns3::Chunk::Print(std::ostream & os) const [member function]
- cls.add_method('Print',
- 'void',
- [param('std::ostream &', 'os')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- return
-
-def register_Ns3Gnuplot2dDataset_methods(root_module, cls):
- ## gnuplot.h (module 'tools'): ns3::Gnuplot2dDataset::Gnuplot2dDataset(ns3::Gnuplot2dDataset const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Gnuplot2dDataset const &', 'arg0')])
- ## gnuplot.h (module 'tools'): ns3::Gnuplot2dDataset::Gnuplot2dDataset(std::string const & title="Untitled") [constructor]
- cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot2dDataset::Add(double x, double y) [member function]
- cls.add_method('Add',
- 'void',
- [param('double', 'x'), param('double', 'y')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot2dDataset::Add(double x, double y, double errorDelta) [member function]
- cls.add_method('Add',
- 'void',
- [param('double', 'x'), param('double', 'y'), param('double', 'errorDelta')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot2dDataset::Add(double x, double y, double xErrorDelta, double yErrorDelta) [member function]
- cls.add_method('Add',
- 'void',
- [param('double', 'x'), param('double', 'y'), param('double', 'xErrorDelta'), param('double', 'yErrorDelta')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot2dDataset::AddEmptyLine() [member function]
- cls.add_method('AddEmptyLine',
- 'void',
- [])
- ## gnuplot.h (module 'tools'): static void ns3::Gnuplot2dDataset::SetDefaultErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function]
- cls.add_method('SetDefaultErrorBars',
- 'void',
- [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')],
- is_static=True)
- ## gnuplot.h (module 'tools'): static void ns3::Gnuplot2dDataset::SetDefaultStyle(ns3::Gnuplot2dDataset::Style style) [member function]
- cls.add_method('SetDefaultStyle',
- 'void',
- [param('ns3::Gnuplot2dDataset::Style', 'style')],
- is_static=True)
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot2dDataset::SetErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function]
- cls.add_method('SetErrorBars',
- 'void',
- [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot2dDataset::SetStyle(ns3::Gnuplot2dDataset::Style style) [member function]
- cls.add_method('SetStyle',
- 'void',
- [param('ns3::Gnuplot2dDataset::Style', 'style')])
- return
-
-def register_Ns3Gnuplot2dFunction_methods(root_module, cls):
- ## gnuplot.h (module 'tools'): ns3::Gnuplot2dFunction::Gnuplot2dFunction(ns3::Gnuplot2dFunction const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Gnuplot2dFunction const &', 'arg0')])
- ## gnuplot.h (module 'tools'): ns3::Gnuplot2dFunction::Gnuplot2dFunction(std::string const & title="Untitled", std::string const & function="") [constructor]
- cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"'), param('std::string const &', 'function', default_value='""')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot2dFunction::SetFunction(std::string const & function) [member function]
- cls.add_method('SetFunction',
- 'void',
- [param('std::string const &', 'function')])
- return
-
-def register_Ns3Gnuplot3dDataset_methods(root_module, cls):
- ## gnuplot.h (module 'tools'): ns3::Gnuplot3dDataset::Gnuplot3dDataset(ns3::Gnuplot3dDataset const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Gnuplot3dDataset const &', 'arg0')])
- ## gnuplot.h (module 'tools'): ns3::Gnuplot3dDataset::Gnuplot3dDataset(std::string const & title="Untitled") [constructor]
- cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot3dDataset::Add(double x, double y, double z) [member function]
- cls.add_method('Add',
- 'void',
- [param('double', 'x'), param('double', 'y'), param('double', 'z')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot3dDataset::AddEmptyLine() [member function]
- cls.add_method('AddEmptyLine',
- 'void',
- [])
- ## gnuplot.h (module 'tools'): static void ns3::Gnuplot3dDataset::SetDefaultStyle(std::string const & style) [member function]
- cls.add_method('SetDefaultStyle',
- 'void',
- [param('std::string const &', 'style')],
- is_static=True)
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot3dDataset::SetStyle(std::string const & style) [member function]
- cls.add_method('SetStyle',
- 'void',
- [param('std::string const &', 'style')])
- return
-
-def register_Ns3Gnuplot3dFunction_methods(root_module, cls):
- ## gnuplot.h (module 'tools'): ns3::Gnuplot3dFunction::Gnuplot3dFunction(ns3::Gnuplot3dFunction const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Gnuplot3dFunction const &', 'arg0')])
- ## gnuplot.h (module 'tools'): ns3::Gnuplot3dFunction::Gnuplot3dFunction(std::string const & title="Untitled", std::string const & function="") [constructor]
- cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"'), param('std::string const &', 'function', default_value='""')])
- ## gnuplot.h (module 'tools'): void ns3::Gnuplot3dFunction::SetFunction(std::string const & function) [member function]
- cls.add_method('SetFunction',
- 'void',
- [param('std::string const &', 'function')])
- return
-
-def register_Ns3Header_methods(root_module, cls):
- cls.add_output_stream_operator()
- ## header.h (module 'network'): ns3::Header::Header() [constructor]
- cls.add_constructor([])
- ## header.h (module 'network'): ns3::Header::Header(ns3::Header const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Header const &', 'arg0')])
- ## header.h (module 'network'): uint32_t ns3::Header::Deserialize(ns3::Buffer::Iterator start) [member function]
- cls.add_method('Deserialize',
- 'uint32_t',
- [param('ns3::Buffer::Iterator', 'start')],
- is_pure_virtual=True, is_virtual=True)
- ## header.h (module 'network'): uint32_t ns3::Header::GetSerializedSize() const [member function]
- cls.add_method('GetSerializedSize',
- 'uint32_t',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## header.h (module 'network'): static ns3::TypeId ns3::Header::GetTypeId() [member function]
- cls.add_method('GetTypeId',
- 'ns3::TypeId',
- [],
- is_static=True)
- ## header.h (module 'network'): void ns3::Header::Print(std::ostream & os) const [member function]
- cls.add_method('Print',
- 'void',
- [param('std::ostream &', 'os')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## header.h (module 'network'): void ns3::Header::Serialize(ns3::Buffer::Iterator start) const [member function]
- cls.add_method('Serialize',
- 'void',
- [param('ns3::Buffer::Iterator', 'start')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- return
-
-def register_Ns3Object_methods(root_module, cls):
- ## object.h (module 'core'): ns3::Object::Object() [constructor]
- cls.add_constructor([])
- ## object.h (module 'core'): void ns3::Object::AggregateObject(ns3::Ptr<ns3::Object> other) [member function]
- cls.add_method('AggregateObject',
- 'void',
- [param('ns3::Ptr< ns3::Object >', 'other')])
- ## object.h (module 'core'): void ns3::Object::Dispose() [member function]
- cls.add_method('Dispose',
- 'void',
- [])
- ## object.h (module 'core'): ns3::Object::AggregateIterator ns3::Object::GetAggregateIterator() const [member function]
- cls.add_method('GetAggregateIterator',
- 'ns3::Object::AggregateIterator',
- [],
- is_const=True)
- ## object.h (module 'core'): ns3::TypeId ns3::Object::GetInstanceTypeId() const [member function]
- cls.add_method('GetInstanceTypeId',
- 'ns3::TypeId',
- [],
- is_const=True, is_virtual=True)
- ## object.h (module 'core'): static ns3::TypeId ns3::Object::GetTypeId() [member function]
- cls.add_method('GetTypeId',
- 'ns3::TypeId',
- [],
- is_static=True)
- ## 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]
- cls.add_constructor([param('ns3::Object const &', 'o')],
- visibility='protected')
- ## object.h (module 'core'): void ns3::Object::DoDispose() [member function]
- cls.add_method('DoDispose',
- 'void',
- [],
- visibility='protected', is_virtual=True)
- ## object.h (module 'core'): void ns3::Object::DoInitialize() [member function]
- cls.add_method('DoInitialize',
- 'void',
- [],
- visibility='protected', is_virtual=True)
- ## object.h (module 'core'): void ns3::Object::NotifyNewAggregate() [member function]
- cls.add_method('NotifyNewAggregate',
- 'void',
- [],
- visibility='protected', is_virtual=True)
- return
-
-def register_Ns3ObjectAggregateIterator_methods(root_module, cls):
- ## object.h (module 'core'): ns3::Object::AggregateIterator::AggregateIterator(ns3::Object::AggregateIterator const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Object::AggregateIterator const &', 'arg0')])
- ## object.h (module 'core'): ns3::Object::AggregateIterator::AggregateIterator() [constructor]
- cls.add_constructor([])
- ## object.h (module 'core'): bool ns3::Object::AggregateIterator::HasNext() const [member function]
- cls.add_method('HasNext',
- 'bool',
- [],
- is_const=True)
- ## object.h (module 'core'): ns3::Ptr<ns3::Object const> ns3::Object::AggregateIterator::Next() [member function]
- cls.add_method('Next',
- 'ns3::Ptr< ns3::Object const >',
- [])
- return
-
-def register_Ns3SimpleRefCount__Ns3AttributeAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeAccessor__gt___methods(root_module, cls):
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> >::SimpleRefCount() [constructor]
- cls.add_constructor([])
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> >::SimpleRefCount(ns3::SimpleRefCount<ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> > const & o) [copy constructor]
- cls.add_constructor([param('ns3::SimpleRefCount< ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter< ns3::AttributeAccessor > > const &', 'o')])
- ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter<ns3::AttributeAccessor> >::Cleanup() [member function]
- cls.add_method('Cleanup',
- 'void',
- [],
- is_static=True)
- return
-
-def register_Ns3SimpleRefCount__Ns3AttributeChecker_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeChecker__gt___methods(root_module, cls):
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> >::SimpleRefCount() [constructor]
- cls.add_constructor([])
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> >::SimpleRefCount(ns3::SimpleRefCount<ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> > const & o) [copy constructor]
- cls.add_constructor([param('ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter< ns3::AttributeChecker > > const &', 'o')])
- ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter<ns3::AttributeChecker> >::Cleanup() [member function]
- cls.add_method('Cleanup',
- 'void',
- [],
- is_static=True)
- return
-
-def register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, cls):
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> >::SimpleRefCount() [constructor]
- cls.add_constructor([])
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> >::SimpleRefCount(ns3::SimpleRefCount<ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> > const & o) [copy constructor]
- cls.add_constructor([param('ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter< ns3::AttributeValue > > const &', 'o')])
- ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter<ns3::AttributeValue> >::Cleanup() [member function]
- cls.add_method('Cleanup',
- 'void',
- [],
- is_static=True)
- return
-
-def register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, cls):
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >::SimpleRefCount() [constructor]
- cls.add_constructor([])
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >::SimpleRefCount(ns3::SimpleRefCount<ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> > const & o) [copy constructor]
- cls.add_constructor([param('ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter< ns3::CallbackImplBase > > const &', 'o')])
- ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter<ns3::CallbackImplBase> >::Cleanup() [member function]
- cls.add_method('Cleanup',
- 'void',
- [],
- is_static=True)
- return
-
-def register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, cls):
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> >::SimpleRefCount() [constructor]
- cls.add_constructor([])
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> >::SimpleRefCount(ns3::SimpleRefCount<ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> > const & o) [copy constructor]
- cls.add_constructor([param('ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter< ns3::EventImpl > > const &', 'o')])
- ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::EventImpl, ns3::empty, ns3::DefaultDeleter<ns3::EventImpl> >::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<ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> >::SimpleRefCount() [constructor]
- cls.add_constructor([])
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> >::SimpleRefCount(ns3::SimpleRefCount<ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> > const & o) [copy constructor]
- cls.add_constructor([param('ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter< ns3::NixVector > > const &', 'o')])
- ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::NixVector, ns3::empty, ns3::DefaultDeleter<ns3::NixVector> >::Cleanup() [member function]
- cls.add_method('Cleanup',
- 'void',
- [],
- is_static=True)
- return
-
-def register_Ns3SimpleRefCount__Ns3Packet_Ns3Empty_Ns3DefaultDeleter__lt__ns3Packet__gt___methods(root_module, cls):
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >::SimpleRefCount() [constructor]
- cls.add_constructor([])
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >::SimpleRefCount(ns3::SimpleRefCount<ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> > const & o) [copy constructor]
- cls.add_constructor([param('ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter< ns3::Packet > > const &', 'o')])
- ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::Packet, ns3::empty, ns3::DefaultDeleter<ns3::Packet> >::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<ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> >::SimpleRefCount() [constructor]
- cls.add_constructor([])
- ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> >::SimpleRefCount(ns3::SimpleRefCount<ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> > const & o) [copy constructor]
- cls.add_constructor([param('ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter< ns3::TraceSourceAccessor > > const &', 'o')])
- ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount<ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter<ns3::TraceSourceAccessor> >::Cleanup() [member function]
- cls.add_method('Cleanup',
- 'void',
- [],
- is_static=True)
- return
-
-def register_Ns3Time_methods(root_module, cls):
- cls.add_binary_numeric_operator('+', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right'))
- cls.add_binary_numeric_operator('-', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right'))
- cls.add_binary_comparison_operator('<')
- cls.add_binary_comparison_operator('>')
- cls.add_binary_comparison_operator('!=')
- cls.add_inplace_numeric_operator('+=', param('ns3::Time const &', 'right'))
- cls.add_inplace_numeric_operator('-=', param('ns3::Time const &', 'right'))
- cls.add_output_stream_operator()
- cls.add_binary_comparison_operator('<=')
- cls.add_binary_comparison_operator('==')
- cls.add_binary_comparison_operator('>=')
- ## nstime.h (module 'core'): ns3::Time::Time() [constructor]
- cls.add_constructor([])
- ## nstime.h (module 'core'): ns3::Time::Time(ns3::Time const & o) [copy constructor]
- cls.add_constructor([param('ns3::Time const &', 'o')])
- ## nstime.h (module 'core'): ns3::Time::Time(double v) [constructor]
- cls.add_constructor([param('double', 'v')])
- ## nstime.h (module 'core'): ns3::Time::Time(int v) [constructor]
- cls.add_constructor([param('int', 'v')])
- ## nstime.h (module 'core'): ns3::Time::Time(long int v) [constructor]
- cls.add_constructor([param('long int', 'v')])
- ## nstime.h (module 'core'): ns3::Time::Time(long long int v) [constructor]
- cls.add_constructor([param('long long int', 'v')])
- ## nstime.h (module 'core'): ns3::Time::Time(unsigned int v) [constructor]
- cls.add_constructor([param('unsigned int', 'v')])
- ## nstime.h (module 'core'): ns3::Time::Time(long unsigned int v) [constructor]
- cls.add_constructor([param('long unsigned int', 'v')])
- ## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor]
- cls.add_constructor([param('long long unsigned int', 'v')])
- ## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor]
- cls.add_constructor([param('std::string const &', 's')])
- ## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor]
- cls.add_constructor([param('ns3::int64x64_t const &', 'value')])
- ## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function]
- cls.add_method('Compare',
- 'int',
- [param('ns3::Time const &', 'o')],
- is_const=True)
- ## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function]
- cls.add_method('From',
- 'ns3::Time',
- [param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')],
- is_static=True)
- ## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function]
- cls.add_method('From',
- 'ns3::Time',
- [param('ns3::int64x64_t const &', 'value')],
- is_static=True)
- ## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function]
- cls.add_method('FromDouble',
- 'ns3::Time',
- [param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')],
- is_static=True)
- ## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function]
- cls.add_method('FromInteger',
- 'ns3::Time',
- [param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')],
- is_static=True)
- ## nstime.h (module 'core'): double ns3::Time::GetDouble() const [member function]
- cls.add_method('GetDouble',
- 'double',
- [],
- is_const=True)
- ## nstime.h (module 'core'): int64_t ns3::Time::GetFemtoSeconds() const [member function]
- cls.add_method('GetFemtoSeconds',
- 'int64_t',
- [],
- is_const=True)
- ## nstime.h (module 'core'): int64_t ns3::Time::GetInteger() const [member function]
- cls.add_method('GetInteger',
- 'int64_t',
- [],
- is_const=True)
- ## nstime.h (module 'core'): int64_t ns3::Time::GetMicroSeconds() const [member function]
- cls.add_method('GetMicroSeconds',
- 'int64_t',
- [],
- is_const=True)
- ## nstime.h (module 'core'): int64_t ns3::Time::GetMilliSeconds() const [member function]
- cls.add_method('GetMilliSeconds',
- 'int64_t',
- [],
- is_const=True)
- ## nstime.h (module 'core'): int64_t ns3::Time::GetNanoSeconds() const [member function]
- cls.add_method('GetNanoSeconds',
- 'int64_t',
- [],
- is_const=True)
- ## nstime.h (module 'core'): int64_t ns3::Time::GetPicoSeconds() const [member function]
- cls.add_method('GetPicoSeconds',
- 'int64_t',
- [],
- is_const=True)
- ## nstime.h (module 'core'): static ns3::Time::Unit ns3::Time::GetResolution() [member function]
- cls.add_method('GetResolution',
- 'ns3::Time::Unit',
- [],
- is_static=True)
- ## nstime.h (module 'core'): double ns3::Time::GetSeconds() const [member function]
- cls.add_method('GetSeconds',
- 'double',
- [],
- is_const=True)
- ## nstime.h (module 'core'): int64_t ns3::Time::GetTimeStep() const [member function]
- cls.add_method('GetTimeStep',
- 'int64_t',
- [],
- is_const=True)
- ## nstime.h (module 'core'): bool ns3::Time::IsNegative() const [member function]
- cls.add_method('IsNegative',
- 'bool',
- [],
- is_const=True)
- ## nstime.h (module 'core'): bool ns3::Time::IsPositive() const [member function]
- cls.add_method('IsPositive',
- 'bool',
- [],
- is_const=True)
- ## nstime.h (module 'core'): bool ns3::Time::IsStrictlyNegative() const [member function]
- cls.add_method('IsStrictlyNegative',
- 'bool',
- [],
- is_const=True)
- ## nstime.h (module 'core'): bool ns3::Time::IsStrictlyPositive() const [member function]
- cls.add_method('IsStrictlyPositive',
- 'bool',
- [],
- is_const=True)
- ## nstime.h (module 'core'): bool ns3::Time::IsZero() const [member function]
- cls.add_method('IsZero',
- 'bool',
- [],
- is_const=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'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function]
- cls.add_method('To',
- 'ns3::int64x64_t',
- [param('ns3::Time::Unit', 'timeUnit')],
- is_const=True)
- ## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function]
- cls.add_method('ToDouble',
- 'double',
- [param('ns3::Time::Unit', 'timeUnit')],
- is_const=True)
- ## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function]
- cls.add_method('ToInteger',
- 'int64_t',
- [param('ns3::Time::Unit', 'timeUnit')],
- is_const=True)
- return
-
-def register_Ns3TraceSourceAccessor_methods(root_module, cls):
- ## trace-source-accessor.h (module 'core'): ns3::TraceSourceAccessor::TraceSourceAccessor(ns3::TraceSourceAccessor const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::TraceSourceAccessor const &', 'arg0')])
- ## trace-source-accessor.h (module 'core'): ns3::TraceSourceAccessor::TraceSourceAccessor() [constructor]
- cls.add_constructor([])
- ## trace-source-accessor.h (module 'core'): bool ns3::TraceSourceAccessor::Connect(ns3::ObjectBase * obj, std::string context, ns3::CallbackBase const & cb) const [member function]
- cls.add_method('Connect',
- 'bool',
- [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## trace-source-accessor.h (module 'core'): bool ns3::TraceSourceAccessor::ConnectWithoutContext(ns3::ObjectBase * obj, ns3::CallbackBase const & cb) const [member function]
- cls.add_method('ConnectWithoutContext',
- 'bool',
- [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('ns3::CallbackBase const &', 'cb')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## trace-source-accessor.h (module 'core'): bool ns3::TraceSourceAccessor::Disconnect(ns3::ObjectBase * obj, std::string context, ns3::CallbackBase const & cb) const [member function]
- cls.add_method('Disconnect',
- 'bool',
- [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## trace-source-accessor.h (module 'core'): bool ns3::TraceSourceAccessor::DisconnectWithoutContext(ns3::ObjectBase * obj, ns3::CallbackBase const & cb) const [member function]
- cls.add_method('DisconnectWithoutContext',
- 'bool',
- [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('ns3::CallbackBase const &', 'cb')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- return
-
-def register_Ns3Trailer_methods(root_module, cls):
- cls.add_output_stream_operator()
- ## trailer.h (module 'network'): ns3::Trailer::Trailer() [constructor]
- cls.add_constructor([])
- ## trailer.h (module 'network'): ns3::Trailer::Trailer(ns3::Trailer const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::Trailer const &', 'arg0')])
- ## trailer.h (module 'network'): uint32_t ns3::Trailer::Deserialize(ns3::Buffer::Iterator end) [member function]
- cls.add_method('Deserialize',
- 'uint32_t',
- [param('ns3::Buffer::Iterator', 'end')],
- is_pure_virtual=True, is_virtual=True)
- ## trailer.h (module 'network'): uint32_t ns3::Trailer::GetSerializedSize() const [member function]
- cls.add_method('GetSerializedSize',
- 'uint32_t',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## trailer.h (module 'network'): static ns3::TypeId ns3::Trailer::GetTypeId() [member function]
- cls.add_method('GetTypeId',
- 'ns3::TypeId',
- [],
- is_static=True)
- ## trailer.h (module 'network'): void ns3::Trailer::Print(std::ostream & os) const [member function]
- cls.add_method('Print',
- 'void',
- [param('std::ostream &', 'os')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## trailer.h (module 'network'): void ns3::Trailer::Serialize(ns3::Buffer::Iterator start) const [member function]
- cls.add_method('Serialize',
- 'void',
- [param('ns3::Buffer::Iterator', 'start')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- return
-
-def register_Ns3AttributeAccessor_methods(root_module, cls):
- ## attribute.h (module 'core'): ns3::AttributeAccessor::AttributeAccessor(ns3::AttributeAccessor const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::AttributeAccessor const &', 'arg0')])
- ## attribute.h (module 'core'): ns3::AttributeAccessor::AttributeAccessor() [constructor]
- cls.add_constructor([])
- ## attribute.h (module 'core'): bool ns3::AttributeAccessor::Get(ns3::ObjectBase const * object, ns3::AttributeValue & attribute) const [member function]
- cls.add_method('Get',
- 'bool',
- [param('ns3::ObjectBase const *', 'object'), param('ns3::AttributeValue &', 'attribute')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## attribute.h (module 'core'): bool ns3::AttributeAccessor::HasGetter() const [member function]
- cls.add_method('HasGetter',
- 'bool',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## attribute.h (module 'core'): bool ns3::AttributeAccessor::HasSetter() const [member function]
- cls.add_method('HasSetter',
- 'bool',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## attribute.h (module 'core'): bool ns3::AttributeAccessor::Set(ns3::ObjectBase * object, ns3::AttributeValue const & value) const [member function]
- cls.add_method('Set',
- 'bool',
- [param('ns3::ObjectBase *', 'object', transfer_ownership=False), param('ns3::AttributeValue const &', 'value')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- return
-
-def register_Ns3AttributeChecker_methods(root_module, cls):
- ## attribute.h (module 'core'): ns3::AttributeChecker::AttributeChecker(ns3::AttributeChecker const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::AttributeChecker const &', 'arg0')])
- ## attribute.h (module 'core'): ns3::AttributeChecker::AttributeChecker() [constructor]
- cls.add_constructor([])
- ## attribute.h (module 'core'): bool ns3::AttributeChecker::Check(ns3::AttributeValue const & value) const [member function]
- cls.add_method('Check',
- 'bool',
- [param('ns3::AttributeValue const &', 'value')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## attribute.h (module 'core'): bool ns3::AttributeChecker::Copy(ns3::AttributeValue const & source, ns3::AttributeValue & destination) const [member function]
- cls.add_method('Copy',
- 'bool',
- [param('ns3::AttributeValue const &', 'source'), param('ns3::AttributeValue &', 'destination')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## attribute.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::AttributeChecker::Create() const [member function]
- cls.add_method('Create',
- 'ns3::Ptr< ns3::AttributeValue >',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## attribute.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::AttributeChecker::CreateValidValue(ns3::AttributeValue const & value) const [member function]
- cls.add_method('CreateValidValue',
- 'ns3::Ptr< ns3::AttributeValue >',
- [param('ns3::AttributeValue const &', 'value')],
- is_const=True)
- ## attribute.h (module 'core'): std::string ns3::AttributeChecker::GetUnderlyingTypeInformation() const [member function]
- cls.add_method('GetUnderlyingTypeInformation',
- 'std::string',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## attribute.h (module 'core'): std::string ns3::AttributeChecker::GetValueTypeName() const [member function]
- cls.add_method('GetValueTypeName',
- 'std::string',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## attribute.h (module 'core'): bool ns3::AttributeChecker::HasUnderlyingTypeInformation() const [member function]
- cls.add_method('HasUnderlyingTypeInformation',
- 'bool',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- return
-
-def register_Ns3AttributeValue_methods(root_module, cls):
- ## attribute.h (module 'core'): ns3::AttributeValue::AttributeValue(ns3::AttributeValue const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::AttributeValue const &', 'arg0')])
- ## attribute.h (module 'core'): ns3::AttributeValue::AttributeValue() [constructor]
- cls.add_constructor([])
- ## attribute.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::AttributeValue::Copy() const [member function]
- cls.add_method('Copy',
- 'ns3::Ptr< ns3::AttributeValue >',
- [],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## attribute.h (module 'core'): bool ns3::AttributeValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function]
- cls.add_method('DeserializeFromString',
- 'bool',
- [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_pure_virtual=True, is_virtual=True)
- ## attribute.h (module 'core'): std::string ns3::AttributeValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function]
- cls.add_method('SerializeToString',
- 'std::string',
- [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- return
-
-def register_Ns3CallbackChecker_methods(root_module, cls):
- ## callback.h (module 'core'): ns3::CallbackChecker::CallbackChecker() [constructor]
- cls.add_constructor([])
- ## callback.h (module 'core'): ns3::CallbackChecker::CallbackChecker(ns3::CallbackChecker const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::CallbackChecker const &', 'arg0')])
- return
-
-def register_Ns3CallbackImplBase_methods(root_module, cls):
- ## callback.h (module 'core'): ns3::CallbackImplBase::CallbackImplBase() [constructor]
- cls.add_constructor([])
- ## callback.h (module 'core'): ns3::CallbackImplBase::CallbackImplBase(ns3::CallbackImplBase const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::CallbackImplBase const &', 'arg0')])
- ## callback.h (module 'core'): bool ns3::CallbackImplBase::IsEqual(ns3::Ptr<ns3::CallbackImplBase const> other) const [member function]
- cls.add_method('IsEqual',
- 'bool',
- [param('ns3::Ptr< ns3::CallbackImplBase const >', 'other')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- return
-
-def register_Ns3CallbackValue_methods(root_module, cls):
- ## callback.h (module 'core'): ns3::CallbackValue::CallbackValue(ns3::CallbackValue const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::CallbackValue const &', 'arg0')])
- ## callback.h (module 'core'): ns3::CallbackValue::CallbackValue() [constructor]
- cls.add_constructor([])
- ## callback.h (module 'core'): ns3::CallbackValue::CallbackValue(ns3::CallbackBase const & base) [constructor]
- cls.add_constructor([param('ns3::CallbackBase const &', 'base')])
- ## callback.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::CallbackValue::Copy() const [member function]
- cls.add_method('Copy',
- 'ns3::Ptr< ns3::AttributeValue >',
- [],
- is_const=True, is_virtual=True)
- ## callback.h (module 'core'): bool ns3::CallbackValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function]
- cls.add_method('DeserializeFromString',
- 'bool',
- [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_virtual=True)
- ## callback.h (module 'core'): std::string ns3::CallbackValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function]
- cls.add_method('SerializeToString',
- 'std::string',
- [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_const=True, is_virtual=True)
- ## callback.h (module 'core'): void ns3::CallbackValue::Set(ns3::CallbackBase base) [member function]
- cls.add_method('Set',
- 'void',
- [param('ns3::CallbackBase', 'base')])
- return
-
-def register_Ns3DataCalculator_methods(root_module, cls):
- ## data-calculator.h (module 'stats'): ns3::DataCalculator::DataCalculator(ns3::DataCalculator const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::DataCalculator const &', 'arg0')])
- ## data-calculator.h (module 'stats'): ns3::DataCalculator::DataCalculator() [constructor]
- cls.add_constructor([])
- ## data-calculator.h (module 'stats'): void ns3::DataCalculator::Disable() [member function]
- cls.add_method('Disable',
- 'void',
- [])
- ## data-calculator.h (module 'stats'): void ns3::DataCalculator::Enable() [member function]
- cls.add_method('Enable',
- 'void',
- [])
- ## data-calculator.h (module 'stats'): std::string ns3::DataCalculator::GetContext() const [member function]
- cls.add_method('GetContext',
- 'std::string',
- [],
- is_const=True)
- ## data-calculator.h (module 'stats'): bool ns3::DataCalculator::GetEnabled() const [member function]
- cls.add_method('GetEnabled',
- 'bool',
- [],
- is_const=True)
- ## data-calculator.h (module 'stats'): std::string ns3::DataCalculator::GetKey() const [member function]
- cls.add_method('GetKey',
- 'std::string',
- [],
- is_const=True)
- ## data-calculator.h (module 'stats'): void ns3::DataCalculator::Output(ns3::DataOutputCallback & callback) const [member function]
- cls.add_method('Output',
- 'void',
- [param('ns3::DataOutputCallback &', 'callback')],
- is_pure_virtual=True, is_const=True, is_virtual=True)
- ## data-calculator.h (module 'stats'): void ns3::DataCalculator::SetContext(std::string const context) [member function]
- cls.add_method('SetContext',
- 'void',
- [param('std::string const', 'context')])
- ## data-calculator.h (module 'stats'): void ns3::DataCalculator::SetKey(std::string const key) [member function]
- cls.add_method('SetKey',
- 'void',
- [param('std::string const', 'key')])
- ## data-calculator.h (module 'stats'): void ns3::DataCalculator::Start(ns3::Time const & startTime) [member function]
- cls.add_method('Start',
- 'void',
- [param('ns3::Time const &', 'startTime')],
- is_virtual=True)
- ## data-calculator.h (module 'stats'): void ns3::DataCalculator::Stop(ns3::Time const & stopTime) [member function]
- cls.add_method('Stop',
- 'void',
- [param('ns3::Time const &', 'stopTime')],
- is_virtual=True)
- ## data-calculator.h (module 'stats'): void ns3::DataCalculator::DoDispose() [member function]
- cls.add_method('DoDispose',
- 'void',
- [],
- visibility='protected', is_virtual=True)
- 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')])
- ## data-output-interface.h (module 'stats'): ns3::DataOutputInterface::DataOutputInterface() [constructor]
- cls.add_constructor([])
- ## data-output-interface.h (module 'stats'): std::string ns3::DataOutputInterface::GetFilePrefix() const [member function]
- cls.add_method('GetFilePrefix',
- 'std::string',
- [],
- is_const=True)
- ## data-output-interface.h (module 'stats'): void ns3::DataOutputInterface::Output(ns3::DataCollector & dc) [member function]
- cls.add_method('Output',
- 'void',
- [param('ns3::DataCollector &', 'dc')],
- is_pure_virtual=True, is_virtual=True)
- ## data-output-interface.h (module 'stats'): void ns3::DataOutputInterface::SetFilePrefix(std::string const prefix) [member function]
- cls.add_method('SetFilePrefix',
- 'void',
- [param('std::string const', 'prefix')])
- ## data-output-interface.h (module 'stats'): void ns3::DataOutputInterface::DoDispose() [member function]
- cls.add_method('DoDispose',
- 'void',
- [],
- visibility='protected', is_virtual=True)
- return
-
-def register_Ns3EmptyAttributeValue_methods(root_module, cls):
- ## attribute.h (module 'core'): ns3::EmptyAttributeValue::EmptyAttributeValue(ns3::EmptyAttributeValue const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::EmptyAttributeValue const &', 'arg0')])
- ## attribute.h (module 'core'): ns3::EmptyAttributeValue::EmptyAttributeValue() [constructor]
- cls.add_constructor([])
- ## attribute.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::EmptyAttributeValue::Copy() const [member function]
- cls.add_method('Copy',
- 'ns3::Ptr< ns3::AttributeValue >',
- [],
- is_const=True, visibility='private', is_virtual=True)
- ## attribute.h (module 'core'): bool ns3::EmptyAttributeValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function]
- cls.add_method('DeserializeFromString',
- 'bool',
- [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- visibility='private', is_virtual=True)
- ## attribute.h (module 'core'): std::string ns3::EmptyAttributeValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function]
- cls.add_method('SerializeToString',
- 'std::string',
- [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_const=True, visibility='private', is_virtual=True)
- return
-
-def register_Ns3EventImpl_methods(root_module, cls):
- ## event-impl.h (module 'core'): ns3::EventImpl::EventImpl(ns3::EventImpl const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::EventImpl const &', 'arg0')])
- ## event-impl.h (module 'core'): ns3::EventImpl::EventImpl() [constructor]
- cls.add_constructor([])
- ## event-impl.h (module 'core'): void ns3::EventImpl::Cancel() [member function]
- cls.add_method('Cancel',
- 'void',
- [])
- ## event-impl.h (module 'core'): void ns3::EventImpl::Invoke() [member function]
- cls.add_method('Invoke',
- 'void',
- [])
- ## event-impl.h (module 'core'): bool ns3::EventImpl::IsCancelled() [member function]
- cls.add_method('IsCancelled',
- 'bool',
- [])
- ## event-impl.h (module 'core'): void ns3::EventImpl::Notify() [member function]
- cls.add_method('Notify',
- 'void',
- [],
- is_pure_virtual=True, visibility='protected', is_virtual=True)
- return
-
-def register_Ns3MinMaxAvgTotalCalculator__Double_methods(root_module, cls):
- ## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<double>::MinMaxAvgTotalCalculator(ns3::MinMaxAvgTotalCalculator<double> const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::MinMaxAvgTotalCalculator< double > const &', 'arg0')])
- ## basic-data-calculators.h (module 'stats'): ns3::MinMaxAvgTotalCalculator<double>::MinMaxAvgTotalCalculator() [constructor]
- cls.add_constructor([])
- ## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator<double>::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<double>::Reset() [member function]
- cls.add_method('Reset',
- 'void',
- [])
- ## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator<double>::Update(double const i) [member function]
- cls.add_method('Update',
- 'void',
- [param('double const', 'i')])
- ## basic-data-calculators.h (module 'stats'): long int ns3::MinMaxAvgTotalCalculator<double>::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<double>::getMax() const [member function]
- cls.add_method('getMax',
- 'double',
- [],
- is_const=True, is_virtual=True)
- ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getMean() const [member function]
- cls.add_method('getMean',
- 'double',
- [],
- is_const=True, is_virtual=True)
- ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getMin() const [member function]
- cls.add_method('getMin',
- 'double',
- [],
- is_const=True, is_virtual=True)
- ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getSqrSum() const [member function]
- cls.add_method('getSqrSum',
- 'double',
- [],
- is_const=True, is_virtual=True)
- ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getStddev() const [member function]
- cls.add_method('getStddev',
- 'double',
- [],
- is_const=True, is_virtual=True)
- ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getSum() const [member function]
- cls.add_method('getSum',
- 'double',
- [],
- is_const=True, is_virtual=True)
- ## basic-data-calculators.h (module 'stats'): double ns3::MinMaxAvgTotalCalculator<double>::getVariance() const [member function]
- cls.add_method('getVariance',
- 'double',
- [],
- is_const=True, is_virtual=True)
- ## basic-data-calculators.h (module 'stats'): void ns3::MinMaxAvgTotalCalculator<double>::DoDispose() [member function]
- cls.add_method('DoDispose',
- 'void',
- [],
- visibility='protected', is_virtual=True)
- return
-
-def register_Ns3NixVector_methods(root_module, cls):
- cls.add_output_stream_operator()
- ## nix-vector.h (module 'network'): ns3::NixVector::NixVector() [constructor]
- cls.add_constructor([])
- ## nix-vector.h (module 'network'): ns3::NixVector::NixVector(ns3::NixVector const & o) [copy constructor]
- cls.add_constructor([param('ns3::NixVector const &', 'o')])
- ## nix-vector.h (module 'network'): void ns3::NixVector::AddNeighborIndex(uint32_t newBits, uint32_t numberOfBits) [member function]
- cls.add_method('AddNeighborIndex',
- 'void',
- [param('uint32_t', 'newBits'), param('uint32_t', 'numberOfBits')])
- ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::BitCount(uint32_t numberOfNeighbors) const [member function]
- cls.add_method('BitCount',
- 'uint32_t',
- [param('uint32_t', 'numberOfNeighbors')],
- is_const=True)
- ## nix-vector.h (module 'network'): ns3::Ptr<ns3::NixVector> ns3::NixVector::Copy() const [member function]
- cls.add_method('Copy',
- 'ns3::Ptr< ns3::NixVector >',
- [],
- is_const=True)
- ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::Deserialize(uint32_t const * buffer, uint32_t size) [member function]
- cls.add_method('Deserialize',
- 'uint32_t',
- [param('uint32_t const *', 'buffer'), param('uint32_t', 'size')])
- ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::ExtractNeighborIndex(uint32_t numberOfBits) [member function]
- cls.add_method('ExtractNeighborIndex',
- 'uint32_t',
- [param('uint32_t', 'numberOfBits')])
- ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::GetRemainingBits() [member function]
- cls.add_method('GetRemainingBits',
- 'uint32_t',
- [])
- ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::GetSerializedSize() const [member function]
- cls.add_method('GetSerializedSize',
- 'uint32_t',
- [],
- is_const=True)
- ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::Serialize(uint32_t * buffer, uint32_t maxSize) const [member function]
- cls.add_method('Serialize',
- 'uint32_t',
- [param('uint32_t *', 'buffer'), param('uint32_t', 'maxSize')],
- is_const=True)
- return
-
-def register_Ns3ObjectFactoryChecker_methods(root_module, cls):
- ## object-factory.h (module 'core'): ns3::ObjectFactoryChecker::ObjectFactoryChecker() [constructor]
- cls.add_constructor([])
- ## object-factory.h (module 'core'): ns3::ObjectFactoryChecker::ObjectFactoryChecker(ns3::ObjectFactoryChecker const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::ObjectFactoryChecker const &', 'arg0')])
- return
-
-def register_Ns3ObjectFactoryValue_methods(root_module, cls):
- ## object-factory.h (module 'core'): ns3::ObjectFactoryValue::ObjectFactoryValue() [constructor]
- cls.add_constructor([])
- ## object-factory.h (module 'core'): ns3::ObjectFactoryValue::ObjectFactoryValue(ns3::ObjectFactoryValue const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::ObjectFactoryValue const &', 'arg0')])
- ## object-factory.h (module 'core'): ns3::ObjectFactoryValue::ObjectFactoryValue(ns3::ObjectFactory const & value) [constructor]
- cls.add_constructor([param('ns3::ObjectFactory const &', 'value')])
- ## object-factory.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::ObjectFactoryValue::Copy() const [member function]
- cls.add_method('Copy',
- 'ns3::Ptr< ns3::AttributeValue >',
- [],
- is_const=True, is_virtual=True)
- ## object-factory.h (module 'core'): bool ns3::ObjectFactoryValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function]
- cls.add_method('DeserializeFromString',
- 'bool',
- [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_virtual=True)
- ## object-factory.h (module 'core'): ns3::ObjectFactory ns3::ObjectFactoryValue::Get() const [member function]
- cls.add_method('Get',
- 'ns3::ObjectFactory',
- [],
- is_const=True)
- ## object-factory.h (module 'core'): std::string ns3::ObjectFactoryValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function]
- cls.add_method('SerializeToString',
- 'std::string',
- [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_const=True, is_virtual=True)
- ## object-factory.h (module 'core'): void ns3::ObjectFactoryValue::Set(ns3::ObjectFactory const & value) [member function]
- cls.add_method('Set',
- 'void',
- [param('ns3::ObjectFactory const &', 'value')])
- return
-
-def register_Ns3Packet_methods(root_module, cls):
- cls.add_output_stream_operator()
- ## packet.h (module 'network'): ns3::Packet::Packet() [constructor]
- cls.add_constructor([])
- ## packet.h (module 'network'): ns3::Packet::Packet(ns3::Packet const & o) [copy constructor]
- cls.add_constructor([param('ns3::Packet const &', 'o')])
- ## packet.h (module 'network'): ns3::Packet::Packet(uint32_t size) [constructor]
- cls.add_constructor([param('uint32_t', 'size')])
- ## packet.h (module 'network'): ns3::Packet::Packet(uint8_t const * buffer, uint32_t size, bool magic) [constructor]
- 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<const ns3::Packet> packet) [member function]
- cls.add_method('AddAtEnd',
- 'void',
- [param('ns3::Ptr< ns3::Packet const >', 'packet')])
- ## packet.h (module 'network'): void ns3::Packet::AddByteTag(ns3::Tag const & tag) const [member function]
- cls.add_method('AddByteTag',
- 'void',
- [param('ns3::Tag const &', 'tag')],
- is_const=True)
- ## packet.h (module 'network'): void ns3::Packet::AddHeader(ns3::Header const & header) [member function]
- cls.add_method('AddHeader',
- 'void',
- [param('ns3::Header const &', 'header')])
- ## packet.h (module 'network'): void ns3::Packet::AddPacketTag(ns3::Tag const & tag) const [member function]
- cls.add_method('AddPacketTag',
- 'void',
- [param('ns3::Tag const &', 'tag')],
- is_const=True)
- ## packet.h (module 'network'): void ns3::Packet::AddPaddingAtEnd(uint32_t size) [member function]
- cls.add_method('AddPaddingAtEnd',
- 'void',
- [param('uint32_t', 'size')])
- ## packet.h (module 'network'): void ns3::Packet::AddTrailer(ns3::Trailer const & trailer) [member function]
- cls.add_method('AddTrailer',
- 'void',
- [param('ns3::Trailer const &', 'trailer')])
- ## packet.h (module 'network'): ns3::PacketMetadata::ItemIterator ns3::Packet::BeginItem() const [member function]
- cls.add_method('BeginItem',
- 'ns3::PacketMetadata::ItemIterator',
- [],
- is_const=True)
- ## packet.h (module 'network'): ns3::Ptr<ns3::Packet> ns3::Packet::Copy() const [member function]
- cls.add_method('Copy',
- 'ns3::Ptr< ns3::Packet >',
- [],
- is_const=True)
- ## packet.h (module 'network'): uint32_t ns3::Packet::CopyData(uint8_t * buffer, uint32_t size) const [member function]
- cls.add_method('CopyData',
- 'uint32_t',
- [param('uint8_t *', 'buffer'), param('uint32_t', 'size')],
- is_const=True)
- ## packet.h (module 'network'): void ns3::Packet::CopyData(std::ostream * os, uint32_t size) const [member function]
- cls.add_method('CopyData',
- 'void',
- [param('std::ostream *', 'os'), param('uint32_t', 'size')],
- is_const=True)
- ## packet.h (module 'network'): ns3::Ptr<ns3::Packet> ns3::Packet::CreateFragment(uint32_t start, uint32_t length) const [member function]
- cls.add_method('CreateFragment',
- 'ns3::Ptr< ns3::Packet >',
- [param('uint32_t', 'start'), param('uint32_t', 'length')],
- is_const=True)
- ## packet.h (module 'network'): static void ns3::Packet::EnableChecking() [member function]
- cls.add_method('EnableChecking',
- 'void',
- [],
- is_static=True)
- ## packet.h (module 'network'): static void ns3::Packet::EnablePrinting() [member function]
- cls.add_method('EnablePrinting',
- 'void',
- [],
- is_static=True)
- ## packet.h (module 'network'): bool ns3::Packet::FindFirstMatchingByteTag(ns3::Tag & tag) const [member function]
- cls.add_method('FindFirstMatchingByteTag',
- 'bool',
- [param('ns3::Tag &', 'tag')],
- is_const=True)
- ## packet.h (module 'network'): ns3::ByteTagIterator ns3::Packet::GetByteTagIterator() const [member function]
- cls.add_method('GetByteTagIterator',
- 'ns3::ByteTagIterator',
- [],
- is_const=True)
- ## packet.h (module 'network'): ns3::Ptr<ns3::NixVector> ns3::Packet::GetNixVector() const [member function]
- cls.add_method('GetNixVector',
- 'ns3::Ptr< ns3::NixVector >',
- [],
- is_const=True)
- ## packet.h (module 'network'): ns3::PacketTagIterator ns3::Packet::GetPacketTagIterator() const [member function]
- cls.add_method('GetPacketTagIterator',
- 'ns3::PacketTagIterator',
- [],
- is_const=True)
- ## packet.h (module 'network'): uint32_t ns3::Packet::GetSerializedSize() const [member function]
- cls.add_method('GetSerializedSize',
- 'uint32_t',
- [],
- is_const=True)
- ## packet.h (module 'network'): uint32_t ns3::Packet::GetSize() const [member function]
- cls.add_method('GetSize',
- 'uint32_t',
- [],
- is_const=True)
- ## packet.h (module 'network'): uint64_t ns3::Packet::GetUid() const [member function]
- cls.add_method('GetUid',
- 'uint64_t',
- [],
- is_const=True)
- ## packet.h (module 'network'): uint8_t const * ns3::Packet::PeekData() const [member function]
- cls.add_method('PeekData',
- 'uint8_t const *',
- [],
- deprecated=True, is_const=True)
- ## packet.h (module 'network'): uint32_t ns3::Packet::PeekHeader(ns3::Header & header) const [member function]
- cls.add_method('PeekHeader',
- 'uint32_t',
- [param('ns3::Header &', 'header')],
- is_const=True)
- ## packet.h (module 'network'): bool ns3::Packet::PeekPacketTag(ns3::Tag & tag) const [member function]
- cls.add_method('PeekPacketTag',
- 'bool',
- [param('ns3::Tag &', 'tag')],
- is_const=True)
- ## packet.h (module 'network'): uint32_t ns3::Packet::PeekTrailer(ns3::Trailer & trailer) [member function]
- cls.add_method('PeekTrailer',
- 'uint32_t',
- [param('ns3::Trailer &', 'trailer')])
- ## packet.h (module 'network'): void ns3::Packet::Print(std::ostream & os) const [member function]
- cls.add_method('Print',
- 'void',
- [param('std::ostream &', 'os')],
- is_const=True)
- ## packet.h (module 'network'): void ns3::Packet::PrintByteTags(std::ostream & os) const [member function]
- cls.add_method('PrintByteTags',
- 'void',
- [param('std::ostream &', 'os')],
- is_const=True)
- ## packet.h (module 'network'): void ns3::Packet::PrintPacketTags(std::ostream & os) const [member function]
- cls.add_method('PrintPacketTags',
- 'void',
- [param('std::ostream &', 'os')],
- is_const=True)
- ## packet.h (module 'network'): void ns3::Packet::RemoveAllByteTags() [member function]
- cls.add_method('RemoveAllByteTags',
- 'void',
- [])
- ## packet.h (module 'network'): void ns3::Packet::RemoveAllPacketTags() [member function]
- cls.add_method('RemoveAllPacketTags',
- 'void',
- [])
- ## packet.h (module 'network'): void ns3::Packet::RemoveAtEnd(uint32_t size) [member function]
- cls.add_method('RemoveAtEnd',
- 'void',
- [param('uint32_t', 'size')])
- ## packet.h (module 'network'): void ns3::Packet::RemoveAtStart(uint32_t size) [member function]
- cls.add_method('RemoveAtStart',
- 'void',
- [param('uint32_t', 'size')])
- ## packet.h (module 'network'): uint32_t ns3::Packet::RemoveHeader(ns3::Header & header) [member function]
- cls.add_method('RemoveHeader',
- 'uint32_t',
- [param('ns3::Header &', 'header')])
- ## packet.h (module 'network'): bool ns3::Packet::RemovePacketTag(ns3::Tag & tag) [member function]
- cls.add_method('RemovePacketTag',
- 'bool',
- [param('ns3::Tag &', 'tag')])
- ## packet.h (module 'network'): uint32_t ns3::Packet::RemoveTrailer(ns3::Trailer & trailer) [member function]
- cls.add_method('RemoveTrailer',
- 'uint32_t',
- [param('ns3::Trailer &', 'trailer')])
- ## packet.h (module 'network'): uint32_t ns3::Packet::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function]
- cls.add_method('Serialize',
- 'uint32_t',
- [param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')],
- is_const=True)
- ## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> arg0) [member function]
- cls.add_method('SetNixVector',
- 'void',
- [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([])
- ## nstime.h (module 'core'): ns3::TimeValue::TimeValue(ns3::TimeValue const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::TimeValue const &', 'arg0')])
- ## nstime.h (module 'core'): ns3::TimeValue::TimeValue(ns3::Time const & value) [constructor]
- cls.add_constructor([param('ns3::Time const &', 'value')])
- ## nstime.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::TimeValue::Copy() const [member function]
- cls.add_method('Copy',
- 'ns3::Ptr< ns3::AttributeValue >',
- [],
- is_const=True, is_virtual=True)
- ## nstime.h (module 'core'): bool ns3::TimeValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function]
- cls.add_method('DeserializeFromString',
- 'bool',
- [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_virtual=True)
- ## nstime.h (module 'core'): ns3::Time ns3::TimeValue::Get() const [member function]
- cls.add_method('Get',
- 'ns3::Time',
- [],
- is_const=True)
- ## nstime.h (module 'core'): std::string ns3::TimeValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function]
- cls.add_method('SerializeToString',
- 'std::string',
- [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_const=True, is_virtual=True)
- ## nstime.h (module 'core'): void ns3::TimeValue::Set(ns3::Time const & value) [member function]
- cls.add_method('Set',
- 'void',
- [param('ns3::Time const &', 'value')])
- return
-
-def register_Ns3TypeIdChecker_methods(root_module, cls):
- ## type-id.h (module 'core'): ns3::TypeIdChecker::TypeIdChecker() [constructor]
- cls.add_constructor([])
- ## type-id.h (module 'core'): ns3::TypeIdChecker::TypeIdChecker(ns3::TypeIdChecker const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::TypeIdChecker const &', 'arg0')])
- return
-
-def register_Ns3TypeIdValue_methods(root_module, cls):
- ## type-id.h (module 'core'): ns3::TypeIdValue::TypeIdValue() [constructor]
- cls.add_constructor([])
- ## type-id.h (module 'core'): ns3::TypeIdValue::TypeIdValue(ns3::TypeIdValue const & arg0) [copy constructor]
- cls.add_constructor([param('ns3::TypeIdValue const &', 'arg0')])
- ## type-id.h (module 'core'): ns3::TypeIdValue::TypeIdValue(ns3::TypeId const & value) [constructor]
- cls.add_constructor([param('ns3::TypeId const &', 'value')])
- ## type-id.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::TypeIdValue::Copy() const [member function]
- cls.add_method('Copy',
- 'ns3::Ptr< ns3::AttributeValue >',
- [],
- is_const=True, is_virtual=True)
- ## type-id.h (module 'core'): bool ns3::TypeIdValue::DeserializeFromString(std::string value, ns3::Ptr<ns3::AttributeChecker const> checker) [member function]
- cls.add_method('DeserializeFromString',
- 'bool',
- [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_virtual=True)
- ## type-id.h (module 'core'): ns3::TypeId ns3::TypeIdValue::Get() const [member function]
- cls.add_method('Get',
- 'ns3::TypeId',
- [],
- is_const=True)
- ## type-id.h (module 'core'): std::string ns3::TypeIdValue::SerializeToString(ns3::Ptr<ns3::AttributeChecker const> checker) const [member function]
- cls.add_method('SerializeToString',
- 'std::string',
- [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
- is_const=True, is_virtual=True)
- ## type-id.h (module 'core'): void ns3::TypeIdValue::Set(ns3::TypeId const & value) [member function]
- cls.add_method('Set',
- 'void',
- [param('ns3::TypeId const &', 'value')])
- return
-
-def register_functions(root_module):
- module = root_module
- register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module)
- return
-
-def register_functions_ns3_FatalImpl(module, root_module):
- return
-
-def main():
- out = FileCodeSink(sys.stdout)
- root_module = module_init()
- register_types(root_module)
- register_methods(root_module)
- register_functions(root_module)
- root_module.generate(out)
-
-if __name__ == '__main__':
- main()
-
--- a/src/tools/examples/gnuplot-example.cc Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,271 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2011 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
- *
- * Author: Mitch Watrous (watrous@u.washington.edu)
- */
-
-#include <fstream>
-
-#include "ns3/gnuplot.h"
-
-using namespace ns3;
-
-namespace {
-
-//===========================================================================
-// Function: Create2DPlotFile
-//
-//
-// This function creates a 2-D plot file.
-//===========================================================================
-
-void Create2DPlotFile ()
-{
- std::string fileNameWithNoExtension = "plot-2d";
- std::string graphicsFileName = fileNameWithNoExtension + ".png";
- std::string plotFileName = fileNameWithNoExtension + ".plt";
- std::string plotTitle = "2-D Plot";
- std::string dataTitle = "2-D Data";
-
- // Instantiate the plot and set its title.
- Gnuplot plot (graphicsFileName);
- plot.SetTitle (plotTitle);
-
- // Make the graphics file, which the plot file will create when it
- // is used with Gnuplot, be a PNG file.
- plot.SetTerminal ("png");
-
- // Set the labels for each axis.
- plot.SetLegend ("X Values", "Y Values");
-
- // Set the range for the x axis.
- plot.AppendExtra ("set xrange [-6:+6]");
-
- // Instantiate the dataset, set its title, and make the points be
- // plotted along with connecting lines.
- Gnuplot2dDataset dataset;
- dataset.SetTitle (dataTitle);
- dataset.SetStyle (Gnuplot2dDataset::LINES_POINTS);
-
- double x;
- double y;
-
- // Create the 2-D dataset.
- for (x = -5.0; x <= +5.0; x += 1.0)
- {
- // Calculate the 2-D curve
- //
- // 2
- // y = x .
- //
- y = x * x;
-
- // Add this point.
- dataset.Add (x, y);
- }
-
- // Add the dataset to the plot.
- plot.AddDataset (dataset);
-
- // Open the plot file.
- std::ofstream plotFile (plotFileName.c_str());
-
- // Write the plot file.
- plot.GenerateOutput (plotFile);
-
- // Close the plot file.
- plotFile.close ();
-}
-
-
-//===========================================================================
-// Function: Create2DPlotWithErrorBarsFile
-//
-//
-// This function creates a 2-D plot with error bars file.
-//===========================================================================
-
-void Create2DPlotWithErrorBarsFile ()
-{
- std::string fileNameWithNoExtension = "plot-2d-with-error-bars";
- std::string graphicsFileName = fileNameWithNoExtension + ".png";
- std::string plotFileName = fileNameWithNoExtension + ".plt";
- std::string plotTitle = "2-D Plot With Error Bars";
- std::string dataTitle = "2-D Data With Error Bars";
-
- // Instantiate the plot and set its title.
- Gnuplot plot (graphicsFileName);
- plot.SetTitle (plotTitle);
-
- // Make the graphics file, which the plot file will create when it
- // is used with Gnuplot, be a PNG file.
- plot.SetTerminal ("png");
-
- // Set the labels for each axis.
- plot.SetLegend ("X Values", "Y Values");
-
- // Set the range for the x axis.
- plot.AppendExtra ("set xrange [-6:+6]");
-
- // Instantiate the dataset, set its title, and make the points be
- // plotted with no connecting lines.
- Gnuplot2dDataset dataset;
- dataset.SetTitle (dataTitle);
- dataset.SetStyle (Gnuplot2dDataset::POINTS);
-
- // Make the dataset have error bars in both the x and y directions.
- dataset.SetErrorBars (Gnuplot2dDataset::XY);
-
- double x;
- double xErrorDelta;
- double y;
- double yErrorDelta;
-
- // Create the 2-D dataset.
- for (x = -5.0; x <= +5.0; x += 1.0)
- {
- // Calculate the 2-D curve
- //
- // 2
- // y = x .
- //
- y = x * x;
-
- // Make the uncertainty in the x direction be constant and make
- // the uncertainty in the y direction be a constant fraction of
- // y's value.
- xErrorDelta = 0.25;
- yErrorDelta = 0.1 * y;
-
- // Add this point with uncertainties in both the x and y
- // direction.
- dataset.Add (x, y, xErrorDelta, yErrorDelta);
- }
-
- // Add the dataset to the plot.
- plot.AddDataset (dataset);
-
- // Open the plot file.
- std::ofstream plotFile (plotFileName.c_str());
-
- // Write the plot file.
- plot.GenerateOutput (plotFile);
-
- // Close the plot file.
- plotFile.close ();
-}
-
-
-//===========================================================================
-// Function: Create3DPlotFile
-//
-//
-// This function creates a 3-D plot file.
-//===========================================================================
-
-void Create3DPlotFile ()
-{
- std::string fileNameWithNoExtension = "plot-3d";
- std::string graphicsFileName = fileNameWithNoExtension + ".png";
- std::string plotFileName = fileNameWithNoExtension + ".plt";
- std::string plotTitle = "3-D Plot";
- std::string dataTitle = "3-D Data";
-
- // Instantiate the plot and set its title.
- Gnuplot plot (graphicsFileName);
- plot.SetTitle (plotTitle);
-
- // Make the graphics file, which the plot file will create when it
- // is used with Gnuplot, be a PNG file.
- plot.SetTerminal ("png");
-
- // Rotate the plot 30 degrees around the x axis and then rotate the
- // plot 120 degrees around the new z axis.
- plot.AppendExtra ("set view 30, 120, 1.0, 1.0");
-
- // Make the zero for the z-axis be in the x-axis and y-axis plane.
- plot.AppendExtra ("set ticslevel 0");
-
- // Set the labels for each axis.
- plot.AppendExtra ("set xlabel 'X Values'");
- plot.AppendExtra ("set ylabel 'Y Values'");
- plot.AppendExtra ("set zlabel 'Z Values'");
-
- // Set the ranges for the x and y axis.
- plot.AppendExtra ("set xrange [-5:+5]");
- plot.AppendExtra ("set yrange [-5:+5]");
-
- // Instantiate the dataset, set its title, and make the points be
- // connected by lines.
- Gnuplot3dDataset dataset;
- dataset.SetTitle (dataTitle);
- dataset.SetStyle ("with lines");
-
- double x;
- double y;
- double z;
-
- // Create the 3-D dataset.
- for (x = -5.0; x <= +5.0; x += 1.0)
- {
- for (y = -5.0; y <= +5.0; y += 1.0)
- {
- // Calculate the 3-D surface
- //
- // 2 2
- // z = x * y .
- //
- z = x * x * y * y;
-
- // Add this point.
- dataset.Add (x, y, z);
- }
-
- // The blank line is necessary at the end of each x value's data
- // points for the 3-D surface grid to work.
- dataset.AddEmptyLine ();
- }
-
- // Add the dataset to the plot.
- plot.AddDataset (dataset);
-
- // Open the plot file.
- std::ofstream plotFile (plotFileName.c_str());
-
- // Write the plot file.
- plot.GenerateOutput (plotFile);
-
- // Close the plot file.
- plotFile.close ();
-}
-
-} // anonymous namespace
-
-
-int main (int argc, char *argv[])
-{
- // Create a 2-D plot file.
- Create2DPlotFile();
-
- // Create a 2-D plot with error bars file.
- Create2DPlotWithErrorBarsFile();
-
- // Create a 3-D plot file.
- Create3DPlotFile();
-
- return 0;
-}
--- a/src/tools/examples/wscript Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
-
-def build(bld):
- if not bld.env['ENABLE_EXAMPLES']:
- return;
-
- obj = bld.create_ns3_program('gnuplot-example', ['tools'])
- obj.source = 'gnuplot-example.cc'
-
-
--- a/src/tools/model/average.h Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2009 IITP RAS
- *
- * 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: Pavel Boyko <boyko@iitp.ru>
- * Corrections and extensions: Timo Bingmann <tbns@idlebox.net>
- */
-
-#ifndef AVERAGE_H
-#define AVERAGE_H
-#include <cmath>
-#include <ostream>
-#include <limits>
-#include <stdint.h>
-#include "ns3/basic-data-calculators.h"
-
-namespace ns3 {
-
-/**
- * \defgroup tools Tools
- *
- */
-
-/**
- * \ingroup tools
- *
- * Simple average, min, max and std. deviation calculator
- *
- */
-
-template <typename T = double>
-class Average
-{
-public:
- Average ()
- : m_size (0), m_min (std::numeric_limits<T>::max ()), m_max (0)
- {
- }
-
- /// Add new sample
- void Update (T const & x)
- {
- // Give the variance calculator the next value.
- m_varianceCalculator.Update (x);
-
- m_min = std::min (x, m_min);
- m_max = std::max (x, m_max);
- m_size++;
- }
- /// Reset statistics
- void Reset ()
- {
- m_varianceCalculator.Reset ();
-
- m_size = 0;
- m_min = std::numeric_limits<T>::max ();
- m_max = 0;
- }
-
- ///\name Sample statistics
- //\{
- /// Sample size
- uint32_t Count () const { return m_size; }
- /// Minimum
- T Min () const { return m_min; }
- /// Maximum
- T Max () const { return m_max; }
- /// Sample average
- double Avg () const { return m_varianceCalculator.getMean ();}
- /// Estimate of mean, alias to Avg
- double Mean () const { return Avg (); }
- /// Unbiased estimate of variance
- double Var () const { return m_varianceCalculator.getVariance ();}
- /// Standard deviation
- double Stddev () const { return std::sqrt (Var ()); }
- //\}
-
- /**
- * \name Error of the mean estimates
- *
- * Note that estimates are valid for
- * - uncorrelated measurements,
- * - normal distribution and
- * - large enough sample size.
- */
- //\{
- /// Margin of error of the mean for 90% confidence level
- double Error90 () const { return 1.645 * std::sqrt (Var () / Count ()); }
- /// Margin of error of the mean for 95% confidence level
- double Error95 () const { return 1.960 * std::sqrt (Var () / Count ()); }
- /// Margin of error of the mean for 99% confidence level
- double Error99 () const { return 2.576 * std::sqrt (Var () / Count ()); }
- //\}
-
-private:
- uint32_t m_size;
- T m_min, m_max;
- MinMaxAvgTotalCalculator<double> m_varianceCalculator;
-};
-
-/// Print avg (err) [min, max]
-template <typename T>
-std::ostream & operator<< (std::ostream & os, Average<T> const & x)
-{
- if (x.Count () != 0)
- os << x.Avg () << " (" << x.Stddev () << ") [" << x.Min () << ", " << x.Max () << "]";
- else
- os << "NA"; // not available
- return os;
-}
-}
-#endif /* AVERAGE_H */
--- a/src/tools/model/delay-jitter-estimation.cc Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-
-#include "delay-jitter-estimation.h"
-#include "ns3/tag.h"
-#include "ns3/simulator.h"
-#include "ns3/string.h"
-
-namespace ns3 {
-
-class DelayJitterEstimationTimestampTag : public Tag
-{
-public:
- DelayJitterEstimationTimestampTag ();
- static TypeId GetTypeId (void);
- virtual TypeId GetInstanceTypeId (void) const;
-
- virtual uint32_t GetSerializedSize (void) const;
- virtual void Serialize (TagBuffer i) const;
- virtual void Deserialize (TagBuffer i);
- virtual void Print (std::ostream &os) const;
-
- Time GetTxTime (void) const;
-private:
- uint64_t m_creationTime;
-};
-
-DelayJitterEstimationTimestampTag::DelayJitterEstimationTimestampTag ()
- : m_creationTime (Simulator::Now ().GetTimeStep ())
-{
-}
-
-TypeId
-DelayJitterEstimationTimestampTag::GetTypeId (void)
-{
- static TypeId tid = TypeId ("anon::DelayJitterEstimationTimestampTag")
- .SetParent<Tag> ()
- .AddConstructor<DelayJitterEstimationTimestampTag> ()
- .AddAttribute ("CreationTime",
- "The time at which the timestamp was created",
- StringValue ("0.0s"),
- MakeTimeAccessor (&DelayJitterEstimationTimestampTag::GetTxTime),
- MakeTimeChecker ())
- ;
- return tid;
-}
-TypeId
-DelayJitterEstimationTimestampTag::GetInstanceTypeId (void) const
-{
- return GetTypeId ();
-}
-
-uint32_t
-DelayJitterEstimationTimestampTag::GetSerializedSize (void) const
-{
- return 8;
-}
-void
-DelayJitterEstimationTimestampTag::Serialize (TagBuffer i) const
-{
- i.WriteU64 (m_creationTime);
-}
-void
-DelayJitterEstimationTimestampTag::Deserialize (TagBuffer i)
-{
- m_creationTime = i.ReadU64 ();
-}
-void
-DelayJitterEstimationTimestampTag::Print (std::ostream &os) const
-{
- os << "CreationTime=" << m_creationTime;
-}
-Time
-DelayJitterEstimationTimestampTag::GetTxTime (void) const
-{
- return TimeStep (m_creationTime);
-}
-
-DelayJitterEstimation::DelayJitterEstimation ()
- : m_previousRx (Simulator::Now ()),
- m_previousRxTx (Simulator::Now ()),
- m_jitter (0),
- m_delay (Seconds (0.0))
-{
-}
-void
-DelayJitterEstimation::PrepareTx (Ptr<const Packet> packet)
-{
- DelayJitterEstimationTimestampTag tag;
- packet->AddByteTag (tag);
-}
-void
-DelayJitterEstimation::RecordRx (Ptr<const Packet> packet)
-{
- DelayJitterEstimationTimestampTag tag;
- bool found;
- found = packet->FindFirstMatchingByteTag (tag);
- if (!found)
- {
- return;
- }
- tag.GetTxTime ();
-
- Time delta = (Simulator::Now () - m_previousRx) - (tag.GetTxTime () - m_previousRxTx);
- m_jitter += (Abs (delta) - m_jitter) / 16;
- m_previousRx = Simulator::Now ();
- m_previousRxTx = tag.GetTxTime ();
- m_delay = Simulator::Now () - tag.GetTxTime ();
-}
-
-Time
-DelayJitterEstimation::GetLastDelay (void) const
-{
- return m_delay;
-}
-uint64_t
-DelayJitterEstimation::GetLastJitter (void) const
-{
- return m_jitter.GetHigh ();
-}
-
-} // namespace ns3
--- a/src/tools/model/delay-jitter-estimation.h Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-#ifndef DELAY_JITTER_ESTIMATION_H
-#define DELAY_JITTER_ESTIMATION_H
-
-#include "ns3/nstime.h"
-#include "ns3/packet.h"
-
-namespace ns3 {
-
-/**
- * \ingroup tools
- *
- * \brief quick and dirty delay and jitter estimation
- *
- */
-class DelayJitterEstimation
-{
-public:
- DelayJitterEstimation ();
-
- /**
- * \param packet the packet to send over a wire
- *
- * This method should be invoked once on each packet to
- * record within the packet the tx time which is used upon
- * packet reception to calculate the delay and jitter. The
- * tx time is stored in the packet as an ns3::Tag which means
- * that it does not use any network resources and is not
- * taken into account in transmission delay calculations.
- */
- static void PrepareTx (Ptr<const Packet> packet);
- /**
- * \param packet the packet received
- *
- * Invoke this method to update the delay and jitter calculations
- * After a call to this method, \ref GetLastDelay and \ref GetLastJitter
- * will return an updated delay and jitter.
- */
- void RecordRx (Ptr<const Packet> packet);
-
- /**
- * \returns the updated delay.
- */
- Time GetLastDelay (void) const;
- /**
- * The jitter is calculated using the RFC 1889 (RTP) jitter
- * definition.
- *
- * \returns the updated jitter.
- */
- uint64_t GetLastJitter (void) const;
-
-private:
- Time m_previousRx;
- Time m_previousRxTx;
- int64x64_t m_jitter;
- Time m_delay;
-};
-
-} // namespace ns3
-
-#endif /* DELAY_JITTER_ESTIMATION_H */
--- a/src/tools/model/event-garbage-collector.cc Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/* -*- 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 <gjc@inescporto.pt>
- */
-#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
-
-
--- a/src/tools/model/event-garbage-collector.h Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/* -*- 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 <gjc@inescporto.pt>
- */
-#ifndef EVENT_GARBAGE_COLLECTOR_H
-#define EVENT_GARBAGE_COLLECTOR_H
-
-#include <set>
-#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<EventId, EventIdLessThanTs> EventList;
-
- EventList::size_type m_nextCleanupSize;
- EventList m_events;
-
- void Cleanup ();
- void Grow ();
- void Shrink ();
-};
-
-} // namespace ns3
-
-#endif /* EVENT_GARBAGE_COLLECTOR_H */
--- a/src/tools/model/gnuplot.cc Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,732 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2007 INRIA, 2008 Timo Bingmann
- *
- * 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
- *
- * Original Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
- * Enhancements: Timo Bingmann <timo.bingmann@student.kit.edu>
- */
-#include "gnuplot.h"
-#include "ns3/assert.h"
-#include <ostream>
-#include <stdexcept>
-
-namespace ns3 {
-
-// --- GnuplotDataset::Data ------------------------------------------------ //
-
-struct GnuplotDataset::Data
-{
- // *** Data Variables ***
-
- unsigned int m_references;
-
- std::string m_title;
- std::string m_extra;
-
- /**
- * Initializes the reference counter to 1 and sets m_title and m_extra.
- */
- Data(const std::string& title);
-
- /// Required.
- virtual ~Data();
-
- /**
- * Returns "plot" or "splot".
- */
- virtual std::string GetCommand () const = 0;
-
- /**
- * Prints the plot description used as argument to (s)plot. Either the
- * function expression or a datafile description. Should include m_title and
- * m_extra in the output.
- */
- virtual void PrintExpression (std::ostream &os) const = 0;
-
- /**
- * Print the inline data file contents trailing the plot command. Empty for
- * functions.
- */
- virtual void PrintDatafile (std::ostream &os) const = 0;
-};
-
-GnuplotDataset::Data::Data(const std::string& title)
- : m_references (1),
- m_title (title),
- m_extra (m_defaultExtra)
-{
-}
-
-GnuplotDataset::Data::~Data()
-{
-}
-
-// --- GnuplotDataset ------------------------------------------------------ //
-
-std::string GnuplotDataset::m_defaultExtra = "";
-
-GnuplotDataset::GnuplotDataset (struct Data* data)
- : m_data (data)
-{
-}
-
-GnuplotDataset::GnuplotDataset (const GnuplotDataset& original)
- : m_data (original.m_data)
-{
- ++m_data->m_references;
-}
-
-GnuplotDataset::~GnuplotDataset()
-{
- if (--m_data->m_references == 0)
- delete m_data;
-}
-
-GnuplotDataset& GnuplotDataset::operator= (const GnuplotDataset& original)
-{
- if (this != &original)
- {
- if (--m_data->m_references == 0)
- delete m_data;
-
- m_data = original.m_data;
- ++m_data->m_references;
- }
- return *this;
-}
-
-void
-GnuplotDataset::SetTitle (const std::string& title)
-{
- m_data->m_title = title;
-}
-
-void
-GnuplotDataset::SetDefaultExtra (const std::string& extra)
-{
- m_defaultExtra = extra;
-}
-void
-GnuplotDataset::SetExtra (const std::string& extra)
-{
- m_data->m_extra = extra;
-}
-
-// --- Gnuplot2dDataset::Data2d -------------------------------------------- //
-
-struct Gnuplot2dDataset::Data2d : public GnuplotDataset::Data
-{
- // *** Data Variables ***
-
- enum Style m_style;
- enum ErrorBars m_errorBars;
-
- PointSet m_pointset;
-
- /**
- * Initializes with the values from m_defaultStyle and m_defaultErrorBars.
- */
- Data2d(const std::string& title);
-
- virtual std::string GetCommand () const;
- virtual void PrintExpression (std::ostream &os) const;
- virtual void PrintDatafile (std::ostream &os) const;
-};
-
-Gnuplot2dDataset::Data2d::Data2d(const std::string& title)
- : Data (title),
- m_style (m_defaultStyle),
- m_errorBars (m_defaultErrorBars)
-{
-}
-
-std::string
-Gnuplot2dDataset::Data2d::GetCommand () const
-{
- return "plot";
-}
-
-void
-Gnuplot2dDataset::Data2d::PrintExpression (std::ostream &os) const
-{
- os << "'-' ";
-
- if (m_title.size ())
- os << " title '" << m_title << "'";
-
- switch (m_style) {
- case LINES:
- os << " with lines";
- break;
- case POINTS:
- switch (m_errorBars)
- {
- case NONE:
- os << " with points";
- break;
- case X:
- os << " with xerrorbars";
- break;
- case Y:
- os << " with yerrorbars";
- break;
- case XY:
- os << " with xyerrorbars";
- break;
- }
- break;
- case LINES_POINTS:
- switch (m_errorBars)
- {
- case NONE:
- os << " with linespoints";
- break;
- case X:
- os << " with errorlines";
- break;
- case Y:
- os << " with yerrorlines";
- break;
- case XY:
- os << " with xyerrorlines";
- break;
- }
- break;
- case DOTS:
- os << " with dots";
- break;
- case IMPULSES:
- os << " with impulses";
- break;
- case STEPS:
- os << " with steps";
- break;
- case FSTEPS:
- os << " with fsteps";
- break;
- case HISTEPS:
- os << " with histeps";
- break;
- }
-
- if (m_extra.size ())
- os << " " << m_extra;
-}
-
-void
-Gnuplot2dDataset::Data2d::PrintDatafile (std::ostream &os) const
-{
- for (PointSet::const_iterator i = m_pointset.begin ();
- i != m_pointset.end (); ++i)
- {
- if (i->empty) {
- os << std::endl;
- continue;
- }
-
- switch (m_errorBars) {
- case NONE:
- os << i->x << " " << i->y << std::endl;
- break;
- case X:
- os << i->x << " " << i->y << " " << i->dx << std::endl;
- break;
- case Y:
- os << i->x << " " << i->y << " " << i->dy << std::endl;
- break;
- case XY:
- os << i->x << " " << i->y << " " << i->dx << " " << i->dy << std::endl;
- break;
- }
- }
- os << "e" << std::endl;
-}
-
-// --- Gnuplot2dDataset ---------------------------------------------------- //
-
-enum Gnuplot2dDataset::Style Gnuplot2dDataset::m_defaultStyle = LINES;
-enum Gnuplot2dDataset::ErrorBars Gnuplot2dDataset::m_defaultErrorBars = NONE;
-
-Gnuplot2dDataset::Gnuplot2dDataset (const std::string& title)
- : GnuplotDataset ( new Data2d (title) )
-{
-}
-
-void
-Gnuplot2dDataset::SetDefaultStyle (enum Style style)
-{
- m_defaultStyle = style;
-}
-void
-Gnuplot2dDataset::SetStyle (enum Style style)
-{
- reinterpret_cast<Data2d*>(m_data)->m_style = style;
-}
-
-void
-Gnuplot2dDataset::SetDefaultErrorBars (enum ErrorBars errorBars)
-{
- m_defaultErrorBars = errorBars;
-}
-void
-Gnuplot2dDataset::SetErrorBars (enum ErrorBars errorBars)
-{
- reinterpret_cast<Data2d*>(m_data)->m_errorBars = errorBars;
-}
-
-void
-Gnuplot2dDataset::Add (double x, double y)
-{
- NS_ASSERT (reinterpret_cast<Data2d*>(m_data)->m_errorBars == NONE);
-
- struct Point data;
- data.empty = false;
- data.x = x;
- data.y = y;
- data.dx = 0.0;
- data.dy = 0.0;
- reinterpret_cast<Data2d*>(m_data)->m_pointset.push_back (data);
-}
-
-void
-Gnuplot2dDataset::Add (double x, double y, double errorDelta)
-{
- NS_ASSERT ( reinterpret_cast<Data2d*>(m_data)->m_errorBars == X ||
- reinterpret_cast<Data2d*>(m_data)->m_errorBars == Y );
-
- struct Point data;
- data.empty = false;
- data.x = x;
- data.y = y;
- data.dx = errorDelta;
- data.dy = errorDelta;
- reinterpret_cast<Data2d*>(m_data)->m_pointset.push_back (data);
-}
-
-void
-Gnuplot2dDataset::Add (double x, double y, double xErrorDelta, double yErrorDelta)
-{
- NS_ASSERT ( reinterpret_cast<Data2d*>(m_data)->m_errorBars == XY );
-
- struct Point data;
- data.empty = false;
- data.x = x;
- data.y = y;
- data.dx = xErrorDelta;
- data.dy = yErrorDelta;
- reinterpret_cast<Data2d*>(m_data)->m_pointset.push_back (data);
-}
-
-void
-Gnuplot2dDataset::AddEmptyLine ()
-{
- struct Point data;
- data.empty = true;
- reinterpret_cast<Data2d*>(m_data)->m_pointset.push_back (data);
-}
-
-// --- Gnuplot2dFunction::Function2d --------------------------------------- //
-
-struct Gnuplot2dFunction::Function2d : public GnuplotDataset::Data
-{
- // *** Data Variables ***
-
- std::string m_function;
-
- /**
- * Initializes with the function and title.
- */
- Function2d(const std::string& title, const std::string& function);
-
- virtual std::string GetCommand () const;
- virtual void PrintExpression (std::ostream &os) const;
- virtual void PrintDatafile (std::ostream &os) const;
-};
-
-Gnuplot2dFunction::Function2d::Function2d(const std::string& title, const std::string& function)
- : Data (title),
- m_function (function)
-{
-}
-
-std::string
-Gnuplot2dFunction::Function2d::GetCommand () const
-{
- return "plot";
-}
-
-void
-Gnuplot2dFunction::Function2d::PrintExpression (std::ostream &os) const
-{
- os << m_function;
-
- if (m_title.size ())
- os << " title '" << m_title << "'";
-
- if (m_extra.size ())
- os << " " << m_extra;
-}
-
-void
-Gnuplot2dFunction::Function2d::PrintDatafile (std::ostream &os) const
-{
-}
-
-// --- Gnuplot2dFunction --------------------------------------------------- //
-
-Gnuplot2dFunction::Gnuplot2dFunction (const std::string& title, const std::string& function)
- : GnuplotDataset ( new Function2d (title, function) )
-{
-}
-
-void
-Gnuplot2dFunction::SetFunction (const std::string& function)
-{
- reinterpret_cast<Function2d*>(m_data)->m_function = function;
-}
-
-// --- Gnuplot3dDataset::Data3d -------------------------------------------- //
-
-struct Gnuplot3dDataset::Data3d : public GnuplotDataset::Data
-{
- // *** Data Variables ***
-
- std::string m_style;
-
- PointSet m_pointset;
-
- /**
- * Initializes with value from m_defaultStyle.
- */
- Data3d(const std::string& title);
-
- virtual std::string GetCommand () const;
- virtual void PrintExpression (std::ostream &os) const;
- virtual void PrintDatafile (std::ostream &os) const;
-};
-
-Gnuplot3dDataset::Data3d::Data3d(const std::string& title)
- : Data (title),
- m_style (m_defaultStyle)
-{
-}
-
-std::string
-Gnuplot3dDataset::Data3d::GetCommand () const
-{
- return "splot";
-}
-
-void
-Gnuplot3dDataset::Data3d::PrintExpression (std::ostream &os) const
-{
- os << "'-' ";
-
- if (m_style.size ())
- os << " " << m_style;
-
- if (m_title.size ())
- os << " title '" << m_title << "'";
-
- if (m_extra.size ())
- os << " " << m_extra;
-}
-
-void
-Gnuplot3dDataset::Data3d::PrintDatafile (std::ostream &os) const
-{
- for (PointSet::const_iterator i = m_pointset.begin ();
- i != m_pointset.end (); ++i)
- {
- if (i->empty) {
- os << std::endl;
- continue;
- }
-
- os << i->x << " " << i->y << " " << i->z << std::endl;
- }
- os << "e" << std::endl;
-}
-
-// --- Gnuplot3dDataset ---------------------------------------------------- //
-
-std::string Gnuplot3dDataset::m_defaultStyle = "";
-
-Gnuplot3dDataset::Gnuplot3dDataset (const std::string& title)
- : GnuplotDataset ( new Data3d (title) )
-{
-}
-
-void
-Gnuplot3dDataset::SetDefaultStyle (const std::string& style)
-{
- m_defaultStyle = style;
-}
-void
-Gnuplot3dDataset::SetStyle (const std::string& style)
-{
- reinterpret_cast<Data3d*>(m_data)->m_style = style;
-}
-
-void
-Gnuplot3dDataset::Add (double x, double y, double z)
-{
- struct Point data;
- data.empty = false;
- data.x = x;
- data.y = y;
- data.z = z;
- reinterpret_cast<Data3d*>(m_data)->m_pointset.push_back (data);
-}
-
-void
-Gnuplot3dDataset::AddEmptyLine ()
-{
- struct Point data;
- data.empty = true;
- reinterpret_cast<Data3d*>(m_data)->m_pointset.push_back (data);
-}
-
-// --- Gnuplot3dFunction::Function3d --------------------------------------- //
-
-struct Gnuplot3dFunction::Function3d : public GnuplotDataset::Data
-{
- // *** Data Variables ***
-
- std::string m_function;
-
- /**
- * Initializes with the function and title.
- */
- Function3d(const std::string& title, const std::string& function);
-
- virtual std::string GetCommand () const;
- virtual void PrintExpression (std::ostream &os) const;
- virtual void PrintDatafile (std::ostream &os) const;
-};
-
-Gnuplot3dFunction::Function3d::Function3d(const std::string& title, const std::string& function)
- : Data (title),
- m_function (function)
-{
-}
-
-std::string
-Gnuplot3dFunction::Function3d::GetCommand () const
-{
- return "splot";
-}
-
-void
-Gnuplot3dFunction::Function3d::PrintExpression (std::ostream &os) const
-{
- os << m_function;
-
- if (m_title.size ())
- os << " title '" << m_title << "'";
-
- if (m_extra.size ())
- os << " " << m_extra;
-}
-
-void
-Gnuplot3dFunction::Function3d::PrintDatafile (std::ostream &os) const
-{
-}
-
-// --- Gnuplot3dFunction --------------------------------------------------- //
-
-Gnuplot3dFunction::Gnuplot3dFunction (const std::string& title, const std::string& function)
- : GnuplotDataset ( new Function3d (title, function) )
-{
-}
-
-void
-Gnuplot3dFunction::SetFunction (const std::string& function)
-{
- reinterpret_cast<Function3d*>(m_data)->m_function = function;
-}
-
-// ------------------------------------------------------------------------- //
-
-Gnuplot::Gnuplot (const std::string& outputFilename, const std::string& title)
- : m_outputFilename (outputFilename),
- m_terminal ( DetectTerminal (outputFilename) ),
- m_title (title)
-{
-}
-
-std::string Gnuplot::DetectTerminal (const std::string& filename)
-{
- std::string::size_type dotpos = filename.rfind ('.');
- if (dotpos == std::string::npos) return "";
-
- if (filename.substr (dotpos) == ".png") {
- return "png";
- }
- else if (filename.substr (dotpos) == ".pdf") {
- return "pdf";
- }
-
- return "";
-}
-
-void
-Gnuplot::SetTerminal (const std::string& terminal)
-{
- m_terminal = terminal;
-}
-
-void
-Gnuplot::SetTitle (const std::string& title)
-{
- m_title = title;
-}
-
-void
-Gnuplot::SetLegend (const std::string& xLegend, const std::string& yLegend)
-{
- m_xLegend = xLegend;
- m_yLegend = yLegend;
-}
-
-void
-Gnuplot::SetExtra (const std::string& extra)
-{
- m_extra = extra;
-}
-
-void
-Gnuplot::AppendExtra (const std::string& extra)
-{
- m_extra += "\n";
- m_extra += extra;
-}
-
-void
-Gnuplot::AddDataset (const GnuplotDataset& dataset)
-{
- m_datasets.push_back (dataset);
-}
-
-void
-Gnuplot::GenerateOutput (std::ostream &os) const
-{
- if (m_terminal.size ())
- os << "set terminal " << m_terminal << std::endl;
-
- if (m_outputFilename.size ())
- os << "set output '" << m_outputFilename << "'" << std::endl;
-
- if (m_title.size ())
- os << "set title '" << m_title << "'" << std::endl;
-
- if (m_xLegend.size ())
- os << "set xlabel '" << m_xLegend << "'" << std::endl;
-
- if (m_yLegend.size ())
- os << "set ylabel '" << m_yLegend << "'" << std::endl;
-
- if (m_extra.size ())
- os << m_extra << std::endl;
-
- if (m_datasets.empty ())
- return;
-
- // Determine the GetCommand() values of all datasets included. Check that all
- // are equal and print the command.
-
- std::string command = m_datasets.begin ()->m_data->GetCommand ();
-
- for (Datasets::const_iterator i = m_datasets.begin () + 1;
- i != m_datasets.end (); ++i)
- {
- NS_ASSERT_MSG (command == i->m_data->GetCommand (),
- "Cannot mix 'plot' and 'splot' GnuplotDatasets.");
- }
-
- os << command << " ";
-
- // Print all dataset expressions
-
- for (Datasets::const_iterator i = m_datasets.begin (); i != m_datasets.end ();)
- {
- i->m_data->PrintExpression (os);
-
- i++;
-
- if (i != m_datasets.end ())
- {
- os << ", ";
- }
- }
- os << std::endl;
-
- // followed by the inline datafile.
-
- for (Datasets::const_iterator i = m_datasets.begin (); i != m_datasets.end (); i++)
- {
- i->m_data->PrintDatafile (os);
- }
-}
-
-// ------------------------------------------------------------------------- //
-
-GnuplotCollection::GnuplotCollection (const std::string& outputFilename)
- : m_outputFilename (outputFilename),
- m_terminal ( Gnuplot::DetectTerminal (outputFilename) )
-{
-}
-
-void
-GnuplotCollection::SetTerminal (const std::string& terminal)
-{
- m_terminal = terminal;
-}
-
-void
-GnuplotCollection::AddPlot (const Gnuplot& plot)
-{
- m_plots.push_back (plot);
-}
-
-Gnuplot&
-GnuplotCollection::GetPlot (unsigned int id)
-{
- if (id >= m_plots.size ())
- throw(std::range_error ("Gnuplot id is out of range"));
- else
- return m_plots[id];
-}
-
-void
-GnuplotCollection::GenerateOutput (std::ostream &os) const
-{
- if (m_terminal.size ())
- os << "set terminal " << m_terminal << std::endl;
-
- if (m_outputFilename.size ())
- os << "set output '" << m_outputFilename << "'" << std::endl;
-
- for (Plots::const_iterator i = m_plots.begin (); i != m_plots.end (); ++i)
- {
- i->GenerateOutput (os);
- }
-}
-
-// ------------------------------------------------------------------------- //
-
-} // namespace ns3
--- a/src/tools/model/gnuplot.h Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,462 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2007 INRIA, 2008 Timo Bingmann
- *
- * 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
- *
- * Original Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
- * Enhancements: Timo Bingmann <timo.bingmann@student.kit.edu>
- */
-#ifndef GNUPLOT_H
-#define GNUPLOT_H
-
-#include <string>
-#include <vector>
-#include <utility>
-
-namespace ns3 {
-
-/**
- * \ingroup tools
- *
- * \brief Abstract class to store a plot line to be used by ns3::Gnuplot.
- *
- * This class contains a reference counted data object in m_data. The data
- * object contains different structs derived from struct Data by subclasses.
- */
-class GnuplotDataset
-{
-public:
-
- /**
- * Reference-counting copy constructor.
- */
- GnuplotDataset (const GnuplotDataset& original);
-
- /**
- * Reference-counting destructor.
- */
- ~GnuplotDataset();
-
- /**
- * Reference-counting assignment operator.
- */
- GnuplotDataset& operator= (const GnuplotDataset& original);
-
- /**
- * \brief Change line title.
- * \param title the new title string to use for this dataset.
- */
- void SetTitle (const std::string& title);
-
- /**
- * \brief Change extra formatting style parameters for newly created objects.
- * \param extra extra formatting
- */
- static void SetDefaultExtra (const std::string& extra);
-
- /**
- * \brief Add extra formatting parameters to this dataset.
- * \param extra extra formatting
- */
- void SetExtra (const std::string& extra);
-
-protected:
-
- /// Friend because it accesses m_data and it's virtual functions directly in
- /// GenerateOutput().
- friend class Gnuplot;
-
- /**
- * \brief Extra gnuplot parameters set on every newly created dataset.
- */
- static std::string m_defaultExtra;
-
- /**
- * \brief Derived classes subclass this struct and add their own data fields.
- */
- struct Data;
-
- /**
- * Called by constructors of derived classes.
- * \param data the reference counted data object representing this dataset.
- */
- GnuplotDataset (struct Data* data);
-
- /**
- * Reference counted data object.
- */
- struct Data* m_data;
-};
-
-/**
- * \brief Class to represent a 2D points plot. Set the line or points style
- * using SetStyle() and set points using Add().
- */
-class Gnuplot2dDataset : public GnuplotDataset
-{
-public:
- /**
- * The plotting style to use for this dataset.
- */
- enum Style {
- LINES,
- POINTS,
- LINES_POINTS,
- DOTS,
- IMPULSES,
- STEPS,
- FSTEPS,
- HISTEPS,
- };
-
- /**
- * Whether errorbars should be used for this dataset.
- */
- enum ErrorBars {
- NONE,
- X,
- Y,
- XY
- };
-
- /**
- * \param title the title to be associated to this dataset.
- *
- * Create an empty dataset. Usually, the dataset's title is
- * displayed in the legend box.
- */
- Gnuplot2dDataset (const std::string& title = "Untitled");
-
- /**
- * Change default style for all newly created objects.
- * \param style the style of plotting to use for newly created datasets.
- */
- static void SetDefaultStyle (enum Style style);
-
- /**
- * \param style the style of plotting to use for this dataset.
- */
- void SetStyle (enum Style style);
-
- /**
- * Change default errorbars style for all newly created objects.
- * \param errorBars the style of errorbars to use for newly created datasets.
- */
- static void SetDefaultErrorBars (enum ErrorBars errorBars);
-
- /**
- * \param errorBars the style of errorbars to display.
- *
- * If you use any style other than none, you need
- * to make sure you store the delta information in
- * this dataset with the right GnuplotDataset::Add
- * method.
- */
- void SetErrorBars (enum ErrorBars errorBars);
-
- /**
- * \param x x coord to new data point
- * \param y y coord to new data point
- *
- * Use this method with error bar style NONE.
- */
- void Add (double x, double y);
-
- /**
- * \param x x coord to new data point
- * \param y y coord to new data point
- * \param errorDelta x and y data point uncertainty
- *
- * Use this method with error bar style X or Y.
- */
- void Add (double x, double y, double errorDelta);
-
- /**
- * \param x x coord to new data point
- * \param y y coord to new data point
- * \param xErrorDelta x data point uncertainty
- * \param yErrorDelta y data point uncertainty
- *
- * Use this method with error bar style XY.
- */
- void Add (double x, double y, double xErrorDelta, double yErrorDelta);
-
- /**
- * Add an empty line in the data output sequence. Empty lines in the plot
- * data break continuous lines and do other things in the output.
- */
- void AddEmptyLine ();
-
-private:
-
- struct Point {
- bool empty;
- double x;
- double y;
- double dx;
- double dy;
- };
-
- typedef std::vector<struct Point> PointSet;
-
- static enum Style m_defaultStyle;
- static enum ErrorBars m_defaultErrorBars;
-
- /// Forward declaration of the internal data class.
- struct Data2d;
-};
-
-/**
- * \brief Class to represent a 2D function expression plot.
- *
- * Since the function expression is not escaped, styles and extras could just
- * as well be included in the expression string.
- */
-class Gnuplot2dFunction : public GnuplotDataset
-{
-public:
- /**
- * \param title the title to be associated to this dataset.
- * \param function function to plot
- *
- * Create an function dataset. Usually, the dataset's title is displayed in
- * the legend box.
- */
- Gnuplot2dFunction (const std::string& title = "Untitled", const std::string& function = "");
-
- /**
- * \param function new function string to set
- */
- void SetFunction (const std::string& function);
-
-private:
-
- /// Forward declaration of the internal data class.
- struct Function2d;
-};
-
-/**
- * \brief Class to represent a 3D points plot. Set the line or points style
- * using SetStyle() and set points using Add().
- */
-class Gnuplot3dDataset : public GnuplotDataset
-{
-public:
- /**
- * \param title the title to be associated to this dataset.
- *
- * Create an empty dataset. Usually, the dataset's title is
- * displayed in the legend box.
- */
- Gnuplot3dDataset (const std::string& title = "Untitled");
-
- /**
- * Change default style for all newly created objects.
- * \param style the style of plotting to use for newly created datasets.
- */
- static void SetDefaultStyle (const std::string& style);
-
- /**
- * \param style the style of plotting to use for this dataset.
- */
- void SetStyle (const std::string& style);
-
- /**
- * \param x x coord to new data point
- * \param y y coord to new data point
- * \param z z coord to new data point
- *
- * Use this method to add a new 3D point
- */
- void Add (double x, double y, double z);
-
- /**
- * Add an empty line in the data output sequence. Empty lines in the plot
- * data break continuous lines and do other things in the output.
- */
- void AddEmptyLine ();
-
-private:
-
- struct Point {
- bool empty;
- double x, y, z;
- };
-
- typedef std::vector<struct Point> PointSet;
-
- static std::string m_defaultStyle;
-
- /// Forward declaration of the internal data class.
- struct Data3d;
-};
-
-/**
- * \brief Class to represent a 3D function expression plot.
- *
- * Since the function expression is not escaped, styles and extras could just as
- * well be included in the expression string. The only difference to
- * Gnuplot2dFunction is the splot command string.
- */
-class Gnuplot3dFunction : public GnuplotDataset
-{
-public:
- /**
- * \param title the title to be associated to this dataset.
- * \param function function to plot
- *
- * Create an function dataset. Usually, the dataset's title is displayed in
- * the legend box.
- */
- Gnuplot3dFunction (const std::string& title = "Untitled", const std::string& function = "");
-
- /**
- * \param function new function string to set
- */
- void SetFunction (const std::string& function);
-
-private:
-
- /// Forward declaration of the internal data class.
- struct Function3d;
-};
-
-/**
- * \brief a simple class to generate gnuplot-ready plotting commands
- * from a set of datasets.
- *
- * This class really represents a single graph on which multiple datasets
- * can be plotted.
- */
-class Gnuplot
-{
-public:
- /**
- * \param outputFilename the name of the file where the rendering of the
- * graph will be generated if you feed the command stream output by
- * Gnuplot::GenerateOutput to the gnuplot program.
- * \param title title line of the plot page
- */
- Gnuplot (const std::string& outputFilename="", const std::string& title = "");
-
- /**
- * Crude attempt to auto-detect the correct terminal setting by inspecting
- * the filename's extension.
- * \param filename output file name
- */
- static std::string DetectTerminal (const std::string& filename);
-
- /**
- * \param terminal terminal setting string for output. The default terminal
- * string is "png"
- */
- void SetTerminal (const std::string& terminal);
-
- /**
- * \param title set new plot title string to use for this plot.
- */
- void SetTitle (const std::string& title);
-
- /**
- * \param xLegend the legend for the x horizontal axis
- * \param yLegend the legend for the y vertical axis
- */
- void SetLegend (const std::string& xLegend, const std::string& yLegend);
-
- /**
- * \param extra set extra gnuplot directive for output.
- */
- void SetExtra (const std::string& extra);
-
- /**
- * \param extra append extra gnuplot directive for output.
- */
- void AppendExtra (const std::string& extra);
-
- /**
- * \param dataset add a dataset to the graph to be plotted.
- */
- void AddDataset (const GnuplotDataset& dataset);
-
- /**
- * \param os the output stream on which the relevant gnuplot commands should
- * be generated. Including output file and terminal headers.
- */
- void GenerateOutput (std::ostream &os) const;
-
-private:
- typedef std::vector<GnuplotDataset> Datasets;
-
- std::string m_outputFilename;
- std::string m_terminal;
-
- Datasets m_datasets;
-
- std::string m_title;
- std::string m_xLegend;
- std::string m_yLegend;
- std::string m_extra;
-};
-
-/**
- * \brief a simple class to group together multiple gnuplots into one file,
- * e.g. for PDF multi-page output terminals.
- */
-class GnuplotCollection
-{
-public:
- /**
- * \param outputFilename the name of the file where the rendering of the
- * graph will be generated if you feed the command stream output by
- * GnuplotCollection::GenerateOutput to the gnuplot program.
- */
- GnuplotCollection (const std::string& outputFilename);
-
- /**
- * \param terminal terminal setting string for output. The default terminal
- * string is guessed from the output filename's extension.
- */
- void SetTerminal (const std::string& terminal);
-
- /**
- * \param plot add a plot to the collection to be plotted.
- */
- void AddPlot (const Gnuplot& plot);
-
- /**
- * Return a pointer to one of the added plots.
- * \param id index of plot to return
- * \return reference to plot, throws std::range_error if it does not exist.
- */
- Gnuplot& GetPlot (unsigned int id);
-
- /**
- * \param os the output stream on which the relevant gnuplot commands should
- * be generated.
- */
- void GenerateOutput (std::ostream &os) const;
-
-private:
- typedef std::vector<Gnuplot> Plots;
-
- std::string m_outputFilename;
- std::string m_terminal;
-
- Plots m_plots;
-};
-
-} // namespace ns3
-
-#endif /* GNUPLOT_H */
--- a/src/tools/test/average-test-suite.cc Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,251 +0,0 @@
-/* -*- 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
- *
- * Author: Mitch Watrous (watrous@u.washington.edu)
- */
-
-#include <cmath>
-
-#include "ns3/test.h"
-#include "ns3/average.h"
-
-using namespace ns3;
-
-const double TOLERANCE = 1e-14;
-
-// ===========================================================================
-// Test case for a single integer.
-// ===========================================================================
-
-class OneIntegerAverageTestCase : public TestCase
-{
-public:
- OneIntegerAverageTestCase ();
- virtual ~OneIntegerAverageTestCase ();
-
-private:
- virtual void DoRun (void);
-};
-
-OneIntegerAverageTestCase::OneIntegerAverageTestCase ()
- : TestCase ("Average Object Test using One Integer")
-
-{
-}
-
-OneIntegerAverageTestCase::~OneIntegerAverageTestCase ()
-{
-}
-
-void
-OneIntegerAverageTestCase::DoRun (void)
-{
- Average<int> calculator;
-
- long count = 1;
-
- double sum = 0;
- double sqrSum = 0;
- double min;
- double max;
- double mean;
- double stddev;
- double variance;
-
- // Put all of the values into the calculator.
- int multiple = 5;
- int value;
- for (long i = 0; i < count; i++)
- {
- value = multiple * (i + 1);
-
- calculator.Update (value);
-
- sum += value;
- sqrSum += value * value;
- }
-
- // Calculate the expected values for the statistical functions.
- min = multiple;
- max = multiple * count;
- mean = sum / count;
- variance = 0;
- stddev = std::sqrt (variance);
-
- // Test the calculator.
- NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Count (), count, TOLERANCE, "Count value wrong");
- NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Min (), min, TOLERANCE, "Min value wrong");
- NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Max (), max, TOLERANCE, "Max value wrong");
- NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Mean (), mean, TOLERANCE, "Mean value wrong");
- NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Stddev (), stddev, TOLERANCE, "Stddev value wrong");
- NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Var (), variance, TOLERANCE, "Variance value wrong");
-}
-
-
-// ===========================================================================
-// Test case for five integers.
-// ===========================================================================
-
-class FiveIntegersAverageTestCase : public TestCase
-{
-public:
- FiveIntegersAverageTestCase ();
- virtual ~FiveIntegersAverageTestCase ();
-
-private:
- virtual void DoRun (void);
-};
-
-FiveIntegersAverageTestCase::FiveIntegersAverageTestCase ()
- : TestCase ("Average Object Test using Five Integers")
-
-{
-}
-
-FiveIntegersAverageTestCase::~FiveIntegersAverageTestCase ()
-{
-}
-
-void
-FiveIntegersAverageTestCase::DoRun (void)
-{
- Average<int> calculator;
-
- long count = 5;
-
- double sum = 0;
- double sqrSum = 0;
- double min;
- double max;
- double mean;
- double stddev;
- double variance;
-
- // Put all of the values into the calculator.
- int multiple = 5;
- int value;
- for (long i = 0; i < count; i++)
- {
- value = multiple * (i + 1);
-
- calculator.Update (value);
-
- sum += value;
- sqrSum += value * value;
- }
-
- // Calculate the expected values for the statistical functions.
- min = multiple;
- max = multiple * count;
- mean = sum / count;
- variance = (count * sqrSum - sum * sum) / (count * (count - 1));
- stddev = std::sqrt (variance);
-
- // Test the calculator.
- NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Count (), count, TOLERANCE, "Count value wrong");
- NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Min (), min, TOLERANCE, "Min value wrong");
- NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Max (), max, TOLERANCE, "Max value wrong");
- NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Mean (), mean, TOLERANCE, "Mean value wrong");
- NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Stddev (), stddev, TOLERANCE, "Stddev value wrong");
- NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Var (), variance, TOLERANCE, "Variance value wrong");
-}
-
-
-// ===========================================================================
-// Test case for five double values.
-// ===========================================================================
-
-class FiveDoublesAverageTestCase : public TestCase
-{
-public:
- FiveDoublesAverageTestCase ();
- virtual ~FiveDoublesAverageTestCase ();
-
-private:
- virtual void DoRun (void);
-};
-
-FiveDoublesAverageTestCase::FiveDoublesAverageTestCase ()
- : TestCase ("Average Object Test using Five Double Values")
-
-{
-}
-
-FiveDoublesAverageTestCase::~FiveDoublesAverageTestCase ()
-{
-}
-
-void
-FiveDoublesAverageTestCase::DoRun (void)
-{
- Average<double> calculator;
-
- long count = 5;
-
- double sum = 0;
- double sqrSum = 0;
- double min;
- double max;
- double mean;
- double stddev;
- double variance;
-
- // Put all of the values into the calculator.
- double multiple = 3.14;
- double value;
- for (long i = 0; i < count; i++)
- {
- value = multiple * (i + 1);
-
- calculator.Update (value);
-
- sum += value;
- sqrSum += value * value;
- }
-
- // Calculate the expected values for the statistical functions.
- min = multiple;
- max = multiple * count;
- mean = sum / count;
- variance = (count * sqrSum - sum * sum) / (count * (count - 1));
- stddev = std::sqrt (variance);
-
- // Test the calculator.
- NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Count (), count, TOLERANCE, "Count value wrong");
- NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Min (), min, TOLERANCE, "Min value wrong");
- NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Max (), max, TOLERANCE, "Max value wrong");
- NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Mean (), mean, TOLERANCE, "Mean value wrong");
- NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Stddev (), stddev, TOLERANCE, "Stddev value wrong");
- NS_TEST_ASSERT_MSG_EQ_TOL (calculator.Var (), variance, TOLERANCE, "Variance value wrong");
-}
-
-
-class AverageTestSuite : public TestSuite
-{
-public:
- AverageTestSuite ();
-};
-
-AverageTestSuite::AverageTestSuite ()
- : TestSuite ("average", UNIT)
-{
- AddTestCase (new OneIntegerAverageTestCase, TestCase::QUICK);
- AddTestCase (new FiveIntegersAverageTestCase, TestCase::QUICK);
- AddTestCase (new FiveDoublesAverageTestCase, TestCase::QUICK);
-}
-
-static AverageTestSuite averageTestSuite;
--- a/src/tools/test/event-garbage-collector-test-suite.cc Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/* -*- 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 <gjc@inescporto.pt>
- */
-
-#include "ns3/test.h"
-#include "ns3/event-garbage-collector.h"
-
-namespace ns3 {
-
-class EventGarbageCollectorTestCase : public TestCase
-{
- int m_counter;
- EventGarbageCollector *m_events;
-
- void EventGarbageCollectorCallback ();
-
-public:
-
- EventGarbageCollectorTestCase ();
- virtual ~EventGarbageCollectorTestCase ();
- virtual void DoRun (void);
-};
-
-EventGarbageCollectorTestCase::EventGarbageCollectorTestCase ()
- : TestCase ("EventGarbageCollector"), m_counter (0), m_events (0)
-{
-}
-
-EventGarbageCollectorTestCase::~EventGarbageCollectorTestCase ()
-{
-}
-
-void
-EventGarbageCollectorTestCase::EventGarbageCollectorCallback ()
-{
- m_counter++;
- if (m_counter == 50)
- {
- // this should cause the remaining (50) events to be cancelled
- delete m_events;
- m_events = 0;
- }
-}
-
-void EventGarbageCollectorTestCase::DoRun (void)
-{
- m_events = new EventGarbageCollector ();
-
- for (int n = 0; n < 100; n++)
- {
- m_events->Track (Simulator::Schedule
- (Simulator::Now (),
- &EventGarbageCollectorTestCase::EventGarbageCollectorCallback,
- this));
- }
- Simulator::Run ();
- NS_TEST_EXPECT_MSG_EQ (m_events, 0, "");
- NS_TEST_EXPECT_MSG_EQ (m_counter, 50, "");
- Simulator::Destroy ();
-}
-
-static class EventGarbageCollectorTestSuite : public TestSuite
-{
-public:
- EventGarbageCollectorTestSuite ()
- : TestSuite ("event-garbage-collector", UNIT)
- {
- AddTestCase (new EventGarbageCollectorTestCase (), TestCase::QUICK);
- }
-} g_eventGarbageCollectorTests;
-
-}
-
--- a/src/tools/test/examples-to-run.py Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-#! /usr/bin/env python
-## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
-
-# 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
-#
-# (example_name, do_run, do_valgrind_run).
-#
-# See test.py for more information.
-cpp_examples = [
- ("gnuplot-example", "False", "False"),
-]
-
-# A list of Python examples to run in order to ensure that they remain
-# runnable over time. Each tuple in the list contains
-#
-# (example_name, do_run).
-#
-# See test.py for more information.
-python_examples = []
--- a/src/tools/wscript Wed Jul 24 13:19:54 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
-
-def build(bld):
-
- module = bld.create_ns3_module('tools', ['network', 'stats'])
- module.source = [
- 'model/event-garbage-collector.cc',
- 'model/gnuplot.cc',
- 'model/delay-jitter-estimation.cc',
- ]
-
- module_test = bld.create_ns3_module_test_library('tools')
- module_test.source = [
- 'test/average-test-suite.cc',
- 'test/event-garbage-collector-test-suite.cc',
- ]
-
- headers = bld(features='ns3header')
- headers.module = 'tools'
- headers.source = [
- 'model/average.h',
- 'model/event-garbage-collector.h',
- 'model/gnuplot.h',
- 'model/delay-jitter-estimation.h',
- ]
-
- if (bld.env['ENABLE_EXAMPLES']):
- bld.recurse('examples')
-
- bld.ns3_python_bindings()
--- a/src/topology-read/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/topology-read/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -134,8 +134,6 @@
module.add_class('OrbisTopologyReader', parent=root_module['ns3::TopologyReader'])
## rocketfuel-topology-reader.h (module 'topology-read'): ns3::RocketfuelTopologyReader [class]
module.add_class('RocketfuelTopologyReader', parent=root_module['ns3::TopologyReader'])
- ## 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]
@@ -209,7 +207,6 @@
register_Ns3Node_methods(root_module, root_module['ns3::Node'])
register_Ns3OrbisTopologyReader_methods(root_module, root_module['ns3::OrbisTopologyReader'])
register_Ns3RocketfuelTopologyReader_methods(root_module, root_module['ns3::RocketfuelTopologyReader'])
- 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'])
@@ -1527,6 +1524,16 @@
'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',
@@ -2253,13 +2260,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([])
--- a/src/topology-read/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/topology-read/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -134,8 +134,6 @@
module.add_class('OrbisTopologyReader', parent=root_module['ns3::TopologyReader'])
## rocketfuel-topology-reader.h (module 'topology-read'): ns3::RocketfuelTopologyReader [class]
module.add_class('RocketfuelTopologyReader', parent=root_module['ns3::TopologyReader'])
- ## 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]
@@ -209,7 +207,6 @@
register_Ns3Node_methods(root_module, root_module['ns3::Node'])
register_Ns3OrbisTopologyReader_methods(root_module, root_module['ns3::OrbisTopologyReader'])
register_Ns3RocketfuelTopologyReader_methods(root_module, root_module['ns3::RocketfuelTopologyReader'])
- 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'])
@@ -1527,6 +1524,16 @@
'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',
@@ -2253,13 +2260,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([])
--- a/src/uan/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/uan/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -90,6 +90,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')
## uan-mac-rc.h (module 'uan'): ns3::Reservation [class]
module.add_class('Reservation')
## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [class]
@@ -342,8 +344,6 @@
module.add_class('PointerChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker'])
## pointer.h (module 'core'): ns3::PointerValue [class]
module.add_class('PointerValue', 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]
@@ -565,7 +565,6 @@
register_Ns3ParetoRandomVariable_methods(root_module, root_module['ns3::ParetoRandomVariable'])
register_Ns3PointerChecker_methods(root_module, root_module['ns3::PointerChecker'])
register_Ns3PointerValue_methods(root_module, root_module['ns3::PointerValue'])
- 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'])
@@ -2009,6 +2008,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):
@@ -3441,6 +3444,16 @@
'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',
@@ -4965,7 +4978,7 @@
cls.add_method('SetRxThresholdDb',
'void',
[param('double', 'thresh')],
- is_virtual=True)
+ deprecated=True, is_virtual=True)
## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetSinrModelPhy1(ns3::Ptr<ns3::UanPhyCalcSinr> calcSinr) [member function]
cls.add_method('SetSinrModelPhy1',
'void',
@@ -7220,6 +7233,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',
@@ -7319,13 +7336,6 @@
[param('ns3::Ptr< ns3::Object >', 'object')])
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([])
--- a/src/uan/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/uan/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -90,6 +90,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')
## uan-mac-rc.h (module 'uan'): ns3::Reservation [class]
module.add_class('Reservation')
## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [class]
@@ -342,8 +344,6 @@
module.add_class('PointerChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker'])
## pointer.h (module 'core'): ns3::PointerValue [class]
module.add_class('PointerValue', 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]
@@ -565,7 +565,6 @@
register_Ns3ParetoRandomVariable_methods(root_module, root_module['ns3::ParetoRandomVariable'])
register_Ns3PointerChecker_methods(root_module, root_module['ns3::PointerChecker'])
register_Ns3PointerValue_methods(root_module, root_module['ns3::PointerValue'])
- 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'])
@@ -2009,6 +2008,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):
@@ -3441,6 +3444,16 @@
'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',
@@ -4965,7 +4978,7 @@
cls.add_method('SetRxThresholdDb',
'void',
[param('double', 'thresh')],
- is_virtual=True)
+ deprecated=True, is_virtual=True)
## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetSinrModelPhy1(ns3::Ptr<ns3::UanPhyCalcSinr> calcSinr) [member function]
cls.add_method('SetSinrModelPhy1',
'void',
@@ -7220,6 +7233,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',
@@ -7319,13 +7336,6 @@
[param('ns3::Ptr< ns3::Object >', 'object')])
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([])
--- a/src/uan/examples/uan-cw-example.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/uan/examples/uan-cw-example.cc Wed Jul 24 13:20:24 2013 +0200
@@ -40,7 +40,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/applications-module.h"
#include <fstream>
--- a/src/uan/examples/uan-cw-example.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/uan/examples/uan-cw-example.h Wed Jul 24 13:20:24 2013 +0200
@@ -22,7 +22,7 @@
#define UAN_CW_EXAMPLE_H
#include "ns3/network-module.h"
-#include "ns3/tools-module.h"
+#include "ns3/stats-module.h"
#include "ns3/uan-module.h"
using namespace ns3;
--- a/src/uan/examples/uan-rc-example.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/uan/examples/uan-rc-example.cc Wed Jul 24 13:20:24 2013 +0200
@@ -59,7 +59,7 @@
#include "ns3/log.h"
#include "ns3/config.h"
#include "ns3/callback.h"
-#include "ns3/tools-module.h"
+#include "ns3/stats-module.h"
#include <fstream>
--- a/src/uan/examples/uan-rc-example.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/uan/examples/uan-rc-example.h Wed Jul 24 13:20:24 2013 +0200
@@ -22,7 +22,7 @@
#define UAN_RC_EXAMPLE_H
#include "ns3/network-module.h"
-#include "ns3/tools-module.h"
+#include "ns3/stats-module.h"
#include "ns3/uan-module.h"
using namespace ns3;
--- a/src/uan/examples/wscript Wed Jul 24 13:19:54 2013 +0200
+++ b/src/uan/examples/wscript Wed Jul 24 13:20:24 2013 +0200
@@ -1,8 +1,8 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
- obj = bld.create_ns3_program('uan-cw-example', ['internet', 'mobility', 'tools', 'applications', 'uan'])
+ obj = bld.create_ns3_program('uan-cw-example', ['internet', 'mobility', 'stats', 'applications', 'uan'])
obj.source = 'uan-cw-example.cc'
- obj = bld.create_ns3_program('uan-rc-example', ['internet', 'mobility', 'tools', 'applications', 'uan'])
+ obj = bld.create_ns3_program('uan-rc-example', ['internet', 'mobility', 'stats', 'applications', 'uan'])
obj.source = 'uan-rc-example.cc'
--- a/src/uan/model/uan-net-device.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/uan/model/uan-net-device.cc Wed Jul 24 13:20:24 2013 +0200
@@ -226,7 +226,7 @@
bool
UanNetDevice::SetMtu (uint16_t mtu)
{
- // TODO: Check this in MAC
+ /// \todo Check this in MAC
NS_LOG_WARN ("UanNetDevice: MTU is not implemented");
m_mtu = mtu;
return true;
--- a/src/uan/model/uan-phy-dual.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/uan/model/uan-phy-dual.h Wed Jul 24 13:20:24 2013 +0200
@@ -95,7 +95,8 @@
virtual void SetReceiveErrorCallback (RxErrCallback cb);
virtual void SetRxGainDb (double gain);
virtual void SetTxPowerDb (double txpwr);
- virtual void SetRxThresholdDb (double thresh);
+ /** \deprecated Look at PER Functor attribute */
+ virtual void SetRxThresholdDb (double thresh) NS_DEPRECATED;
virtual void SetCcaThresholdDb (double thresh);
virtual double GetRxGainDb (void);
virtual double GetTxPowerDb (void);
@@ -250,7 +251,7 @@
virtual void SetSleepMode (bool sleep)
{
- //TODO This method has to be implemented
+ /// \todo This method has to be implemented
}
/**
--- a/src/visualizer/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/visualizer/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -130,6 +130,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')
## pyviz.h (module 'visualizer'): ns3::PyViz [class]
module.add_class('PyViz')
## pyviz.h (module 'visualizer'): ns3::PyViz::PacketCaptureMode [enumeration]
@@ -320,8 +322,6 @@
module.add_class('OutputStreamWrapper', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >'])
## 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<ns3::Packet> >'])
- ## 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]
@@ -474,7 +474,6 @@
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'])
@@ -2009,6 +2008,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):
@@ -4034,6 +4037,16 @@
'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',
@@ -5732,6 +5745,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',
@@ -5743,13 +5760,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([])
--- a/src/visualizer/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/visualizer/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -130,6 +130,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')
## pyviz.h (module 'visualizer'): ns3::PyViz [class]
module.add_class('PyViz')
## pyviz.h (module 'visualizer'): ns3::PyViz::PacketCaptureMode [enumeration]
@@ -320,8 +322,6 @@
module.add_class('OutputStreamWrapper', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter<ns3::OutputStreamWrapper> >'])
## 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<ns3::Packet> >'])
- ## 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]
@@ -474,7 +474,6 @@
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'])
@@ -2009,6 +2008,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):
@@ -4034,6 +4037,16 @@
'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',
@@ -5732,6 +5745,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',
@@ -5743,13 +5760,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([])
--- a/src/visualizer/model/visual-simulator-impl.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/visualizer/model/visual-simulator-impl.h Wed Jul 24 13:20:24 2013 +0200
@@ -33,6 +33,7 @@
/**
* \ingroup visualizer
+ * \ingroup simulator
*
* \brief A replacement simulator that starts the visualizer
* \internal
--- a/src/wifi/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/wifi/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -150,6 +150,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')
## pcap-file.h (module 'network'): ns3::PcapFile [class]
module.add_class('PcapFile', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
@@ -506,8 +508,6 @@
module.add_class('StaWifiMac', parent=root_module['ns3::RegularWifiMac'])
## supported-rates.h (module 'wifi'): ns3::SupportedRates [class]
module.add_class('SupportedRates', parent=root_module['ns3::WifiInformationElement'])
- ## 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]
@@ -805,7 +805,6 @@
register_Ns3SsidValue_methods(root_module, root_module['ns3::SsidValue'])
register_Ns3StaWifiMac_methods(root_module, root_module['ns3::StaWifiMac'])
register_Ns3SupportedRates_methods(root_module, root_module['ns3::SupportedRates'])
- 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'])
@@ -3167,6 +3166,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):
@@ -5542,6 +5545,16 @@
'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',
@@ -5675,14 +5688,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',
- 'void',
- [param('double', 'lambda')])
+ ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetFrequency(double frequency) [member function]
+ cls.add_method('SetFrequency',
+ 'void',
+ [param('double', 'frequency')])
## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetSystemLoss(double systemLoss) [member function]
cls.add_method('SetSystemLoss',
'void',
@@ -5696,8 +5705,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)
@@ -9325,14 +9334,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',
- 'void',
- [param('double', 'lambda')])
+ ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetFrequency(double frequency) [member function]
+ cls.add_method('SetFrequency',
+ 'void',
+ [param('double', 'frequency')])
## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetSystemLoss(double systemLoss) [member function]
cls.add_method('SetSystemLoss',
'void',
@@ -9346,8 +9351,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)
@@ -10885,6 +10890,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',
@@ -11427,13 +11436,6 @@
cls.add_instance_attribute('extended', 'ns3::ExtendedSupportedRatesIE', is_const=False)
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([])
--- a/src/wifi/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/wifi/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -150,6 +150,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')
## pcap-file.h (module 'network'): ns3::PcapFile [class]
module.add_class('PcapFile', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
@@ -506,8 +508,6 @@
module.add_class('StaWifiMac', parent=root_module['ns3::RegularWifiMac'])
## supported-rates.h (module 'wifi'): ns3::SupportedRates [class]
module.add_class('SupportedRates', parent=root_module['ns3::WifiInformationElement'])
- ## 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]
@@ -805,7 +805,6 @@
register_Ns3SsidValue_methods(root_module, root_module['ns3::SsidValue'])
register_Ns3StaWifiMac_methods(root_module, root_module['ns3::StaWifiMac'])
register_Ns3SupportedRates_methods(root_module, root_module['ns3::SupportedRates'])
- 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'])
@@ -3167,6 +3166,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):
@@ -5542,6 +5545,16 @@
'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',
@@ -5675,14 +5688,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',
- 'void',
- [param('double', 'lambda')])
+ ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetFrequency(double frequency) [member function]
+ cls.add_method('SetFrequency',
+ 'void',
+ [param('double', 'frequency')])
## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetSystemLoss(double systemLoss) [member function]
cls.add_method('SetSystemLoss',
'void',
@@ -5696,8 +5705,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)
@@ -9325,14 +9334,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',
- 'void',
- [param('double', 'lambda')])
+ ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetFrequency(double frequency) [member function]
+ cls.add_method('SetFrequency',
+ 'void',
+ [param('double', 'frequency')])
## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetSystemLoss(double systemLoss) [member function]
cls.add_method('SetSystemLoss',
'void',
@@ -9346,8 +9351,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)
@@ -10885,6 +10890,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',
@@ -11427,13 +11436,6 @@
cls.add_instance_attribute('extended', 'ns3::ExtendedSupportedRatesIE', is_const=False)
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([])
--- a/src/wifi/model/aarf-wifi-manager.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/wifi/model/aarf-wifi-manager.cc Wed Jul 24 13:20:24 2013 +0200
@@ -227,8 +227,8 @@
AarfWifiManager::DoGetRtsMode (WifiRemoteStation *st)
{
NS_LOG_FUNCTION (this << st);
- // XXX: we could/should implement the Aarf algorithm for
- // RTS only by picking a single rate within the BasicRateSet.
+ /// \todo we could/should implement the Aarf algorithm for
+ /// RTS only by picking a single rate within the BasicRateSet.
AarfWifiRemoteStation *station = (AarfWifiRemoteStation *) st;
return GetSupported (station, 0);
}
--- a/src/wifi/model/aarfcd-wifi-manager.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/wifi/model/aarfcd-wifi-manager.cc Wed Jul 24 13:20:24 2013 +0200
@@ -305,8 +305,8 @@
AarfcdWifiManager::DoGetRtsMode (WifiRemoteStation *st)
{
NS_LOG_FUNCTION (this << st);
- // XXX: we could/should implement the Aarf algorithm for
- // RTS only by picking a single rate within the BasicRateSet.
+ /// \todo we could/should implement the Aarf algorithm for
+ /// RTS only by picking a single rate within the BasicRateSet.
AarfcdWifiRemoteStation *station = (AarfcdWifiRemoteStation *) st;
return GetSupported (station, 0);
}
--- a/src/wifi/model/amrr-wifi-manager.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/wifi/model/amrr-wifi-manager.cc Wed Jul 24 13:20:24 2013 +0200
@@ -321,7 +321,7 @@
NS_LOG_FUNCTION (this << st);
AmrrWifiRemoteStation *station = (AmrrWifiRemoteStation *)st;
UpdateMode (station);
- // XXX: can we implement something smarter ?
+ /// \todo can we implement something smarter ?
return GetSupported (station, 0);
}
--- a/src/wifi/model/arf-wifi-manager.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/wifi/model/arf-wifi-manager.cc Wed Jul 24 13:20:24 2013 +0200
@@ -199,8 +199,8 @@
ArfWifiManager::DoGetRtsMode (WifiRemoteStation *st)
{
NS_LOG_FUNCTION (this << st);
- // XXX: we could/should implement the Arf algorithm for
- // RTS only by picking a single rate within the BasicRateSet.
+ /// \todo we could/should implement the Arf algorithm for
+ /// RTS only by picking a single rate within the BasicRateSet.
ArfWifiRemoteStation *station = (ArfWifiRemoteStation *) st;
return GetSupported (station, 0);
}
--- a/src/wifi/model/cara-wifi-manager.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/wifi/model/cara-wifi-manager.cc Wed Jul 24 13:20:24 2013 +0200
@@ -175,8 +175,8 @@
CaraWifiManager::DoGetRtsMode (WifiRemoteStation *st)
{
NS_LOG_FUNCTION (this << st);
- // XXX: we could/should implement the Arf algorithm for
- // RTS only by picking a single rate within the BasicRateSet.
+ /// \todo we could/should implement the Arf algorithm for
+ /// RTS only by picking a single rate within the BasicRateSet.
return GetSupported (st, 0);
}
--- a/src/wifi/model/ctrl-headers.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/wifi/model/ctrl-headers.cc Wed Jul 24 13:20:24 2013 +0200
@@ -314,7 +314,7 @@
CtrlBAckResponseHeader::Print (std::ostream &os) const
{
NS_LOG_FUNCTION (this << &os);
- os << "TID_INFO=" << m_tidInfo << ", StartingSeq=" << std::hex << m_startingSeq;
+ os << "TID_INFO=" << m_tidInfo << ", StartingSeq=" << std::hex << m_startingSeq << std::dec;
}
uint32_t
--- a/src/wifi/model/mac-low.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/wifi/model/mac-low.cc Wed Jul 24 13:20:24 2013 +0200
@@ -1012,8 +1012,8 @@
DoNavResetNow (duration);
return;
}
- // XXX Note that we should also handle CF_END specially here
- // but we don't for now because we do not generate them.
+ /// \todo We should also handle CF_END specially here
+ /// but we don't for now because we do not generate them.
else if (hdr.GetAddr1 () != m_self)
{
// see section 9.2.5.4 802.11-1999
@@ -1128,9 +1128,9 @@
{
NS_LOG_FUNCTION (this);
NS_LOG_DEBUG ("cts timeout");
- // XXX: should check that there was no rx start before now.
- // we should restart a new cts timeout now until the expected
- // end of rx if there was a rx start before now.
+ /// \todo should check that there was no rx start before now.
+ /// we should restart a new cts timeout now until the expected
+ /// end of rx if there was a rx start before now.
m_stationManager->ReportRtsFailed (m_currentHdr.GetAddr1 (), &m_currentHdr);
m_currentPacket = 0;
MacLowTransmissionListener *listener = m_listener;
@@ -1142,9 +1142,9 @@
{
NS_LOG_FUNCTION (this);
NS_LOG_DEBUG ("normal ack timeout");
- // XXX: should check that there was no rx start before now.
- // we should restart a new ack timeout now until the expected
- // end of rx if there was a rx start before now.
+ /// \todo should check that there was no rx start before now.
+ /// we should restart a new ack timeout now until the expected
+ /// end of rx if there was a rx start before now.
m_stationManager->ReportDataFailed (m_currentHdr.GetAddr1 (), &m_currentHdr);
MacLowTransmissionListener *listener = m_listener;
m_listener = 0;
--- a/src/wifi/model/onoe-wifi-manager.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/wifi/model/onoe-wifi-manager.cc Wed Jul 24 13:20:24 2013 +0200
@@ -267,7 +267,7 @@
{
OnoeWifiRemoteStation *station = (OnoeWifiRemoteStation *)st;
UpdateMode (station);
- // XXX: can we implement something smarter ?
+ /// \todo can we implement something smarter ?
return GetSupported (station, 0);
}
--- a/src/wifi/model/wifi-information-element-vector.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/wifi/model/wifi-information-element-vector.cc Wed Jul 24 13:20:24 2013 +0200
@@ -106,7 +106,7 @@
void
WifiInformationElementVector::Print (std::ostream & os) const
{
- //TODO
+ /// \todo
}
void
WifiInformationElementVector::SetMaxSize (uint16_t size)
--- a/src/wifi/model/wifi-phy-standard.h Wed Jul 24 13:19:54 2013 +0200
+++ b/src/wifi/model/wifi-phy-standard.h Wed Jul 24 13:20:24 2013 +0200
@@ -45,9 +45,9 @@
* ACM MOBICOM, 2001.
*/
WIFI_PHY_STANDARD_holland,
- /** deprecated, see <A HREF="http://www.nsnam.org/bugzilla/show_bug.cgi?id=945">bug 945</A> */
+ /** \deprecated see <A HREF="http://www.nsnam.org/bugzilla/show_bug.cgi?id=945">bug 945</A> */
WIFI_PHY_STANDARD_80211p_CCH,
- /** deprecated, see <A HREF="http://www.nsnam.org/bugzilla/show_bug.cgi?id=945">bug 945</A> */
+ /** \deprecated see <A HREF="http://www.nsnam.org/bugzilla/show_bug.cgi?id=945">bug 945</A> */
WIFI_PHY_STANDARD_80211p_SCH
};
--- a/src/wifi/model/wifi-remote-station-manager.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/wifi/model/wifi-remote-station-manager.cc Wed Jul 24 13:20:24 2013 +0200
@@ -644,7 +644,7 @@
* unless they conflict with the requirement to use the
* BSSBasicRateSet parameter.
*
- * TODO: Note that we're ignoring the last sentence for now, because
+ * \todo Note that we're ignoring the last sentence for now, because
* there is not yet any manipulation here of PHY options.
*/
for (uint32_t idx = 0; idx < m_wifiPhy->GetNModes (); idx++)
--- a/src/wimax/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/wimax/bindings/modulegen__gcc_ILP32.py Wed Jul 24 13:20:24 2013 +0200
@@ -128,6 +128,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')
## pcap-file.h (module 'network'): ns3::PcapFile [class]
module.add_class('PcapFile', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
@@ -474,8 +476,6 @@
module.add_class('SimpleOfdmWimaxPhy', parent=root_module['ns3::WimaxPhy'])
## simple-ofdm-wimax-phy.h (module 'wimax'): ns3::SimpleOfdmWimaxPhy::FrameDurationCode [enumeration]
module.add_enum('FrameDurationCode', ['FRAME_DURATION_2_POINT_5_MS', 'FRAME_DURATION_4_MS', 'FRAME_DURATION_5_MS', 'FRAME_DURATION_8_MS', 'FRAME_DURATION_10_MS', 'FRAME_DURATION_12_POINT_5_MS', 'FRAME_DURATION_20_MS'], outer_class=root_module['ns3::SimpleOfdmWimaxPhy'])
- ## 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]
@@ -746,7 +746,6 @@
register_Ns3Packet_methods(root_module, root_module['ns3::Packet'])
register_Ns3ParetoRandomVariable_methods(root_module, root_module['ns3::ParetoRandomVariable'])
register_Ns3SimpleOfdmWimaxPhy_methods(root_module, root_module['ns3::SimpleOfdmWimaxPhy'])
- 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'])
@@ -2949,6 +2948,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):
@@ -6423,6 +6426,16 @@
'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',
@@ -6619,14 +6632,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',
- 'void',
- [param('double', 'lambda')])
+ ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetFrequency(double frequency) [member function]
+ cls.add_method('SetFrequency',
+ 'void',
+ [param('double', 'frequency')])
## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetSystemLoss(double systemLoss) [member function]
cls.add_method('SetSystemLoss',
'void',
@@ -6640,8 +6649,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)
@@ -9378,14 +9387,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',
- 'void',
- [param('double', 'lambda')])
+ ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetFrequency(double frequency) [member function]
+ cls.add_method('SetFrequency',
+ 'void',
+ [param('double', 'frequency')])
## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetSystemLoss(double systemLoss) [member function]
cls.add_method('SetSystemLoss',
'void',
@@ -9399,8 +9404,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)
@@ -10509,6 +10514,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',
@@ -10743,13 +10752,6 @@
visibility='private', 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([])
--- a/src/wimax/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:19:54 2013 +0200
+++ b/src/wimax/bindings/modulegen__gcc_LP64.py Wed Jul 24 13:20:24 2013 +0200
@@ -128,6 +128,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')
## pcap-file.h (module 'network'): ns3::PcapFile [class]
module.add_class('PcapFile', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
@@ -474,8 +476,6 @@
module.add_class('SimpleOfdmWimaxPhy', parent=root_module['ns3::WimaxPhy'])
## simple-ofdm-wimax-phy.h (module 'wimax'): ns3::SimpleOfdmWimaxPhy::FrameDurationCode [enumeration]
module.add_enum('FrameDurationCode', ['FRAME_DURATION_2_POINT_5_MS', 'FRAME_DURATION_4_MS', 'FRAME_DURATION_5_MS', 'FRAME_DURATION_8_MS', 'FRAME_DURATION_10_MS', 'FRAME_DURATION_12_POINT_5_MS', 'FRAME_DURATION_20_MS'], outer_class=root_module['ns3::SimpleOfdmWimaxPhy'])
- ## 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]
@@ -746,7 +746,6 @@
register_Ns3Packet_methods(root_module, root_module['ns3::Packet'])
register_Ns3ParetoRandomVariable_methods(root_module, root_module['ns3::ParetoRandomVariable'])
register_Ns3SimpleOfdmWimaxPhy_methods(root_module, root_module['ns3::SimpleOfdmWimaxPhy'])
- 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'])
@@ -2949,6 +2948,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):
@@ -6423,6 +6426,16 @@
'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',
@@ -6619,14 +6632,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',
- 'void',
- [param('double', 'lambda')])
+ ## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetFrequency(double frequency) [member function]
+ cls.add_method('SetFrequency',
+ 'void',
+ [param('double', 'frequency')])
## propagation-loss-model.h (module 'propagation'): void ns3::TwoRayGroundPropagationLossModel::SetSystemLoss(double systemLoss) [member function]
cls.add_method('SetSystemLoss',
'void',
@@ -6640,8 +6649,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)
@@ -9378,14 +9387,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',
- 'void',
- [param('double', 'lambda')])
+ ## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetFrequency(double frequency) [member function]
+ cls.add_method('SetFrequency',
+ 'void',
+ [param('double', 'frequency')])
## propagation-loss-model.h (module 'propagation'): void ns3::FriisPropagationLossModel::SetSystemLoss(double systemLoss) [member function]
cls.add_method('SetSystemLoss',
'void',
@@ -9399,8 +9404,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)
@@ -10509,6 +10514,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',
@@ -10743,13 +10752,6 @@
visibility='private', 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([])
--- a/src/wimax/model/bs-scheduler-simple.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/wimax/model/bs-scheduler-simple.cc Wed Jul 24 13:20:24 2013 +0200
@@ -162,7 +162,7 @@
if (availableSymbols <= BurstSizeSymbols)
{
- availableSymbols -= BurstSizeSymbols; // XXX: Overflows but don't know how to fix
+ availableSymbols -= BurstSizeSymbols; /// \todo Overflows but don't know how to fix
break;
}
}
--- a/src/wimax/model/cid-factory.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/wimax/model/cid-factory.cc Wed Jul 24 13:20:24 2013 +0200
@@ -118,7 +118,7 @@
void
CidFactory::FreeCid (Cid cid)
{
- // TODO:We need to update the cid bitmap properly here.
+ /// \todo We need to update the cid bitmap properly here.
NS_FATAL_ERROR ("TODO: Update the cid bitmap properly here-- please implement and contribute a patch");
}
--- a/src/wimax/model/wimax-net-device.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/wimax/model/wimax-net-device.cc Wed Jul 24 13:20:24 2013 +0200
@@ -633,7 +633,7 @@
void
WimaxNetDevice::AddLinkChangeCallback (Callback<void> callback)
{
- /* TODO: Add a callback invoked whenever the link
+ /* \todo Add a callback invoked whenever the link
* status changes to UP. This callback is typically used
* by the IP/ARP layer to flush the ARP cache and by IPv6 stack
* to flush NDISC cache whenever the link goes up.
--- a/src/wimax/model/wimax-tlv.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/src/wimax/model/wimax-tlv.cc Wed Jul 24 13:20:24 2013 +0200
@@ -156,15 +156,15 @@
switch (m_type)
{
case HMAC_TUPLE:
- // TODO: implement Deserialize HMAC_TUPLE
+ /// \todo implement Deserialize HMAC_TUPLE
NS_FATAL_ERROR ("Not implemented-- please implement and contribute a patch");
break;
case MAC_VERSION_ENCODING:
- // TODO: implement Deserialize MAC_VERSION_ENCODING
+ /// \todo implement Deserialize MAC_VERSION_ENCODING
NS_FATAL_ERROR ("Not implemented-- please implement and contribute a patch");
break;
case CURRENT_TRANSMIT_POWER:
- // TODO: implement Deserialize CURRENT_TRANSMIT_POWER
+ /// \todo implement Deserialize CURRENT_TRANSMIT_POWER
NS_FATAL_ERROR ("Not implemented-- please implement and contribute a patch");
break;
case DOWNLINK_SERVICE_FLOW:
@@ -182,11 +182,11 @@
break;
}
case VENDOR_ID_EMCODING:
- // TODO: implement Deserialize VENDOR_ID_EMCODING
+ /// \todo implement Deserialize VENDOR_ID_EMCODING
NS_FATAL_ERROR ("Not implemented-- please implement and contribute a patch");
break;
case VENDOR_SPECIFIC_INFORMATION:
- // TODO: implement Deserialize VENDOR_SPECIFIC_INFORMATION
+ /// \todo implement Deserialize VENDOR_SPECIFIC_INFORMATION
NS_FATAL_ERROR ("Not implemented-- please implement and contribute a patch");
break;
default:
--- a/test.py Wed Jul 24 13:19:54 2013 +0200
+++ b/test.py Wed Jul 24 13:20:24 2013 +0200
@@ -58,6 +58,7 @@
"BUILD_PROFILE",
"VERSION",
"PYTHON",
+ "VALGRIND_FOUND",
]
NSC_ENABLED = False
@@ -71,8 +72,10 @@
EXAMPLE_DIRECTORIES = []
APPNAME = ""
BUILD_PROFILE = ""
+BUILD_PROFILE_SUFFIX = ""
VERSION = ""
PYTHON = ""
+VALGRIND_FOUND = True
#
# This will be given a prefix and a suffix when the waf config file is
@@ -164,7 +167,7 @@
# Add the proper prefix and suffix to the example name to
# match what is done in the wscript file.
- example_name = "%s%s-%s-%s" % (APPNAME, VERSION, example_name, BUILD_PROFILE)
+ example_name = "%s%s-%s%s" % (APPNAME, VERSION, example_name, BUILD_PROFILE_SUFFIX)
# Set the full path for the example.
example_path = os.path.join(cpp_executable_dir, example_name)
@@ -999,10 +1002,19 @@
read_waf_config()
#
+ # Set the proper suffix.
+ #
+ global BUILD_PROFILE_SUFFIX
+ if BUILD_PROFILE == 'release':
+ BUILD_PROFILE_SUFFIX = ""
+ else:
+ BUILD_PROFILE_SUFFIX = "-" + BUILD_PROFILE
+
+ #
# Add the proper prefix and suffix to the test-runner name to
# match what is done in the wscript file.
#
- test_runner_name = "%s%s-%s-%s" % (APPNAME, VERSION, "test-runner", BUILD_PROFILE)
+ test_runner_name = "%s%s-%s%s" % (APPNAME, VERSION, "test-runner", BUILD_PROFILE_SUFFIX)
#
# Run waf to make sure that everything is built, configured and ready to go
@@ -1432,7 +1444,7 @@
elif len(options.example):
# Add the proper prefix and suffix to the example name to
# match what is done in the wscript file.
- example_name = "%s%s-%s-%s" % (APPNAME, VERSION, options.example, BUILD_PROFILE)
+ example_name = "%s%s-%s%s" % (APPNAME, VERSION, options.example, BUILD_PROFILE_SUFFIX)
# Don't try to run this example if it isn't runnable.
if not ns3_runnable_programs_dictionary.has_key(example_name):
@@ -1443,6 +1455,7 @@
# irrespective of any condition.
#
example_path = ns3_runnable_programs_dictionary[example_name]
+ example_path = os.path.abspath(example_path)
job = Job()
job.set_is_example(True)
job.set_is_pyexample(False)
@@ -1764,6 +1777,17 @@
print '*** Note: ns-3 examples are currently disabled. Enable them by adding'
print '*** "--enable-examples" to ./waf configure or modifying your .ns3rc file.'
print
+
+ #
+ # Let the user know if they tried to use valgrind but it was not
+ # present on their machine.
+ #
+ if options.valgrind and not VALGRIND_FOUND:
+ print
+ print '*** Note: you are trying to use valgrind, but valgrind could not be found'
+ print '*** on your machine. All tests and examples will crash or be skipped.'
+ print
+
#
# If we have been asked to retain all of the little temporary files, we
# don't delete tm. If we do delete the temporary files, delete only the
--- a/utils/bench-simulator.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/utils/bench-simulator.cc Wed Jul 24 13:20:24 2013 +0200
@@ -18,193 +18,257 @@
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
*/
-#include "ns3/core-module.h"
+#include <iomanip>
#include <iostream>
#include <fstream>
#include <vector>
#include <string.h>
+#include "ns3/core-module.h"
+
using namespace ns3;
bool g_debug = false;
+std::string g_me;
+#define LOG(x) std::cout << x << std::endl
+#define LOGME(x) LOG (g_me << x)
+#define DEB(x) if (g_debug) { LOGME (x) ; }
+
+// Output field width
+int g_fwidth = 6;
+
class Bench
{
public:
- Bench ();
- void ReadDistribution (std::istream &istream);
- void SetTotal (uint32_t total);
+ Bench (const uint32_t population, const uint32_t total)
+ : m_population (population),
+ m_total (total),
+ m_count (0)
+ { };
+
+ void SetRandomStream (Ptr<RandomVariableStream> stream)
+ {
+ m_rand = stream;
+ }
+
+ void SetPopulation (const uint32_t population)
+ {
+ m_population = population;
+ }
+
+ void SetTotal (const uint32_t total)
+ {
+ m_total = total;
+ }
+
void RunBench (void);
private:
void Cb (void);
- std::vector<uint64_t> m_distribution;
- std::vector<uint64_t>::const_iterator m_current;
- uint32_t m_n;
+
+ Ptr<RandomVariableStream> m_rand;
+ uint32_t m_population;
uint32_t m_total;
+ uint32_t m_count;
};
-Bench::Bench ()
- : m_n (0),
- m_total (0)
-{}
-
-void
-Bench::SetTotal (uint32_t total)
-{
- m_total = total;
-}
-
-void
-Bench::ReadDistribution (std::istream &input)
-{
- double data;
- while (!input.eof ())
- {
- if (input >> data)
- {
- uint64_t ns = (uint64_t) (data * 1000000000);
- m_distribution.push_back (ns);
- }
- else
- {
- input.clear ();
- std::string line;
- input >> line;
- }
- }
-}
-
void
Bench::RunBench (void)
{
SystemWallClockMs time;
double init, simu;
+
+ DEB ("initializing");
+
time.Start ();
- for (std::vector<uint64_t>::const_iterator i = m_distribution.begin ();
- i != m_distribution.end (); i++)
+ for (uint32_t i = 0; i < m_population; ++i)
{
- Simulator::Schedule (NanoSeconds (*i), &Bench::Cb, this);
+ Time at = NanoSeconds (m_rand->GetValue ());
+ Simulator::Schedule (at, &Bench::Cb, this);
}
init = time.End ();
init /= 1000;
+ DEB ("initialization took " << init << "s");
- m_current = m_distribution.begin ();
-
+ DEB ("running");
time.Start ();
Simulator::Run ();
simu = time.End ();
simu /= 1000;
+ DEB ("run took " << simu << "s");
- std::cout <<
- "init n=" << m_distribution.size () << ", time=" << init << "s" << std::endl <<
- "simu n=" << m_n << ", time=" <<simu << "s" << std::endl <<
- "init " << ((double)m_distribution.size ()) / init << " insert/s, avg insert=" <<
- init / ((double)m_distribution.size ())<< "s" << std::endl <<
- "simu " << ((double)m_n) / simu<< " hold/s, avg hold=" <<
- simu / ((double)m_n) << "s" << std::endl
- ;
+ LOG (std::setw (g_fwidth) << init <<
+ std::setw (g_fwidth) << (m_population / init) <<
+ std::setw (g_fwidth) << (init / m_population) <<
+ std::setw (g_fwidth) << simu <<
+ std::setw (g_fwidth) << (m_count / simu) <<
+ std::setw (g_fwidth) << (simu / m_count));
+
+ // Clean up scheduler
+ Simulator::Destroy ();
}
void
Bench::Cb (void)
{
- if (m_n > m_total)
+ if (m_count > m_total)
{
return;
}
- if (m_current == m_distribution.end ())
- {
- m_current = m_distribution.begin ();
- }
- if (g_debug)
- {
- std::cerr << "event at " << Simulator::Now ().GetSeconds () << "s" << std::endl;
- }
- Simulator::Schedule (NanoSeconds (*m_current), &Bench::Cb, this);
- m_current++;
- m_n++;
+ DEB ("event at " << Simulator::Now ().GetSeconds () << "s");
+
+ Time after = NanoSeconds (m_rand->GetValue ());
+ Simulator::Schedule (after, &Bench::Cb, this);
+ ++m_count;
}
-void
-PrintHelp (void)
+
+Ptr<RandomVariableStream>
+GetRandomStream (std::string filename)
{
- std::cout << "bench-simulator filename [options]"<<std::endl;
- std::cout << " filename: a string which identifies the input distribution. \"-\" represents stdin." << std::endl;
- std::cout << " Options:"<<std::endl;
- std::cout << " --list: use std::list scheduler"<<std::endl;
- std::cout << " --map: use std::map cheduler"<<std::endl;
- std::cout << " --heap: use Binary Heap scheduler"<<std::endl;
- std::cout << " --debug: enable some debugging"<<std::endl;
+ Ptr<RandomVariableStream> stream = 0;
+
+ if (filename == "")
+ {
+ LOGME ("using default exponential distribution");
+ Ptr<ExponentialRandomVariable> erv = CreateObject<ExponentialRandomVariable> ();
+ erv->SetAttribute ("Mean", DoubleValue (100));
+ stream = erv;
+ }
+ else
+ {
+ std::istream *input;
+
+ if (filename == "-")
+ {
+ LOGME ("using event distribution from stdin");
+ input = &std::cin;
+ }
+ else
+ {
+ LOGME ("using event distribution from " << filename);
+ input = new std::ifstream (filename.c_str ());
+ }
+
+ double value;
+ std::vector<double> nsValues;
+
+ while (!input->eof ())
+ {
+ if (*input >> value)
+ {
+ uint64_t ns = (uint64_t) (value * 1000000000);
+ nsValues.push_back (ns);
+ }
+ else
+ {
+ input->clear ();
+ std::string line;
+ *input >> line;
+ }
+ }
+ LOGME ("found " << nsValues.size () << " entries");
+ Ptr<DeterministicRandomVariable> drv = CreateObject<DeterministicRandomVariable> ();
+ drv->SetValueArray (&nsValues[0], nsValues.size ());
+ stream = drv;
+ }
+
+ return stream;
}
+
+
int main (int argc, char *argv[])
{
- char const *filename = argv[1];
- std::istream *input;
- uint32_t n = 1;
- uint32_t total = 20000;
- if (argc == 1)
- {
- PrintHelp ();
- return 0;
- }
- argc-=2;
- argv+= 2;
- if (strcmp (filename, "-") == 0)
- {
- input = &std::cin;
- }
- else
- {
- input = new std::ifstream (filename);
- }
- while (argc > 0)
+
+ bool schedCal = false;
+ bool schedHeap = false;
+ bool schedList = false;
+ bool schedMap = true;
+
+ uint32_t pop = 100000;
+ uint32_t total = 1000000;
+ uint32_t runs = 1;
+ std::string filename = "";
+
+ CommandLine cmd;
+ cmd.Usage ("Benchmark the simulator scheduler.\n"
+ "\n"
+ "Event intervals are taken from one of:\n"
+ " an exponential distribution, with mean 100 ns,\n"
+ " an ascii file, given by the --file=\"<filename>\" argument,\n"
+ " or standard input, by the argument --file=\"-\"\n"
+ "In the case of either --file form, the input is expected\n"
+ "to be ascii, giving the relative event times in ns.");
+ cmd.AddValue ("cal", "use CalendarSheduler", schedCal);
+ cmd.AddValue ("heap", "use HeapScheduler", schedHeap);
+ cmd.AddValue ("list", "use ListSheduler", schedList);
+ cmd.AddValue ("map", "use MapScheduler (default)", schedMap);
+ cmd.AddValue ("debug", "enable debugging output", g_debug);
+ cmd.AddValue ("pop", "event population size (default 1E5)", pop);
+ cmd.AddValue ("total", "total number of events to run (default 1E6)", total);
+ cmd.AddValue ("runs", "number of runs (default 1)", runs);
+ cmd.AddValue ("file", "file of relative event times", filename);
+ cmd.AddValue ("prec", "printed output precision", g_fwidth);
+ cmd.Parse (argc, argv);
+ g_me = cmd.GetName () + ": ";
+ g_fwidth += 6; // 5 extra chars in '2.000002e+07 ': . e+0 _
+
+ ObjectFactory factory ("ns3::MapScheduler");
+ if (schedCal) { factory.SetTypeId ("ns3::CalendarScheduler"); }
+ if (schedHeap) { factory.SetTypeId ("ns3::HeapScheduler"); }
+ if (schedList) { factory.SetTypeId ("ns3::ListScheduler"); }
+ Simulator::SetScheduler (factory);
+
+ LOGME (std::setprecision (g_fwidth - 6));
+ DEB ("debugging is ON");
+
+ LOGME ("scheduler: " << factory.GetTypeId ().GetName ());
+ LOGME ("population: " << pop);
+ LOGME ("total events: " << total);
+ LOGME ("runs: " << runs);
+
+ Bench *bench = new Bench (pop, total);
+ bench->SetRandomStream (GetRandomStream (filename));
+
+ // table header
+ LOG ("");
+ LOG (std::left << std::setw (g_fwidth) << "Run #" <<
+ std::left << std::setw (3 * g_fwidth) << "Inititialization:" <<
+ std::left << std::setw (3 * g_fwidth) << "Simulation:");
+ LOG (std::left << std::setw (g_fwidth) << "" <<
+ std::left << std::setw (g_fwidth) << "Time (s)" <<
+ std::left << std::setw (g_fwidth) << "Rate (ev/s)" <<
+ std::left << std::setw (g_fwidth) << "Per (s/ev)" <<
+ std::left << std::setw (g_fwidth) << "Time (s)" <<
+ std::left << std::setw (g_fwidth) << "Rate (ev/s)" <<
+ std::left << std::setw (g_fwidth) << "Per (s/ev)" );
+ LOG (std::setfill ('-') <<
+ std::right << std::setw (g_fwidth) << " " <<
+ std::right << std::setw (g_fwidth) << " " <<
+ std::right << std::setw (g_fwidth) << " " <<
+ std::right << std::setw (g_fwidth) << " " <<
+ std::right << std::setw (g_fwidth) << " " <<
+ std::right << std::setw (g_fwidth) << " " <<
+ std::right << std::setw (g_fwidth) << " " <<
+ std::setfill (' ')
+ );
+
+ // prime
+ DEB ("priming");
+ std::cout << std::left << std::setw (g_fwidth) << "(prime)";
+ bench->RunBench ();
+
+ bench->SetPopulation (pop);
+ bench->SetTotal (total);
+ for (uint32_t i = 0; i < runs; i++)
{
- ObjectFactory factory;
- if (strcmp ("--list", argv[0]) == 0)
- {
- factory.SetTypeId ("ns3::ListScheduler");
- Simulator::SetScheduler (factory);
- }
- else if (strcmp ("--heap", argv[0]) == 0)
- {
- factory.SetTypeId ("ns3::HeapScheduler");
- Simulator::SetScheduler (factory);
- }
- else if (strcmp ("--map", argv[0]) == 0)
- {
- factory.SetTypeId ("ns3::HeapScheduler");
- Simulator::SetScheduler (factory);
- }
- else if (strcmp ("--calendar", argv[0]) == 0)
- {
- factory.SetTypeId ("ns3::CalendarScheduler");
- Simulator::SetScheduler (factory);
- }
- else if (strcmp ("--debug", argv[0]) == 0)
- {
- g_debug = true;
- }
- else if (strncmp ("--total=", argv[0], strlen("--total=")) == 0)
- {
- total = atoi (argv[0]+strlen ("--total="));
- }
- else if (strncmp ("--n=", argv[0], strlen("--n=")) == 0)
- {
- n = atoi (argv[0]+strlen ("--n="));
- }
-
- argc--;
- argv++;
- }
- Bench *bench = new Bench ();
- bench->ReadDistribution (*input);
- bench->SetTotal (total);
- for (uint32_t i = 0; i < n; i++)
- {
+ std::cout << std::setw (g_fwidth) << i;
+
bench->RunBench ();
}
+ LOG ("");
return 0;
}
--- a/utils/print-introspected-doxygen.cc Wed Jul 24 13:19:54 2013 +0200
+++ b/utils/print-introspected-doxygen.cc Wed Jul 24 13:20:24 2013 +0200
@@ -1,6 +1,7 @@
#include <iostream>
#include <algorithm>
#include <map>
+
#include "ns3/object.h"
#include "ns3/pointer.h"
#include "ns3/object-vector.h"
@@ -711,7 +712,7 @@
<< anchor
<< "GlobalValue" << (*i)->GetName () << " " << (*i)->GetName ()
<< boldStop
- << ": " << (*i)->GetHelp () << "(" << val.Get () << ")"
+ << ": " << (*i)->GetHelp () << ". Default value: " << val.Get () << "."
<< listLineStop << std::endl;
}
std::cout << listStop << std::endl
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/utils/rescale-pdf.sh Wed Jul 24 13:20:24 2013 +0200
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+TMPDIR=${TMPDIR:-/tmp}
+
+TMPFILE=`mktemp -t $(basename ${2}).XXXXXX`
+
+echo "Rescaling ${2} to ${1}"
+
+echo "
+\documentclass{book}
+ \usepackage{pdfpages}
+ \begin{document}
+ \includepdf[width=${1},fitpaper]{${2}}
+ \end{document}
+" \
+>${TMPFILE}.tex
+
+pdflatex -output-directory ${TMPDIR} ${TMPFILE}.tex >/dev/null 2>/dev/null
+cp ${TMPFILE}.pdf ${2}
+rm -f ${TMPFILE}{,.{tex,aux,log,pdf}}
Binary file waf has changed
--- a/waf-tools/boost.py Wed Jul 24 13:19:54 2013 +0200
+++ b/waf-tools/boost.py Wed Jul 24 13:20:24 2013 +0200
@@ -356,7 +356,7 @@
self.end_msg("ok: winning cxxflags combination: %s" % (self.env["CXXFLAGS_%s" % var]))
e = None
break
- except Errors.ConfigurationError as exc:
+ except Errors.ConfigurationError, exc:
self.env.revert()
e = exc
@@ -368,7 +368,7 @@
self.start_msg('Checking for boost linkage')
try:
try_link()
- except Errors.ConfigurationError as e:
+ except Errors.ConfigurationError, e:
self.fatal("Could not link against boost libraries using supplied options")
self.end_msg('ok')
--- a/wscript Wed Jul 24 13:19:54 2013 +0200
+++ b/wscript Wed Jul 24 13:20:24 2013 +0200
@@ -468,8 +468,10 @@
conf.report_optional_feature("ENABLE_EXAMPLES", "Build examples", env['ENABLE_EXAMPLES'],
why_not_examples)
+ env['VALGRIND_FOUND'] = False
try:
conf.find_program('valgrind', var='VALGRIND')
+ env['VALGRIND_FOUND'] = True
except WafError:
pass
@@ -820,6 +822,10 @@
# build command.
bld.env['PRINT_BUILT_MODULES_AT_END'] = True
+ # Do not print the modules built if build command was "clean"
+ if bld.cmd == 'clean':
+ bld.env['PRINT_BUILT_MODULES_AT_END'] = False
+
if Options.options.run:
# Check that the requested program name is valid
program_name, dummy_program_argv = wutils.get_run_program(Options.options.run, wutils.get_command_template(env))
@@ -849,8 +855,9 @@
def _cleandocs():
_cleandir('doc/html')
_cleandir('doc/manual/build')
+ _cleandir('doc/manual/source-temp')
_cleandir('doc/tutorial/build')
- _cleandir('doc/tutorial-pt/build')
+ _cleandir('doc/tutorial-pt-br/build')
_cleandir('doc/models/build')
_cleandir('doc/models/source-temp')