Inetmanet Error

189 views
Skip to first unread message

chandran AR

unread,
Sep 10, 2009, 1:03:25 AM9/10/09
to omnetpp
I just tried creating my own mobility n/w while doing so, i just
modified exiting file
into my own & put into the new folder -- which is created under src
folder...

When doing so , I just modified the
ChannelControl into IChannelControl & (corresponding files .cc, .h
files also.)
when i trying to execute the prj...
it prompts me an error,,,, saying that


. "error in module (ISnrEval80211) IMFNET.host[0].wlan.snrEval
(id=22) : Could not fine IChannelConrol Module. "


ISnrEval80211 this is actually SnrEval80211.... I am trying for along
time but I COuld not find the
problem...

PLease help me to solve this problem...


Rudolf Hornig

unread,
Sep 10, 2009, 4:33:23 AM9/10/09
to omn...@googlegroups.com
Are you sure the new file is included in the makefile (i.e. linked into the project)?
Open src/Makefile and check wheter your file can be found in the OBJS variable.

If not: re-run make makefiles from the root to regerate the file.
If it contains, then check your cc file if it contains the Define_Module macro with the correct (changed) calssname.

Reading a little further... This is a NED error. You have moved the file into a different directory (i.e. you have implicitly changed its package too.) Are you sure all package names and import fdeclarations are correct?

Rudolf

chandran AR

unread,
Sep 10, 2009, 5:43:12 AM9/10/09
to omn...@googlegroups.com
Th files are added correctly into the makefiles as follows.
 
OBJS = \
$O/aidemo/channels/IChannelAccess.o \
$O/aidemo/channels/IChannelAccessExtended.o \
$O/aidemo/channels/IChannelControl.o \
$O/aidemo/channels/IChannelControlExtended.o \
$O/aidemo/pingapp/IPingApp.o \
$O/aidemo/snreval/IBasicSnrEval.o \
$O/aidemo/snreval/ISnrEval.o \
$O/aidemo/snreval/ISnrEval80211.o \
 
2. Name contradiction is also not there and the files are and Under Define_Module(IChannelControl); is als correct..
 
3. then i have not moved any files , i just copied the  files  changed name into differet locations.
 
please specify where i might have done a mistake.....

Rudolf Hornig

unread,
Sep 10, 2009, 7:12:11 AM9/10/09
to omn...@googlegroups.com
On Thu, Sep 10, 2009 at 11:43 AM, chandran AR <chandr...@gmail.com> wrote:
Th files are added correctly into the makefiles as follows.
 
OBJS = \
$O/aidemo/channels/IChannelAccess.o \
$O/aidemo/channels/IChannelAccessExtended.o \
$O/aidemo/channels/IChannelControl.o \
$O/aidemo/channels/IChannelControlExtended.o \
$O/aidemo/pingapp/IPingApp.o \
$O/aidemo/snreval/IBasicSnrEval.o \
$O/aidemo/snreval/ISnrEval.o \
$O/aidemo/snreval/ISnrEval80211.o \
 
2. Name contradiction is also not there and the files are and Under Define_Module(IChannelControl); is als correct..
 
3. then i have not moved any files , i just copied the  files  changed name into differet locations.

Ok, not moved..I was suggesting that if you have copied NED files to a different directory then you have to modify the package definitions and also import statements. 

Please attach/paste ISnrEval80211.ned and IChannelConrol.ned. I'd love to see them.
Rudolf

chandran AR

unread,
Sep 10, 2009, 7:34:54 AM9/10/09
to omn...@googlegroups.com
 
 I pasted the files ... please refer..
 
 
   ISNREVAL

package

inet.aidemo.snreval;

//

//#

FIXME merge docu with IBasicSnrEval's

simple

ISnrEval

{

parameters:

double channelNumber = default(0); // channel identifier

bool debug = default(false); // debug switch

double transmitterPower @unit("mW");

double bitrate @unit("bps");

int headerLength @unit(b);

double thermalNoise @unit("dBm");

double pathLossAlpha;

double sensitivity @unit(mW);

@display(

"i=block/wrxtx");

gates:

input uppergateIn; // from higher layer protocol (MAC)

output uppergateOut; // to decider (decider connects to higher layer protocol, i.e. the MAC)

input radioIn; // to receive frames (AirFrame) on the radio channel

}

 
 
IChannelControl.ned
 
 
 
 

package

inet.aidemo.channels;

//

// ChannelControl has exactly one instance in every network model that

// contains mobile or wireless nodes. This module gets informed about the

// location and movement of nodes, and determines which nodes are within

// communication or interference distance. This info is then used by the

// radio interfaces of nodes at transmissions.

//

// Side effect: updates the containing compound module's display string

// according to the given playground size (sets

<tt>"p=0,0;b=$playgroundSizeX,

// $playgroundSizeY"

</tt>).

//

// This ChannelControl is a different implementation from the one in

// Mobility Framework 1.0a5: here we use sendDirect(), while the MF version

// used normal send() and dynamic connections.

//

//

@author Andras Varga (based on MF's ChannelControl by Steffen Sroka and Daniel Willkomm)

//

@see BasicMobility

//

simple

IChannelControl

{

parameters:

bool coreDebug = default(false); // debug switch for core framework

double playgroundSizeX = default(600); // x size of the playground (in meters)

double playgroundSizeY = default(400); // y size of the playground (in meters)

double pMax @unit("mW") = default(20mW); // maximum sending power used for this network (in mW)

double sat @unit("dBm") = default(-110dBm); // signal attenuation threshold (in dBm)

double alpha = default(2); // path loss coefficient

double carrierFrequency @unit("Hz") = default(2.4GHz); // carrier frequency of the channel (in Hz)

int numChannels = default(1); // number of radio channels (frequencies)

@display(

"i=misc/sun");

}

 

 

Rudolf Hornig

unread,
Sep 10, 2009, 8:01:15 AM9/10/09
to omn...@googlegroups.com
The ISnrEval80211.ned file please (where the problem is reported), not the ISnrEval.ned
Rudolf

chandran AR

unread,
Sep 10, 2009, 8:13:01 AM9/10/09
to omn...@googlegroups.com
Sorry please .....
 
ISnrEval80211.ned file is
 
 

package

inet.aidemo.snreval;

//

// This component has been taken over from Mobility Framework 1.0a5.

//

simple

ISnrEval80211

{

parameters:

int channelNumber; // channel identifier

bool debug = default(false); // debug switch

double transmitterPower @unit("mW");

double bitrate @unit("bps");

int headerLength @unit(b);

double carrierFrequency @unit("Hz");

double thermalNoise @unit("dBm");

double pathLossAlpha;

double sensitivity @unit("dBm");

@display(

"i=block/wrxtx");

gates:

input uppergateIn;

output uppergateOut;

input radioIn; // to receive AirFrames

}

Rudolf Hornig

unread,
Sep 11, 2009, 8:57:51 AM9/11/09
to OMNeT++ Discussion List
Hi, I have taken a look at your project. About the your current issue:

- You have done the renaming/namereplace a little bit too eagerly. You have changed also the following lines:
IChannelControl.cc:
    IChannelControl *cc = dynamic_cast<IChannelControl *>(simulation.getModuleByPath("channelcontrol"));
    if (!cc)
        cc = dynamic_cast<IChannelControl *>(simulation.getModuleByPath("channelcontrol"));


IChannelCOntrolExtended.cc:
cc = dynamic_cast<IChannelControl *>(simulation.getModuleByPath("channelcontrolextended"));
    if (!cc)
       cc = dynamic_cast<IChannelControl *>(simulation.getModuleByPath("channelcontrolextended"));

The bold stuff is the name of the channel controller object at the top level and not its type... It should not be replaced...

This will fix your current issue BUT:
As soon as you fix it, you will face an other one:
The mobility moules are also expecting a channel controller at top level, but they are hardcoded to expect a type of ChannelController. Your module now contains an IChannelController, so they will not find it and you will get another
error about a missing channelCotroller node... So you have to rename/copy the whole mobility stuff too...

In general, I don't know why do you do this copy/rename stuff, but this is a bad idea. To make everything work slowly you will rename each module step by step (because of the dependencies) and will get a second independent copy of all the code inside the src folder which is a waste of time and effort...

If you want to do minor tweak for your research you can do it directly in the original classes. If you want to add new functionality, then duplicating the already exisitng code is not the way to go. In this case fork the inetmanet project on github and do the development in your own repo...

Rudolf

On Fri, Sep 11, 2009 at 11:50 AM, chandran AR <chandr...@gmail.com> wrote:
Thanks for your reply.
 
I missed to attach the file INic80211 as  created under the  same existing Folder Structure : inet.linklayer.mf80211.
Now i am attaching that file too. please

 
On Fri, Sep 11, 2009 at 2:28 PM, Rudolf Hornig <rudolf...@gmail.com> wrote:
Checked the project and failed:

In IMFMobileHost.ned i found:

import inet.linklayer.mf80211.INic80211

In INET-FW there is no such file in src/linklayer/mf80211

Are you sure you have copied all modified files into the aidemo directory that was sent to me?
Rudolf




On Thu, Sep 10, 2009 at 2:43 PM, chandran AR <chandr...@gmail.com> wrote:
 
I have attached the  files.....
Created aidemo under src folder and  IMobilityFrame under examples -> adhoc -> folder.
 
 


 
On Thu, Sep 10, 2009 at 5:54 PM, Rudolf Hornig <rudolf...@gmail.com> wrote:
Hi, I went off list not to pollute the mailing list too much.
I cannot see anything from the files. If you zip your directory (src/aidemo) and send it, I will try to take a look at it.

Right now, I have no idea what the problem is.

chandran AR

unread,
Sep 11, 2009, 9:11:44 AM9/11/09
to omn...@googlegroups.com

Hi  Rudolf Hornig ,
 
                          Thank you so much for your Suggestion ,effort and reply. I will try modifying the existing code.

Shaikha Al-Khuder

unread,
Jan 3, 2016, 12:20:13 AM1/3/16
to OMNeT++ Users
"Could not find ChannelControl module with name 'channelControl' in the top-level network"

when using :**.wlan[*].typename = "Ieee80211Nic"


How to fix?

Alfonso Ariza Quintana

unread,
Jan 4, 2016, 2:21:02 PM1/4/16
to omn...@googlegroups.com
Have you check that exist the module cannelControl in your model?


Date: Sat, 2 Jan 2016 21:20:13 -0800
From: cpe....@gmail.com
To: omn...@googlegroups.com
Subject: Re: [Omnetpp-l] Inetmanet Error
--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/omnetpp.
For more options, visit https://groups.google.com/d/optout.

Shaikha Al-Khuder

unread,
Jan 4, 2016, 2:56:18 PM1/4/16
to omn...@googlegroups.com
Yes it is there in all my ned classes:


CopsAODV.ned:

package cops.AODV;
package inet.nodes.aodv;
package inet.examples.aodv;

import inet.nodes.aodv.AODVRouter;
import cops.AODV.MalAODVRouter;
import inet.base.LifecycleController;
import inet.networklayer.autorouting.ipv4.IPv4NetworkConfigurator;
import inet.networklayer.ipv4.RoutingTableRecorder;
import inet.nodes.aodv.AODVRouter;
import inet.world.radio.IdealChannelModel;
import inet.world.radio.ChannelControl;
import inet.world.scenario.ScenarioManager;
import inet.nodes.inet.AdhocHost;
import inet.networklayer.routing.aodv.AODVRouting;
import inet.battery.models.InetSimpleBattery;


network COPSaodv
{
    parameters:
        int numHosts;
        @display("bgb=1033,795;bgl=2");
    submodules:
        channelControl: IdealChannelModel {
            parameters:
                @display("p=979,40");
        }
        configurator: IPv4NetworkConfigurator {
            parameters:
                config = xml("<config><interface hosts='*' address='139.141.x.x' netmask='255.255.0.0'/></config>");
                @display("p=979,112");
        }
        routingTableRecorder: RoutingTableRecorder {
            parameters:
                @display("p=979,190");
        }
        lifecycleController: LifecycleController {
            parameters:
                @display("p=979,266");
        }
        scenarioManager: ScenarioManager {
            parameters:
                script = default(xml("<scenario/>"));
                @display("p=979,346");
        }
        host[numHosts]: AODVRouter {
            parameters:
                @display("i=misc/node,cyan");

        }

       

    connections allowunconnected:
}
———————————————————————————————


AODVRouter.ned:

//
// Copyright (C) 2014 OpenSim Ltd.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program.  If not, see http://www.gnu.org/licenses/.
//

package inet.nodes.aodv;

import inet.networklayer.routing.aodv.AODVRouting;
import inet.nodes.inet.WirelessHost;
import inet.battery.models.InetSimpleBattery;
package inet.nodes.inet;
import inet.world.radio.ChannelControl;
import inet.world.radio.IdealChannelModel;


import inet.base.NotificationBoard;
import inet.battery.IBattery;
import inet.linklayer.IExternalNic;
import inet.linklayer.IWiredNic;
import inet.linklayer.IWirelessNic;
import inet.linklayer.loopback.LoopbackInterface;
import inet.mobility.contract.IMobility;
import inet.networklayer.common.InterfaceTable;
import inet.networklayer.ipv4.RoutingTable;
import inet.status.NodeStatus;
import inet.util.PcapRecorder;


//
// It models a ~WirelessHost extended with ~AODVRouting submodule.
//
// AODV is an on-demand MANET routing protocol. Each node
// works similar to a 'router': they manage their own routing
// tables, send request for routes and consult the IP layer via
// Netfilter hooks for data forwarding.
//
// Scenerios where AODV routing is desired use this module as a
// host module.
//
// For more info about AODVRouting, see the corresponding module:
// ~AODVRouting and its C++ implementation with the same name.
//
// The AODV v.2 (known as DYMO) is also implemented: ~xDYMO,
// ~DYMORouter.
//
module AODVRouter extends WirelessHost
{
    parameters:
        @display("i=device/cellphone;bgl=2");
        IPForward = true;
        wlan[*].mgmtType = default("Ieee80211MgmtAdhoc");
        @node;
        @labels(node,ethernet-node,wireless-node);

        

       

        

    submodules:
        aodv: AODVRouting {
            @display("p=558,307");
        }

        inetSimpleBattery: InetSimpleBattery {
            @display("p=628,227");
        }

        

           channelControl: IdealChannelModel {
            parameters:
                @display("p=979,40");
        }

     

        

     

    connections:
        aodv.ipOut --> networkLayer.transportIn++;
        aodv.ipIn <-- networkLayer.transportOut++;
}

—————————————————————————

You received this message because you are subscribed to a topic in the Google Groups "OMNeT++ Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/omnetpp/rHJE-9-n-rM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to omnetpp+u...@googlegroups.com.

Alfonso Ariza Quintana

unread,
Jan 4, 2016, 3:12:50 PM1/4/16
to omn...@googlegroups.com
I can't find the problem, the module channelControl is defined.
The usual problem is that the capital letter, the name must be exactly channelControl.


Subject: Re: [Omnetpp-l] Inetmanet Error
Date: Mon, 4 Jan 2016 22:55:58 +0300
To: omn...@googlegroups.com

Shaikha Al-Khuder

unread,
Jan 4, 2016, 3:15:21 PM1/4/16
to omn...@googlegroups.com
When I write as you wrote it I get this error:

imported NED type not found: ‘inet.world.radio.channelControl'

Alfonso Ariza Quintana

unread,
Jan 5, 2016, 1:13:37 PM1/5/16
to omn...@googlegroups.com
The module is ChannelControl or, in your case IdealChannelModel, but the name of the module in the network must be channelControl


From: cpe....@gmail.com
Subject: Re: [Omnetpp-l] Inetmanet Error
Date: Mon, 4 Jan 2016 23:15:11 +0300
To: omn...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages