Skip to content

Commit

Permalink
Update to ns-3.38 and minor memory leak fixes (#101)
Browse files Browse the repository at this point in the history
* lte-related changes

* non lte-related changes

* Update ns-3 to commit 9a2fd5d

* Update to ns-3.38 RC 1

* Improve readability of UpdateUeSinrEstimate

* Clear maps in the PHY classes object destructors

* Add author, changes and rel notes MD files

* Update to ns-3.38

* Add required internet-apps to enabled modules in the CI

* Reset PHY ptrs only when the simulation actually ends

* enforce new clang-format based code style

* add missing includes in lte test files

* add missing includes in lte/model
  • Loading branch information
pagmatt authored Mar 21, 2023
1 parent a402f10 commit 970552f
Show file tree
Hide file tree
Showing 3,191 changed files with 738,926 additions and 634,334 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
76 changes: 26 additions & 50 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,53 +1,29 @@
---
Language: Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: AllDefinitions
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterFunction: true
AfterNamespace: false
AfterStruct: true
IndentBraces: true
BeforeElse: true
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BasedOnStyle: Microsoft

AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AlwaysBreakAfterReturnType: TopLevelDefinitions
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
ColumnLimit: 100
ConstructorInitializerAllOnOneLineOrOnePerLine: true
Cpp11BracedListStyle: true
DerivePointerAlignment: false
IndentCaseLabels: false
IndentWidth: 2
NamespaceIndentation: None
PointerAlignment: Right
ReflowComments: false
SortIncludes: false
SpaceAfterCStyleCast: true
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: Always
SpaceInEmptyParentheses: false
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: 'Cpp11'
UseTab: Never
...
DeriveLineEnding: false
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^(<|")ns3/'
Priority: 2
SortPriority: 0
- Regex: "^<"
Priority: 3
SortPriority: 0
- Regex: ".*"
Priority: 1
SortPriority: 0
KeepEmptyLinesAtTheStartOfBlocks: false
PackConstructorInitializers: Never
PointerAlignment: Left
QualifierAlignment: Left
SeparateDefinitionBlocks: Always
Standard: "c++17"
50 changes: 50 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Checks: >
-*,
bugprone-argument-comment,
bugprone-bool-pointer-implicit-conversion,
bugprone-inaccurate-erase,
bugprone-move-forwarding-reference,
bugprone-redundant-branch-condition,
bugprone-string-constructor,
bugprone-string-integer-assignment,
bugprone-suspicious-memset-usage,
bugprone-suspicious-semicolon,
bugprone-suspicious-string-compare,
bugprone-terminating-continue,
bugprone-too-small-loop-variable,
bugprone-virtual-near-miss,
misc-redundant-expression,
misc-static-assert,
modernize-make-shared,
modernize-make-unique,
modernize-redundant-void-arg,
modernize-use-emplace,
modernize-use-equals-delete,
modernize-use-nullptr,
modernize-use-override,
performance-faster-string-find,
performance-for-range-copy,
performance-implicit-conversion-in-loop,
performance-inefficient-algorithm,
performance-inefficient-vector-operation,
performance-trivially-destructible,
readability-braces-around-statements,
readability-container-size-empty,
readability-duplicate-include,
readability-isolate-declaration,
readability-make-member-function-const,
readability-misleading-indentation,
readability-misplaced-array-index,
readability-redundant-control-flow,
readability-redundant-function-ptr-dereference,
readability-redundant-smartptr-get,
readability-redundant-string-cstr,
readability-simplify-subscript-expr,
readability-static-accessed-through-instance,
readability-static-definition-in-anonymous-namespace,
readability-string-compare,
readability-uppercase-literal-suffix,
FormatStyle: "file"
HeaderFilterRegex: ".*(ns|NS).*/(contrib|examples|src|scratch|utils)/*/.*h"
UseColor: true
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:

# Enable only the mmwave module to speedup the test
- name: build and run the tests
run: ./ns3 configure --enable-examples --enable-tests --enable-modules=mmwave && ./ns3 build && ./test.py
run: ./ns3 configure --enable-examples --enable-tests --enable-modules=mmwave,internet-apps && ./ns3 build && ./test.py
5 changes: 5 additions & 0 deletions .vscode/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*
!.gitignore

!launch.json
!tasks.json
113 changes: 113 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch from scratch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/${relativeFileDirname}/ns3-dev-${fileBasenameNoExtension}-${input:buildType}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"preLaunchTask": "Build",
"environment": [
{
"name": "LD_LIBRARY_PATH",
"value": "${workspaceFolder}/build/lib/"
}
],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "(lldb) Launch from scratch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/${relativeFileDirname}/ns3-dev-${fileBasenameNoExtension}-${input:buildType}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"preLaunchTask": "Build",
"environment": [
{
"name": "LD_LIBRARY_PATH",
"value": "${workspaceFolder}/build/lib/"
}
],
"externalConsole": false,
"MIMode": "lldb"
},
{
"name": "(gdb) Launch testrunner",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/utils/ns3-dev-test-runner-${input:buildType}",
"args": [
"--suite=${selectedText}"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"preLaunchTask": "Build",
"environment": [
{
"name": "LD_LIBRARY_PATH",
"value": "${workspaceFolder}/build/lib/"
}
],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "(lldb) Launch testrunner",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/utils/ns3-dev-test-runner-${input:buildType}",
"args": [
"--suite=${selectedText}"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"preLaunchTask": "Build",
"environment": [
{
"name": "LD_LIBRARY_PATH",
"value": "${workspaceFolder}/build/lib/"
}
],
"externalConsole": false,
"MIMode": "lldb"
}
],
"inputs": [
{
"type": "pickString",
"id": "buildType",
"description": "What is the build option?",
"options": [
"debug",
"default",
"optimized",
"release",
"minsizerel"
],
"default": "default"
}
]
}
25 changes: 25 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Build",
"type": "shell",
"command": "./ns3",
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Run tests",
"type": "shell",
"command": "./test.py",
"group": {
"kind": "test",
"isDefault": true
}
}
]
}
14 changes: 11 additions & 3 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ Ankit Deepak ([email protected])
Christophe Delahaye ([email protected])
Sébastien Deronne ([email protected])
Ameya Deshpande ([email protected])
Zhiheng Dong ([email protected])
Christoph Döpmann ([email protected])
Jordan Dorham ([email protected])
Craig Dowell ([email protected])
Matteo Drago ([email protected])
Gilaras Drakeson ([email protected])
Jared Dulmage ([email protected])
Mathias Ettinger ([email protected])
Expand Down Expand Up @@ -109,6 +111,7 @@ Frank Helbert ([email protected])
Tom Henderson ([email protected])
Christopher Hepner ([email protected])
Budiarto Herman ([email protected])
Heun ([email protected])
Tom Hewer ([email protected])
Kristian A. Hiorth ([email protected])
Hrishikesh Hiraskar ([email protected])
Expand Down Expand Up @@ -137,6 +140,7 @@ Ouassim Karrakchou ([email protected])
Tanmay Kathpalia ([email protected])
Konstantinos Katsaros ([email protected])
Bhaskar Kataria ([email protected])
Nils Kattenbeck ([email protected])
Morteza Kheirkhah ([email protected])
Jörg Christian Kirchhof ([email protected])
Ohad Klausner
Expand Down Expand Up @@ -187,6 +191,7 @@ Faker Moatamri ([email protected])
Edvin Močibob ([email protected])
Amir Modarresi ([email protected])
Akash Mondal ([email protected])
Lars Moons ([email protected])
Mike Moreton ([email protected])
Michele Muccio ([email protected])
Esteban Municio ([email protected])
Expand All @@ -205,15 +210,16 @@ Michael Nowatkowski ([email protected])
Anh Nguyen ([email protected])
Duy Nguyen ([email protected])
Alfonso Oliveira ([email protected])
Wouter Overmeire ([email protected])
Luis Pacheco ([email protected])
Matteo Pagin ([email protected])
Jendaipou Palmei ([email protected])
Lluís Parcerisa ([email protected])
Parth Pandya ([email protected])
Lluís Parcerisa ([email protected])
Mingyu Park ([email protected])
Jendaipou Palmei ([email protected])
Parth Pandya ([email protected])
Harsh Patel ([email protected])
Natale Patriciello ([email protected])
Pavinberg ([email protected])
Tommaso Pecorella ([email protected])
Guangyu Pei ([email protected])
Josh Pelkey ([email protected])
Expand Down Expand Up @@ -290,9 +296,11 @@ Rohit P. Tahiliani ([email protected])
Dave Taht ([email protected])
Marcos Talau ([email protected])
Adrian S. W. Tam ([email protected])
Bill Tao ([email protected])
Cristiano Tapparello ([email protected])
Hajime Tazaki ([email protected])
Wilson Thong ([email protected])
Lars Toenning ([email protected])
Omer Topal ([email protected])
Mauro Tortonesi ([email protected])
Quincy Tse ([email protected])
Expand Down
Loading

0 comments on commit 970552f

Please sign in to comment.