Skip to content

Commit

Permalink
Revert "Add support for configuring wireless interfaces"
Browse files Browse the repository at this point in the history
This reverts commit ad80f49.
  • Loading branch information
n-jay committed Apr 20, 2024
1 parent 8bfecec commit a63106a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
8 changes: 3 additions & 5 deletions src/inet/routing/leach/Leach.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ void Leach::initialize(int stage) {

clusterHeadRatio = par("clusterHeadRatio");
roundDurationVariance = par("roundDurationVariance");
interfaces = par("interfaces");

roundDuration = dblrand(0) * roundDurationVariance;
TDMADelayCounter = 1;
Expand Down Expand Up @@ -72,14 +71,13 @@ void Leach::stop() {
}

void Leach::configureInterfaces() {
cPatternMatcher interfaceMatcher(interfaces, false, true, false);
int numInterfaces = interfaceTable->getNumInterfaces();
for (int i = 0; i < numInterfaces; i++) {
NetworkInterface *networkInterface = interfaceTable->getInterface(i);
if (networkInterface->isMulticast()
&& interfaceMatcher.matches(
networkInterface->getInterfaceName())) {
// Only single wireless interface is required
if (networkInterface->isWireless()) {
wirelessInterface = networkInterface;
break;
}
}
}
Expand Down
1 change: 0 additions & 1 deletion src/inet/routing/leach/Leach.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class INET_API Leach: public RoutingProtocolBase {
cMessage *event = nullptr;
int round = 0;
ModuleRefByPar<IInterfaceTable> interfaceTable;
const char *interfaces = nullptr;

protected:
simtime_t dataPktSendDelay;
Expand Down
1 change: 0 additions & 1 deletion src/inet/routing/leach/Leach.ned
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ simple Leach like IManetRouting
string interfaceTableModule;

// LEACH parameter group
string interfaces = default("*"); // Only single wireless interface is required
volatile double startupDelay @unit(s) = default(uniform(0s, 1s));
double clusterHeadRatio @unit(ratio) = default(0.05ratio); // Determines ratio of cluster heads in network, which is used for threshold function
int roundDurationVariance = default(10);
Expand Down

0 comments on commit a63106a

Please sign in to comment.