Skip to content

Commit

Permalink
Merge tag 'ns-3.40' into unison
Browse files Browse the repository at this point in the history
ns-3.40 release
  • Loading branch information
F5Soft committed Nov 20, 2023
2 parents 5241eb7 + 4fdc985 commit b3f09bc
Show file tree
Hide file tree
Showing 1,037 changed files with 20,817 additions and 11,792 deletions.
4 changes: 4 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ Checks: >
modernize-make-shared,
modernize-make-unique,
modernize-redundant-void-arg,
modernize-type-traits,
modernize-use-auto,
modernize-use-bool-literals,
modernize-use-emplace,
modernize-use-equals-delete,
modernize-use-nullptr,
modernize-use-override,
modernize-use-transparent-functors,
performance-faster-string-find,
performance-for-range-copy,
performance-implicit-conversion-in-loop,
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ cmake-build-debug/
cmake-build-relwithdebinfo/
cmake-build-minsizerel/
cmake-build-release/
vcpkg/

.vs/

Expand Down
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ Sandra Lagen (sandra.lagen@cttc.es)
Emmanuelle Laprise (emmmanuelle.laprise@bluekazoo.ca)
Harsh Lara (harshapplefan@gmail.com)
Mattia Lecci (mattia.lecci@gmail.com)
Ben Lee (limjcst@163.com)
Robin Lee (xinyashuai1987@163.com)
Juan Leon (juanvleonr@gmail.com)
Kristijan Lenković (k.lenkovic@me.com)
Expand Down
30 changes: 30 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,36 @@ Note that users who upgrade the simulator across versions, or who work directly

This file is a best-effort approach to solving this issue; we will do our best but can guarantee that there will be things that fall through the cracks, unfortunately. If you, as a user, can suggest improvements to this file based on your experience, please contribute a patch or drop us a note on ns-developers mailing list.

Changes from ns-3.39 to ns-3.40
-------------------------------

### New API

* (energy) Added `GenericBatteryModel` to the energy module with working examples, and support for battery presets and cell packs.
* (lr-wpan) Added the functions to set or get the capability field via bitmap (a 8 bit int).
* (lr-wpan) Added the possibility to obtain the LQI from a received `MlmeAssociateIndicationParams`.
* (wifi) Added new helper methods to SpectrumWifiPhyHelper to allow flexible configuration for the mapping between spectrum PHY interfaces and PHY instances.
* (wifi) Added new trace sources to `WifiPhy`: **OperatingChannelChange**, which is fired when the operating channel of a PHY is changed.
* (wifi) The attribute `WifiPhy::Antennas` is extended to support up to 8 antennas.

### Changes to existing API

* (core) Removed private class `EmpiricalRandomVariable::ValueCDF` in favor of `std::map`.
* (lr-wpan) Removed unnecessary bcst filter from `LrWpanMac::PdDataIndication` which also blocked the correct reception of beacon request commands.
* (wifi) The attribute `WifiPhy::Antennas` is extended to support up to 8 antennas.
* (wifi) `StaWifiMac::MacState` enum is now public, and `WifiMacHeader` can be subclassed

### Changes to build system

* Added support for Vcpkg and CPM package managers

### Changed behavior

* (core) `EmpiricalRandomVariable` CDF pairs can now be added in any order.
* (core) `EmpiricalRandomVariable` no longer requires that a CDF pair with a range value exactly equal to 1.0 be added (see issue #922).
* (wifi) Upon ML setup, a non-AP MLD updates the IDs of the setup links to match the IDs used by the AP MLD.
* (wifi) Attribute **TrackSignalsFromInactiveInterfaces** in SpectrumWifiPhy has been defaulted to be enabled.

Changes from ns-3.38 to ns-3.39
-------------------------------

Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ option(NS3_NETANIM "Build netanim" OFF)
# other options
option(NS3_ENABLE_BUILD_VERSION "Embed version info into libraries" OFF)
option(NS3_CCACHE "Use Ccache to speed up recompilation" ON)
option(NS3_CPM "Enable the CPM C++ library manager support" OFF)
option(NS3_FAST_LINKERS "Use Mold or LLD to speed up linking if available" ON)
option(NS3_FETCH_OPTIONAL_COMPONENTS
"Fetch Brite, Click and Openflow dependencies" OFF
Expand Down Expand Up @@ -83,6 +84,7 @@ option(NS3_EIGEN "Build with Eigen support" ON)
option(NS3_STATIC "Build a static ns-3 library and link it against executables"
OFF
)
option(NS3_VCPKG "Enable the Vcpkg C++ library manager support" OFF)
option(NS3_VERBOSE "Print additional build system messages" OFF)
option(NS3_VISUALIZER "Build visualizer module" ON)
option(NS3_WARNINGS "Enable compiler warnings" ON)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,4 +238,4 @@ Below are some links that may also be helpful to you:
- [ns-3 Tutorial](https://www.nsnam.org/docs/tutorial/html/index.html)
- [ns-3 Model Library](https://www.nsnam.org/docs/models/html/index.html)
- [ns-3 Manual](https://www.nsnam.org/docs/manual/html/index.html)
- [ns-3 Manual](https://www.nsnam.org/docs/manual/html/index.html)
49 changes: 49 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,55 @@ a [GitLab.com issue tracker](https://gitlab.com/nsnam/ns-3-dev/-/issues) number,
and references prefixed by '!' refer to a
[GitLab.com merge request](https://gitlab.com/nsnam/ns-3-dev/-/merge_requests) number.

Release 3.40
------------

### Availability

This release is available from:
<https://www.nsnam.org/release/ns-allinone-3.40.tar.bz2>

### Supported platforms

This release is intended to work on systems with the following minimal
requirements (Note: not all ns-3 features are available on all systems):

- g++-9 or later, or LLVM/clang++-10 or later
- Python 3.6 or later
- CMake 3.10 or later
- (macOS only) Xcode 11 or later
- (Windows only) Msys2/MinGW64 toolchain or WSL2

Python API requires [Cppyy](https://cppyy.readthedocs.io/en/latest/installation.html) and works for Linux only. Specifically, avoid Cppyy version 3; stay with version 2.4.2 for this release.

### New user-visible features

- (core) !1586 - `EmpiricalRandomVariable` CDF pairs can now be added in any order.
- (energy) !1329 - Extensions to battery discharge module
- (lr-wpan) !1604 - Add CapabilityField bitmap functions
- (lr-wpan) !1645 - Add LQI to MlmeAssociateIndicationParams
- (wifi) Added support for 802.11be TID-to-Link Mapping
- (wifi) Added a new trace source to WifiPhy to indicate operating channel change
- (wifi) Improved support for multiple spectrum PHY interfaces
- (wifi) Added initial support for MU-MIMO (ideal PHY layer only)

### Bugs fixed

- (antenna) #889 - Improve `WrapTo*` functions
- (core) #922 - `EmpiricalRandomVariable` no longer requires that a CDF pair with a range value exactly equal to 1.0 be added.
- (core) #949 - Fix bound callbacks arguments type detection
- (internet) #956 - Avoid sending RS when link goes down
- (lr-wpan) !1591 - Removed unnecessary Bcst filter from MAC
- (lr-wpan) #944 - Fix for-loop in PrintTxQueue(s) functions
- (lr-wpan) - Fix incorrect return parameter in the MAC MlmeAssociateConfirm
- (mobility) #943 - Fix node direction change when node is in a corner
- (wifi) - Reset MU PPDU UID to prevent STA from receiving the TB PPDU sent by another STA
- (wifi) - Fix max value for UL MCS field of User Info fields (depends on TF variant)
- (wifi) - Update TXOP bandwidth upon every transmission
- (wifi) - Fix flush operation on WifiMacQueues
- (wifi) #942 - Trace expired MPDUs before removing them from the queue to avoid blocking the recipient buffer
- (wifi) - Fix wrong condition preventing PHY from aborting RX when starting TX

Release 3.39
------------

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.39
3.40
5 changes: 4 additions & 1 deletion build-support/custom-modules/ns3-cmake-package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function(build_required_and_libs_lists module_name visibility libraries
)
set(lib_real_name "-l${lib_real_name}")
else()
if(IS_ABSOLUTE ${lib})
if((IS_ABSOLUTE "${lib}") OR ("${lib}" MATCHES "^-l"))
set(lib_real_name ${lib})
else()
set(lib_real_name "-l${lib}")
Expand Down Expand Up @@ -88,6 +88,9 @@ function(pkgconfig_module libname)
string(REPLACE ";-I" " -I" pkgconfig_interface_include_directories
"${pkgconfig_interface_include_directories}"
)
string(REPLACE ";" "" pkgconfig_interface_include_directories
"${pkgconfig_interface_include_directories}"
)
endif()

# Configure pkgconfig file for the module using pkgconfig variables
Expand Down
60 changes: 34 additions & 26 deletions build-support/custom-modules/ns3-configtable.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,20 @@

# Now the CMake part

set(ON ON)
macro(check_on_or_off user_config_switch confirmation_flag)
if(${user_config_switch})
if(${confirmation_flag})
# Argument parsing
if(${${user_config_switch}})
if(${${confirmation_flag}})
string(APPEND out "${Green}ON${ColourReset}\n")
else()
string(APPEND out "${Red}OFF (missing dependency)${ColourReset}\n")
if(${confirmation_flag}_REASON)
string(APPEND out
"${Red}OFF (${${confirmation_flag}_REASON})${ColourReset}\n"
)
else()
string(APPEND out "${Red}OFF (missing dependency)${ColourReset}\n")
endif()
endif()
else()
string(APPEND out "OFF (not requested)\n")
Expand Down Expand Up @@ -120,76 +128,76 @@ macro(write_configtable)
)

string(APPEND out "Build with runtime asserts : ")
check_on_or_off("${NS3_ASSERT}" "${NS3_ASSERT}")
check_on_or_off("NS3_ASSERT" "NS3_ASSERT")

string(APPEND out "Build with runtime logging : ")
check_on_or_off("${NS3_LOG}" "${NS3_LOG}")
check_on_or_off("NS3_LOG" "NS3_LOG")

string(APPEND out "Build version embedding : ")
check_on_or_off("${NS3_ENABLE_BUILD_VERSION}" "${ENABLE_BUILD_VERSION}")
check_on_or_off("NS3_ENABLE_BUILD_VERSION" "ENABLE_BUILD_VERSION")

string(APPEND out "BRITE Integration : ")
check_on_or_off("ON" "${NS3_BRITE}")
check_on_or_off("ON" "NS3_BRITE")

string(APPEND out "DES Metrics event collection : ")
check_on_or_off("${NS3_DES_METRICS}" "${NS3_DES_METRICS}")
check_on_or_off("NS3_DES_METRICS" "NS3_DES_METRICS")

string(APPEND out "DPDK NetDevice : ")
check_on_or_off("${NS3_DPDK}" "${ENABLE_DPDKDEVNET}")
check_on_or_off("NS3_DPDK" "ENABLE_DPDKDEVNET")

string(APPEND out "Emulation FdNetDevice : ")
check_on_or_off("${ENABLE_EMU}" "${ENABLE_EMUNETDEV}")
check_on_or_off("ENABLE_EMU" "ENABLE_EMUNETDEV")

string(APPEND out "Examples : ")
check_on_or_off("${ENABLE_EXAMPLES}" "${ENABLE_EXAMPLES}")
check_on_or_off("ENABLE_EXAMPLES" "ENABLE_EXAMPLES")

string(APPEND out "File descriptor NetDevice : ")
check_on_or_off("ON" "${ENABLE_FDNETDEV}")
check_on_or_off("ON" "ENABLE_FDNETDEV")

string(APPEND out "GNU Scientific Library (GSL) : ")
check_on_or_off("${NS3_GSL}" "${GSL_FOUND}")
check_on_or_off("NS3_GSL" "GSL_FOUND")

string(APPEND out "GtkConfigStore : ")
check_on_or_off("${NS3_GTK3}" "${GTK3_FOUND}")
check_on_or_off("NS3_GTK3" "GTK3_FOUND")

string(APPEND out "LibXml2 support : ")
check_on_or_off("ON" "${LIBXML2_FOUND}")
check_on_or_off("ON" "LIBXML2_FOUND")

string(APPEND out "MPI Support : ")
check_on_or_off("${NS3_MPI}" "${MPI_FOUND}")
check_on_or_off("NS3_MPI" "MPI_FOUND")

string(APPEND out "Multithreaded Simulation : ")
check_on_or_off("${NS3_MTP}" "ON")

string(APPEND out "ns-3 Click Integration : ")
check_on_or_off("ON" "${NS3_CLICK}")
check_on_or_off("ON" "NS3_CLICK")

string(APPEND out "ns-3 OpenFlow Integration : ")
check_on_or_off("ON" "${NS3_OPENFLOW}")
check_on_or_off("ON" "NS3_OPENFLOW")

string(APPEND out "Netmap emulation FdNetDevice : ")
check_on_or_off("${ENABLE_EMU}" "${ENABLE_NETMAP_EMU}")
check_on_or_off("ENABLE_EMU" "ENABLE_NETMAP_EMU")

string(APPEND out "PyViz visualizer : ")
check_on_or_off("${NS3_VISUALIZER}" "${ENABLE_VISUALIZER}")
check_on_or_off("NS3_VISUALIZER" "ENABLE_VISUALIZER")

string(APPEND out "Python Bindings : ")
check_on_or_off("${NS3_PYTHON_BINDINGS}" "${ENABLE_PYTHON_BINDINGS}")
check_on_or_off("NS3_PYTHON_BINDINGS" "ENABLE_PYTHON_BINDINGS")

string(APPEND out "SQLite support : ")
check_on_or_off("${NS3_SQLITE}" "${ENABLE_SQLITE}")
check_on_or_off("NS3_SQLITE" "ENABLE_SQLITE")

string(APPEND out "Eigen3 support : ")
check_on_or_off("${NS3_EIGEN}" "${ENABLE_EIGEN}")
check_on_or_off("NS3_EIGEN" "ENABLE_EIGEN")

string(APPEND out "Tap Bridge : ")
check_on_or_off("${ENABLE_TAP}" "${ENABLE_TAP}")
check_on_or_off("ENABLE_TAP" "ENABLE_TAP")

string(APPEND out "Tap FdNetDevice : ")
check_on_or_off("${ENABLE_TAP}" "${ENABLE_TAPNETDEV}")
check_on_or_off("ENABLE_TAP" "ENABLE_TAPNETDEV")

string(APPEND out "Tests : ")
check_on_or_off("${ENABLE_TESTS}" "${ENABLE_TESTS}")
check_on_or_off("ENABLE_TESTS" "ENABLE_TESTS")

# string(APPEND out "Use sudo to set suid bit : not enabled (option
# --enable-sudo not selected) string(APPEND out "XmlIo : enabled
Expand Down
37 changes: 37 additions & 0 deletions build-support/custom-modules/ns3-module-macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,29 @@ function(build_lib)
# include directories, allowing consumers of this module to include and link
# the 3rd-party code with no additional setup
get_target_includes(${lib${BLIB_LIBNAME}} exported_include_directories)

string(REPLACE "-I" "" exported_include_directories
"${exported_include_directories}"
)

# include directories prefixed in the source or binary directory need to be
# treated differently
set(new_exported_include_directories)
foreach(directory ${exported_include_directories})
string(FIND "${directory}" "${PROJECT_SOURCE_DIR}" is_prefixed_in_subdir)
if(${is_prefixed_in_subdir} GREATER_EQUAL 0)
string(SUBSTRING "${directory}" ${is_prefixed_in_subdir} -1
directory_path
)
list(APPEND new_exported_include_directories
$<BUILD_INTERFACE:${directory_path}>
)
else()
list(APPEND new_exported_include_directories ${directory})
endif()
endforeach()
set(exported_include_directories ${new_exported_include_directories})

string(REPLACE "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/include" ""
exported_include_directories
"${exported_include_directories}"
Expand Down Expand Up @@ -235,6 +255,23 @@ function(build_lib)
INTERFACE ${exported_include_directories}
)

# Export definitions as interface definitions, propagating local definitions
# to other modules and scratches
get_target_property(
target_definitions ${lib${BLIB_LIBNAME}} COMPILE_DEFINITIONS
)
if(${target_definitions} STREQUAL "target_definitions-NOTFOUND")
set(target_definitions)
endif()
get_directory_property(dir_definitions COMPILE_DEFINITIONS)
set(exported_definitions "${target_definitions};${dir_definitions}")
list(REMOVE_DUPLICATES exported_definitions)
list(REMOVE_ITEM exported_definitions "")
set_target_properties(
${lib${BLIB_LIBNAME}} PROPERTIES INTERFACE_COMPILE_DEFINITIONS
"${exported_definitions}"
)

set(ns3-external-libs "${non_ns_libraries_to_link};${ns3-external-libs}"
CACHE INTERNAL
"list of non-ns libraries to link to NS3_STATIC and NS3_MONOLIB"
Expand Down
Loading

0 comments on commit b3f09bc

Please sign in to comment.