File tree Expand file tree Collapse file tree 3 files changed +3
-7
lines changed Expand file tree Collapse file tree 3 files changed +3
-7
lines changed Original file line number Diff line number Diff 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
7473void 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}
Original file line number Diff line number Diff 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
4443protected:
4544 simtime_t dataPktSendDelay;
Original file line number Diff line number Diff 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);
You can’t perform that action at this time.
0 commit comments