From a63106acb64a772636d57672147fff2ea125c715 Mon Sep 17 00:00:00 2001 From: n-jay Date: Sat, 20 Apr 2024 20:09:02 +0530 Subject: [PATCH] Revert "Add support for configuring wireless interfaces" This reverts commit ad80f49543c129b25da92bfee6b18b9a49c2a0d7. --- src/inet/routing/leach/Leach.cc | 8 +++----- src/inet/routing/leach/Leach.h | 1 - src/inet/routing/leach/Leach.ned | 1 - 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/inet/routing/leach/Leach.cc b/src/inet/routing/leach/Leach.cc index d7ce258b8fc..23282842b9b 100644 --- a/src/inet/routing/leach/Leach.cc +++ b/src/inet/routing/leach/Leach.cc @@ -41,7 +41,6 @@ void Leach::initialize(int stage) { clusterHeadRatio = par("clusterHeadRatio"); roundDurationVariance = par("roundDurationVariance"); - interfaces = par("interfaces"); roundDuration = dblrand(0) * roundDurationVariance; TDMADelayCounter = 1; @@ -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; } } } diff --git a/src/inet/routing/leach/Leach.h b/src/inet/routing/leach/Leach.h index 41dff367a2b..bb60b5f2d19 100644 --- a/src/inet/routing/leach/Leach.h +++ b/src/inet/routing/leach/Leach.h @@ -39,7 +39,6 @@ class INET_API Leach: public RoutingProtocolBase { cMessage *event = nullptr; int round = 0; ModuleRefByPar interfaceTable; - const char *interfaces = nullptr; protected: simtime_t dataPktSendDelay; diff --git a/src/inet/routing/leach/Leach.ned b/src/inet/routing/leach/Leach.ned index cddf3828c01..48aa9560897 100644 --- a/src/inet/routing/leach/Leach.ned +++ b/src/inet/routing/leach/Leach.ned @@ -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);