-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into congestion-framework
- Loading branch information
Showing
13 changed files
with
1,821 additions
and
1,729 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
BasedOnStyle: llvm | ||
IndentWidth: 4 | ||
UseTab: Never | ||
BreakBeforeBraces: Linux | ||
SortIncludes: false | ||
IndentCaseLabels: false | ||
AlwaysBreakTemplateDeclarations: true | ||
AllowShortFunctionsOnASingleLine: false | ||
AllowShortCaseLabelsOnASingleLine: true | ||
AllowShortIfStatementsOnASingleLine: true | ||
PointerAlignment: Left |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: clang-format Check | ||
on: [push, pull_request] | ||
jobs: | ||
formatting-check: | ||
name: Formatting Check | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
path: | ||
- 'src' | ||
- 'libs' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run clang-format style check for C/C++/Protobuf programs. | ||
uses: jidicula/[email protected] | ||
with: | ||
clang-format-version: '13' | ||
check-path: ${{ matrix.path }} | ||
fallback-style: 'Mozilla' # optional |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
#!/bin/bash | ||
echo "Simulating ns3 on file: $1" | ||
|
||
rm -rf traces/ | ||
mkdir traces | ||
cp user_src/* scratch/ | ||
|
||
export NS_LOG=FRRQueue=level_all | ||
|
||
./ns3 build | ||
./ns3 run "scratch/$1" > traces/output.log 2>&1 | ||
|
||
./ns3 build | ||
./ns3 run "scratch/$1" >traces/output.log 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
find . -regex '.*\.\(cpp\|hpp\|cc\|cxx\|h\)' -exec clang-format -style=file -i {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,25 @@ | ||
#ifndef MODULO_CONGESTION_POLICY_H | ||
#define MODULO_CONGESTION_POLICY_H | ||
|
||
|
||
|
||
template <int MODULO> | ||
class ModuloCongestionPolicy | ||
{ | ||
|
||
private: | ||
int counter; | ||
int counter; | ||
|
||
public: | ||
|
||
template <typename CONTAINER> | ||
bool isCongested(const CONTAINER& container) | ||
{ | ||
increment(); | ||
return counter; | ||
increment(); | ||
return counter; | ||
} | ||
|
||
|
||
void increment() | ||
{ | ||
counter = (counter + 1) % MODULO; | ||
counter = (counter + 1) % MODULO; | ||
} | ||
|
||
}; | ||
|
||
|
||
#endif |
Oops, something went wrong.