-
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 'congestion-framework' into addBasicCongestionPolicy
- Loading branch information
Showing
11 changed files
with
1,853 additions
and
1,784 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 |
---|---|---|
@@ -1 +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,30 +1,25 @@ | ||
#ifndef MODULO_CONGESTION_POLICY_H | ||
#define MODULO_CONGESTION_POLICY_H | ||
|
||
|
||
|
||
template <int MODULO> | ||
class ModuloCongestionPolicy | ||
{ | ||
|
||
private: | ||
int counter; | ||
int counter; | ||
|
||
public: | ||
|
||
bool isCongested(ns3::Queue<ns3::Packet>* queue) | ||
{ | ||
increment(); | ||
return counter; | ||
increment(); | ||
return counter; | ||
} | ||
|
||
|
||
void increment() | ||
{ | ||
counter = (counter + 1) % MODULO; | ||
counter = (counter + 1) % MODULO; | ||
} | ||
|
||
}; | ||
|
||
|
||
#endif |
Oops, something went wrong.