Skip to content

Commit a63106a

Browse files
committed
Revert "Add support for configuring wireless interfaces"
This reverts commit ad80f49.
1 parent 8bfecec commit a63106a

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

src/inet/routing/leach/Leach.cc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ void Leach::initialize(int stage) {
4141

4242
clusterHeadRatio = par("clusterHeadRatio");
4343
roundDurationVariance = par("roundDurationVariance");
44-
interfaces = par("interfaces");
4544

4645
roundDuration = dblrand(0) * roundDurationVariance;
4746
TDMADelayCounter = 1;
@@ -72,14 +71,13 @@ void Leach::stop() {
7271
}
7372

7473
void Leach::configureInterfaces() {
75-
cPatternMatcher interfaceMatcher(interfaces, false, true, false);
7674
int numInterfaces = interfaceTable->getNumInterfaces();
7775
for (int i = 0; i < numInterfaces; i++) {
7876
NetworkInterface *networkInterface = interfaceTable->getInterface(i);
79-
if (networkInterface->isMulticast()
80-
&& interfaceMatcher.matches(
81-
networkInterface->getInterfaceName())) {
77+
// Only single wireless interface is required
78+
if (networkInterface->isWireless()) {
8279
wirelessInterface = networkInterface;
80+
break;
8381
}
8482
}
8583
}

src/inet/routing/leach/Leach.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class INET_API Leach: public RoutingProtocolBase {
3939
cMessage *event = nullptr;
4040
int round = 0;
4141
ModuleRefByPar<IInterfaceTable> interfaceTable;
42-
const char *interfaces = nullptr;
4342

4443
protected:
4544
simtime_t dataPktSendDelay;

src/inet/routing/leach/Leach.ned

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ simple Leach like IManetRouting
2929
string interfaceTableModule;
3030

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

0 commit comments

Comments
 (0)