Skip to content

Commit

Permalink
Update to ns-3 3.35 and new antenna model (#86)
Browse files Browse the repository at this point in the history
* Initial import from main repo

* do not use deprecated functions

* Add constant qualifier in lte files to reflect ns-3-dev changes

* mmwave antenna updates on top of ns3-3.35 (#88)

* Most MmWave changes

* Fix remaining compilation errors

* Tentative fix for MC scripts

* Remove legacy files

* Update comments in the mmwave examples

* Fix qd-channel-full-stack-example

* Add support to qd-channel from mmwave-helper

* Fix lte antenna test

* Fix remaining tests

* Fix last non-passing tests

Co-authored-by: Mattia Lecci <[email protected]>

Co-authored-by: Mattia Lecci <[email protected]>
  • Loading branch information
pagmatt and mattia-lecci authored May 2, 2022
1 parent 06f252d commit 95eed3b
Show file tree
Hide file tree
Showing 933 changed files with 150,144 additions and 59,172 deletions.
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Makefile wrapper for waf

all:
./waf

# free free to change this part to suit your requirements
configure:
./waf configure --enable-examples --enable-tests

build:
./waf build

install:
./waf install

clean:
./waf clean

distclean:
./waf distclean
2 changes: 1 addition & 1 deletion bindings/python/ns3modulescan-modular.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def ns3_module_scan(top_builddir, module_name, headers_map, output_file_name, cf
output_file = open(output_file_name, "wt")
output_sink = FileCodeSink(output_file)

# if there exists a scan-header.h file in src/<module>/bindings,
# if there exists a scan-header.h file in src/<module>/bindings or contrib/<module>/bindings,
# scan it, otherwise scan ns3/xxxx-module.h.
scan_header = os.path.join(os.path.dirname(output_file_name), "scan-header.h")
if not os.path.exists(scan_header):
Expand Down
4 changes: 2 additions & 2 deletions bindings/python/ns3modulescan.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os.path

import pybindgen.settings
from pybindgen.gccxmlparser import ModuleParser, PygenClassifier, PygenSection, WrapperWarning
from pybindgen.castxmlparser import ModuleParser, PygenClassifier, PygenSection, WrapperWarning
from pybindgen.typehandlers.codesink import FileCodeSink
from pygccxml.declarations import templates
from pygccxml.declarations.class_declaration import class_t
Expand All @@ -18,7 +18,7 @@
import ns3modulegen_core_customizations


## silence gccxmlparser errors; we only want error handling in the
## silence castxmlparser errors; we only want error handling in the
## generated python script, not while scanning.
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, dummy_wrapper, dummy_exception, dummy_traceback_):
Expand Down
6 changes: 4 additions & 2 deletions bindings/python/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ from waflib.Errors import WafError
# version as, e.g. '0.21.0'
# If specifying a commit on the development tree, specify it like this based
# on 'git describe --tags' command. Example, if the latest release was 0.21.0,
# and 'git decribe --tags' reports "0.21.0-6-g8e7c0a9", then write the
# and 'git describe --tags' reports "0.21.0-6-g8e7c0a9", then write the
# PYBINDGEN version string below as '0.21.0.post6+ng8e7c0a9'
REQUIRED_PYBINDGEN_VERSION = '0.21.0.post15+nga587377'
REQUIRED_PYBINDGEN_VERSION = '0.22.0'
REQUIRED_PYGCCXML_VERSION = (2, 0, 1)
REQUIRED_CASTXML_VERSION = '0.2'

Expand Down Expand Up @@ -390,6 +390,8 @@ class apiscan_task(Task.Task):
def run(self):
self.inputs = [self.bld.bldnode.find_resource("ns3/{0}-module.h".format(self.module))]
self.outputs = [self.bld.srcnode.find_resource("src/{}/bindings/modulegen__{}.py".format(self.module, self.target))]
if self.outputs[0] is None:
self.outputs = [self.bld.srcnode.find_resource("contrib/{}/bindings/modulegen__{}.py".format(self.module, self.target))]
top_builddir = self.bld.bldnode.abspath()
module_path = get_module_path(self.bld, self.module)
headers_map = get_headers_map(self.bld)
Expand Down
2 changes: 2 additions & 0 deletions doc/doxygen.conf
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ TAB_SIZE = 4
## Func<MyClass> ();

ALIASES = "bugid{1}=<a href=\"http://www.nsnam.org/bugzilla/show_bug.cgi?id=\1\">Bug \1</a>" \
"issueid{1}=<a href=\"https://gitlab.com/nsnam/ns-3-dev/-/issues/\1\">Issue \1</a>" \
"internal=\par \b Internal:" \
"pname{1}=<span class=\"params\"><span class=\"paramname\">\1</span></span>" \
"RFC{1}=<a href=\"http://datatracker.ietf.org/doc/rfc\1/\">RFC \1</a>" \
Expand Down Expand Up @@ -2213,6 +2214,7 @@ PREDEFINED = NS3_ASSERT_ENABLE \
NS3_BUILD_PROFILE_DEBUG \
NS3_BUILD_PROFILE_RELEASE \
NS3_BUILD_PROFILE_OPTIMIZED \
DOXYGEN_SHOULD_SKIP_THIS \
INT64X64_USE_CAIRO \
INT64X64_USE_DOUBLE \
INT64X64_USE_CAIRO \
Expand Down
86 changes: 59 additions & 27 deletions doc/doxygen.warnings.report.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# -*- indent-tabs-mode:nil; -*-
# -*- indent-tabs-mode:nil; -*-


# Process doxygen log to generate sorted list of top offenders.
Expand Down Expand Up @@ -42,12 +42,12 @@ function usage
{
synopsis_short
cat <<-EOF
Run doxygen to generate all errors; report error counts
by module and file.
-i Skip the build, try print-introspected-doxygen anyway.
-s Skip doxygen run; use existing <log-file>.
-w Skip doxygen run; use existing warnings log doc/$WARNINGSLOGFILE
-l Skip doxygen run; use the normal doxygen log doc/$STANDARDLOGFILE
Expand All @@ -61,7 +61,7 @@ function usage
-v Show detailed output from each step.
-h Print this usage message
The default behavior is to modify doxygen.conf temporarily to
report all undocumented elements, and to reduce the run time.
The output of this special run is kept in doc/$WARNINGSLOGFILE.
Expand All @@ -73,13 +73,13 @@ function usage
The first two use a specified or the standard log file;
the -s option uses the warnings log from a prior run.
Only the first of -f <log-file>, -s, or -l will have effect.
The -e and -t options exclude examples and test directories
from the counts. The -m option only includes a specific module.
The -F option only includes files (or warnings) matching the <regex>.
The -m and -F options append the relevant warnings after the
numerical report. These can be used in any combination.
EOF
exit 0
}
Expand Down Expand Up @@ -129,7 +129,7 @@ function status_report
fi
fi
}


# Argument processing ------------------
#
Expand All @@ -140,36 +140,42 @@ logfile_arg=
# -l
use_standard=0
# skip doxygen run; using existing log file
skip_doxy=0
# skip print-introspected-doxygen, avoiding a build
skip_intro=0
skip_doxy=0
# skip print-introspected-doxygen, avoiding a build
skip_intro=0

# Filtering flags
filter_blacklist=1
filter_examples=0
filter_test=0
explicit_m_option=0
filter_module=""
explicit_f_option=0
filter_in=""
filter_out=""

while getopts :bef:F:hilm:s:tvw option ; do

case $option in
(b) filter_blacklist=0 ;;

(e) filter_examples=1 ;;

(f) filter_in="$OPTARG" ;;
(f) filter_in="$OPTARG"
explicit_f_option=1
;;

(F) filter_out="$OPTARG" ;;

(h) usage ;;

(i) skip_intro=1 ;;

(l) use_standard=1 ;;

(m) filter_module="$OPTARG" ;;
(m) filter_module="$OPTARG"
explicit_m_option=1
;;

(s) use_filearg=1
logfile_arg="$OPTARG"
Expand All @@ -184,11 +190,11 @@ while getopts :bef:F:hilm:s:tvw option ; do
(w) use_filearg=1
logfile_arg="$DIR/$WARNINGSLOGFILE"
;;

(:) echo "$me: Missing argument to -$OPTARG" ; synopsis ;;

(\?) echo "$me: Invalid option: -$OPTARG" ; synopsis ;;

esac
done

Expand All @@ -202,7 +208,7 @@ function checklogfile
synopsis
fi
}

# Log file -----------------------------
#

Expand All @@ -225,6 +231,10 @@ function REappend
eval "${param}=\"${!param:-}${!param:+\\|}$token\""
}

# Explicit -f or -m with empty args should filter out all, not pass all
[[ $explicit_f_option -eq 1 && "${filter_in:-}" == "" ]] && filter_out=".*"
[[ $explicit_m_option -eq 1 && "${filter_module:-}" == "" ]] && filter_out=".*"

# Filter in regular expression for -m and -f
filter_inRE=""
[[ "$filter_module" != "" ]] && REappend filter_inRE src/$filter_module
Expand All @@ -244,7 +254,7 @@ REappend filter_blacklistRE "ScheduleWithContext(uint32_t"
REappend filter_blacklistRE "Schedule\\(Now\\|Destroy\\)(\\(MEM\\|void\\)"

# ATTRIBUTE_HELPER_CPP( and _HEADER(
REappend filter_blacklistRE "ATTRIBUTE_HELPER_\\(CPP\\|HEADER\\)("
REappend filter_blacklistRE "ATTRIBUTE_HELPER_\\(CPP\\|HEADER\\)"

# Filter out regular expression for black list, -e, -t and -F
filter_outRE=""
Expand Down Expand Up @@ -304,7 +314,7 @@ else
conf=doc/doxygen.conf
cp $conf ${conf}.bak
cat <<-EOF >> $conf
# doxygen.warnings.report.sh:
EXTRACT_ALL = no
HAVE_DOT = no
Expand Down Expand Up @@ -333,12 +343,13 @@ EOF
fi

# Waf insists on writing cruft to stdout
sed -i -E '/^Waf:/d' doc/$intro_h
sed -i.bak -E '/^Waf:/d' doc/$intro_h
rm doc/$intro_h.bak

verbose -n "Rebuilding doxygen docs with full errors"
(cd "$ROOT" && ./waf --doxygen-no-build >&6 2>&6 )
status_report $? "./waf --doxygen-no-build"

# Swap back to original config
rm -f $conf
mv -f $conf.bak $conf
Expand Down Expand Up @@ -394,7 +405,7 @@ modcount=$( \
# Doxygen prints the additional parameters on separate lines,
# so they don't show up in the totals above.
# Rather than work too hard to get the exact number for each file,
# we just list the total here.
# we just list the total here.
addlparam=$( \
grep "^ parameter '" "$LOG" | \
wc -l | \
Expand Down Expand Up @@ -464,7 +475,7 @@ echo
echo
echo "Warnings by file (alphabetical)"
echo
echo "Count File"
echo "Count File"
echo "----- ----------------------------------"
echo "$undocfiles"
echo "----------------------------------------"
Expand All @@ -473,7 +484,7 @@ echo
echo
echo "Warnings by file (numerical)"
echo
echo "Count File"
echo "Count File"
echo "----- ----------------------------------"
echo "$undocsort"
echo "----------------------------------------"
Expand All @@ -486,12 +497,33 @@ printf "%6d directories\n" $modcount
printf "%6d files\n" $filecount
printf "%6d warnings\n" $warncount

# Return status based on warnings
exit_status=$((warncount > 0))

# if [ "${filter_inRE:-}" != "" ] ; then
# if [ "$filterin" != "" ] ; then
# echo
# echo
# echo "Filtered Warnings"
# echo "========================================"
# echo "$filterin"
# exit_status=1
# else
# exit_status=0
# fi
# fi

if [ "$filterin" != "" ] ; then
echo
echo
echo "Filtered Warnings"
echo "========================================"
echo "$filterin"
exit_status=1
else
exit_status=0
fi

status_report 0 $me

exit $exit_status
4 changes: 2 additions & 2 deletions doc/manual/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@
# built documents.
#
# The short X.Y version.
version = u'ns-3.33'
version = u'ns-3.35'
# The full version, including alpha/beta/rc tags.
release = u'ns-3.33'
release = u'ns-3.35'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
Loading

0 comments on commit 95eed3b

Please sign in to comment.